ソースを参照

现在提示登录次数,改到正式版接口

gcz 1 年間 前
コミット
1fa39c8b09
2 ファイル変更18 行追加8 行削除
  1. 7 7
      common/config.js
  2. 11 1
      common/request.js

+ 7 - 7
common/config.js

@@ -12,15 +12,15 @@
 // }
 
 //64
-let baseUrl='https://xusfoodapi.hw.hongweisoft.com/appapi/app';
-let upFileUrl='http://fileupload.hw.hongweisoft.com/upload/single/minio';
-// let staticUrl='http://res.hw.hongweisoft.com/xushuo/';
-let staticUrl='https://xusapi.gzxsjt.cn/miniores/imgs/app';
+// let baseUrl='https://xusfoodapi.hw.hongweisoft.com/appapi/app';
+// let upFileUrl='http://fileupload.hw.hongweisoft.com/upload/single/minio';
+// // let staticUrl='http://res.hw.hongweisoft.com/xushuo/';
+// let staticUrl='https://xusapi.gzxsjt.cn/miniores/imgs/app';
 
 //正式
-// let baseUrl='https://xusapi.gzxsjt.cn/appapi/app';
-// let upFileUrl='https://xusapi.gzxsjt.cn/thirdapi/upload/single/minio';
-// let staticUrl='https://xusapi.gzxsjt.cn/miniores/imgs/app';
+let baseUrl='https://xusapi.gzxsjt.cn/appapi/app';
+let upFileUrl='https://xusapi.gzxsjt.cn/thirdapi/upload/single/minio';
+let staticUrl='https://xusapi.gzxsjt.cn/miniores/imgs/app';
 
 const commonConfig = {
 	wxAppid: '', // 测试wxAppid

+ 11 - 1
common/request.js

@@ -1,6 +1,7 @@
 import { commonConfig } from '@/common/config.js';
 import {againToken}  from '../utils/againToken.js'
 import { showFullScreenLoading , tryHideFullScreenLoading } from '../utils/loading.js'
+let showModal = false;
 // 此vm参数为页面的实例,可以通过它引用vuex中的变量
 module.exports = (vm) => {
     // 初始化请求配置
@@ -67,6 +68,8 @@ module.exports = (vm) => {
 				}
 			});
 			tryHideFullScreenLoading()
+			if(showModal){return}
+			showModal = true;
 			uni.showModal({
 			  title: '提示',
 			  content: '你需要登录后,才可使用此功能!',
@@ -80,8 +83,15 @@ module.exports = (vm) => {
 							// console.log('success');
 						}
 					});
-					uni.navigateBack()
+					console.log('pages',pages);
+					let pages = getCurrentPages();
+					if(pages.length>1){
+						uni.navigateBack()
+					}
 				}
+			  },
+			  complete() {
+			  	showModal = false
 			  }
 			})