Commit 6d66b01748a28beebe1a4825623c3f6942d268d4

Authored by ww
1 parent 2d104816

perf: add empty toast

@@ -95,6 +95,7 @@ uni.$u.http.interceptors.response.use( @@ -95,6 +95,7 @@ uni.$u.http.interceptors.response.use(
95 } else if (message == "request:fail timeout") { 95 } else if (message == "request:fail timeout") {
96 errorData = "请求超时:请检查网络"; 96 errorData = "请求超时:请检查网络";
97 } else if (response.data.status == 401) { 97 } else if (response.data.status == 401) {
  98 + console.log(store.state.userInfo.isThirdLogin)
98 if (!store.state.userInfo.isThirdLogin) { 99 if (!store.state.userInfo.isThirdLogin) {
99 uni.reLaunch({ 100 uni.reLaunch({
100 url: "/publicLoginSubPage/public/login", 101 url: "/publicLoginSubPage/public/login",
@@ -102,7 +103,7 @@ uni.$u.http.interceptors.response.use( @@ -102,7 +103,7 @@ uni.$u.http.interceptors.response.use(
102 // 清空登录信息 103 // 清空登录信息
103 store.commit("emptyUserInfo"); 104 store.commit("emptyUserInfo");
104 show = false; 105 show = false;
105 - } else { 106 + } else if (store.state.userInfo.isThirdLogin) {
106 uni.switchTab({ 107 uni.switchTab({
107 url: "../pages/personal/personal", 108 url: "../pages/personal/personal",
108 }); 109 });
@@ -111,6 +112,7 @@ uni.$u.http.interceptors.response.use( @@ -111,6 +112,7 @@ uni.$u.http.interceptors.response.use(
111 } else { 112 } else {
112 errorData = message || ""; 113 errorData = message || "";
113 } 114 }
  115 + console.log(errorData)
114 if (show) uni.$u.toast(errorData); 116 if (show) uni.$u.toast(errorData);
115 return Promise.reject(response); 117 return Promise.reject(response);
116 } 118 }
@@ -9,7 +9,8 @@ @@ -9,7 +9,8 @@
9 <view class="word">{{ item.name }}</view> 9 <view class="word">{{ item.name }}</view>
10 </view> 10 </view>
11 </view> 11 </view>
12 - </luyj-tree> 12 + </luyj-tree>
  13 + <mescroll-empty v-if="!tree.length" />
13 </view> 14 </view>
14 </view> 15 </view>
15 </template> 16 </template>
@@ -45,7 +46,7 @@ export default { @@ -45,7 +46,7 @@ export default {
45 } 46 }
46 }) 47 })
47 .catch(e => { 48 .catch(e => {
48 - uni.$u.toast(e.data.message); 49 + // uni.$u.toast(e.data.message);
49 }); 50 });
50 }, 51 },
51 confirm(val) { 52 confirm(val) {
@@ -256,7 +256,8 @@ export default { @@ -256,7 +256,8 @@ export default {
256 ...this.bindAccountObj, 256 ...this.bindAccountObj,
257 platformName: 'WECHAT', 257 platformName: 'WECHAT',
258 thirdUserId: this.getOpenId 258 thirdUserId: this.getOpenId
259 - }; 259 + };
  260 + console.log(postData)
260 uni.$u.http 261 uni.$u.http
261 .post('/yt/third/bind', postData) 262 .post('/yt/third/bind', postData)
262 .then(res => { 263 .then(res => {