Authored by 王洪广

增加退换货列表

... ... @@ -124,7 +124,7 @@ const order = {
res.render('coin', {
module: 'home',
page: 'coin',
coin: result
coi
});
}).catch(next);
},
... ...
... ... @@ -6,7 +6,7 @@
const refundModel = require('../models/refund');
const notLoginCode = 400;
const notLoginTip = '抱歉,您暂未登录!';
const testUid = 8050378;// 测试uid
const testUid = 8039837;// 测试uid
const isBLK = 1;
const refund = {
... ... @@ -72,7 +72,6 @@ const refund = {
let uid = req.query.id;
let page = req.query.page;
let limit = req.query.limit;
let isend = true;
uid = testUid;
if (!uid && req.xhr) {
... ... @@ -89,10 +88,7 @@ const refund = {
};
refundModel.getRefundOrders(param).then(result => {
if (result && page < result.pageTotal) {
isend = false;
}
return res.json(Object.assign({isend: isend}, result));
return res.json(result);
});
}
};
... ...
... ... @@ -23,7 +23,7 @@
return {
page: 0,
limit: 15,
pageTotal: 0,
pageTotal: 1,
coinList: [],
busy: false,
};
... ... @@ -38,7 +38,7 @@
let _that = this;
this.busy = true;
if (this.page > this.pageTotal) {
if (this.page >= this.pageTotal) {
return;
}
$.ajax({
... ...
... ... @@ -54,7 +54,7 @@
return {
page: 0,
limit: 10,
pageTotal: 0,
pageTotal: 1,
type: this.$parent.$data.type,
orderList: [],
busy: false,
... ... @@ -70,7 +70,7 @@
let _that = this;
this.busy = true;
if (this.page > this.pageTotal) {
if (this.page >= this.pageTotal) {
return;
}
$.ajax({
... ...
... ... @@ -28,7 +28,7 @@
</div>
</div>
</div>
<div class="order-option">
<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">取消申请</button>
... ... @@ -51,6 +51,7 @@
return {
page: 0,
limit: 10,
pageTotal: 1,
orderList: [],
busy: false,
};
... ... @@ -65,6 +66,9 @@
let _that = this;
this.busy = true;
if (this.page >= this.pageTotal) {
return;
}
$.ajax({
url: '/home/refund/get-orders',
data: {
... ... @@ -72,13 +76,10 @@
limit: this.limit
}
}).then(result => {
if (result.isend) {
_that.busy = true;
} else {
_that.busy = false;
}
_that.busy = false;
if (result.data.list.length > 0) {
this.$set('orderList', result.data.list);
this.$set('orderList', _that.orderList.concat(result.data.list));
_that.pageTotal = result.data.totalPage;
}
}).fail(() => {
tip('网络错误');
... ... @@ -112,13 +113,4 @@
@import "../../scss/home/_order.css";
.order-wrapper {
height: 100%;
ul {
height: 100%;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
}
</style>
\ No newline at end of file
... ...