|
@@ -149,17 +149,24 @@
|
|
},
|
|
},
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- console.log("执行了没有", this.invitationCode)
|
|
|
|
|
|
+ console.log("首页执行了没有", this.invitationCode)
|
|
// 如果 invitationCode 存在且不等于特殊值时执行代码
|
|
// 如果 invitationCode 存在且不等于特殊值时执行代码
|
|
if (this.invitationCode) {
|
|
if (this.invitationCode) {
|
|
- console.log("sadsad")
|
|
|
|
|
|
+ console.log("存在邀请码")
|
|
let params = {
|
|
let params = {
|
|
userId: this.userId,
|
|
userId: this.userId,
|
|
targetId: this.invitationCode,
|
|
targetId: this.invitationCode,
|
|
type: 1
|
|
type: 1
|
|
};
|
|
};
|
|
inviteBind(params).then(res => {
|
|
inviteBind(params).then(res => {
|
|
- console.log("绑定邀请码结果:", res);
|
|
|
|
|
|
+ if(res&& res.code ==200){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title:'您已成功加入团队',
|
|
|
|
+ icon:'success',
|
|
|
|
+ dration:2000
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ // console.log("绑定邀请码结果:", res);
|
|
});
|
|
});
|
|
this.$store.commit('SET_INVITATIONCODE', '')
|
|
this.$store.commit('SET_INVITATIONCODE', '')
|
|
|
|
|