|
|
|
|
@ -1,11 +1,11 @@ |
|
|
|
|
<template> |
|
|
|
|
<view class="order_box"> |
|
|
|
|
<view class="order_title"> |
|
|
|
|
<p @click="handleTab(1)" class="tit" :class="active == 1 ? 'actived' : ''">全部</p> |
|
|
|
|
<p @click="handleTab(2)" class="tit" :class="active == 2 ? 'actived' : ''">待付款</p> |
|
|
|
|
<p @click="handleTab(3)" class="tit" :class="active == 3 ? 'actived' : ''">待发货</p> |
|
|
|
|
<p @click="handleTab(4)" class="tit" :class="active == 4 ? 'actived' : ''">待收货</p> |
|
|
|
|
<p @click="handleTab(5)" class="tit" :class="active == 5 ? 'actived' : ''">已完成</p> |
|
|
|
|
<p @click="handleTab(1)" class="tit" :class="active == '' ? 'actived' : ''">全部</p> |
|
|
|
|
<p @click="handleTab(2)" class="tit" :class="active == 1 ? 'actived' : ''">待付款</p> |
|
|
|
|
<p @click="handleTab(3)" class="tit" :class="active == 2 ? 'actived' : ''">待发货</p> |
|
|
|
|
<p @click="handleTab(4)" class="tit" :class="active == 3 ? 'actived' : ''">待收货</p> |
|
|
|
|
<p @click="handleTab(5)" class="tit" :class="active == 4 ? 'actived' : ''">已完成</p> |
|
|
|
|
</view> |
|
|
|
|
<view class="order_content" v-for="(item,index) in orderData" :key="index"> |
|
|
|
|
<view class="order_item" @click="handleCheck(item)"> |
|
|
|
|
@ -68,7 +68,7 @@ |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
imgPrefix: getApp().globalData.imgPrefix, |
|
|
|
|
active: 1, |
|
|
|
|
active: '', |
|
|
|
|
orderData: [], |
|
|
|
|
current: 0, |
|
|
|
|
size: 10, |
|
|
|
|
@ -78,11 +78,16 @@ |
|
|
|
|
contentdown: "点击查看更多", |
|
|
|
|
contentrefresh: "正在加载...", |
|
|
|
|
contentnomore: "没有更多数据了", |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
userInfo: {} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.loadMore(); |
|
|
|
|
onLoad() { |
|
|
|
|
let userInfo = uni.getStorageSync('userInfo'); |
|
|
|
|
if(userInfo) { |
|
|
|
|
this.userInfo = JSON.parse(userInfo); |
|
|
|
|
this.loadMore(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 查看物流 |
|
|
|
|
@ -94,9 +99,9 @@ |
|
|
|
|
loadMore() { |
|
|
|
|
if (this.hasMore) { |
|
|
|
|
this.current = this.current + 1; |
|
|
|
|
this.staus = 'loading'; |
|
|
|
|
this.status = 'loading'; |
|
|
|
|
uni.request({ |
|
|
|
|
url: getApp().globalData.baseUrl + '/blade-desk/order/page?current=' + this.current + '&size=' + this |
|
|
|
|
url: getApp().globalData.baseUrl + '/blade-desk/order/page?buyerPhone=' + this.userInfo.phone + '&status=' + this.active + '¤t=' + this.current + '&size=' + this |
|
|
|
|
.size, |
|
|
|
|
method: 'GET', |
|
|
|
|
header: { |
|
|
|
|
@ -122,7 +127,11 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
handleTab(val) { |
|
|
|
|
this.active = val |
|
|
|
|
this.active = val; |
|
|
|
|
this.current = 0; |
|
|
|
|
this.orderData = []; |
|
|
|
|
this.hasMore = true; |
|
|
|
|
this.loadMore(); |
|
|
|
|
}, |
|
|
|
|
handleCheck(row) { |
|
|
|
|
let item = encodeURIComponent(JSON.stringify(row)) |
|
|
|
|
|