deguodaigou/components/order/tab/index.js

114 lines
3.0 KiB
JavaScript
Raw Normal View History

2019-12-23 16:53:54 +08:00
import bin from "../../../utils/bin"
2019-12-23 10:04:09 +08:00
Component({
properties: {
2019-12-28 14:27:57 +08:00
index:Number
2019-12-23 10:04:09 +08:00
},
data: {
},
methods: {
2019-12-24 14:08:26 +08:00
receivingw(a){
// receiving
wx.navigateTo({
url: "/pages/receiving/receiving?id=" + a.target.dataset.id
})
},
receivings(a){
console.log(a)
wx.navigateTo({
url: "/pages/undetermined/undetermined?id=" + a.target.dataset.id
})
},
todetail(a) {
console.log(a)
// return ;
wx.navigateTo({
url: "/pages/particulars/particulars?id=" + a.target.dataset.id
})
},
2019-12-23 16:53:54 +08:00
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)
})
2019-12-24 14:08:26 +08:00
} ,
receiving(){
2019-12-26 09:13:34 +08:00
},
shua(){
console.log(123)
this.getlist()
2019-12-24 14:08:26 +08:00
}
2019-12-23 16:53:54 +08:00
},
ready(){
this.getlist()
2019-12-23 10:04:09 +08:00
}
2019-12-23 16:53:54 +08:00
2019-12-14 10:25:59 +08:00
})