|
...
|
...
|
@@ -81,12 +81,26 @@ Page({ |
|
|
|
onUnload: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
getLisType(){
|
|
|
|
if(this.tabType<5) return {type:this.tabType}
|
|
|
|
//2=交易成功(待使用) 3=已使用 5=已退款 6=已过期
|
|
|
|
return {status:{5:2,6:3,7:6,8:5}[this.tabType]}
|
|
|
|
},
|
|
|
|
getOffset(){
|
|
|
|
if(this.tabType<5) return this.offset
|
|
|
|
let page=Math.ceil(this.offset/this.limit)
|
|
|
|
return page<1?1:page
|
|
|
|
},
|
|
|
|
getListData() {
|
|
|
|
let tabType=this.tabType
|
|
|
|
App.Customer.GetMyOrder({
|
|
|
|
type: tabType,
|
|
|
|
let lisFun=App.Customer.GetMyOrder
|
|
|
|
if(tabType>4){
|
|
|
|
lisFun=App.Foodset.GetUserFoodOrders
|
|
|
|
}
|
|
|
|
lisFun({
|
|
|
|
...this.getLisType(),//tabType,
|
|
|
|
openid: getApp().openid,
|
|
|
|
offset:this.offset,
|
|
|
|
offset:this.getOffset(),
|
|
|
|
limit:this.limit,
|
|
|
|
}).then(res => {
|
|
|
|
let resData=res.data||[]
|
...
|
...
|
|