Commit 1ac5d4f0 authored by ZJG's avatar ZJG

支付成功页面

parent 59090b0b
......@@ -542,6 +542,8 @@
"path":"allorderList"//统一订单
},{
"path":"allorderdetails"//统一订单详情
},{
"path":"paysuccess"//支付成功页面
}]
},
//相亲分包
......
......@@ -434,11 +434,14 @@
uni.showToast({
title: "支付成功"
})
setTimeout(()=>{
uni.redirectTo({
url: '/pages/jiuzhai/allorderList'
});
}, 100 )
// setTimeout(()=>{
// uni.redirectTo({
// url: '/pages/jiuzhai/allorderList'
// });
// }, 100 )
uni.redirectTo({
url: '/pages/jiuzhai/paysuccess?PreferPrice='+that.addMsg.Final_Price
});
},
fail: function(err) {
console.log('fail:', err);
......@@ -451,6 +454,7 @@
url: '/pages/jiuzhai/allorderList'
});
}, 100 )
}
});
},
......
......@@ -488,11 +488,11 @@
res => {
let orderInfo = JSON.parse(res.data);
console.log(orderInfo)
this.Pay(orderInfo)
this.Pay(orderInfo,data.PreferPrice)
}
);
},
Pay(orderInfo){
Pay(orderInfo,PreferPrice){
let that=this;
uni.requestPayment({
provider: 'wxpay',
......@@ -506,14 +506,16 @@
uni.showToast({
title: "支付成功"
})
if(that.msg.OrderStatus==0){
that.g[that.payindex].OrderStatus = 2;
that.g[that.payindex].OrderStatusName = '待确认';
// if(that.msg.OrderStatus==0){
// that.g[that.payindex].OrderStatus = 2;
// that.g[that.payindex].OrderStatusName = '待确认';
}else{
that.change(2)
}
// }else{
// that.change(2)
// }
uni.redirectTo({
url: '/pages/jiuzhai/paysuccess?PreferPrice='+PreferPrice
});
},
fail: function(err) {
console.log('fail:', err);
......
......@@ -139,6 +139,20 @@
border-top: 1px solid #f5f5f5;
background: #fff;
}
.kefu{
display: flex;
flex-direction: column;
align-items: center;
margin-left: 5px;
}
.contButton {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
opacity: 0;
}
}
</style>
<template>
......@@ -152,7 +166,14 @@
<view class="box-top2">
<view style="display: flex;align-items: center;justify-content: space-between;">
<span class='box-top2-text'>{{OrderInfo.OrderTypeName}}</span>
<span class='box-top2-text' style='font-size: 12px;font-weight: normal;'>{{OrderInfo.OrderNo}}</span>
<view style="display: flex;align-items: center;">
<span class='box-top2-text' style='font-size: 12px;font-weight: normal;'>{{OrderInfo.OrderNo}}</span>
<view style='margin-left: 5px;'>
<u-button size="mini" shape="circle" @click="paste(OrderInfo.OrderNo)">复制</u-button>
</view>
</view>
</view>
<view class="order_xu"></view>
......@@ -295,6 +316,13 @@
</view>
<view style='width: 100%;height: 80px;'></view>
<view class="btn-box" >
<view class="kefu" style="position: relative;" >
<u-icon name="service-o" color="#111" size="24rpx"></u-icon>
<span style='margin-left: 3px;'>客服</span>
<button open-type="contact" class="contButton" ></button>
</view>
<view class="item" v-if="OrderInfo.OrderStatus==1 ">
<u-button shape="circle" size="medium" @click.stop="queren(OrderInfo)" :custom-style="customStyle2" >待付款</u-button>
</view>
......@@ -302,7 +330,7 @@
<u-button shape="circle" size="medium" @click.stop="onemoreorder(OrderInfo)" :custom-style="customStyle2" >再来一单</u-button>
</view>
<view @click.stop="getCancel(OrderInfo)" class="item" v-if="OrderInfo.IsApplyForCancel!=1 && (OrderInfo.OrderStatus==1||OrderInfo.OrderStatus==2 ||OrderInfo.OrderStatus==3)&& getquxiao(OrderInfo)">
<u-button shape="circle" size="medium" :custom-style="customStyle" @click="cancel">取消订单</u-button>
<u-button shape="circle" size="medium" :custom-style="customStyle" >取消订单</u-button>
</view>
<view class="item" style="line-height: 34px;font-size: 16px;color: gray;font-weight: 600;" v-if="OrderInfo.OrderStatus == 4">
......@@ -311,6 +339,8 @@
<view class="item" style="line-height: 34px;font-size: 16px;color: gray;font-weight: 600;" v-if="OrderInfo.OrderStatus == 5">
待处理
</view>
</view>
<u-popup v-model="showModal" mode="center" length="80%">
<view style='display: flex;flex-direction: column;align-items: center;background: #fff;'>
......@@ -492,7 +522,10 @@
uni.showToast({
title: "支付成功"
})
that.getMyOrderInfo()
// that.getMyOrderInfo()
uni.redirectTo({
url: '/pages/jiuzhai/paysuccess?PreferPrice='+that.OrderInfo.PreferPrice
});
},
fail: function(err) {
console.log('fail:', err);
......@@ -549,7 +582,12 @@
url: '/pages/guidecar/index?obj='+encodeURIComponent(JSON.stringify(obj)),
})
}
}
},
paste(value) {
uni.setClipboardData({
data: value,
});
},
}
}
</script>
......
<template>
<view class="paySuccess">
<view style="background: #fff;">
<view class="img-box">
<img src="/static/images/icon/pay-success.png" class="img" />
</view>
<view class="title">订单支付成功</view>
<view class="price">实付 ¥{{PreferPrice}}</view>
<view class="btn-box">
<u-button style="display: inline-block;" shape="circle" :custom-style="customStyle" @click="goHome">返回首页</u-button>
<u-button shape="circle" style="margin-left: 60rpx; display: inline-block;" :custom-style="themCustomStyle"
@click.stop="redictToOrders">查看订单</u-button>
</view>
</view>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
customStyle: {
marginLeft: "20px",
padding: "0 30rpx",
},
themCustomStyle: {
marginLeft: "20px",
padding: "0 30rpx",
},
mainColor: "",
recommend: [],
payInfo: {},
showCoupons: false,
couponMessage: '',
PreferPrice:'',
};
},
onLoad(option) {
if (option.PreferPrice) {
this.PreferPrice = option.PreferPrice
}
uni.setNavigationBarTitle({
title: "支付成功",
});
this.mainColor = this.$uiConfig.mainColor;
this.themCustomStyle.color = this.mainColor;
this.themCustomStyle.borderColor = this.mainColor;
},
methods: {
redictToOrders() {
uni.redirectTo({
url: '/pages/jiuzhai/allorderList'
});
},
goHome() {
uni.reLaunch({
url: "/pages/index/index",
});
},
},
};
</script>
<style>
.paySuccess {
min-height: 100vh;
padding-bottom: 40rpx;
background: #f5f5f5;
}
.paySuccess .img-box {
display: flex;
align-items: center;
justify-content: center;
}
.paySuccess .img-box .img {
width: 256rpx;
height: 256rpx;
padding: 60rpx 0 0 0;
}
.paySuccess .title {
padding: 40rpx 0 20rpx 0;
font-size: 32rpx;
color: #000;
font-weight: 600;
text-align: center;
}
.paySuccess .price {
font-size: 30rpx;
color: gray;
padding-bottom: 60rpx;
text-align: center;
}
.paySuccess .btn-box {
padding-bottom: 60rpx;
text-align: center;
}
</style>
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