From a5b825873529c9a8d6039c3638494019318221c3 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期三, 09 八月 2023 15:44:57 +0800 Subject: [PATCH] no message --- uniapp/pages/login/setInviteCode.vue | 28 +++++++++++++++++++++++++--- 1 files changed, 25 insertions(+), 3 deletions(-) diff --git a/uniapp/pages/login/setInviteCode.vue b/uniapp/pages/login/setInviteCode.vue index 0a64ae0..efa0c41 100644 --- a/uniapp/pages/login/setInviteCode.vue +++ b/uniapp/pages/login/setInviteCode.vue @@ -161,13 +161,14 @@ uni.switchTab({ url: '../index/index' }) - */} + }*/ }).catch(function (err) { console.log(err) }) }, setCode() { + console.log("纭畾"); var that=this; if(this.inviteCode) { @@ -177,11 +178,32 @@ console.log(e) if(e.code != 0) return that.$alert(e.msg) uni.setStorageSync('inviterInfo',e.data) - this.inviterShow = true + //this.inviterShow = true + this.setinvite(); }).catch(function (err) { }) } - } + }, + setinvite() { + var that = this; + let deviceInfo = uni.getDeviceInfo(); + console.log(deviceInfo.deviceId); + this.$u.api.bindInvitation({ + invite_code:this.inviteCode, + deviceid:deviceInfo.deviceId + }).then(e => { + if(e.code != 0) return that.$alert(e.msg) + uni.showToast({ + title:'缁戝畾鎴愬姛锛�', + icon:'none' + }) + setTimeout(function(){ + that.getuserInfo(); + },1000) + }).catch(function (err) { + }) + + }, } } </script> -- Gitblit v1.9.3