Commit d5aba70be705f71e6a6a45d2e8509fc71e5b8579

Authored by loveumiko
1 parent 60cb4726

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

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