Commit 605d3cd31762f0d9f1c5ce4e5824b41b7a61a87c

Authored by loveumiko
1 parent 5ef2ec1c

fix: 修改第三方登录时请求报账号密码错误

@@ -30,7 +30,19 @@ @@ -30,7 +30,19 @@
30 // }) 30 // })
31 // #endif 31 // #endif
32 }, 32 },
33 - onHide() {} 33 + onHide() {},
  34 + methods:{
  35 + // 判断是否是第三方登录没有绑定账号不请求数据
  36 + getBindNot(){
  37 + // #ifndef H5
  38 + const userInfo = uni.getStorageSync('userInfo');
  39 + // #endif
  40 + // #ifdef H5
  41 + const userInfo = JSON.parse(sessionStorage.getItem('userInfo') || localStorage.getItem('userInfo'));
  42 + // #endif
  43 + return userInfo.isThirdLogin
  44 + }
  45 + }
34 }; 46 };
35 </script> 47 </script>
36 48
@@ -241,6 +241,9 @@ @@ -241,6 +241,9 @@
241 }, 241 },
242 onShow() { 242 onShow() {
243 this.page.num = 1; 243 this.page.num = 1;
  244 + if(getApp().getBindNot()){
  245 + return
  246 + }
244 if (this.detailStatus) { 247 if (this.detailStatus) {
245 this.loadData(1, null, null, null, null, null, null); 248 this.loadData(1, null, null, null, null, null, null);
246 } 249 }
@@ -256,6 +259,9 @@ @@ -256,6 +259,9 @@
256 onLoad(e) { 259 onLoad(e) {
257 // 隐藏原生的tabbar 260 // 隐藏原生的tabbar
258 uni.hideTabBar(); 261 uni.hideTabBar();
  262 + if(getApp().getBindNot()){
  263 + return
  264 + }
259 if (e.type == undefined) { 265 if (e.type == undefined) {
260 this.loadData(1, null, null, null, null, null, null); 266 this.loadData(1, null, null, null, null, null, null);
261 } else { 267 } else {
@@ -211,6 +211,9 @@ @@ -211,6 +211,9 @@
211 async onLoad(options) { 211 async onLoad(options) {
212 // 隐藏原生的tabbar 212 // 隐藏原生的tabbar
213 uni.hideTabBar(); 213 uni.hideTabBar();
  214 + if(getApp().getBindNot()){
  215 + return
  216 + }
214 this.page.num = 1; 217 this.page.num = 1;
215 const { 218 const {
216 deviceState 219 deviceState
@@ -231,6 +234,9 @@ @@ -231,6 +234,9 @@
231 } 234 }
232 }, 235 },
233 onShow() { 236 onShow() {
  237 + // if(getApp().getBindNot()){
  238 + // return
  239 + // }
234 if (this.orgId) { 240 if (this.orgId) {
235 this.loadData(1, { 241 this.loadData(1, {
236 organizationId: this.orgId 242 organizationId: this.orgId
@@ -128,6 +128,9 @@ @@ -128,6 +128,9 @@
128 onLoad() { 128 onLoad() {
129 // 隐藏原生的tabbar 129 // 隐藏原生的tabbar
130 uni.hideTabBar(); 130 uni.hideTabBar();
  131 + if(getApp().getBindNot()){
  132 + return
  133 + }
131 this.getDeviceTotalData(); 134 this.getDeviceTotalData();
132 uni.setStorageSync('getConfiguration', { 135 uni.setStorageSync('getConfiguration', {
133 isConfiguration: false 136 isConfiguration: false