feat: 增加保存图片的提示

This commit is contained in:
2025-10-06 17:29:21 +08:00
parent ce6ab31d8b
commit 3aa216d70f

View File

@@ -531,8 +531,13 @@ function Result() {
Taro.authorize({
scope: "scope.writePhotosAlbum",
success: async () => {
const url = await genCardImage();
Taro.saveImageToPhotosAlbum({ filePath: url });
try {
const url = await genCardImage();
Taro.saveImageToPhotosAlbum({ filePath: url });
Taro.showToast({ title: "保存成功" });
} catch (e) {
Taro.showToast({ title: "图片保存失败", icon: "none" });
}
},
fail: () => {
Taro.showModal({