Commit f1d8bf60 authored by 王建威's avatar 王建威

Merge branch 'develop' into wjw_fenqi

parents 1500addb 0a8b5acb
......@@ -4,6 +4,9 @@
<uni-icons color="#212121" class="search-icon-arrowleft" size="24" type="arrowleft" @click="goBack" />
<view class="title">微信支付</view>
</view>
<view class="sub-title">
谛宝多多分期定金订单-{{order_id}}
</view>
<view class="price">
{{amount}}
</view>
......@@ -21,13 +24,15 @@
data(){
return {
loading: false,
amount: ''
amount: '',
order_id: ''
}
},
onLoad(){
const { href } = location;
const { amount, order_id, code } = parse(href.split('?')[1]);
this.amount = amount;
this.order_id = order_id;
},
methods: {
handleSumit(){
......@@ -68,7 +73,9 @@
duration: 2000,
icon: 'none'
});
// this.closeWindow();
setTimeout(() => {
history.back();
},2000);
return;
}
WeixinJSBridge.invoke(
......@@ -88,24 +95,39 @@
url: '/pages/payresult/payresult'
})
} else if (res.err_msg === "get_brand_wcpay_request:cancel") {
Toast.info("支付取消", 2);
// 重新跳转支付页面,刷新当前code 值
this.$jump(`${url}?app=member`);
uni.showToast({
title: '已取消支付,请重新支付',
duration: 2000,
icon: 'none'
});
setTimeout(() => {
history.back();
},2000);
} else if (res.err_msg === "get_brand_wcpay_request:fail") {
// Toast.fail('支付失败', 3);
uni.showToast({
title: '支付失败,请重新支付',
duration: 2000,
icon: 'none'
});
// 回退上一页重新支付
setTimeout(() => {
history.back();
},2000);
// 提示支付失败,关闭当前页面
setTimeout(function() {
// setTimeout(function() {
//这个可以关闭安卓系统的手机
document.addEventListener(
"WeixinJSBridgeReady",
function() {
WeixinJSBridge.call("closeWindow");
},
false
);
//这个可以关闭ios系统的手机
WeixinJSBridge.call("closeWindow");
}, 300);
// document.addEventListener(
// "WeixinJSBridgeReady",
// function() {
// WeixinJSBridge.call("closeWindow");
// },
// false
// );
// //这个可以关闭ios系统的手机
// WeixinJSBridge.call("closeWindow");
// this.$jump(`${url}?app=member`);
// }, 300);
} else {
uni.showToast({
title: '未知错误,刷新重试',
......@@ -142,9 +164,15 @@
font-size: 30rpx;
}
}
.sub-title{
font-size:30rpx;
text-align: center;
color: #5d5d5d;
margin-top: 120rpx;
}
.price{
text-align: center;
margin-top: 150rpx;
margin-top: 50rpx;
font-size: 60rpx;
}
.submit-btn{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment