浏览代码

APP 跳转

twt 1 年之前
父节点
当前提交
4c817c950d

+ 22 - 4
pages/myOrder/activityOrderDetail.vue

@@ -359,12 +359,13 @@
 				index: 0,
 				iOSInfo:'',
 				swiperIndex:0,
+				back:'',
 			}
 		},
 		onLoad(opt) {
 			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.id = opt.id
-
+            this.back=opt.back;
 
 			if (this.id) {
 				this.getData()
@@ -680,9 +681,26 @@
 			},
 
 			goback() {
-				uni.navigateBack({
-					delta: 1
-				})
+				if(this.back==1){
+					uni.navigateBack({
+						delta: 1
+					}) 
+				}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()
+					}
+				}
+				
+				
 			},
 			gohome() {
 				uni.switchTab({

+ 20 - 3
pages/myOrder/mallOrderDetail.vue

@@ -365,11 +365,13 @@
 				index: 0,
 				iOSInfo:'',
 				swiperIndex:0,
+				back:'',
 			}
 		},
 		onLoad(opt) {
 			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.id = opt.id
+			 this.back=opt.back;
 			this.SheetType = opt.SheetType
 
 			if (this.id) {
@@ -675,9 +677,24 @@
 				})
 			},
 			goback() {
-				uni.navigateBack({
-					delta: 1
-				})
+				if(this.back==1){
+					uni.navigateBack({
+						delta: 1
+					}) 
+				}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()
+					}
+				}
 			},
 
 

+ 3 - 3
pages/myOrder/myOrder.vue

@@ -305,17 +305,17 @@
 				//SheetType 1 商品2项目3套餐4救援5钣喷6集客
 				if((item.SheetType==1)||(item.SheetType==2)||(item.SheetType==3)){
 					uni.navigateTo({
-						url: "mallOrderDetail?id=" + item.ID +"&SheetType=" + item.SheetType
+						url: "mallOrderDetail?id=" + item.ID +"&SheetType=" + item.SheetType+'&back=1'
 					})
 				}
 				else if (item.SheetType==5){
 					uni.navigateTo({
-						url: "paintOrderDetail?id=" + item.ID
+						url: "paintOrderDetail?id=" + item.ID+'&back=1'
 					})
 				}
 				else if (item.SheetType==6){
 					uni.navigateTo({
-						url: "activityOrderDetail?id=" + item.ID
+						url: "activityOrderDetail?id=" + item.ID+'&back=1'
 					})
 				}
 			},

+ 20 - 4
pages/myOrder/paintOrderDetail.vue

@@ -345,12 +345,13 @@
 				index: 0,
 				iOSInfo:'',
 				swiperIndex:0,
+				back:'',
 			}
 		},
 		onLoad(opt) {
 			 this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.id = opt.id
-			
+			 this.back=opt.back;
 
 			if (this.id) {
 				this.getData()
@@ -687,9 +688,24 @@
 			},
 			
 			goback() {
-				uni.navigateBack({
-				 	delta: 1
-				})
+				if(this.back==1){
+					uni.navigateBack({
+						delta: 1
+					}) 
+				}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()
+					}
+				}
 			},
 			gohome(){
 				uni.switchTab({