From 110b6b66982f0c02a70a3291d54c1f19693138ee Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期六, 03 八月 2024 15:42:46 +0800 Subject: [PATCH] 1 --- pages/user/supplier-user.vue | 60 +++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 49 insertions(+), 11 deletions(-) diff --git a/pages/user/supplier-user.vue b/pages/user/supplier-user.vue index f6eb393..93c7b95 100644 --- a/pages/user/supplier-user.vue +++ b/pages/user/supplier-user.vue @@ -336,14 +336,51 @@ order_pendding_num: 0, }; - }, - // watch: { - // currentInfo(nv, ov) { - // if (!cacheUserId) { - - // } - // } - // }, + }, + // #ifndef PUB_CUSTOMER + onShareAppMessage() { + let that = this; + var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' + var url = + `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + return { + title: "花满芫", + path: url, + } + }, + onShareTimeline() { + let that = this; + var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' + var url = + `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + return { + title: "花满芫", + path: url, + } + }, + // #endif + // #ifdef PUB_CUSTOMER + onShareAppMessage() { + let that = this; + var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' + var url = + `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + return { + title: "花满芫", + path: url, + } + }, + onShareTimeline() { + let that = this; + var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' + var url = + `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + return { + title: "花满芫", + path: url, + } + }, + // #endif onShow() { this.getTj() }, @@ -392,7 +429,7 @@ console.log('条码内容:' + res.result); var dto = undefined try { - if (res.result && res.result.startsWith('http://') && res.result.indexOf( + if (res.result && (res.result.startsWith('https://')||res.result.startsWith('http://')) && res.result.indexOf( 'partnerUserId') >= 0) { var arr = res.result.split("?")[1].split("&") dto = {} @@ -402,7 +439,7 @@ dto[tarr[0]] = dto[tarr[1]] } } - dto['name'] = dto['partnerUserName'] || dto['partnerUserId'] || '佚名' + dto['name'] = dto['partnerUserName'] || '' dto['userId'] = dto['partnerUserId'] || '' } else { @@ -417,7 +454,8 @@ } else { that.$message.showToast('二维码格式不正确扫码失败') } - } catch (e) { + } catch (e) { + console.log('e',e) that.$message.showToast('二维码扫码错误') } }, -- Gitblit v1.9.3