feat: 绑定逻辑
This commit is contained in:
@@ -24,7 +24,8 @@
|
||||
<view>上级ID:{{ performanceData.seniorId || 0 }}</view>
|
||||
</view>
|
||||
<!-- 绑定 -->
|
||||
<view v-else @click="bindHowShow = true;"> 点击绑定</view>
|
||||
<view v-else @click="bindHowShow = true;" class="bind_how"> 点击绑定</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="my_team_content_warp">
|
||||
@@ -181,6 +182,7 @@
|
||||
@cancel="bindHowShow = false" class="bind-show-model">
|
||||
<up-input placeholder="输入邀请码" border="surround" v-model="bindValue"></up-input>
|
||||
</up-modal>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -228,20 +230,22 @@ export default {
|
||||
methods: {
|
||||
formatDate,
|
||||
getValue,
|
||||
onBindConfirm() {
|
||||
console.log(this.bindValue, '/user/bindInvitationCode');
|
||||
bindInvitationCode({
|
||||
async onBindConfirm() {
|
||||
const result = await bindInvitationCode({
|
||||
inviteCode: this.bindValue,
|
||||
}).then(res => {
|
||||
if (res && res.bizcode === 100) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'success',
|
||||
message: "绑定成功",
|
||||
});
|
||||
this.bindHowShow = false;
|
||||
this.getUserInfo();
|
||||
}
|
||||
})
|
||||
|
||||
if (result && result.bizcode === 100) {
|
||||
this.bindHowShow = false;
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'success',
|
||||
message: "绑定成功",
|
||||
});
|
||||
this.getUserInfo();
|
||||
this.getPerformance();
|
||||
this.getAcctCategory();
|
||||
}
|
||||
|
||||
},
|
||||
jumpMine() {
|
||||
uni.switchTab({// 首页
|
||||
@@ -558,4 +562,16 @@ export default {
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
line-height: 38rpx;
|
||||
}
|
||||
|
||||
.bind_how {
|
||||
width: 150rpx;
|
||||
height: 45rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 45rpx;
|
||||
border: 1rpx solid #fff;
|
||||
margin-right: 10rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user