7.14
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom">
|
||||
<view>
|
||||
<view class="item-container" v-for="order in orderList" :key="order.order_id">
|
||||
<OrderItem :order="order"></OrderItem>
|
||||
<OrderItem :order="order" @refreshOrderList="getOrderList"></OrderItem>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList.length"></u-empty>
|
||||
@@ -64,7 +64,7 @@ export default {
|
||||
this.setViewHeight();
|
||||
},
|
||||
methods: {
|
||||
async getOrderList({ reload = '' } = {}) {
|
||||
setOrderType() {
|
||||
let type;
|
||||
// state_type 订单状态:0:已取消 10:未付款 20:已付款 30:已发货 40:已收货
|
||||
switch (this.current) {
|
||||
@@ -87,6 +87,10 @@ export default {
|
||||
type = -1;
|
||||
break;
|
||||
}
|
||||
return type;
|
||||
},
|
||||
async getOrderList({ reload = '' } = {}) {
|
||||
const type = this.setOrderType();
|
||||
const res = await this.$u.api.getOrderList({
|
||||
page: this.page,
|
||||
type: type,
|
||||
|
||||
Reference in New Issue
Block a user