Feat:新增旅居订单分类
This commit is contained in:
@@ -11,6 +11,28 @@
|
||||
@search="changeType"
|
||||
/>
|
||||
</view>
|
||||
<view class="order-type-tabs v12-mb-2">
|
||||
<u-tabs
|
||||
lineHeight="2"
|
||||
lineColor="#C52733"
|
||||
:activeStyle="{
|
||||
color: '#C52733',
|
||||
fontWeight: 'bold'
|
||||
}"
|
||||
:inactiveStyle="{
|
||||
color: '#333',
|
||||
fontSize: '28rpx',
|
||||
fontWeight: 'bold'
|
||||
}"
|
||||
:itemStyle="{
|
||||
height: '30px',
|
||||
padding: '0 15px !important'
|
||||
}"
|
||||
:current="orderTypeTabIndex"
|
||||
:list="orderTypeTabList"
|
||||
@click="orderTypeTabChange"
|
||||
/>
|
||||
</view>
|
||||
<view class="m-tab-warp">
|
||||
<u-tabs
|
||||
lineHeight="0"
|
||||
@@ -471,6 +493,12 @@ export default {
|
||||
{ name: '待评价' },
|
||||
{ name: '已完成' }
|
||||
],
|
||||
orderTypeTabList: [
|
||||
{ name: '购物', orderType: 'shop' },
|
||||
{ name: '旅居', orderType: 'travel' }
|
||||
],
|
||||
orderTypeTabIndex: 0,
|
||||
orderType: 'shop',
|
||||
offlinePayStatus: 2,
|
||||
orderData: {},
|
||||
type: 0,
|
||||
@@ -833,6 +861,11 @@ export default {
|
||||
this.$yroute.query.type = this.type
|
||||
this.changeType()
|
||||
},
|
||||
orderTypeTabChange(item) {
|
||||
this.orderTypeTabIndex = item.index
|
||||
this.orderType = item.orderType
|
||||
this.changeType()
|
||||
},
|
||||
changeType() {
|
||||
this.orderList = []
|
||||
this.page = 1
|
||||
@@ -856,13 +889,15 @@ export default {
|
||||
const {
|
||||
page,
|
||||
limit,
|
||||
keyword
|
||||
keyword,
|
||||
orderType
|
||||
} = this
|
||||
getOrderList({
|
||||
page,
|
||||
limit,
|
||||
type,
|
||||
keyword
|
||||
keyword,
|
||||
orderType
|
||||
}).then(res => {
|
||||
this.orderList = this.orderList.concat(res.data)
|
||||
if (this.orderList.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user