From 6587464abfced7e10ce3aaf0efae2d73cdb20cb5 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Sat, 5 Jul 2025 14:25:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E9=9A=90=E7=A7=81?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E7=9B=B4=E6=8E=A5=E8=B0=83=E7=94=A8=E5=B9=B6?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=99=BB=E5=BD=95=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除直接调用隐私弹窗的代码,改为调用handleAgreePrivacy方法 优化登录接口参数,添加shareId参数 --- pages/index/index.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 63cf20d..1bebb12 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -105,7 +105,7 @@ return; } - this.$refs.privacyPopup.open() + // this.$refs.privacyPopup.open() // uni.showLoading({ // title: '登录中...' // }); @@ -118,6 +118,8 @@ // url: '/pages/index/index' // }); // }, 1500); + + this.handleAgreePrivacy() }, handleCancel() { // 关闭当前页面回到首页 @@ -173,14 +175,20 @@ // 执行登录逻辑... let self = this + + let data = { + code: res.code + } + + if (uni.getStorageSync('shareId')) { + data.shareId = uni.getStorageSync('shareId') + } wx.login({ success(res) { // console.log(res.code,'code') if (res.code) { - self.$api('wxLogin', { - code: res.code - }, res => { + self.$api('wxLogin', data, res => { console.log(res, 'login') if (res.code == 200) { uni.hideLoading();