Kaynağa Gözat

防重复提交添加加载层

yangzj 2 yıl önce
ebeveyn
işleme
c4d600b569

+ 5 - 1
common/http.interceptor.js

@@ -3,7 +3,11 @@ import store  from '../store/index.js'
 // vm,就是我们在vue文件里面的this,所以我们能在这里获取vuex的变量,比如存放在里面的token
 const install = (Vue, vm) => {
 	Vue.prototype.$u.http.setConfig({
-		baseUrl: config.baseUrl
+		baseUrl: config.baseUrl,
+		showLoading: true,
+		loadingText: '加载中...',
+		loadingMask: true,
+		loadingTime: 100
 	});
 	// 请求拦截,配置Token等参数
 	Vue.prototype.$u.http.interceptor.request = (config) => {

+ 0 - 7
pages/paymentMethod/paymentMethod.vue

@@ -99,9 +99,6 @@
 			 * @param {String} deviceNo 设备编号(只有车位锁部分有)
 			 * */
 			gyBankPay() {
-				uni.showLoading({
-					title: '加载中'
-				});
 				const params = {
 					orderList: this.curOrderList,
 					deviceNo: this.deviceNo,
@@ -142,9 +139,6 @@
 			 * 最后再调起微信支付
 			 * */
 			juhePay() {
-				uni.showLoading({
-					title: '加载中'
-				});
 				this.getWXPayByJava(this.curOrderList, this.deviceNo);
 			},
 			/**
@@ -208,7 +202,6 @@
 							// }
 							localStorage.setItem('jumpUrl', this.jumpUrl);
 							location.href = res.data.qrCodeUrl;
-							// this.cookie.set("jumpUrl",this.jumpUrl);
 						} else {
 							uni.hideLoading();
 						}