|
@ -14,7 +14,7 @@ |
|
|
|
|
|
|
|
|
<view v-if="orderList.length > 0" class="list"> |
|
|
<view v-if="orderList.length > 0" class="list"> |
|
|
<view class="item" |
|
|
<view class="item" |
|
|
v-for="(item, index) in orderList" |
|
|
|
|
|
|
|
|
v-for="(item, index) in orderList.records" |
|
|
@click="toOrderDetail(item.id)" |
|
|
@click="toOrderDetail(item.id)" |
|
|
:key="index"> |
|
|
:key="index"> |
|
|
|
|
|
|
|
@ -112,30 +112,57 @@ |
|
|
pageNo: 1, |
|
|
pageNo: 1, |
|
|
pageSize: 10 |
|
|
pageSize: 10 |
|
|
}, |
|
|
}, |
|
|
orderList: [ |
|
|
|
|
|
{ |
|
|
|
|
|
money : 99.99, |
|
|
|
|
|
address : '广东省广州市越秀区城南故事C3栋2802', |
|
|
|
|
|
name : '李**', |
|
|
|
|
|
phone : '150*****091', |
|
|
|
|
|
unit : '120*40*75【桌子尺寸】', |
|
|
|
|
|
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg', |
|
|
|
|
|
state_dictText : '已完成', |
|
|
|
|
|
} |
|
|
|
|
|
], //订单列表数据 |
|
|
|
|
|
|
|
|
// orderList: [ |
|
|
|
|
|
// { |
|
|
|
|
|
// money : 99.99, |
|
|
|
|
|
// address : '广东省广州市越秀区城南故事C3栋2802', |
|
|
|
|
|
// name : '李**', |
|
|
|
|
|
// phone : '150*****091', |
|
|
|
|
|
// unit : '120*40*75【桌子尺寸】', |
|
|
|
|
|
// image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg', |
|
|
|
|
|
// state_dictText : '已完成', |
|
|
|
|
|
// } |
|
|
|
|
|
// ], //订单列表数据 |
|
|
|
|
|
orderList : { |
|
|
|
|
|
records : [], |
|
|
|
|
|
total : 0, |
|
|
|
|
|
}, |
|
|
|
|
|
state : -1, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed : { |
|
|
|
|
|
|
|
|
onShow() { |
|
|
|
|
|
this.orderPage() |
|
|
|
|
|
}, |
|
|
|
|
|
//滚动到屏幕底部 |
|
|
|
|
|
onReachBottom() { |
|
|
|
|
|
if(this.queryParams.pageSize < this.orderList.total){ |
|
|
|
|
|
this.queryParams.pageSize += 10 |
|
|
|
|
|
this.orderPage() |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
orderPage(){ |
|
|
|
|
|
let queryParams = { |
|
|
|
|
|
...this.queryParams, |
|
|
|
|
|
} |
|
|
|
|
|
if(this.state != -1){ |
|
|
|
|
|
queryParams.state = this.state |
|
|
|
|
|
} |
|
|
|
|
|
this.$api('orderPage', queryParams, res => { |
|
|
|
|
|
if(res.code == 200){ |
|
|
|
|
|
this.orderList = res.result |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
//点击tab栏 |
|
|
//点击tab栏 |
|
|
clickTabs(index) { |
|
|
clickTabs(index) { |
|
|
if (index == 0) { |
|
|
if (index == 0) { |
|
|
this.queryParams.state = -1; |
|
|
|
|
|
|
|
|
this.state = -1; |
|
|
} else { |
|
|
} else { |
|
|
this.queryParams.state = index - 1; |
|
|
|
|
|
|
|
|
this.state = index - 1; |
|
|
} |
|
|
} |
|
|
this.getOrderList() |
|
|
|
|
|
|
|
|
this.queryParams.pageSize = 10 |
|
|
|
|
|
this.orderPage() |
|
|
}, |
|
|
}, |
|
|
//跳转订单详情页面 |
|
|
//跳转订单详情页面 |
|
|
toOrderDetail(id) { |
|
|
toOrderDetail(id) { |
|
|