Commit 6786d0ff586e91373d75ac6f987b3ff44dabe702
Merge branch 'version_2.0.0_optimization_mall_update' of http://bj.gitlab.cnlive…
….com/w-front-end/select_good into version_2.0.0_optimization_mall_update
Showing
3 changed files
with
26 additions
and
5 deletions
src/components/showModal/show_modal.less
src/main.js
| @@ -377,10 +377,20 @@ Vue.prototype.http = function(path, data, callback, ext) { | @@ -377,10 +377,20 @@ Vue.prototype.http = function(path, data, callback, ext) { | ||
| 377 | } | 377 | } |
| 378 | }, | 378 | }, |
| 379 | err => { | 379 | err => { |
| 380 | + | ||
| 380 | /* 加载错误处理 开始 */ | 381 | /* 加载错误处理 开始 */ |
| 382 | + | ||
| 381 | Indicator.close(); | 383 | Indicator.close(); |
| 382 | - Toast("请求出错"); | 384 | + |
| 385 | + // 判断是断网还是接口出错 | ||
| 386 | + if (!navigator.onLine) { | ||
| 387 | + Toast("网络异常,请检查网络"); | ||
| 388 | + } else { | ||
| 389 | + Toast("请求出错"); | ||
| 390 | + } | ||
| 391 | + | ||
| 383 | /* 加载错误处理 结束 */ | 392 | /* 加载错误处理 结束 */ |
| 393 | + | ||
| 384 | } | 394 | } |
| 385 | ); | 395 | ); |
| 386 | } | 396 | } |
| @@ -424,10 +434,20 @@ Vue.prototype.http = function(path, data, callback, ext) { | @@ -424,10 +434,20 @@ Vue.prototype.http = function(path, data, callback, ext) { | ||
| 424 | } | 434 | } |
| 425 | }, | 435 | }, |
| 426 | err => { | 436 | err => { |
| 437 | + | ||
| 427 | /* 加载错误处理 开始 */ | 438 | /* 加载错误处理 开始 */ |
| 439 | + | ||
| 428 | Indicator.close(); | 440 | Indicator.close(); |
| 429 | - Toast("请求出错"); | 441 | + |
| 442 | + // 判断是断网还是接口出错 | ||
| 443 | + if (!navigator.onLine) { | ||
| 444 | + Toast("网络异常,请检查网络"); | ||
| 445 | + } else { | ||
| 446 | + Toast("请求出错"); | ||
| 447 | + } | ||
| 448 | + | ||
| 430 | /* 加载错误处理 结束 */ | 449 | /* 加载错误处理 结束 */ |
| 450 | + | ||
| 431 | } | 451 | } |
| 432 | ); | 452 | ); |
| 433 | } | 453 | } |
src/pages/common/common.vue
| 1 | <template> | 1 | <template> |
| 2 | <div class="common"> | 2 | <div class="common"> |
| 3 | 3 | ||
| 4 | + <!-- 主页面 --> | ||
| 5 | + <router-view ref="childCommon"></router-view> | ||
| 6 | + | ||
| 4 | <!-- iOS QQ内 & Android WeChat内无法唤起App,提示用Safari或浏览器打开蒙层 --> | 7 | <!-- iOS QQ内 & Android WeChat内无法唤起App,提示用Safari或浏览器打开蒙层 --> |
| 5 | <mask-layer ref="maskLayer" | 8 | <mask-layer ref="maskLayer" |
| 6 | :maskLayers="maskLayers"> | 9 | :maskLayers="maskLayers"> |
| @@ -15,8 +18,6 @@ | @@ -15,8 +18,6 @@ | ||
| 15 | <show-modal ref="callAppModal" | 18 | <show-modal ref="callAppModal" |
| 16 | :options="callAppModals"> | 19 | :options="callAppModals"> |
| 17 | </show-modal> | 20 | </show-modal> |
| 18 | - | ||
| 19 | - <router-view ref="childCommon"></router-view> | ||
| 20 | </div> | 21 | </div> |
| 21 | </template> | 22 | </template> |
| 22 | 23 |