Authored by 陈轩

Merge remote-tracking branch 'origin/develop' into develop

... ... @@ -57,8 +57,8 @@ const exchange = {
* @param next
*/
cancelApply(req, res, next) {
let id = req.body.id;
let uid = req.user.uid;
const id = req.body.id;
const uid = req.user.uid;
exchangeModel.cancelApply(uid, id).then(result => {
return res.json(result);
... ...
... ... @@ -41,7 +41,7 @@ const component = {
},
helpDetail: (req, res) => {
const caption = req.query.caption;
let data = {
const data = {
module: 'me',
page: 'help',
noLocalJS: true,
... ...
... ... @@ -58,7 +58,7 @@ const component = {
}).catch(next);
},
saveMydetails: (req, res, next) => {
var params = {
const params = {
uid: req.user.uid
};
... ...
... ... @@ -10,7 +10,7 @@ const notLoginTip = '抱歉,您暂未登录!';
const order = {
orders: (req, res) => {
let type = req.query.type;
const type = req.query.type;
res.render('order', {
module: 'me',
... ... @@ -19,8 +19,8 @@ const order = {
});
},
orderDetail: (req, res) => {
let orderCode = req.query.orderCode;
let uid = req.user.uid;
const orderCode = req.query.orderCode;
const uid = req.user.uid;
if (!uid && req.xhr) {
return res.json({
... ... @@ -56,8 +56,8 @@ const order = {
});
},
getOrderDetailData: (req, res) => {
let orderCode = req.query.orderCode;
let uid = req.user.uid;
const orderCode = req.query.orderCode;
const uid = req.user.uid;
if (!uid && req.xhr) {
return res.json({
... ... @@ -71,24 +71,24 @@ const order = {
});
},
cancelOrder: (req, res) => {
let orderCode = req.body.orderCode;
let reasonId = req.body.reasonId;
let reason = req.body.reason;
const orderCode = req.body.orderCode;
const reasonId = req.body.reasonId;
const reason = req.body.reason;
orderModel.cancelOrder(orderCode, reasonId, reason).then(result => {
return res.json(result);
});
},
confirmOrder: (req, res) => {
let orderode = req.body.orderCode;
const orderode = req.body.orderCode;
orderModel.confirmOrder(orderode).then(result => {
return res.json(result);
});
},
deleteOrder: (req, res) => {
let orderCode = req.body.orderCode;
let uid = req.user.uid;
const orderCode = req.body.orderCode;
const uid = req.user.uid;
if (!uid && req.xhr) {
return res.json({
... ... @@ -102,7 +102,7 @@ const order = {
});
},
coin: (req, res, next) => {
let uid = req.user.uid;
const uid = req.user.uid;
orderModel.getCoins(uid).then(result => {
res.render('coin', {
... ... @@ -120,9 +120,9 @@ const order = {
* @returns {*|{read, write}}
*/
getCoinDetail: (req, res) => {
let uid = req.user.uid;
let page = req.query.page;
let limit = req.query.limit;
const uid = req.user.uid;
const page = req.query.page;
const limit = req.query.limit;
if (!uid && req.xhr) {
return res.json({
... ...
... ... @@ -105,9 +105,7 @@ const refund = {
* @returns {*|{read, write}}
*/
getRefundOrders(req, res) {
let uid = req.user.uid;
let page = req.query.page;
let limit = req.query.limit;
const uid = req.user.uid;
if (!uid && req.xhr) {
return res.json({
... ... @@ -117,8 +115,8 @@ const refund = {
}
let param = {
uid: uid,
page: page,
limit: limit
page: req.query.page,
limit: req.query.limit
};
refundModel.getRefundOrders(param).then(result => {
... ... @@ -132,8 +130,8 @@ const refund = {
* @param res
*/
cancelApply(req, res) {
let uid = req.user.uid;
let id = req.body.id;
const uid = req.user.uid;
const id = req.body.id;
if (!uid && req.xhr) {
return res.json({
... ...
... ... @@ -47,7 +47,7 @@ const _getInfoNumData = (uid) => {
}, {
code: 200
})]).then(data => {
let res = {
const res = {
wait_pay_num: '',
wait_cargo_num: '',
send_cargo_num: '',
... ... @@ -90,7 +90,7 @@ exports.getUserHomeData = (uid) => {
*
*/
exports.getHelpInfo = (data) => {
var defaultParam = {
let defaultParam = {
method: 'app.help.li'
},
infoData = Object.assign(defaultParam, data);
... ... @@ -98,8 +98,8 @@ exports.getHelpInfo = (data) => {
return api.get('', infoData, {
code: 200
}).then(result => {
var helpData = result.data;
var formatData = [];
const formatData = [];
let helpData = result.data;
helpData = helpData || [];
helpData.forEach(function(item) {
... ... @@ -122,7 +122,7 @@ exports.getHelpInfo = (data) => {
* @param data
*/
exports.getHelpDetail = (data) => {
var defaultParam = {
let defaultParam = {
method: 'app.help.detail',
return_type: 'html'
},
... ... @@ -155,7 +155,7 @@ exports.saveFeedback = (data) => {
* @param data
*/
exports.saveMydetails = (params) => {
var defaultParam = {
let defaultParam = {
method: 'app.passport.modifyBase'
},
data = Object.assign(defaultParam, params);
... ...
... ... @@ -2,7 +2,8 @@ $black: #000;
$white: #fff;
.main-wrap,
#home-order-list {
#home-order-list,
#refund-order-list {
height: 100%;
}
... ...
... ... @@ -40,6 +40,7 @@
const tip = require('common/tip');
const interceptClick = require('common/intercept-click');
const yoho = require('yoho');
const bus = require('common/vue-bus');
module.exports = {
data() {
... ... @@ -91,6 +92,11 @@
}
this.nullbox = this.brandData.length ? 'hide' : '';
if (this.page === 1) {
yoho.showLoading(false);
this.updateNavBar();
}
}).fail(() => {
tip('网络错误');
});
... ... @@ -143,7 +149,7 @@
return false;
} else {
this.pageX = event.targetTouches[0].pageX;
var delBtn = $('#del-' + id);
let delBtn = $('#del-' + id);
if (delBtn.hasClass('hide')) {
delBtn.removeClass('hide');
... ... @@ -222,15 +228,9 @@
this.updateNavBar();
});
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
this.updateNavBar();
}
});
},
ready() {
yoho.showLoading(false);
this.updateNavBar();
if (yoho.isApp) {
bus.$on('app.favourite.tabChange', this.updateNavBar);
}
}
};
</script>
... ...
... ... @@ -45,6 +45,7 @@
const tip = require('common/tip');
const interceptClick = require('common/intercept-click');
const yoho = require('yoho');
const bus = require('common/vue-bus');
module.exports = {
data() {
... ... @@ -72,11 +73,7 @@
if ($.isEmptyObject(data) || data.pageTotal === 0) {
this.busy = true;
} else {
if (this.page === data.pageTotal) {
this.busy = true;
} else {
this.busy = false;
}
this.busy = this.page === data.pageTotal;
const list = data.productList || [];
... ... @@ -111,6 +108,11 @@
}
this.nullbox = this.productData.length ? 'hide' : '';
if (this.page === 1) {
yoho.showLoading(false);
this.updateNavBar();
}
}).fail(() => {
tip('网络错误');
});
... ... @@ -162,7 +164,7 @@
return false;
} else {
this.pageX = event.targetTouches[0].pageX;
var delBtn = $('#del-' + id);
let delBtn = $('#del-' + id);
if (delBtn.hasClass('hide')) {
delBtn.removeClass('hide');
... ... @@ -241,15 +243,9 @@
this.updateNavBar();
});
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
this.updateNavBar();
}
});
},
ready() {
yoho.showLoading(false);
this.updateNavBar();
if (yoho.isApp) {
bus.$on('app.favourite.tabChange', this.updateNavBar);
}
}
};
</script>
... ...
... ... @@ -187,6 +187,9 @@
}).then(result => {
if (result.code === 200) {
_that.orderList.splice(index, 1);
if (_that.orderList.length === 0) {
_that.emptybox = '';
}
} else if (result.code !== 500) {
tip(result.message);
}
... ...