From 6107ca5c537a027e6f4d9717ebc5b96e0b9fa3ba Mon Sep 17 00:00:00 2001
From: jscyl13849007907 <13849007907@163.com>
Date: Sat, 22 Mar 2025 16:45:40 +0800
Subject: [PATCH 1/8] =?UTF-8?q?app=20=E5=9B=BE=E7=89=87=E4=B8=8B=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/service-modal/index.js | 38 ++++++++++++++++++++++++++++++++++++-
components/service-modal/index.wxml | 6 ++++++
project.config.json | 2 +-
3 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/components/service-modal/index.js b/components/service-modal/index.js
index 16a7442..8ff1144 100644
--- a/components/service-modal/index.js
+++ b/components/service-modal/index.js
@@ -38,6 +38,42 @@ Component({
this.setData({
showModal: false
})
- }
+ },
+ saveImage: function (e) {
+ console.log('saveImage', e.currentTarget.dataset.src);
+ const imageUrl = e.currentTarget.dataset.src;
+ // 给出确认弹窗
+ wx.downloadFile({
+ url: imageUrl,
+ success: res => {
+ if (res.statusCode === 200) {
+ wx.saveImageToPhotosAlbum({
+ filePath: res.tempFilePath,
+ success: () => {
+ wx.showToast({
+ title: '保存成功',
+ icon: 'success'
+ });
+ },
+ fail: err => {
+ console.error('保存失败', err);
+ wx.showToast({
+ title: '保存失败',
+ icon: 'none'
+ });
+ }
+ });
+ }
+ },
+ fail: err => {
+ console.error('下载失败', err);
+ wx.showToast({
+ title: '下载失败',
+ icon: 'none'
+ });
+ }
+ });
+ },
+
}
})
\ No newline at end of file
diff --git a/components/service-modal/index.wxml b/components/service-modal/index.wxml
index 87fb4dc..1a2cee2 100644
--- a/components/service-modal/index.wxml
+++ b/components/service-modal/index.wxml
@@ -16,7 +16,13 @@
加载中...
+
+
+
+
+
+
长按识别二维码
diff --git a/project.config.json b/project.config.json
index 577cad2..858bc26 100644
--- a/project.config.json
+++ b/project.config.json
@@ -44,7 +44,7 @@
"tabIndent": "insertSpaces",
"tabSize": 2
},
- "appid": "wxe431e0b3abd9ae0b",
+ "appid": "wxb0dea4d11428c6a5",
"packOptions": {
"ignore": [],
"include": []
From ee7e54fcdeeb8f4da7ce5f6a4929f9ff672e306d Mon Sep 17 00:00:00 2001
From: jscyl13849007907 <13849007907@163.com>
Date: Sat, 22 Mar 2025 16:47:41 +0800
Subject: [PATCH 2/8] =?UTF-8?q?=E7=99=BB=E5=BD=95=EF=BC=9A=E6=B3=A8?=
=?UTF-8?q?=E9=87=8Aapp=E5=BF=AB=E6=8D=B7=E7=99=BB=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/login/index.wxml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pages/login/index.wxml b/pages/login/index.wxml
index 2108b63..99e817a 100644
--- a/pages/login/index.wxml
+++ b/pages/login/index.wxml
@@ -64,9 +64,9 @@
-