From a3939675b71c041501284cf09a5deb08bcae44a7 Mon Sep 17 00:00:00 2001 From: wangxiaowei <1121133807@qq.com> Date: Thu, 20 Jun 2024 22:56:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E9=82=80=E8=AF=B7=E7=A0=81?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E8=BF=98=E8=A6=81=E5=B0=86?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1code=E4=BC=A0=E4=B8=8A=E5=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/App.vue b/App.vue index a698ab4..e4bc92c 100644 --- a/App.vue +++ b/App.vue @@ -6,6 +6,9 @@ import { getConfig } from '@/api/app' + import { + sendMsg + } from '@/api/shop' import { strToParams } from '@/utils/tools' @@ -14,6 +17,7 @@ } from '@/api/user' import {INVITE_CODE} from '@/config/cachekey' import Cache from '@/utils/cache' + import { getWxCode } from "@/utils/login"; export default { onLaunch: function(options) { //#ifdef MP-WEIXIN @@ -44,19 +48,21 @@ } this.wxShare() } - }, async bindCode(options) { 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(); const { data, code } = await bindSuperior({ - code: invite_code + code: wxCode, + invite_code }) + if (code == -1) { Cache.set(INVITE_CODE, invite_code) }