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"