Commit a0c17226 by liang ce

修改绑定第三方账号过程

parent 57233bad
......@@ -26,7 +26,11 @@ create.Component({
didUnmount() {},
methods: {
getData() {
getThirdUserPlatForm().then(res => {
let data = {
platForm: "",
ddUserId: getApp().globalData.userid
};
getThirdUserPlatForm(data).then(res => {
let relatedAppPlatformList = [];
res.data.data.forEach(item => {
relatedAppPlatformList.push(item.platform);
......
......@@ -46,11 +46,17 @@
关联成功
</view>
</view>
<view a:else>
<view a:elif="{{bindStatus==='fail'}}">
<image class="fix-img-width-fix" mode="scaleToFill" src="./../../assests/bindFail.png"/>
<view>
关联失败
</view>
</view>
<view a:else>
<image class="fix-img-width-fix" mode="scaleToFill" src="./../../assests/bindFail.png"/>
<view>
账户已关联
</view>
</view>
</view>
<selectpopup showSelectPopup="{{showSelectPopup}}" selectPopupList="{{selectPopupList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup>
\ No newline at end of file
......@@ -47,16 +47,26 @@ create.Page({
clearInterval(interval);
}
requestNum++;
let data={
platform: this.data.platform,
let data = {
platForm: this.data.platform,
ddUserId: getApp().globalData.userid
}
};
getThirdUserPlatForm(data).then(res => {
let relatedAppPlatformList = [];
res.data.data.forEach(item => {
if (item.platform === this.data.platform) {
if (res.data.msg === "当前账号已被其他账号绑定!") {
this.setData({
name: item.userName,
isBind: false,
bindStatus: "fail"
});
setTimeout(() => {
that.setData({
isLoading: false
});
}, 2000);
clearInterval(interval);
} else if (res.data.data) {
if (res.data.data.platform === this.data.platform) {
this.setData({
name: res.data.data.userName,
isBind: true,
bindStatus: "success"
});
......@@ -69,7 +79,7 @@ create.Page({
this.$store.data.relatedAppNeedUpdate = true;
this.update();
}
});
}
});
}, 1000);
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment