【类 型】:factor
【原 因】:未支付订单 立即支付按钮 跳转到支付页面 【过 程】:给按钮加跳转组件 把订单号 价格总和 传到支付页面 并跳转支付页面 【影 响】: # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
86996a2ea1
commit
a983a93c5d
@ -7,7 +7,8 @@
|
||||
<view class="fz32 l-h-18 fb">取餐点:{{order.receive_site_name}}</view>
|
||||
<view class="m-t-12">
|
||||
<scroll-view class="scroll-view_H" scroll-x="true">
|
||||
<view class="scroll-view-item_H m-r-12" v-for="(ps,index) in order.product_snapshot" :key="index">
|
||||
<view class="scroll-view-item_H m-r-12" v-for="(ps,index) in order.product_snapshot"
|
||||
:key="index">
|
||||
<u--image :src="ps.spu_photo[0]" width="147rpx" height="110rpx" radius="4rpx" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
@ -16,15 +17,17 @@
|
||||
<view class="flex1 flex column md">
|
||||
<view class="fz28 fb fcm l-h-18">{{ orderStatusDisplay }}</view>
|
||||
<view class="priceBox fz36 fb">
|
||||
¥{{Number(order.transport_price) + Number(order.pack_price) + Number(order.total_price) | formatPrice}}
|
||||
¥{{fullPrice}}
|
||||
</view>
|
||||
<view class="fz24 fcb">共{{order.total_num}}件</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-t-24 flex mr">
|
||||
<view v-if="showPayButton" class="nullBut bg-m fci rad8 fz28 flex mac mc m-l-24">
|
||||
立即支付
|
||||
</view>
|
||||
<navigator :url="`/pages/shop/pay?order_sn=${order.order_sn}&fullPrice=${fullPrice}`" hover-class="navigator-hover">
|
||||
<view v-if="showPayButton" class="nullBut bg-m fci rad8 fz28 flex mac mc">
|
||||
立即支付
|
||||
</view>
|
||||
</navigator>
|
||||
<view v-if="showPickupNumber" class="numberBut bg-m fci rad8 fz28 fb flex mac mc m-l-24">
|
||||
{{ foodSn }}
|
||||
</view>
|
||||
@ -61,23 +64,27 @@
|
||||
clearInterval(this.intervalId);
|
||||
},
|
||||
computed: {
|
||||
// 计算属性:是否显示 "立即支付" 按钮
|
||||
//订单总价格
|
||||
fullPrice(){
|
||||
return this.formatPrice(Number(this.order.transport_price) + Number(this.order.pack_price) + Number(this.order.total_price))
|
||||
},
|
||||
// 是否显示 "立即支付" 按钮
|
||||
showPayButton() {
|
||||
return this.order.main_status === '未付款';
|
||||
},
|
||||
// 计算属性:是否显示 "取餐号"
|
||||
// 是否显示 "取餐号"
|
||||
showPickupNumber() {
|
||||
return this.order.main_status === '已付款' && this.order.refund_status === '未申请';
|
||||
},
|
||||
// 计算属性:是否显示 "申请售后" 按钮
|
||||
// 是否显示 "申请售后" 按钮
|
||||
showAfterSaleButton() {
|
||||
return this.order.main_status === '已付款' && this.order.refund_status === '未申请';
|
||||
},
|
||||
// 计算属性:是否显示 "退款详情" 按钮
|
||||
// 是否显示 "退款详情" 按钮
|
||||
showRefundDetailsButton() {
|
||||
return this.order.refund_status !== '未申请' && this.order.main_status !== '已完成';
|
||||
},
|
||||
// 计算属性:显示订单状态
|
||||
// 显示订单状态
|
||||
orderStatusDisplay() {
|
||||
if (this.order.main_status === '未付款') {
|
||||
return '待支付';
|
||||
@ -98,7 +105,7 @@
|
||||
return '';
|
||||
}
|
||||
},
|
||||
// 计算属性:显示退款状态
|
||||
// 显示退款状态
|
||||
refundStatusDisplay() {
|
||||
switch (this.order.refund_status) {
|
||||
case '申请中':
|
||||
@ -114,6 +121,9 @@
|
||||
}
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
formatPrice //价格格式化
|
||||
},
|
||||
props: {
|
||||
order: {
|
||||
type: Object,
|
||||
|
Loading…
Reference in New Issue
Block a user