LAPTOP-D7TKRI82\邓 4 years ago
parent
commit
f36220c0cb
  1. 11
      pages/order/index.vue
  2. 21
      pages/order/order-item.vue

11
pages/order/index.vue

@ -49,20 +49,11 @@
onLoad(e) {
this.assetsType = e.type
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 => {
});
},
//
swiperChange(e) {
this.tabIndex = e.detail.current
@ -93,7 +84,7 @@
}
},
created() {
this.getUserOrder()
}
}
</script>

21
pages/order/order-item.vue

@ -101,6 +101,15 @@
}
},
methods: {
getUserOrder(pagenum) {
this.$http(this.API.API_USERORDER, {state: this.tabs[this.index].type,page: pagenum,per_page: 20}).then(res => {
console.log(res)
}).catch(err => {
});
},
orderClick(item, type) {
this.orderItem = item
this[type] = true
@ -120,13 +129,6 @@
confirmDetermine() {
this.$toast('已成功收货')
},
//
getAssetsFlow(pageNum) {
setTimeout(() => {
this.mescroll.endBySize(10, 10);
}, 1000)
},
/*下拉刷新的回调 */
downCallback() {
@ -135,8 +137,11 @@
},
/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
upCallback(page) {
this.getAssetsFlow(page.num);
this.getUserOrder(page.num)
}
},
created() {
}
}
</script>

Loading…
Cancel
Save