Authored by 郭成尧

Merge branch 'feature/wxPublic' into 'release/5.6'

Feature/wx public



See merge request !453
... ... @@ -12,6 +12,7 @@ const mRoot = '../models';
const payModel = require(`${mRoot}/pay`);
const payTool = payModel.payTool;
const headerModel = require('../../../doraemon/models/header'); // 头部model
const aboutModel = require('../../../doraemon/models/about');
const co = require('bluebird').coroutine;
const helpers = global.yoho.helpers;
const Payment = require('../helpers/payment');
... ... @@ -215,7 +216,9 @@ const payCod = (req, res, next) => {
payModel.getPayCod(param).then(result => {
if (result.match === true) {
res.render('pay/pay-cod', Object.assign(responseData, result));
aboutModel.about().then(resu => {
res.render('pay/pay-cod', Object.assign(responseData, result, {wxFooter: resu}));
});
} else {
res.redirect('/');
}
... ... @@ -266,7 +269,9 @@ const payAli = (req, res, next) => {
payModel.getPayAli(param).then(result => {
if (result.match === true) {
res.render('pay/pay-ali', Object.assign(responseData, result));
aboutModel.about().then(resu => {
res.render('pay/pay-ali', Object.assign(responseData, result, {wxFooter: resu}));
});
} else {
res.redirect('/');
}
... ...
... ... @@ -34,13 +34,9 @@
<a href="/">随便逛逛</a>
<a href="{{orderUrl}}">查看订单</a>
</div>
<div class="wx-footer">
<div class="icon-pic"></div>
<div class="tips">
<div class="copy">你购物,我买单。</div>
<div class="intro">微信搜索公众号“有货YOHOBUY"关注赢免单!</div>
</div>
</div>
{{# wxFooter}}
{{> wx-footer}}
{{/ wxFooter}}
{{# banner}}
{{#data}}
<a href="{{url}}" class="ad-pic" alt="{{alt}}">
... ...
... ... @@ -32,13 +32,9 @@
<a href="/">随便逛逛</a>
<a href="{{orderUrl}}">查看订单</a>
</div>
<div class="wx-footer">
<div class="icon-pic"></div>
<div class="tips">
<div class="copy">你购物,我买单。</div>
<div class="intro">微信搜索公众号“有货YOHOBUY"关注赢免单!</div>
</div>
</div>
{{# wxFooter}}
{{> wx-footer}}
{{/ wxFooter}}
{{# banner}}
{{#data}}
<a href="{{url}}" class="ad-pic" alt="{{alt}}">
... ...
... ... @@ -13,6 +13,7 @@ const stringProcess = require(`${global.utils}/string-process`);
const guangProcess = require(`${global.utils}/guang-process`);
const productDetailModel = require('../../product/models/detail');
const headerModel = require('../../../doraemon/models/header'); // 头部model
const aboutModel = require('../../../doraemon/models/about');
const qs = require('querystring');
const channels = {
boys: 1,
... ... @@ -439,15 +440,19 @@ const index = (req, res, next) => {
// 标识有微信分享
data.hasWxShare = true;
res.render('info/index', Object.assign({
page: 'info-index',
title: '逛',
gender: gender,
wechatShare: true,
isWeixin: isWeixin,
localCss: true,
isShare: isShare
}, data, parameter));
aboutModel.about().then((resu) => {
data.guang.wxFooter = resu;
res.render('info/index', Object.assign({
page: 'info-index',
title: '逛',
gender: gender,
wechatShare: true,
isWeixin: isWeixin,
localCss: true,
isShare: isShare
}, data, parameter));
});
}).catch(next);
}).catch(next);
};
... ...
... ... @@ -186,11 +186,16 @@
</ul>
</div>
{{/if}}
{{#if isShare}}
<div class="down-bottom"></div>
{{/if}}
</div>
{{# wxFooter}}
<div class="wx-footer-c">
{{> wx-footer}}
</div>
{{/ wxFooter}}
</div>
{{!-- wx-share --}}
... ...
... ... @@ -5,6 +5,7 @@
*/
'use strict';
const headerModel = require('../../../doraemon/models/header'); // 头部model
const aboutModel = require('../../../doraemon/models/about');
const privacy = (req, res) => {
... ... @@ -52,9 +53,27 @@ const agreement = (req, res) => {
}, parameter));
};
const about = (req, res, next) => {
let responseData = {
pageHeader: headerModel.setNav({
navTitle: '关于有货',
navBtn: false
}),
module: 'passport',
page: 'agreement',
title: '关于有货',
width750: true
};
aboutModel.about().then(result => {
res.render('agreement/about', Object.assign(responseData, {wxFooter: result}));
}).catch(next);
};
module.exports = {
privacy,
newpower,
aboutYoho,
agreement
agreement,
about
};
... ...
... ... @@ -138,6 +138,7 @@ router.get('/passport/privacy', agreement.privacy);// 隐私条款
router.get('/passport/newpower', agreement.newpower);// 新力传媒
router.get('/passport/yohobuy', agreement.aboutYoho);// 关于有货
router.get('/passport/agreement', agreement.agreement);// 服务条款
router.get('/passport/about', agreement.about);// 关注有货
// 验证码
let captcha = require('./controllers/captcha');
... ...
<div class="wx-focus-c">
<p class="title">YOHOBUY!有货</p>
<p class="title">如何关注我们的微信公众号?</p>
<div class="focus-arr">
<img src="{{imgSrc 'img/passport/arr.png'}}" />
</div>
{{# wxFooter}}
<div class="wx-boder">
{{> wx-footer}}
</div>
{{/ wxFooter}}
<img class="focus-pic" src="{{imgSrc 'img/passport/focus.jpg'}}" />
</div>
... ...
... ... @@ -12,10 +12,8 @@ const isTest = process.env.NODE_ENV === 'test';
const domains = {
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/',
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/',
... ...
'use strict';
const api = global.yoho.API;
const about = () => {
return api.get('', {
method: 'app.document.config'
}, {
code: 200
}).then(result => {
let resu = {};
if (result && result.data) {
resu = {
wxTitle: result.data.wechatAtten,
wxTip: result.data.wechatAttenSub
};
}
return resu;
});
};
module.exports = {
about
};
... ...
... ... @@ -7,4 +7,4 @@
</div>
</div>
</div>
<!-- /结算提示框 -->
\ No newline at end of file
<!-- /结算提示框 -->
... ...
<div class="wx-footer clearfix">
<div class="wx-pic">
<img src="{{imgSrc 'img/wx-footer.png'}}" />
</div>
<div class="wx-text">
<div class="wx-title">{{wxTitle}}</div>
<div class="wx-tip">{{wxTip}}</div>
</div>
</div>
... ...
... ... @@ -140,36 +140,4 @@
position: absolute;
z-index: 3;
}
.wx-footer {
width: 100%;
min-height: 95px;
background-color: #fff;
border-bottom: solid 1px #e0e0e0;
padding: 0 25px 20px;
.icon-pic {
width: 49px;
height: 49px;
background-image: resolve("home/wechat.png");
background-size: 100%;
float: left;
}
.tips {
margin-left: 20px;
float: left;
width: 520px;
.copy {
font-size: 24px;
color: #444;
}
.intro {
font-size: 18px;
color: #b0b0b0;
}
}
}
}
... ...
... ... @@ -213,3 +213,39 @@ button {
.icon-cb-radio:before {
content: "\e646";
}
.wx-footer-c {
margin-top: 30px;
}
.wx-footer {
padding: 20px 0;
border-top: 1px solid #e0e0e0;
background-color: #fff;
.wx-pic {
width: 15%;
float: left;
padding: 15px 25px 0;
img {
width: 100%;
height: auto;
}
}
.wx-text {
float: left;
width: 85%;
.wx-title {
font-size: 28px;
color: #444;
}
.wx-tip {
font-size: 24px;
color: #b0b0b0;
}
}
}
... ...
... ... @@ -112,3 +112,30 @@
}
}
}
.wx-focus-c {
padding: 40px 30px 0;
.title {
font-size: 32px;
color: #444;
text-align: center;
line-height: 50px;
}
.wx-boder {
border: 1px solid #e0e0e0;
border-top: 0;
margin-top: 30px;
}
.focus-pic {
margin-top: 70px;
}
.focus-arr {
width: 48px;
height: 60px;
margin: 30px auto 0;
}
}
... ...