订单页调整

static-project
chen 2022-06-14 14:50:48 +08:00
parent ebecce786d
commit c0e7afbd82
2 changed files with 11 additions and 12 deletions

View File

@ -63,7 +63,7 @@
{url:'',iconsrc:'/static/public/icon-payment.png',iconWidth:50,iconHeight:44,title:'已下单',num:0},
{url:'',iconsrc:'/static/public/icon-send-goods.png',iconWidth:46,iconHeight:40,title:'制作中',num:0},
{url:'',iconsrc:'/static/public/icon-take.png',iconWidth:48,iconHeight:42,title:'已发货',num:0},
{url:'',iconsrc:'/static/public/icon-finish.png',iconWidth:49,iconHeight:44,title:'已完成',num:0},
{url:'',iconsrc:'/static/public/icon-finish.png',iconWidth:49,iconHeight:44,title:'已送达',num:0},
],
list1: [
{url:'/pagesA/order-list/order-list',iconsrc:'',iconWidth:60,iconHeight:60,title:'我的订单',content:'全部订单',contentColor:'#999999',ifNext:true},
@ -113,6 +113,7 @@
this.list[0].num = res.data.order_count.order_placed;
this.list[1].num = res.data.order_count.makeing;
this.list[2].num = res.data.order_count.shipped;
this.list[3].num = res.data.order_count.arrived;
}
})
},

View File

@ -8,7 +8,7 @@
<swiper-tab-jl :list="tagList" v-model="activeIndex" @changeEv="tabTap" itemColor="#FFFFFF"></swiper-tab-jl>
</view>
<swiper :style="{height: swiperHeight + 'px'}" class="fon30" style="background-color: #f4f4f4;" :current="activeIndex" @change="swiperChange">
<swiper-item v-for="(item,index) in dataList" :key="index" class="pad-s30">
<swiper-item v-for="(item,index) in dataList" :key="index" class="pad-sx30">
<scroll-view scroll-y @scrolltolower="scrollBottomEv" style="height: 100%;">
<!-- 列表数据 -->
<view class="radius20 bacf pad-zy30 mar-x25 mar-zy40" @tap="goDetail(item1.id)" v-for="(item1,index1) in dataList[index]" :key="index1">
@ -33,11 +33,10 @@
<view class="bold" style="color: #f83030;">合计{{item1.original_price}}</view>
<view class="btn" @tap.stop="cancleEv(item1.coding)" v-if="item1.status == 'order_placed'"></view>
<view class="btn csbtn" @tap.stop="buyEv(index1)" v-if="item1.status == 'completed' || item1.status == 'cancel'"></view>
<view class="btn csbtn" @tap.stop="affirmEv(item1.id)" v-if="item1.status == 'shipped' || item1.status == 'arrived'"></view>
<!-- <view class="btn csbtn" @tap.stop="affirmEv(item1.id)" v-if="item1.status == 'shipped' || item1.status == 'arrived'"></view> -->
</view>
</view>
<view class="pad-sx40" v-if="total==totalAll"><pitera textStr="—— 到底啦 ——"></pitera></view>
<view class="pad-x40" v-if="total==totalAll"><pitera textStr="—— 到底啦 ——"></pitera></view>
</scroll-view>
</swiper-item>
</swiper>
@ -68,7 +67,7 @@
{title:'已下单',tag:'order_placed'},
{title:'制作中',tag:'makeing'},
{title:'已发货',tag:'shipped'},
{title:'已完成',tag:'completed'},
{title:'已送达',tag:'arrived'},
{title:'已取消',tag:'cancel'},
],
activeIndex:0,
@ -105,16 +104,12 @@
this.activeIndex = e.detail.current;
},
scrollBottomEv(e) {
console.log('到底了...')
this.ifLoading = true;
let pageSize = Math.floor(this.totalAll/this.size)
if(this.page < pageSize){
if(this.page <= pageSize){
this.page++;
this.getOrderList();
}else if(this.page == pageSize){
this.page++;
this.getOrderList();
this.total = this.totalAll;
}else{
this.ifLoading = false;
return false;
@ -145,6 +140,9 @@
this.dataList[this.activeIndex].push(dataObj)
})
console.log(this.dataList[this.activeIndex],'订单列表')
if(this.page == Math.floor(this.totalAll/this.size)+1){
this.total = this.totalAll;
}
}
})
},