Authored by 陈峰

zookeeper控制学生入口

... ... @@ -181,6 +181,7 @@ exports.index = (req, res, next) => {
}
}
options.studentSwitch = !_.get(req.app.locals.wap, 'user.removeStudentIdentification', true);
res.render('student-market', options);
}).catch(next);
... ...
... ... @@ -282,6 +282,7 @@ exports.index = (req, res, next) => {
}
// console.log(options);
options.studentSwitch = !_.get(req.app.locals.wap, 'user.removeStudentIdentification', true);
res.render('student', options);
});
... ...
... ... @@ -19,12 +19,13 @@
</div>
</section>
{{/icons}}
{{#if @root.studentSwitch}}
<div class='sm-layout'>
快来认证吧,认证通过即可享受专属优惠!
<a class='s-renzhen' href='{{loginUrl}}'>立即认证</a>
</div>
{{/if}}
{{#coupons}}
<section class='s-section clearfix' data-template-id="{{template_id}}">
... ...
... ... @@ -143,6 +143,7 @@
</section>
{{#loginUrl}}
{{#if @root.studentSwitch}}
<div class='s-layout'>
{{#if @root.isSupportStudent}}
快来认证吧,认证通过即可享受专属优惠!
... ... @@ -155,6 +156,7 @@
{{/if}}
</div>
<div class="s-replace"></div>
{{/if}}
{{/loginUrl}}
</div>
... ...
... ... @@ -9,6 +9,7 @@
const headerModel = require('../../../doraemon/models/header'); // 头部model
const footerModel = require('../../../doraemon/models/footer_tab'); // 底部tab
const indexModel = require('../models/index');
const _ = require('lodash');
/**
* 用户中心首页
... ... @@ -23,6 +24,8 @@ exports.index = (req, res, next) => {
udid: require('md5')(req.ip)
};
let studentSwitch = !_.get(req.app.locals.wap, 'user.removeStudentIdentification', true);
indexModel.index(params).then(result => {
if (result) {
res.render('home', Object.assign(result, {
... ... @@ -35,7 +38,8 @@ exports.index = (req, res, next) => {
boys: true
},
showFooterTab: footerModel.getUrlData('mine'),
localCss: true
localCss: true,
studentSwitch
}));
}
}).catch(next);
... ...
... ... @@ -14,14 +14,18 @@
<div class="iconfont more-icon tap-hightlight">&#xe604;</div>
</a>
{{#unless students}}
{{#if @root.studentSwitch}}
<a class="students-entry" href="{{verifyUrl}}">学生认证</a>
{{/if}}
{{/unless}}
{{^}}
<div class="user-info">
<a class="login-btn" href="{{signinUrl}}">
登录/注册
</a>
{{#if @root.studentSwitch}}
<a class="students-entry" href="{{verifyUrl}}">学生认证</a>
{{/if}}
</div>
{{/isLogin}}
</div>
... ...
... ... @@ -87,7 +87,7 @@ module.exports = {
appSecret: 'ce21ae4a3f93852279175a167e54509b'
}
},
zookeeperServer: '192.168.102.168:2188',
zookeeperServer: '127.0.0.1:2181',
alipayConfig: {
alipayKey: 'kcxawi9bb07mzh0aq2wcirsf9znusobw'
}
... ...