|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view id="order" class="order">
|
|
|
- <view v-if="orders.length===0" style="margin: 20upx auto;text-align: center; font-size: 28upx;color: #999999;">
|
|
|
+ <view v-if="orders.length===0" style="margin: 20upx auto;text-align: center; font-size: 28upx;color: #999999;">
|
|
|
暂无任何订单
|
|
|
</view>
|
|
|
<view class="order-list">
|
|
@@ -34,7 +34,8 @@
|
|
|
总价 <text class="warning">¥{{order.total_amount}}</text>
|
|
|
</view>
|
|
|
<view class="option">
|
|
|
- <button v-if="order.status === 'wait_pay'" class="pay-btn" type="default" @tap="openCashier(order.order_no)">立即支付</button>
|
|
|
+ <button v-if="order.status === 'wait_pay'" class="pay-btn" type="default"
|
|
|
+ @tap="openCashier(order.order_no)">立即支付</button>
|
|
|
<button v-if="order.status === 'wait_sign'" class="confirm-btn" type="default">确认收货</button>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -54,12 +55,19 @@
|
|
|
},
|
|
|
onLoad() {
|
|
|
if (this.$store.state.user.group_id === 2) {
|
|
|
- this.orderStatus = 'wait_deliver'
|
|
|
- }
|
|
|
- if (this.$store.state.user.group_id === 3) {
|
|
|
- this.orderStatus = 'wait_pay'
|
|
|
- }
|
|
|
-
|
|
|
+ this.orderStatus = 'wait_deliver'
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title: "我的待发货"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.$store.state.user.group_id === 3) {
|
|
|
+ this.orderStatus = 'wait_pay'
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title: "我的待付款"
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
this.getOrdersData();
|
|
|
},
|
|
|
onPageScroll(e) {
|
|
@@ -74,12 +82,12 @@
|
|
|
methods: {
|
|
|
openDetails(id) {
|
|
|
uni.navigateTo({
|
|
|
- url: "order-details?id="+id
|
|
|
+ url: "order-details?id=" + id
|
|
|
})
|
|
|
},
|
|
|
openCashier(order_no) {
|
|
|
uni.navigateTo({
|
|
|
- url: "cashier?order_no="+order_no
|
|
|
+ url: "cashier?order_no=" + order_no
|
|
|
})
|
|
|
},
|
|
|
getOrdersData() {
|