From 849b0ee66b6919844f61185a47885fc2c377550b Mon Sep 17 00:00:00 2001 From: shuxiaoquan <853623962@qq.com> Date: Fri, 10 May 2024 16:02:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=80=E8=AF=B7=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ext.json | 2 +- pages/invite/index.vue | 54 +++++++++++++++++++++++++----------------- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/ext.json b/ext.json index d1f4139..f2b22b7 100644 --- a/ext.json +++ b/ext.json @@ -1,6 +1,6 @@ { "extEnable": true, - "extAppid": "wxa3127ed5c3542a28", + "extAppid": "wx9f7e94fe11dc0c23", "ext": { "store_id": 10048 } diff --git a/pages/invite/index.vue b/pages/invite/index.vue index 697066e..717a3e3 100644 --- a/pages/invite/index.vue +++ b/pages/invite/index.vue @@ -71,9 +71,9 @@ - - - {{userInfo.user_id}} + + 取消 保存到相册 @@ -95,6 +95,7 @@ export default { data() { return { + qrcode1: "", qrcode: "", userInfo: {}, backgroundBg: { @@ -161,21 +162,24 @@ success: function(res) { // 在H5平台下,tempFilePath 为 base64 console.log(res.tempFilePath) - uni.saveImageToPhotosAlbum({ - filePath: res.tempFilePath, - success(data) { - that.$success('保存成功') - }, - fail(err) { - if (err.errMsg === - 'saveImageToPhotosAlbum:fail auth deny' - ) { - that.$toast( - '请允许访问相册后重试 (右上角菜单 - 设置 - 相册)', - 3000) - } - } - }) + that.qrcode1 = res.tempFilePath; + that.isPopup = true; + ctx.clearRect(0,0,702,1248); + // uni.saveImageToPhotosAlbum({ + // filePath: res.tempFilePath, + // success(data) { + // that.$success('保存成功') + // }, + // fail(err) { + // if (err.errMsg === + // 'saveImageToPhotosAlbum:fail auth deny' + // ) { + // that.$toast( + // '请允许访问相册后重试 (右上角菜单 - 设置 - 相册)', + // 3000) + // } + // } + // }) } }) @@ -230,8 +234,8 @@ } = await newFunApi.InviteUserPoster({}); if (status == 200) { console.log(data) - this.isPopup = true; - this.qrcode = data.imageUrl + this.qrcode = data.imageUrl; + this.createImge(); } }, download(type) { @@ -243,7 +247,8 @@ uni.showLoading({ title: '加载中' }) - this.createImge(); + app.onSaveImage(app.qrcode1) + // this.createImge(); } return; uni.showLoading({ @@ -331,7 +336,12 @@ url: "/pages/news/user/withdrawal?balance=" + this.userInfo.withdrawal_money }) } else if (index == 3) { - this.InviteUserPoster(); + if(!this.qrcode1){ + this.InviteUserPoster(); + }else{ + this.isPopup = true; + } + } else if (index == 4) { uni.navigateTo({ url: "/pages/invite/rule"