订单页调整
parent
ebecce786d
commit
c0e7afbd82
|
@ -63,7 +63,7 @@
|
||||||
{url:'',iconsrc:'/static/public/icon-payment.png',iconWidth:50,iconHeight:44,title:'已下单',num:0},
|
{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-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-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: [
|
list1: [
|
||||||
{url:'/pagesA/order-list/order-list',iconsrc:'',iconWidth:60,iconHeight:60,title:'我的订单',content:'全部订单',contentColor:'#999999',ifNext:true},
|
{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[0].num = res.data.order_count.order_placed;
|
||||||
this.list[1].num = res.data.order_count.makeing;
|
this.list[1].num = res.data.order_count.makeing;
|
||||||
this.list[2].num = res.data.order_count.shipped;
|
this.list[2].num = res.data.order_count.shipped;
|
||||||
|
this.list[3].num = res.data.order_count.arrived;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<swiper-tab-jl :list="tagList" v-model="activeIndex" @changeEv="tabTap" itemColor="#FFFFFF"></swiper-tab-jl>
|
<swiper-tab-jl :list="tagList" v-model="activeIndex" @changeEv="tabTap" itemColor="#FFFFFF"></swiper-tab-jl>
|
||||||
</view>
|
</view>
|
||||||
<swiper :style="{height: swiperHeight + 'px'}" class="fon30" style="background-color: #f4f4f4;" :current="activeIndex" @change="swiperChange">
|
<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%;">
|
<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">
|
<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="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" @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="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>
|
</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>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
@ -68,7 +67,7 @@
|
||||||
{title:'已下单',tag:'order_placed'},
|
{title:'已下单',tag:'order_placed'},
|
||||||
{title:'制作中',tag:'makeing'},
|
{title:'制作中',tag:'makeing'},
|
||||||
{title:'已发货',tag:'shipped'},
|
{title:'已发货',tag:'shipped'},
|
||||||
{title:'已完成',tag:'completed'},
|
{title:'已送达',tag:'arrived'},
|
||||||
{title:'已取消',tag:'cancel'},
|
{title:'已取消',tag:'cancel'},
|
||||||
],
|
],
|
||||||
activeIndex:0,
|
activeIndex:0,
|
||||||
|
@ -105,16 +104,12 @@
|
||||||
this.activeIndex = e.detail.current;
|
this.activeIndex = e.detail.current;
|
||||||
},
|
},
|
||||||
scrollBottomEv(e) {
|
scrollBottomEv(e) {
|
||||||
|
console.log('到底了...')
|
||||||
this.ifLoading = true;
|
this.ifLoading = true;
|
||||||
|
|
||||||
let pageSize = Math.floor(this.totalAll/this.size)
|
let pageSize = Math.floor(this.totalAll/this.size)
|
||||||
if(this.page < pageSize){
|
if(this.page <= pageSize){
|
||||||
this.page++;
|
this.page++;
|
||||||
this.getOrderList();
|
this.getOrderList();
|
||||||
}else if(this.page == pageSize){
|
|
||||||
this.page++;
|
|
||||||
this.getOrderList();
|
|
||||||
this.total = this.totalAll;
|
|
||||||
}else{
|
}else{
|
||||||
this.ifLoading = false;
|
this.ifLoading = false;
|
||||||
return false;
|
return false;
|
||||||
|
@ -145,6 +140,9 @@
|
||||||
this.dataList[this.activeIndex].push(dataObj)
|
this.dataList[this.activeIndex].push(dataObj)
|
||||||
})
|
})
|
||||||
console.log(this.dataList[this.activeIndex],'订单列表')
|
console.log(this.dataList[this.activeIndex],'订单列表')
|
||||||
|
if(this.page == Math.floor(this.totalAll/this.size)+1){
|
||||||
|
this.total = this.totalAll;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue