|
|
<template>
|
|
|
<ul v-infinite-scroll="getOrderData()" infinite-scroll-disabled="busy" infinite-scroll-distance="10">
|
|
|
<ul v-infinite-scroll="getRefundData()" infinite-scroll-disabled="busy" infinite-scroll-distance="10">
|
|
|
<li class="order-item" v-for="(index, order) in orderList">
|
|
|
<div class="order-detail">
|
|
|
<div class="order-code">
|
...
|
...
|
@@ -12,8 +12,7 @@ |
|
|
<div class="order-goods">
|
|
|
<div class="goods-info" v-for="product in order.goods">
|
|
|
<div class="img-box">
|
|
|
<img v-bind:src="product.goodsImage | resize 49 65" alt="{{product.productName}}">
|
|
|
<label v-if="product.goodsType == 'gift'">赠品</label>
|
|
|
<img v-bind:src="product.goodsImage | resize 49 65">
|
|
|
</div>
|
|
|
<div class="goods-detail">
|
|
|
<p class="name">{{product.productName}}</p>
|
...
|
...
|
@@ -26,12 +25,14 @@ |
|
|
<p>¥{{product.salesPrice}}</p>
|
|
|
<p>×1</p>
|
|
|
</div>
|
|
|
<a v-if="order.refundType === 1" href="/me/return/refund/detail/{{order.id}}"></a>
|
|
|
<a v-if="order.refundType === 2" href="/me/return/exchange/detail/{{order.id}}"></a>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="order-option" v-show="order.canCancel == 'Y'">
|
|
|
<div class="goods-total"></div>
|
|
|
<div class="options" v-show="order.canCancel == 'Y'">
|
|
|
<button v-if="order.canCancel == 'Y'" class="normal" @click="cancelApply(order.id, order.refundType)">取消申请</button>
|
|
|
<div class="options">
|
|
|
<button class="normal" @click="cancelApply(order.id, order.refundType)">取消申请</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -59,13 +60,11 @@ |
|
|
emptybox: 'hide'
|
|
|
};
|
|
|
},
|
|
|
|
|
|
ready() {
|
|
|
this.getOrderData();
|
|
|
this.getRefundData();
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
getOrderData() {
|
|
|
getRefundData() {
|
|
|
this.busy = true;
|
|
|
if (this.page >= this.pageTotal) {
|
|
|
return;
|
...
|
...
|
@@ -77,10 +76,12 @@ |
|
|
limit: this.limit
|
|
|
}
|
|
|
}).then(result => {
|
|
|
this.busy = false;
|
|
|
if (result.data.list.length > 0) {
|
|
|
this.$set('orderList', this.orderList.concat(result.data.list));
|
|
|
this.pageTotal = result.data.totalPage;
|
|
|
if (result.code === 200) {
|
|
|
if (result.data && result.data.list.length > 0) {
|
|
|
this.$set('orderList', this.orderList.concat(result.data.list));
|
|
|
this.pageTotal = result.data.totalPage;
|
|
|
this.busy = false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (this.orderList.length === 0) {
|
...
|
...
|
@@ -97,7 +98,7 @@ |
|
|
*/
|
|
|
cancelApply(id, type) {
|
|
|
$.ajax({
|
|
|
url: '/me/' + (Number(type) === 2 ? 'exchange' : 'refund') + '/cancel-apply',
|
|
|
url: '/me/return/' + (Number(type) === 2 ? 'exchange' : 'refund') + '/cancel-apply',
|
|
|
type: 'post',
|
|
|
data: {
|
|
|
id: id
|
...
|
...
|
|