...
|
...
|
@@ -2,11 +2,12 @@ |
|
|
'use strict';
|
|
|
|
|
|
const headerModel = require('../../../doraemon/models/header');
|
|
|
const storeHomeModel = require('../models/store-home');
|
|
|
|
|
|
exports.index = (req, res) => {
|
|
|
exports.photography = (req, res, next) => {
|
|
|
let responseData = {
|
|
|
module: 'activity',
|
|
|
page: 'store-index',
|
|
|
page: 'store-photography',
|
|
|
pageHeader: headerModel.setNav({
|
|
|
navTitle: '个人中心'
|
|
|
}),
|
...
|
...
|
@@ -14,10 +15,17 @@ exports.index = (req, res) => { |
|
|
localCss: true,
|
|
|
};
|
|
|
|
|
|
res.render('store-home/index', responseData);
|
|
|
let params = {
|
|
|
uid: req.user.uid,
|
|
|
shopType: 3
|
|
|
};
|
|
|
|
|
|
req.ctx(storeHomeModel).baseInfo(params).then(result => {
|
|
|
res.render('store-home/photography', Object.assign(responseData, result));
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
exports.coffee = (req, res) => {
|
|
|
exports.coffee = (req, res, next) => {
|
|
|
let responseData = {
|
|
|
module: 'activity',
|
|
|
page: 'store-coffee',
|
...
|
...
|
@@ -28,10 +36,17 @@ exports.coffee = (req, res) => { |
|
|
localCss: true,
|
|
|
};
|
|
|
|
|
|
res.render('store-home/coffee', responseData);
|
|
|
let params = {
|
|
|
uid: req.user.uid,
|
|
|
shopType: 1
|
|
|
};
|
|
|
|
|
|
req.ctx(storeHomeModel).baseInfo(params).then(result => {
|
|
|
res.render('store-home/coffee', Object.assign(responseData, result));
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
exports.green = (req, res) => {
|
|
|
exports.green = (req, res, next) => {
|
|
|
let responseData = {
|
|
|
module: 'activity',
|
|
|
page: 'store-green',
|
...
|
...
|
@@ -42,7 +57,14 @@ exports.green = (req, res) => { |
|
|
localCss: true,
|
|
|
};
|
|
|
|
|
|
res.render('store-home/green', responseData);
|
|
|
let params = {
|
|
|
uid: req.user.uid,
|
|
|
shopType: 2
|
|
|
};
|
|
|
|
|
|
req.ctx(storeHomeModel).baseInfo(params).then(result => {
|
|
|
res.render('store-home/green', Object.assign(responseData, result));
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
exports.history = (req, res) => {
|
...
|
...
|
@@ -73,7 +95,7 @@ exports.ewm = (req, res) => { |
|
|
res.render('store-home/ewm', responseData);
|
|
|
};
|
|
|
|
|
|
exports.coupon = (req, res) => {
|
|
|
exports.coupon = (req, res, next) => {
|
|
|
let responseData = {
|
|
|
module: 'activity',
|
|
|
page: 'store-coupon',
|
...
|
...
|
@@ -84,5 +106,12 @@ exports.coupon = (req, res) => { |
|
|
localCss: true,
|
|
|
};
|
|
|
|
|
|
res.render('store-home/coupon', responseData);
|
|
|
let params = {
|
|
|
uid: req.user.uid,
|
|
|
shopType: req.query.shopType
|
|
|
};
|
|
|
|
|
|
req.ctx(storeHomeModel).baseInfo(params).then(result => {
|
|
|
res.render('store-home/coupon', Object.assign(responseData, result));
|
|
|
}).catch(next);
|
|
|
}; |
...
|
...
|
|