Showing
1 changed file
with
13 additions
and
4 deletions
@@ -56,9 +56,9 @@ | @@ -56,9 +56,9 @@ | ||
56 | <view> | 56 | <view> |
57 | <u-popup bgColor="transparent" :overlay="true" :show="showBind" mode="bottom"> | 57 | <u-popup bgColor="transparent" :overlay="true" :show="showBind" mode="bottom"> |
58 | <view class="u-flex logout-main"> | 58 | <view class="u-flex logout-main"> |
59 | - <view class="main"><text style="color: #999999">是否需要解绑?</text></view> | 59 | + <view class="main"><text style="color: #999999">是否需要解除绑定的账号?</text></view> |
60 | <view @click="confrimBind(info)" class="main"><text style="color: #f95e5a">是</text></view> | 60 | <view @click="confrimBind(info)" class="main"><text style="color: #f95e5a">是</text></view> |
61 | - <view class="main1"><text @click="showBind = false" style="color: #3478f7">否</text></view> | 61 | + <view @click="showBind = false" class="main1"><text style="color: #3478f7">否</text></view> |
62 | </view> | 62 | </view> |
63 | </u-popup> | 63 | </u-popup> |
64 | </view> | 64 | </view> |
@@ -134,7 +134,8 @@ export default { | @@ -134,7 +134,8 @@ export default { | ||
134 | } | 134 | } |
135 | ] | 135 | ] |
136 | }, | 136 | }, |
137 | - info: {} | 137 | + info: {}, |
138 | + openIds: '' | ||
138 | }; | 139 | }; |
139 | }, | 140 | }, |
140 | onLoad(e) { | 141 | onLoad(e) { |
@@ -150,13 +151,21 @@ export default { | @@ -150,13 +151,21 @@ export default { | ||
150 | this.id = params.data.userId; | 151 | this.id = params.data.userId; |
151 | } | 152 | } |
152 | }, | 153 | }, |
154 | + onShow() { | ||
155 | + let getOpenId = getApp().globalData.openId; | ||
156 | + console.log('获取全局openId', getOpenId); | ||
157 | + if (getOpenId) { | ||
158 | + this.openIds = getOpenId; | ||
159 | + } | ||
160 | + }, | ||
153 | methods: { | 161 | methods: { |
154 | confrimBind(e) { | 162 | confrimBind(e) { |
155 | if (e) { | 163 | if (e) { |
164 | + console.log('Bind', e.third?.thirdUserId); | ||
156 | //解绑 | 165 | //解绑 |
157 | let httpData = { | 166 | let httpData = { |
158 | appUserId: e.data?.userId, | 167 | appUserId: e.data?.userId, |
159 | - thirdUserId: e.third?.thirdUserId | 168 | + thirdUserId: e.third?.thirdUserId == null ? this.openIds : e.third?.thirdUserId |
160 | }; | 169 | }; |
161 | uni.$u.http.delete('/yt/third', httpData).then(res => { | 170 | uni.$u.http.delete('/yt/third', httpData).then(res => { |
162 | if (res) { | 171 | if (res) { |