From 8c2937ba25b66b625ae86b98f142a47f947918d6 Mon Sep 17 00:00:00 2001 From: yanyan Date: Fri, 22 Mar 2024 09:53:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subpkg/complete/complete.vue | 41 ++++++++++-------------------------- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/subpkg/complete/complete.vue b/subpkg/complete/complete.vue index aaea4ce..fef499a 100644 --- a/subpkg/complete/complete.vue +++ b/subpkg/complete/complete.vue @@ -81,7 +81,7 @@ - + @@ -123,7 +123,8 @@ "showLoad": false, canvas: null, //canvas 对象 tempFilePath: "", - "imageQR": '' + "imageQR": '', + picStyle:"z-index:-99999" }; }, //分享到好友 @@ -219,7 +220,7 @@ guid: this.userId }) if (!res.success) return uni.$showMsg() - this.achieveMedalImg = uni.$http.baseUrl + res.data + this.achieveMedalImg = "http://146.56.223.227:9527/profile//2024/03/15/52ce69e2db8e362f225d3c00e10d6fdd.png" if (res.data == null || res.data == "") { this.showMedal = false this.showLayer = false @@ -264,6 +265,7 @@ const ctx = canvas.getContext("2d"); ctx.clearRect(0, 0, 500, 800) this.showLoad = false + this.picStyle ="z-index:-99999" }, saveImage() { uni.canvasToTempFilePath({ @@ -280,6 +282,7 @@ title: '保存成功', }) this.showLoad = false + this.picStyle ="z-index:-99999" const canvas = this.canvas; const ctx = canvas.getContext("2d"); ctx.clearRect(0, 0, 500, 800) @@ -326,6 +329,7 @@ image.src = '/static/images/share_bg.png' // 图片对象 const imageQR = canvas.createImage() + console.log(this.imageQR) imageQR.src = this.imageQR image.onload = () => { // 将图片绘制到 canvas 上 @@ -334,32 +338,10 @@ } }) this.showLoad = true + this.picStyle ="z-index:99999" this.showShare = false this.showLayer = false }, - saveImage() { - uni.canvasToTempFilePath({ - canvasId: 'photo', - destWidth: 286, - destHeight: 417, - canvas: this.canvas, - success: (res) => { - this.tempFilePath = res.tempFilePath - uni.saveImageToPhotosAlbum({ - filePath: res.tempFilePath, - success: (res) => { - wx.showToast({ - title: '保存成功', - }) - this.showLoad = false - const canvas = this.canvas; - const ctx = canvas.getContext("2d"); - ctx.clearRect(0, 0, 500, 800) - } - }) - } - }); - }, itemClickHandler(item) { if (item !== "") { this.ask = item.ask @@ -443,7 +425,7 @@ .title { display: inline-block; - margin-top: 1.0vh; + margin-top: 1.75vh; } } @@ -651,14 +633,13 @@ -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); z-index: 999; - pointer-events: none; } .btnbox { display: flex; justify-content: center; position: absolute; - bottom: 2%; + bottom: 10%; left: 10%; width: 80%; height: 90rpx; @@ -672,7 +653,7 @@ line-height: 90rpx; text-align: center; color: #fff; - font-size: 30rpx; + font-size: 28rpx; border-radius: 50rpx; background: #1367fe; border: 1px solid #1367fe;