Commit 6d66b01748a28beebe1a4825623c3f6942d268d4

Authored by ww
1 parent 2d104816

perf: add empty toast

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