Authored by ccbikai(👎🏻🍜)

Merge remote-tracking branch 'origin/release/5.4.1' into gray

... ... @@ -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);
});
... ...
... ... @@ -8,8 +8,7 @@
<div class="mobile-container">
<div class="mobile-wrap yoho-page student">
<div style=" position: fixed;background: #f0f0f0;height: 100%;width: 100%;">
<div style="text-align:center;font-size:16px;padding-top:100px;">学生认证功能暂时关闭</div>
{{!--<section class="s-feild s-marbot">
<section class="s-feild s-marbot">
全国已有<span class="s-red">{{count}}</span>位学生完成认证
</section>
<div class="s-form">
... ... @@ -41,12 +40,12 @@
同意<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>
</section>
<a class="s-submit" href="javascript:void(0);">立即认证</a>
</div>--}}
</div>
</div>
</div>
</div>
{{!--
<article class="aslider" data-aslider="province">
<section class="asilder_wrapper close">
<header class="s-layout-title">
... ... @@ -134,4 +133,4 @@
</div>
</div>
</section>
</article>--}}
</article>
... ...
... ... @@ -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,18 +143,20 @@
</section>
{{#loginUrl}}
{{!--<div class='s-layout'>
{{#if @root.isSupportStudent}}
快来认证吧,认证通过即可享受专属优惠!
{{else}}
请升级最新APP版本,完成认证
{{/if}}
{{#if @root.studentSwitch}}
<div class='s-layout'>
{{#if @root.isSupportStudent}}
快来认证吧,认证通过即可享受专属优惠!
{{else}}
请升级最新APP版本,完成认证
{{/if}}
{{#if @root.isSupportStudent}}
<a class='s-renzhen' href='{{.}}'>立即认证</a>
{{#if @root.isSupportStudent}}
<a class='s-renzhen' href='{{.}}'>立即认证</a>
{{/if}}
</div>
<div class="s-replace"></div>
{{/if}}
</div>--}}
<div class="s-replace"></div>
{{/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}}
{{!--<a class="students-entry" href="{{verifyUrl}}">学生认证</a>--}}
{{#if @root.studentSwitch}}
<a class="students-entry" href="{{verifyUrl}}">学生认证</a>
{{/if}}
{{/unless}}
{{^}}
<div class="user-info">
<a class="login-btn" href="{{signinUrl}}">
登录/注册
</a>
{{!--<a class="students-entry" href="{{verifyUrl}}">学生认证</a>--}}
{{#if @root.studentSwitch}}
<a class="students-entry" href="{{verifyUrl}}">学生认证</a>
{{/if}}
</div>
{{/isLogin}}
</div>
... ...
... ... @@ -27,7 +27,7 @@ const domains = {
module.exports = {
app: 'h5',
appVersion: '5.4', // 调用api的版本
appVersion: '5.4.1', // 调用api的版本
port: 6001,
siteUrl: '//m.yohobuy.com',
assetUrl: '//127.0.0.1:5001',
... ... @@ -87,7 +87,7 @@ module.exports = {
appSecret: 'ce21ae4a3f93852279175a167e54509b'
}
},
zookeeperServer: '192.168.102.168:2188',
zookeeperServer: '127.0.0.1:2181',
alipayConfig: {
payUrl: 'https://mapi.alipay.com/gateway.do',
service: 'alipay.wap.create.direct.pay.by.user',
... ...