Merge branch 'hotfix/open-student' into 'release/5.4.1'
Hotfix/open student See merge request !325
Showing
8 changed files
with
32 additions
and
20 deletions
@@ -181,6 +181,7 @@ exports.index = (req, res, next) => { | @@ -181,6 +181,7 @@ exports.index = (req, res, next) => { | ||
181 | } | 181 | } |
182 | } | 182 | } |
183 | 183 | ||
184 | + options.studentSwitch = !_.get(req.app.locals.wap, 'user.removeStudentIdentification', true); | ||
184 | res.render('student-market', options); | 185 | res.render('student-market', options); |
185 | 186 | ||
186 | }).catch(next); | 187 | }).catch(next); |
@@ -282,6 +282,7 @@ exports.index = (req, res, next) => { | @@ -282,6 +282,7 @@ exports.index = (req, res, next) => { | ||
282 | } | 282 | } |
283 | 283 | ||
284 | // console.log(options); | 284 | // console.log(options); |
285 | + options.studentSwitch = !_.get(req.app.locals.wap, 'user.removeStudentIdentification', true); | ||
285 | res.render('student', options); | 286 | res.render('student', options); |
286 | }); | 287 | }); |
287 | 288 |
@@ -8,8 +8,7 @@ | @@ -8,8 +8,7 @@ | ||
8 | <div class="mobile-container"> | 8 | <div class="mobile-container"> |
9 | <div class="mobile-wrap yoho-page student"> | 9 | <div class="mobile-wrap yoho-page student"> |
10 | <div style=" position: fixed;background: #f0f0f0;height: 100%;width: 100%;"> | 10 | <div style=" position: fixed;background: #f0f0f0;height: 100%;width: 100%;"> |
11 | - <div style="text-align:center;font-size:16px;padding-top:100px;">学生认证功能暂时关闭</div> | ||
12 | - {{!--<section class="s-feild s-marbot"> | 11 | + <section class="s-feild s-marbot"> |
13 | 全国已有<span class="s-red">{{count}}</span>位学生完成认证 | 12 | 全国已有<span class="s-red">{{count}}</span>位学生完成认证 |
14 | </section> | 13 | </section> |
15 | <div class="s-form"> | 14 | <div class="s-form"> |
@@ -41,12 +40,12 @@ | @@ -41,12 +40,12 @@ | ||
41 | 同意<a class="s-blue" href='//m.yohobuy.com/activity/student/detail/renzhen?openby:yohobuy={"action":"go.h5","params":{"islogin":"N","url":"{{http}}//m.yohobuy.com/activity/student/detail/renzhen"}}'>Yoho!Buy有货学生认证协议</a> | 40 | 同意<a class="s-blue" href='//m.yohobuy.com/activity/student/detail/renzhen?openby:yohobuy={"action":"go.h5","params":{"islogin":"N","url":"{{http}}//m.yohobuy.com/activity/student/detail/renzhen"}}'>Yoho!Buy有货学生认证协议</a> |
42 | </section> | 41 | </section> |
43 | <a class="s-submit" href="javascript:void(0);">立即认证</a> | 42 | <a class="s-submit" href="javascript:void(0);">立即认证</a> |
44 | - </div>--}} | 43 | + </div> |
45 | </div> | 44 | </div> |
46 | 45 | ||
47 | </div> | 46 | </div> |
48 | </div> | 47 | </div> |
49 | -{{!-- | 48 | + |
50 | <article class="aslider" data-aslider="province"> | 49 | <article class="aslider" data-aslider="province"> |
51 | <section class="asilder_wrapper close"> | 50 | <section class="asilder_wrapper close"> |
52 | <header class="s-layout-title"> | 51 | <header class="s-layout-title"> |
@@ -134,4 +133,4 @@ | @@ -134,4 +133,4 @@ | ||
134 | </div> | 133 | </div> |
135 | </div> | 134 | </div> |
136 | </section> | 135 | </section> |
137 | -</article>--}} | 136 | +</article> |
@@ -19,12 +19,13 @@ | @@ -19,12 +19,13 @@ | ||
19 | </div> | 19 | </div> |
20 | </section> | 20 | </section> |
21 | {{/icons}} | 21 | {{/icons}} |
22 | - | 22 | + {{#if @root.studentSwitch}} |
23 | <div class='sm-layout'> | 23 | <div class='sm-layout'> |
24 | 快来认证吧,认证通过即可享受专属优惠! | 24 | 快来认证吧,认证通过即可享受专属优惠! |
25 | 25 | ||
26 | <a class='s-renzhen' href='{{loginUrl}}'>立即认证</a> | 26 | <a class='s-renzhen' href='{{loginUrl}}'>立即认证</a> |
27 | </div> | 27 | </div> |
28 | + {{/if}} | ||
28 | 29 | ||
29 | {{#coupons}} | 30 | {{#coupons}} |
30 | <section class='s-section clearfix' data-template-id="{{template_id}}"> | 31 | <section class='s-section clearfix' data-template-id="{{template_id}}"> |
@@ -143,18 +143,20 @@ | @@ -143,18 +143,20 @@ | ||
143 | </section> | 143 | </section> |
144 | 144 | ||
145 | {{#loginUrl}} | 145 | {{#loginUrl}} |
146 | - {{!--<div class='s-layout'> | ||
147 | - {{#if @root.isSupportStudent}} | ||
148 | - 快来认证吧,认证通过即可享受专属优惠! | ||
149 | - {{else}} | ||
150 | - 请升级最新APP版本,完成认证 | ||
151 | - {{/if}} | 146 | + {{#if @root.studentSwitch}} |
147 | + <div class='s-layout'> | ||
148 | + {{#if @root.isSupportStudent}} | ||
149 | + 快来认证吧,认证通过即可享受专属优惠! | ||
150 | + {{else}} | ||
151 | + 请升级最新APP版本,完成认证 | ||
152 | + {{/if}} | ||
152 | 153 | ||
153 | - {{#if @root.isSupportStudent}} | ||
154 | - <a class='s-renzhen' href='{{.}}'>立即认证</a> | 154 | + {{#if @root.isSupportStudent}} |
155 | + <a class='s-renzhen' href='{{.}}'>立即认证</a> | ||
156 | + {{/if}} | ||
157 | + </div> | ||
158 | + <div class="s-replace"></div> | ||
155 | {{/if}} | 159 | {{/if}} |
156 | - </div>--}} | ||
157 | - <div class="s-replace"></div> | ||
158 | {{/loginUrl}} | 160 | {{/loginUrl}} |
159 | 161 | ||
160 | </div> | 162 | </div> |
@@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
9 | const headerModel = require('../../../doraemon/models/header'); // 头部model | 9 | const headerModel = require('../../../doraemon/models/header'); // 头部model |
10 | const footerModel = require('../../../doraemon/models/footer_tab'); // 底部tab | 10 | const footerModel = require('../../../doraemon/models/footer_tab'); // 底部tab |
11 | const indexModel = require('../models/index'); | 11 | const indexModel = require('../models/index'); |
12 | +const _ = require('lodash'); | ||
12 | 13 | ||
13 | /** | 14 | /** |
14 | * 用户中心首页 | 15 | * 用户中心首页 |
@@ -23,6 +24,8 @@ exports.index = (req, res, next) => { | @@ -23,6 +24,8 @@ exports.index = (req, res, next) => { | ||
23 | udid: require('md5')(req.ip) | 24 | udid: require('md5')(req.ip) |
24 | }; | 25 | }; |
25 | 26 | ||
27 | + let studentSwitch = !_.get(req.app.locals.wap, 'user.removeStudentIdentification', true); | ||
28 | + | ||
26 | indexModel.index(params).then(result => { | 29 | indexModel.index(params).then(result => { |
27 | if (result) { | 30 | if (result) { |
28 | res.render('home', Object.assign(result, { | 31 | res.render('home', Object.assign(result, { |
@@ -35,7 +38,8 @@ exports.index = (req, res, next) => { | @@ -35,7 +38,8 @@ exports.index = (req, res, next) => { | ||
35 | boys: true | 38 | boys: true |
36 | }, | 39 | }, |
37 | showFooterTab: footerModel.getUrlData('mine'), | 40 | showFooterTab: footerModel.getUrlData('mine'), |
38 | - localCss: true | 41 | + localCss: true, |
42 | + studentSwitch | ||
39 | })); | 43 | })); |
40 | } | 44 | } |
41 | }).catch(next); | 45 | }).catch(next); |
@@ -14,14 +14,18 @@ | @@ -14,14 +14,18 @@ | ||
14 | <div class="iconfont more-icon tap-hightlight"></div> | 14 | <div class="iconfont more-icon tap-hightlight"></div> |
15 | </a> | 15 | </a> |
16 | {{#unless students}} | 16 | {{#unless students}} |
17 | - {{!--<a class="students-entry" href="{{verifyUrl}}">学生认证</a>--}} | 17 | + {{#if @root.studentSwitch}} |
18 | + <a class="students-entry" href="{{verifyUrl}}">学生认证</a> | ||
19 | + {{/if}} | ||
18 | {{/unless}} | 20 | {{/unless}} |
19 | {{^}} | 21 | {{^}} |
20 | <div class="user-info"> | 22 | <div class="user-info"> |
21 | <a class="login-btn" href="{{signinUrl}}"> | 23 | <a class="login-btn" href="{{signinUrl}}"> |
22 | 登录/注册 | 24 | 登录/注册 |
23 | </a> | 25 | </a> |
24 | - {{!--<a class="students-entry" href="{{verifyUrl}}">学生认证</a>--}} | 26 | + {{#if @root.studentSwitch}} |
27 | + <a class="students-entry" href="{{verifyUrl}}">学生认证</a> | ||
28 | + {{/if}} | ||
25 | </div> | 29 | </div> |
26 | {{/isLogin}} | 30 | {{/isLogin}} |
27 | </div> | 31 | </div> |
@@ -87,7 +87,7 @@ module.exports = { | @@ -87,7 +87,7 @@ module.exports = { | ||
87 | appSecret: 'ce21ae4a3f93852279175a167e54509b' | 87 | appSecret: 'ce21ae4a3f93852279175a167e54509b' |
88 | } | 88 | } |
89 | }, | 89 | }, |
90 | - zookeeperServer: '192.168.102.168:2188', | 90 | + zookeeperServer: '127.0.0.1:2181', |
91 | alipayConfig: { | 91 | alipayConfig: { |
92 | payUrl: 'https://mapi.alipay.com/gateway.do', | 92 | payUrl: 'https://mapi.alipay.com/gateway.do', |
93 | service: 'alipay.wap.create.direct.pay.by.user', | 93 | service: 'alipay.wap.create.direct.pay.by.user', |
-
Please register or login to post a comment