ming 2 vuotta sitten
vanhempi
commit
47197df836
3 muutettua tiedostoa jossa 19 lisäystä ja 21 poistoa
  1. 1 1
      common/common.scss
  2. 10 15
      pages/setting/funReport/funcAdd/funcAdd.vue
  3. 8 5
      util/api.js

+ 1 - 1
common/common.scss

@@ -917,7 +917,7 @@ radio,checkbox {
 		line-height:72rpx;
 	}
 	.example-body {
-		margin:19rpx 20rpx;
+		margin:18rpx 20rpx;
 		uni-input, select, option{
 			border:none!important;
 		}

+ 10 - 15
pages/setting/funReport/funcAdd/funcAdd.vue

@@ -410,23 +410,18 @@
 					url: this.id?'AlarmReport/edit':'AlarmReport/add',
 					data: params
 				})
+				uni.showToast({
+					title:res.data.msg,
+					icon: "none"
+				});
 				
-				if (!res.data.flag) {
-					uni.showToast({
-						title: "提交失败",
-						icon: "none"
-					});
-				} else {
-					uni.showToast({
-						title: "提交成功",
-					});
+				if (res.data.flag) {
+					setTimeout(() => {
+						uni.redirectTo({
+							url: '/pages/setting/funReport/funReport',
+						});
+					}, 1000);
 				}
-				setTimeout(() => {
-					uni.redirectTo({
-						url: '/pages/setting/funReport/funReport',
-					});
-				}, 1000);
-				
 			},
 			
 			

+ 8 - 5
util/api.js

@@ -33,11 +33,14 @@ function myRequest(options) {
                         title: res.data.msg ? res.data.msg : "获取数据失败",
                         icon: "none"
                     })	
-					setTimeout(()=>{
-						uni.navigateTo({
-							url: '/pages/index/index'
-						})
-					},2500)
+					if(res.data.msg=='登录时效已过期!'){
+						setTimeout(()=>{
+							uni.navigateTo({
+								url: '/pages/login/login'
+							})
+						},2500)
+					}
+					
                 }
                 resolve(res)
             },