twt vor 2 Jahren
Ursprung
Commit
85aed47891
3 geänderte Dateien mit 29 neuen und 20 gelöschten Zeilen
  1. 21 15
      pages/addjk/activity.vue
  2. 4 4
      pages/addjk/eadit.vue
  3. 4 1
      pages/addjk/jkDetail.vue

+ 21 - 15
pages/addjk/activity.vue

@@ -87,7 +87,7 @@
 				itemData: [],
 				noMoreShow: false,
 				tabIndex: '',
-
+                type:'',
 			}
 		},
 		// onBackPress(options){
@@ -98,10 +98,11 @@
 		// 	console.log("返回")
 		// 	return true; 
 		// },
-		onLoad() {
+		onLoad(opt) {
 			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.page = 1
-			this.myOrderCoupon()
+			this.myOrderCoupon();
+			this.type=opt.type
 		},
 
 		methods: {
@@ -111,18 +112,23 @@
 				})
 			},
 			goback(){
-			   var standalone = window.navigator.standalone
-			   var userAgent = window.navigator.userAgent.toLowerCase()
-			   var safari = /safari/.test(userAgent)
-			   var ios = /iphone|ipod|ipad|mac/.test(userAgent)
-			   var android = /android/.test(userAgent)
-			   if (ios) {
-				 if ( true) {//!standalone&& !safari
-				   window.webkit.messageHandlers.goMyNav.postMessage(null)
-				 }
-			   } else if (android) {
-				 window.android.postMessage()
-			   }
+				if(this.type==2){
+					uni.navigateBack()
+				}else{
+					var standalone = window.navigator.standalone
+					var userAgent = window.navigator.userAgent.toLowerCase()
+					var safari = /safari/.test(userAgent)
+					var ios = /iphone|ipod|ipad|mac/.test(userAgent)
+					var android = /android/.test(userAgent)
+					if (ios) {
+									 if ( true) {//!standalone&& !safari
+									   window.webkit.messageHandlers.goMyNav.postMessage(null)
+									 }
+					} else if (android) {
+									 window.android.postMessage()
+					}
+				}
+			   
 			},
 			stop(item) {
 

+ 4 - 4
pages/addjk/eadit.vue

@@ -235,8 +235,8 @@
 					
 					this.clWhereString=jkdata.clWhere;
 					this.clWhereList=this.clWhereString.slice(',');
-					this.startTime=jkdata.startTime.slice(0,10);
-					this.endTime=jkdata.endTime.slice(0,10);
+					this.startTime=jkdata.startTime.slice(0,10)+ ' 00:00:00';
+					this.endTime=jkdata.endTime.slice(0,10)+ ' 23:59:59';
 					this.payType=jkdata.payType;
 					this.img=res.data.img.img;
 					if(res.data.imgList){
@@ -365,8 +365,8 @@
 			var editdata={
 				id:this.id,
 				activityName:this.activityName,
-				startTime:this.startTime+'00',
-				endTime:this.endTime,
+				startTime:this.startTime+ ' 00:00:00',
+				endTime:this.endTime+ ' 23:59:59',
 				number:this.number,
 				activityContent:this.activityContent,
 				clWhere:this.clWhereString,

+ 4 - 1
pages/addjk/jkDetail.vue

@@ -5,7 +5,7 @@
 		</view>
 		<view class="cont">
 			<view class="name">{{info.activityName}}</view>
-			<view class="name2">{{info.startTime}}~{{info.endTime}}</view>
+			<view class="name2">{{info.startTime.slice(0,10)}}~{{info.endTime.slice(0,10)}}</view>
 			<view class="name3">{{info.activityContent}}</view>
 		</view>
 		<view class="shopBox">
@@ -207,6 +207,9 @@
 								 icon:'none',
 								 duration: 2000
 							});
+							uni.navigateTo({
+								url:'activity?type=2'
+							})
 						}
 						//this.list=res.data
 				 })