Commit 956fe7bfcf24b2cd234de57d38250d1f45916b3d

Authored by 王强
1 parent dbb3fe32

1、断网时请求接口判断是否断网,如果断网提示网络问题

2、设备信息:华为YAL-AL10 Android10.0,优选——品质优选视频遮盖弹窗浮层问题
src/components/showModal/show_modal.less
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 position: fixed; 5 position: fixed;
6 top: 0; 6 top: 0;
7 left: 0; 7 left: 0;
8 - z-index: 150; 8 + z-index: 1500;
9 display: flex; 9 display: flex;
10 flex-direction: column; 10 flex-direction: column;
11 justify-content: center; 11 justify-content: center;
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