...
|
...
|
@@ -8,6 +8,7 @@ const headerModel = require('../../../doraemon/models/header'); // 头部model |
|
|
const _ = require('lodash');
|
|
|
const productProcess = require(`${global.utils}/product-process`);
|
|
|
const stdntMrktModel = require('../models/student-market');
|
|
|
const yasProcess = require(`${global.utils}/yas-process`);
|
|
|
|
|
|
const userAcquireStatus = (uid, couponIds) => {
|
|
|
if (couponIds !== '') {
|
...
|
...
|
@@ -197,10 +198,21 @@ exports.index = (req, res, next) => { |
|
|
exports.newIndex = (req, res, next) => {
|
|
|
stdntMrktModel.getStudentGoods({
|
|
|
limit: req.query.limit || '60',
|
|
|
stocknumber: req.query.stocknumber || '1'
|
|
|
stocknumber: req.query.stocknumber || '1',
|
|
|
isApp: req.yoho.isApp
|
|
|
}).then(result => {
|
|
|
let title = '有货学生专享优惠';
|
|
|
|
|
|
if (req.yoho.isApp) {
|
|
|
_.forEach(result, goods => {
|
|
|
goods.url = yasProcess.addParamsToGoodsHref({
|
|
|
href: goods.url,
|
|
|
fromPageName: yasProcess.getPname(req),
|
|
|
fromPageParam: req.originalUrl
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
|
|
|
res.render('student-market-new', {
|
|
|
title: title,
|
|
|
pageHeader: headerModel.setNav({
|
...
|
...
|
|