...
|
...
|
@@ -10,9 +10,7 @@ const headerModel = require('../../../doraemon/models/header'); |
|
|
const mRoot = '../models';
|
|
|
|
|
|
// sale 页 model
|
|
|
// const sale = require(`${mRoot}/sale`);
|
|
|
|
|
|
// const saleDiscount = require(`${mRoot}/sale-discount`);
|
|
|
const sale = require(`${mRoot}/sale`);
|
|
|
|
|
|
// 开发用模拟数据
|
|
|
const simulation = require(`${mRoot}/simulation`);
|
...
|
...
|
@@ -67,15 +65,15 @@ exports.discount = (req, res) => { |
|
|
response.devEnv = true;
|
|
|
|
|
|
// 假数据输出
|
|
|
res.render('sale/discount', Object.assign(response, simulation.discount()));
|
|
|
// res.render('sale/discount', Object.assign(response, simulation.discount()));
|
|
|
|
|
|
/* return saleDiscount.getSaleDiscountData()
|
|
|
return sale.getSaleGoodsListData()
|
|
|
.then(result => {
|
|
|
response.result = result;
|
|
|
response.resultShow = JSON.stringify(result, null, 4);
|
|
|
|
|
|
res.render('sale/discount', response);
|
|
|
});*/
|
|
|
});
|
|
|
|
|
|
})
|
|
|
.catch(() => {
|
...
|
...
|
@@ -101,7 +99,7 @@ exports.vip = (req, res) => { |
|
|
// 假数据输出
|
|
|
res.render('sale/other', Object.assign(response, simulation.other()));
|
|
|
|
|
|
/* return saleVip.getSaleVipData()
|
|
|
/* return sale.getSaleGoodsListData()
|
|
|
.then(result => {
|
|
|
response.result = result;
|
|
|
response.resultShow = JSON.stringify(result, null, 4);
|
...
|
...
|
@@ -133,7 +131,7 @@ exports.breakingYards = (req, res) => { |
|
|
// 假数据输出
|
|
|
res.render('sale/other', Object.assign(response, simulation.other()));
|
|
|
|
|
|
/* return breakingYards.getSaleBreakingYardsData()
|
|
|
/* return sale.getSaleGoodsListData()
|
|
|
.then(result => {
|
|
|
response.result = result;
|
|
|
response.resultShow = JSON.stringify(result, null, 4);
|
...
|
...
|
@@ -165,7 +163,7 @@ exports.newSale = (req, res) => { |
|
|
// 假数据输出
|
|
|
res.render('sale/other', Object.assign(response, simulation.other()));
|
|
|
|
|
|
/* return newSale.getSaleNewSaleData()
|
|
|
/* return sale.getSaleNewSaleData()
|
|
|
.then(result => {
|
|
|
response.result = result;
|
|
|
response.resultShow = JSON.stringify(result, null, 4);
|
...
|
...
|
|