chengziding hace 1 año
padre
commit
b5619babc5
Se han modificado 2 ficheros con 42 adiciones y 19 borrados
  1. 8 1
      .hbuilderx/launch.json
  2. 34 18
      pages/paySuccess.vue

+ 8 - 1
.hbuilderx/launch.json

@@ -4,6 +4,13 @@
         {
             "playground" : "standard",
             "type" : "uni-app:app-android"
-        }
+        },
+	{
+		"app-plus" : 
+		{
+			"launchtype" : "local"
+		},
+		"type" : "uniCloud"
+	}
     ]
 }

+ 34 - 18
pages/paySuccess.vue

@@ -2,6 +2,7 @@
 	<view class="Body">
 		<image src="/static/login/logo1.png" mode=""></image>
 		<button type="primary" @click="goBack()">返回宜格服务APP</button>
+		<!-- <a href="ygfwUrlSchemes://">返回宜格服务APP</a> -->
 	</view>
 </template>
 
@@ -9,15 +10,16 @@
 	export default {
 		data() {
 			return {
-				orderNo:""
+				orderNo: "",
+				error: {}
 			}
 		},
 		onLoad(options) {
-			if(options.orderNo){
-				this.orderNo=options.orderNo
-			}else{
+			if (options.orderNo) {
+				this.orderNo = options.orderNo
+			} else {
 				uni.showToast({
-					icon:"none",
+					icon: "none",
 					title: "参数缺失!",
 					duration: 2000
 				});
@@ -25,20 +27,34 @@
 		},
 		methods: {
 			goBack() {
-				// window.location.href='sandh5payres://ygfuJumpScheme'
-				// this.isIos = uni.getSystemInfoSync().platform //判断是否安卓、ios
-				// if (this.isIos == 'android') {
-				// 	let ifr = document.createElement("iframe");
-				// 	ifr.src =
-				// 	"ygfwUrlSchemes://"; // 这里的hbuilder在manifest.json中配置->“App常用其它设置” -> “Android设置” -> “UrlSchemes” 项中进行设置
-				// 	ifr.style.display = "none";
-				// 	document.body.appendChild(ifr);
-				// } else {
-				// 	// window.location = "https://apps.apple.com/cn/app/idxxxxxxx" //你的苹果应用app链接 
-				// }
-				window.location ="ygfwUrlSchemes://&orderNo="+this.orderNo;
+				this.isIos = uni.getSystemInfoSync().platform //判断是否安卓、ios
+				if (this.isIos == 'android') {
+					// let ifr = document.createElement("iframe");
+					// ifr.src =
+					// "ygfwUrlSchemes://"; // 这里的hbuilder在manifest.json中配置->“App常用其它设置” -> “Android设置” -> “UrlSchemes” 项中进行设置
+					// ifr.style.display = "none";
+					// document.body.appendChild(ifr);
+					window.location = "ygfwUrlSchemes://&orderNo=" + this.orderNo;
+				} else {
+					window.location = "https://yigeapp.songlanyun.com" 
+					// window.open("https://apps.apple.com/cn/app/nano-health/id1615496457");
+					// window.location="https://appstore.nanomirai.com"
+					// window.location = "https://yigeapp.songlanyun.com/ygfw/" //你的苹果应用app链接 
+					// plus.runtime.launchApplication({
+					// 	action: "ygfy://?callback=interapp-callback=123&merchantKey=SG23323424EXS3"
+					// }, function(e) {
+					// 	uni.showToast({
+					// 		icon: "none",
+					// 		title: e.message
+					// 	})
+					// 	console.log("Open system default browser failed: " + e.message)
+					// });
+				}
+
+				// window.location ="ygfwUrlSchemes://";
+				// this.error='aaa'
 			},
-			
+
 		}
 	}
 </script>