|
|
@@ -1,13 +1,14 @@
|
|
|
<template>
|
|
|
<view class="payResult">
|
|
|
- <u-icon name="checkmark-circle-fill" :color="vuex_theme.bgColor" style="margin-top: 50rpx;" size="100"></u-icon>
|
|
|
+ <u-icon name="checkmark-circle-fill" :color="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>
|
|
|
+ <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');
|
|
|
+ import VConsole from 'vconsole';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -18,12 +19,25 @@
|
|
|
margin: '10rpx',
|
|
|
height:"60rpx",
|
|
|
fontSize:"26rpx"
|
|
|
- }
|
|
|
+ },
|
|
|
+ redirect_url: '',
|
|
|
+ bgColor: ''
|
|
|
}
|
|
|
},
|
|
|
- onLoad(options) {
|
|
|
+ async onLoad(options) {
|
|
|
+ // const vConsole = new VConsole();
|
|
|
console.log("商品小票",options)
|
|
|
- this.customStyle.background = this.vuex_theme.bgColor;
|
|
|
+ this.customStyle.background = this.bgColor;
|
|
|
+ let params = {
|
|
|
+ orderId: options.out_trade_no
|
|
|
+ }
|
|
|
+ let res = await this.$api.yeepay.getOrderUrlAndColor(params)
|
|
|
+ if(res.data.success){
|
|
|
+ this.redirect_url = res.data.data.url;
|
|
|
+ this.bgColor = res.data.data.color;
|
|
|
+ this.customStyle.background = this.bgColor;
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
onReady() {
|
|
|
let mchData = {
|
|
|
@@ -38,7 +52,7 @@
|
|
|
goback() {
|
|
|
let mchData = {
|
|
|
action: 'jumpOut',
|
|
|
- jumpOutUrl: decodeURIComponent(this.vuex_redirect_url) //跳转的页面
|
|
|
+ jumpOutUrl: decodeURIComponent(this.redirect_url) //跳转的页面
|
|
|
}
|
|
|
var postData = JSON.stringify(mchData);
|
|
|
parent.postMessage(postData, 'https://payapp.weixin.qq.com')
|