Commit 94635118 authored by 黄媛媛's avatar 黄媛媛

update

parent d5dee9cf
...@@ -31,7 +31,9 @@ export default { ...@@ -31,7 +31,9 @@ export default {
data() { data() {
return { return {
show: true, show: true,
orderInfo: {} orderInfo: {},
}; };
}, },
created() { created() {
...@@ -64,6 +66,7 @@ export default { ...@@ -64,6 +66,7 @@ export default {
); );
}, },
Pay() { Pay() {
let that=this;
let orderInfo = this.orderInfo; let orderInfo = this.orderInfo;
uni.requestPayment({ uni.requestPayment({
provider: 'wxpay', provider: 'wxpay',
...@@ -75,7 +78,7 @@ export default { ...@@ -75,7 +78,7 @@ export default {
success: function(res) { success: function(res) {
console.log('success', res); console.log('success', res);
uni.navigateTo({ uni.navigateTo({
url: '/pages/order-submit/pay-success' url: '/pages/order-submit/pay-success?payInfo='+JSON.stringify(that.payInfo)
}); });
}, },
fail: function(err) { fail: function(err) {
......
...@@ -274,7 +274,7 @@ export default { ...@@ -274,7 +274,7 @@ export default {
exitPay() { exitPay() {
this.payExit = false; this.payExit = false;
uni.redirectTo({ uni.redirectTo({
url: "/pages/order/index/index", url: "/pages/order/index/index?status=0",
}); });
}, },
closePay() { closePay() {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<img src="/static/images/icon/pay-success.png" class="img" /> <img src="/static/images/icon/pay-success.png" class="img" />
</view> </view>
<view class="title">订单支付成功</view> <view class="title">订单支付成功</view>
<view class="price">实付 ¥119.00</view> <view class="price">实付 ¥{{payInfo.total_price}}</view>
<view class="btn-box"> <view class="btn-box">
<u-button <u-button
style="display: inline-block;" style="display: inline-block;"
...@@ -53,9 +53,13 @@ export default { ...@@ -53,9 +53,13 @@ export default {
}, },
mainColor: "", mainColor: "",
recommend: [], recommend: [],
payInfo:{},
}; };
}, },
onLoad(option) { onLoad(option) {
if (option.payInfo) {
this.payInfo=JSON.parse(option.payInfo)
}
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "支付成功", title: "支付成功",
}); });
...@@ -82,7 +86,7 @@ export default { ...@@ -82,7 +86,7 @@ export default {
}, },
redictToOrders() { redictToOrders() {
uni.redirectTo({ uni.redirectTo({
url: "/pages/order/index/index", url: "/pages/order/index/index?status=2",
}); });
}, },
goHome() { goHome() {
......
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