|
|
|
@ -27,27 +27,39 @@ |
|
|
|
type: 'all' |
|
|
|
}, { |
|
|
|
name: '待付款', |
|
|
|
type: 'delivered' |
|
|
|
type: 'unpaid' |
|
|
|
}, { |
|
|
|
name: '已付款', |
|
|
|
type: 'receiving' |
|
|
|
type: 'paid' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '已完成', |
|
|
|
type: 'complete' |
|
|
|
}], |
|
|
|
}, |
|
|
|
{ |
|
|
|
name:'售后', |
|
|
|
type: 'after_sales' |
|
|
|
} |
|
|
|
], |
|
|
|
tabIndex: 0, // 当前tab的下标 |
|
|
|
assetsType: '' //账户类型 |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(e) { |
|
|
|
this.assetsType = e.type |
|
|
|
this.tabIndex = this.assetsType === 'all' ? 0 : this.assetsType === 'delivered' ? 1 : this.assetsType === 'receiving' ? 2 : 0 |
|
|
|
this.tabIndex = this.assetsType === 'all' ? 0 : this.assetsType === 'unpaid' ? 1 : this.assetsType === 'paid' ? 2 : 0 |
|
|
|
|
|
|
|
|
|
|
|
// 需要固定swiper的高度 |
|
|
|
this.height = (uni.getSystemInfoSync().windowHeight) + 'px' |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
getUserOrder() { |
|
|
|
this.$http(this.API.API_USERORDER, {state: this.tabs[this.tabIndex].type,page: 1,per_page: 20}).then(res => { |
|
|
|
console.log(res); |
|
|
|
}).catch(err => err); |
|
|
|
}, |
|
|
|
// 轮播菜单 |
|
|
|
swiperChange(e) { |
|
|
|
this.tabIndex = e.detail.current |
|
|
|
@ -76,6 +88,9 @@ |
|
|
|
// #endif |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getUserOrder() |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|