lyb 4 жил өмнө
parent
commit
3e03757487

+ 9 - 0
pages.json

@@ -262,6 +262,15 @@
             }
             
         }
+        ,{
+            "path" : "pages/payResult/payResult",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "支付结果",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"tabBar": {
 		"list": [{

+ 1 - 1
pages/activity/activityDetail.vue

@@ -443,7 +443,7 @@
 						this.voteSuccess();
 					},(err) => {
 						console.log("作品投票页面err", err)
-						this.$refs.toast.error(err)
+						this.$refs.toast.error(err.errMsg)
 					})
 				} else {
 					this.$refs.toast.error(res.data.msg)

+ 47 - 0
pages/payResult/payResult.vue

@@ -0,0 +1,47 @@
+<template>
+	<view class="payResult">
+		<u-icon name="checkmark-circle-fill" :color="vuex_theme.bgColor" style="margin-top: 50rpx;" size="100"></u-icon>
+		<view>订单支付成功</view>
+		<u-button  shape="circle" :custom-style="customStyle" style="margin-top: 50rpx;" @click="goback">返回</u-button>
+	</view>
+</template>
+
+<script>
+	let goldPlan = require('@/utils/jgoldplan-1.0.0.js');
+	export default {
+		data() {
+			return {
+				customStyle: {
+					color: 'white',
+					background: "#E72226",
+					width: '200rpx',
+					margin: '10rpx',
+					height:"60rpx",
+					fontSize:"26rpx"
+				}
+			}
+		},
+		created() {
+			this.customStyle.background = this.vuex_theme.bgColor;
+		},
+		
+		methods: {
+			goback() {
+				let mchData = {
+					action: 'jumpOut',
+					jumpOutUrl: 'https://vote.guosen-fumao.cn/h5/#/pages/activity/activityDetail' //跳转的页面
+				}				
+				var postData = JSON.stringify(mchData);
+				parent.postMessage(postData, 'https://payapp.weixin.qq.com')
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+.payResult{
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+}
+</style>

+ 2 - 0
utils/jgoldplan-1.0.0.js

@@ -0,0 +1,2 @@
+(function(){var d="";window.addEventListener("message",function(a){var b="string"==typeof a.data?JSON.parse(a.data):a.data;console.log("parent origin",a.origin);console.log("parent data",b);"https://payapp.weixin.qq.com"===a.origin&&Object.prototype.hasOwnProperty.call(b,"action")&&"setToken"===b.action&&Object.prototype.hasOwnProperty.call(b,"token")?d=b.token:console.log("valid")});window.addEventListener("pagehide",function(){var a=JSON.stringify({action:"onSubPageLeave",subPageUrl:window.location.href,
+token:d,sdkVersion:"0.1"});console.log("child page will leave");parent.postMessage(a,"https://payapp.weixin.qq.com")});var c={action:"onLoadSdk",subPageUrl:window.location.href,token:d,sdkVersion:"0.1"};console.log("send message",c);c=JSON.stringify(c);parent.postMessage(c,"https://payapp.weixin.qq.com")})();/*  |xGv00|08097d7ae5858d3c6941d62e581cff57 */