Browse Source

上传

master
前端-胡立永 6 months ago
parent
commit
9237b7bfb2
2 changed files with 17 additions and 30 deletions
  1. +10
    -5
      pages/index/center.vue
  2. +7
    -25
      pages/index/order.vue

+ 10
- 5
pages/index/center.vue View File

@ -62,23 +62,28 @@
<view class="order">
<view class="box">
<view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=1')">
<view class="boxs"
@click="$utils.navigateTo('/pages/index/order?type=1')">
<image src="../../static/image/center/13.png" mode="aspectFill" />
<view>待付款</view>
</view>
<view class="boxs">
<view class="boxs"
@click="$utils.navigateTo('/pages/index/order?type=2')">
<image src="../../static/image/center/14.png" mode="aspectFill" />
<view>已付款</view>
</view>
<view class="boxs">
<view class="boxs"
@click="$utils.navigateTo('/pages/index/order?type=3')">
<image src="../../static/image/center/15.png" mode="aspectFill" />
<view>待发货</view>
</view>
<view class="boxs">
<view class="boxs"
@click="$utils.navigateTo('/pages/index/order?type=4')">
<image src="../../static/image/center/16.png" mode="aspectFill" />
<view>待收货</view>
</view>
<view class="boxs">
<view class="boxs"
@click="$utils.navigateTo('/pages/index/order?type=5')">
<image src="../../static/image/center/17.png" mode="aspectFill" />
<view>已完成</view>
</view>


+ 7
- 25
pages/index/order.vue View File

@ -12,6 +12,7 @@
lineColor="#A3D250"
lineHeight="8rpx"
lineWidth="50rpx"
:current="current"
@click="clickTabs"></uv-tabs>
<view v-if="orderList.length > 0" class="list">
@ -132,41 +133,22 @@
total : 0,
},
state : -1,
current : 0,
}
},
onShow() {
this.orderPage()
onLoad(args) {
this.current = args.type || 0
},
//
onReachBottom() {
if(this.queryParams.pageSize < this.orderList.total){
this.queryParams.pageSize += 10
this.orderPage()
}
onShow() {
},
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
clickTabs(index) {
if (index == 0) {
this.state = -1;
delete this.queryParams.state
} else {
this.state = index - 1;
this.queryParams.state = index - 1
}
this.queryParams.pageSize = 10
this.orderPage()
},
//
toOrderDetail(id) {


Loading…
Cancel
Save