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 @@ +