|
|
|
@ -13,44 +13,12 @@
|
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 商品列表 --> |
|
|
|
|
<!-- <view class="list"> |
|
|
|
|
<ListItem /> |
|
|
|
|
</view> --> |
|
|
|
|
<view class="goodWrapper" |
|
|
|
|
v-for="(order,orderListIndex) in orderList" |
|
|
|
|
:key="orderListIndex" |
|
|
|
|
> |
|
|
|
|
<view class="iconfont icon-tuikuanzhong powder" v-if="order._status._type === -1"></view> |
|
|
|
|
<view class="iconfont icon-yituikuan" v-if="order._status._type === -2"></view> |
|
|
|
|
<view class="orderNum">订单号:{{ order.orderId || '' }}</view> |
|
|
|
|
<view |
|
|
|
|
class="item acea-row row-between-wrapper" |
|
|
|
|
v-for="(cart,cartInfoIndex) in order.cartInfo" |
|
|
|
|
:key="cartInfoIndex" |
|
|
|
|
@click="goOrderDetails(order)" |
|
|
|
|
> |
|
|
|
|
<view class="pictrue"> |
|
|
|
|
<image :src="cart.productInfo.image" class="image" @click.stop="goGoodsCon(cart)" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="text"> |
|
|
|
|
<view class="acea-row row-between-wrapper"> |
|
|
|
|
<view class="name line1">{{ cart.productInfo.storeName }}</view> |
|
|
|
|
<view class="num">x {{ cart.cartNum }}</view> |
|
|
|
|
</view> |
|
|
|
|
<view |
|
|
|
|
class="attr line1" |
|
|
|
|
v-if="cart.productInfo.attrInfo" |
|
|
|
|
>{{ cart.productInfo.attrInfo.sku }}</view> |
|
|
|
|
<view class="attr line1" v-else>{{ cart.productInfo.storeName }}</view> |
|
|
|
|
<view class="money">¥{{ cart.productInfo.price }}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="totalSum"> |
|
|
|
|
共{{ order.cartInfo.length || 0 }}件商品,总金额 |
|
|
|
|
<text |
|
|
|
|
class="font-color-red price" |
|
|
|
|
>¥{{ order.payPrice || 0 }}</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="list"> |
|
|
|
|
<ListItem |
|
|
|
|
v-for="(item,index) in orderList" |
|
|
|
|
:key="index" |
|
|
|
|
:item="item" |
|
|
|
|
/> |
|
|
|
|
</view> |
|
|
|
|
<view class="noCart" v-if="orderList.length === 0 && page > 1"> |
|
|
|
|
<view class="pictrue"> |
|
|
|
@ -78,9 +46,10 @@ export default {
|
|
|
|
|
orderList: [], |
|
|
|
|
listQuery: { |
|
|
|
|
page: 1, |
|
|
|
|
limit: 20, |
|
|
|
|
limit: 5, |
|
|
|
|
type: 0 |
|
|
|
|
}, |
|
|
|
|
type: 0, |
|
|
|
|
loading: false, |
|
|
|
|
loaded: false |
|
|
|
|
}; |
|
|
|
@ -92,44 +61,29 @@ export default {
|
|
|
|
|
!this.loading && this.getOrderList(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
goGoodsCon(cart) { |
|
|
|
|
this.$yrouter.push({ |
|
|
|
|
path: "/pages/shop/GoodsCon/index", |
|
|
|
|
query: { id: cart.productInfo.id } |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
goOrderDetails(order) { |
|
|
|
|
this.$yrouter.push({ |
|
|
|
|
// path: "/pages/order/OrderReturnDetail/index", |
|
|
|
|
path: "/pages/order/OrderDetails/index", |
|
|
|
|
query: { id: order.orderId } |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 售后详情 |
|
|
|
|
getOrderList() { |
|
|
|
|
const { page, limit } = this; |
|
|
|
|
if (this.loading || this.loaded) return; |
|
|
|
|
if ((this.loading || this.loaded) && (this.type === this.listQuery.type)) return; |
|
|
|
|
this.loading = true; |
|
|
|
|
// getOrderList({ |
|
|
|
|
// page, |
|
|
|
|
// limit, |
|
|
|
|
// type: -3 |
|
|
|
|
// }).then(res => { |
|
|
|
|
// this.orderList = this.orderList.concat(res.data); |
|
|
|
|
// this.loading = false; |
|
|
|
|
// this.loaded = res.data.length < limit; |
|
|
|
|
// this.page++; |
|
|
|
|
// }); |
|
|
|
|
// 售后接口 |
|
|
|
|
getAfterSealsList(this.listQuery).then(res => { |
|
|
|
|
// console.log(res) |
|
|
|
|
this.orderList = this.orderList.concat(res.data); |
|
|
|
|
if (this.type === this.listQuery.type) { |
|
|
|
|
this.orderList = [...this.orderList, ...res.data]; |
|
|
|
|
} else { |
|
|
|
|
this.orderList = res.data; |
|
|
|
|
this.type = this.listQuery.type |
|
|
|
|
} |
|
|
|
|
this.listQuery.page++; |
|
|
|
|
// 加载组件 |
|
|
|
|
this.loading = false; |
|
|
|
|
this.loaded = res.data.length < limit; |
|
|
|
|
this.page++; |
|
|
|
|
this.loaded = res.data.length < this.listQuery.limit;// 查询到末尾 |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 分类查询 |
|
|
|
|
changeType (type) { |
|
|
|
|
this.listQuery.type = type |
|
|
|
|
this.listQuery.page = 1; |
|
|
|
|
this.getOrderList() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|