From f765c1dbbdccd5f703f2db7e7136f2de4a517a60 Mon Sep 17 00:00:00 2001 From: wangxiaowei <1121133807@qq.com> Date: Fri, 21 Jun 2024 16:09:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=88=86=E4=BA=AB=E6=8F=90?= =?UTF-8?q?=E4=BA=A4code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 8 ++++---- pages/index/index.vue | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/App.vue b/App.vue index e4bc92c..61f778e 100644 --- a/App.vue +++ b/App.vue @@ -49,20 +49,20 @@ this.wxShare() } }, - async bindCode(options) { + async bindCode(options, code) { if(!options.query) return let invite_code = options.query.invite_code || strToParams(decodeURIComponent(options.query.scene)) .invite_code if (invite_code) { - const wxCode = await getWxCode(); + uni.setStorageSync('invite_code', invite_code) const { data, code } = await bindSuperior({ - code: wxCode, + code: code || await getWxCode(), invite_code }) - + if (code == -1) { Cache.set(INVITE_CODE, invite_code) } diff --git a/pages/index/index.vue b/pages/index/index.vue index ab197ca..e9b2d9e 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -47,6 +47,7 @@ 分类 + @@ -67,6 +68,7 @@ +