This commit is contained in:
2019-12-23 16:53:54 +08:00
parent 9a53bca281
commit 7dd0d87e46
11 changed files with 135 additions and 21 deletions

View File

@@ -1,8 +1,86 @@
import bin from "../../../utils/bin"
Component({
properties: {
},
data: {
},
methods: {
getorder(res){
bin.request({
url:"User/getOrderList",
urldata:{
user_id:res,
type:"WAITPAY",
page:"0"
}
}).then((r)=>{
console.log(r)
this.setData({
WAITPAY:r.data.result
})
})
bin.request({
url:"User/getOrderList",
urldata:{
user_id:res,
type:"WAITSEND",
page:"0"
}
}).then((r)=>{
console.log(r)
this.setData({
WAITSEND:r.data.result
})
})
bin.request({
url:"User/getOrderList",
urldata:{
user_id:res,
type:"WAITRECEIVE",
page:"0"
}
}).then((r)=>{
console.log(r)
this.setData({
WAITRECEIVE:r.data.result
})
})
bin.request({
url:"User/getOrderList",
urldata:{
user_id:res,
type:"FINISH",
page:"0"
}
}).then((r)=>{
console.log(r)
this.setData({
FINISH:r.data.result
})
})
bin.request({
url:"User/getOrderList",
urldata:{
user_id:res,
type:"AFTERSALE",
page:"0"
}
}).then((r)=>{
console.log(r)
this.setData({
AFTERSALE:r.data.result
})
})
},
getlist(){
bin.getuserid().then((res)=>{
this.getorder(res)
})
}
},
ready(){
this.getlist()
}
})

View File

@@ -1,9 +1,13 @@
<van-tabs class="tab" swipe-threshold="5">
<van-tab title="待付款">
<commodity></commodity>
<commodity wx:for="{{WAITPAY}}" wx:for-index="j" wx:key="{{j}}" num="{{item.goods_num}}" cprice="{{item.goods_price}}" freight="{{item.integral_money}}" goods="{{item.goods_list}}"> </commodity>
</van-tab>
<van-tab title="代发货"></van-tab>
<van-tab title="待收货"> </van-tab>
<van-tab title="已完成"> </van-tab>
<van-tab title="售后"> </van-tab>
<van-tab title="代发货">
<commodity wx:for="{{WAITSEND}}" wx:for-index="j" wx:key="{{j}}" num="{{item.goods_num}}" cprice="{{item.goods_price}}" freight="{{item.integral_money}}" goods="{{item.goods_list}}"> </commodity></van-tab>
<van-tab title="待收货">
<commodity wx:for="{{WAITRECEIVE}}" wx:for-index="j" wx:key="{{j}}" num="{{item.goods_num}}" cprice="{{item.goods_price}}" freight="{{item.integral_money}}" goods="{{item.goods_list}}"> </commodity></van-tab>
<van-tab title="已完成">
<commodity wx:for="{{FINISH}}" wx:for-index="j" wx:key="{{j}}" num="{{item.goods_num}}" cprice="{{item.goods_price}}" freight="{{item.integral_money}}" goods="{{item.goods_list}}"> </commodity> </van-tab>
<van-tab title="售后">
<commodity wx:for="{{AFTERSALE}}" wx:for-index="j" wx:key="{{j}}" num="{{item.goods_num}}" cprice="{{item.goods_price}}" freight="{{item.integral_money}}" goods="{{item.goods_list}}"> </commodity> </van-tab>
</van-tabs>