|
@@ -21,7 +21,7 @@
|
|
|
<image :src="$method.splitImgHost(items.coverUrl)" style="height: 134rpx;width: 278rpx;border-radius: 16rpx;flex-shrink: 0;"></image>
|
|
|
<view style="margin-left: 20rpx;flex:1;display: flex;flex-direction: column;">
|
|
|
<view style="color: #333333;font-size: 30rpx;font-weight: bold;flex:1">{{ items.goodsName }}</view>
|
|
|
- <view class="priceTag">¥ {{ items.goodsPrice }}</view>
|
|
|
+ <view class="priceTag">¥ {{ items.goodsRealPrice }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view style="height: 80rpx;display: flex;justify-content: space-between;align-items: center;">
|
|
@@ -65,9 +65,11 @@ export default {
|
|
|
list1: [1, 2, 3, 4, 5, 6, 7],
|
|
|
current: 0,
|
|
|
order: [],
|
|
|
- order1: [],
|
|
|
- order2: [],
|
|
|
- order3: []
|
|
|
+ formData:{
|
|
|
+ status:'0,1',
|
|
|
+ pageNum:1,
|
|
|
+ pageSize:8
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {},
|
|
@@ -86,6 +88,10 @@ export default {
|
|
|
path: `/pages/index/index?inviteCode=` + userInfo == null ? '' : userInfo.userAccount
|
|
|
};
|
|
|
},
|
|
|
+ onReachBottom(){
|
|
|
+ this.formData.pageNum++
|
|
|
+ console.log(this.formData.pageNum)
|
|
|
+ },
|
|
|
methods: {
|
|
|
openPopup() {},
|
|
|
//删除订单
|
|
@@ -98,7 +104,7 @@ export default {
|
|
|
self.$api
|
|
|
.eddOrder({
|
|
|
orderId: item.orderId,
|
|
|
- status: 0
|
|
|
+ status: -1
|
|
|
})
|
|
|
.then(res => {
|
|
|
if (res.data.code === 200) {
|
|
@@ -132,42 +138,46 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ getFY(){
|
|
|
+ if (this.current === 0) {
|
|
|
+ this.formData.orderStatus = 0;
|
|
|
+ }
|
|
|
+ if (this.current === 1) {
|
|
|
+ this.formData.orderStatus = [1, 2];
|
|
|
+ }
|
|
|
+ if (this.current === 2) {
|
|
|
+ this.formData.orderStatus = [-1, -2];
|
|
|
+ }
|
|
|
+ this.$api.getorderlists(this.formData).then(res => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ this.order.push(res.data.rows)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
//获取订单
|
|
|
getOrderList() {
|
|
|
- this.$api.getorderlists({ status: 1 }).then(res => {
|
|
|
+ this.formData.pageNum = 1
|
|
|
+ if (this.current === 0) {
|
|
|
+ this.formData.orderStatus = 0;
|
|
|
+ }
|
|
|
+ if (this.current === 1) {
|
|
|
+ this.formData.orderStatus = [1, 2];
|
|
|
+ }
|
|
|
+ if (this.current === 2) {
|
|
|
+ this.formData.orderStatus = [-1, -2];
|
|
|
+ }
|
|
|
+ this.$api.getorderlists(this.formData).then(res => {
|
|
|
if (res.data.code === 200) {
|
|
|
- var array1 = []; //待支付
|
|
|
- var array2 = []; //已支付
|
|
|
- var array3 = []; //已取消
|
|
|
- res.data.rows.forEach(item => {
|
|
|
- if (item.orderStatus === 0) {
|
|
|
- array1.push(item);
|
|
|
- }
|
|
|
- if (item.orderStatus === 1 || item.orderStatus === 2) {
|
|
|
- array2.push(item);
|
|
|
- }
|
|
|
- if (item.orderStatus === -1 || item.orderStatus === -2) {
|
|
|
- array3.push(item);
|
|
|
- }
|
|
|
- });
|
|
|
- this.order1 = array1;
|
|
|
- this.order2 = array2;
|
|
|
- this.order3 = array3;
|
|
|
- this.change(this.current);
|
|
|
+ this.order = res.data.rows;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
change(index) {
|
|
|
- this.current = index;
|
|
|
- if (index === 0) {
|
|
|
- this.order = JSON.parse(JSON.stringify(this.order1));
|
|
|
- }
|
|
|
- if (index === 1) {
|
|
|
- this.order = JSON.parse(JSON.stringify(this.order2));
|
|
|
- }
|
|
|
- if (index === 2) {
|
|
|
- this.order = JSON.parse(JSON.stringify(this.order3));
|
|
|
+ if (this.current === index) {
|
|
|
+ return;
|
|
|
}
|
|
|
+ this.current = index;
|
|
|
+ this.getOrderList();
|
|
|
}
|
|
|
},
|
|
|
onReachBottom() {},
|