...
|
...
|
@@ -4,6 +4,7 @@ |
|
|
*/
|
|
|
'use strict';
|
|
|
|
|
|
const _ = require('lodash');
|
|
|
const headerModel = require('../../../doraemon/models/header'); // 头部model
|
|
|
const refundModel = require('../models/refund');
|
|
|
const notLoginCode = 400;
|
...
|
...
|
@@ -52,22 +53,32 @@ const refund = { |
|
|
* @param {*} res
|
|
|
* @param {*} next
|
|
|
*/
|
|
|
logistics(req, res, next) {
|
|
|
logistics(req, res) {
|
|
|
let headerData = headerModel.setNav({
|
|
|
navTitle: '退换货订单列表'
|
|
|
});
|
|
|
|
|
|
res.render('refund/logistics', {
|
|
|
module: 'home',
|
|
|
page: 'refund-logistics',
|
|
|
pageHeader: headerData,
|
|
|
applyid: req.query.applyid,
|
|
|
type: req.query.type
|
|
|
});
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 获取快递公司名称
|
|
|
* @param {*} req
|
|
|
* @param {*} res
|
|
|
* @param {*} next
|
|
|
*/
|
|
|
getCompanyList(req, res, next) {
|
|
|
refundModel.getExpressCompany().then(result => {
|
|
|
res.render('refund/logistics', {
|
|
|
module: 'home',
|
|
|
page: 'refund-logistics',
|
|
|
pageHeader: headerData,
|
|
|
applyid: req.query.applyid,
|
|
|
type: req.query.type,
|
|
|
company_list: result ? JSON.stringify(result.data) : ''
|
|
|
});
|
|
|
res.json(_.get(result, 'data', []));
|
|
|
}).catch(next);
|
|
|
},
|
|
|
|
|
|
saveLogistics(req, res, next) {
|
|
|
const uid = req.user.uid;
|
|
|
const applyid = req.body.applyid;
|
...
|
...
|
|