完善订单
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
:key="index"
|
||||
:url="'/pages/order_details/order_details?id=' + item.id">
|
||||
<order-goods :list="item.order_goods" :order_type="item.order_type" :imageRadius="12"
|
||||
:orderDesc="item.order_status_desc"></order-goods>
|
||||
:orderDesc="item.order_status_desc" :orderStatus="item.order_status"></order-goods>
|
||||
<view class="u-m-t-26 u-m-b-26 u-p-l-20 u-p-r-20">
|
||||
<u-line color="#EEE" />
|
||||
</view>
|
||||
@ -33,12 +33,12 @@
|
||||
:customStyle="{ width: '164rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none' }"
|
||||
:hair-line="false" shape="circle">去付款</u-button>
|
||||
</view>
|
||||
<view v-if="type === 'delivery' || type === 'finish'">
|
||||
<u-button @click="seeDetails" hover-class="none" :customStyle="{width: '164rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none'}" :hair-line="false" shape="circle">查看详情</u-button>
|
||||
<view v-if="item.order_status > 0 && item.order_status < 4">
|
||||
<u-button @click.stop="seeDetails(item.id)" hover-class="none" :customStyle="{width: '164rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none'}" :hair-line="false" shape="circle">查看详情</u-button>
|
||||
</view>
|
||||
<view v-if="item.order_status == 4">
|
||||
<u-button @click.stop="toRefund(item.id, item.order_goods)" hover-class="none" :customStyle="{width: '164rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none'}" :hair-line="false" shape="circle">申请退款</u-button>
|
||||
</view>
|
||||
<!-- <view>
|
||||
<u-button @click="toRefund" hover-class="none" :customStyle="{width: '164rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none'}" :hair-line="false" shape="circle">申请退款</u-button>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
@ -88,7 +88,20 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
uni.$on("refreshorder", () => {
|
||||
this.reflesh();
|
||||
});
|
||||
uni.$on("payment", (params) => {
|
||||
if (params.result) {
|
||||
this.reflesh();
|
||||
uni.navigateBack();
|
||||
setTimeout(() => this.$toast({ title: "支付成功" }), 0.5 * 1000);
|
||||
}
|
||||
});
|
||||
},
|
||||
destroyed: function () {
|
||||
uni.$off(["payment", "refreshorder"]);
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
upCallback(page) {
|
||||
@ -138,13 +151,23 @@ export default {
|
||||
},
|
||||
|
||||
// 查看详情
|
||||
seeDetails() {
|
||||
|
||||
seeDetails(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/order_details/order_details?id=${id}`
|
||||
})
|
||||
},
|
||||
|
||||
// 申请退款
|
||||
toRefund() {
|
||||
|
||||
toRefund(id, goods) {
|
||||
if (goods.length == 1) {
|
||||
uni.navigateTo({
|
||||
url: `/bundle/pages/apply_refund/apply_refund?order_id=${goods[0].order_id}&item_id=${goods[0].item_id}`
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/order_details/order_details?id=${id}`
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
Reference in New Issue
Block a user