From fc9bd6378d3bfbde6d5c71535757a3d44de8d8ff Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期四, 20 七月 2023 15:18:06 +0800 Subject: [PATCH] Merge branch 'feature/1.1.4开发' into develop --- uniapp/pages/login/setInviteCode.vue | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/uniapp/pages/login/setInviteCode.vue b/uniapp/pages/login/setInviteCode.vue index 66e25db..efa0c41 100644 --- a/uniapp/pages/login/setInviteCode.vue +++ b/uniapp/pages/login/setInviteCode.vue @@ -168,6 +168,7 @@ }, 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