Commit 2b29bfc8e894d14dd0340af9072d4b724eb5e882

Authored by xp.Huang
2 parents 60cb4726 d5aba70b

Merge branch 'fix/third-login-error' into 'main_dev'

fix: 修改第三方登录和绑定账号的问题

See merge request yunteng/thingskit-app!137
... ... @@ -87,6 +87,9 @@ import {mapActions } from 'vuex'
87 87 this.ordId = ''
88 88 },
89 89 onLoad(e) {
  90 + if (getApp().getBindNot()) {
  91 + return
  92 + }
90 93 if (!e.type) {
91 94 this.loadData(1);
92 95 } else {
... ... @@ -171,12 +174,14 @@ import {mapActions } from 'vuex'
171 174 pageSize: 10,
172 175 ...param
173 176 };
  177 +
174 178 const res = await api.alarmApi.getAlarmApi({
175 179 params,
176 180 custom: {
177 181 load: false
178 182 }
179 183 })
  184 +
180 185 if(res){
181 186 const resAlarm = await uni.$u.http.get('/yt/homepage/app?login=true');
182 187 if (resAlarm) {
... ...
... ... @@ -53,6 +53,7 @@
53 53 useShowToast
54 54 } from '@/plugins/utils.js'
55 55 import api from '@/api/index.js'
  56 + import {mapMutations} from "vuex";
56 57
57 58 export default {
58 59 components: {
... ... @@ -86,17 +87,19 @@
86 87 this.getOpenId = getApp().globalData.openId;
87 88 },
88 89 methods: {
  90 + ...mapMutations(["setUserInfo", "setPlateInfo"]),
89 91 resetFunc() {
90 92 this.bindPhone = false;
91 93 for (let i in this.bindAccountForm) Reflect.set(this.bindAccountForm, i, "")
92 94 for (let i in this.bindPhoneForm) Reflect.set(this.bindPhoneForm, i, "")
93 95 },
94 96 async handleBindForm(loginMethod, bindAccountForm, toastText) {
  97 +
95 98 const data = {
96 99 loginMethod,
97 100 ...bindAccountForm,
98 101 platformName: 'WECHAT',
99   - thirdUserId: this.getOpenId
  102 + thirdUserId: getApp().globalData.openId
100 103 };
101 104 const res = await api.loginApi.postThirdLoginApi(data)
102 105 if (!res) return
... ... @@ -184,4 +187,4 @@
184 187
185 188 <style lang="scss" scoped>
186 189 @import '../static/personal.scss';
187   -</style>
\ No newline at end of file
  190 +</style>
... ...