Showing
10 changed files
with
62 additions
and
16 deletions
@@ -12,6 +12,7 @@ const mRoot = '../models'; | @@ -12,6 +12,7 @@ const mRoot = '../models'; | ||
12 | const payModel = require(`${mRoot}/pay`); | 12 | const payModel = require(`${mRoot}/pay`); |
13 | const payTool = payModel.payTool; | 13 | const payTool = payModel.payTool; |
14 | const headerModel = require('../../../doraemon/models/header'); // 头部model | 14 | const headerModel = require('../../../doraemon/models/header'); // 头部model |
15 | +const aboutModel = require('../../../doraemon/models/about'); | ||
15 | const co = require('bluebird').coroutine; | 16 | const co = require('bluebird').coroutine; |
16 | const helpers = global.yoho.helpers; | 17 | const helpers = global.yoho.helpers; |
17 | const Payment = require('../helpers/payment'); | 18 | const Payment = require('../helpers/payment'); |
@@ -215,7 +216,9 @@ const payCod = (req, res, next) => { | @@ -215,7 +216,9 @@ const payCod = (req, res, next) => { | ||
215 | 216 | ||
216 | payModel.getPayCod(param).then(result => { | 217 | payModel.getPayCod(param).then(result => { |
217 | if (result.match === true) { | 218 | if (result.match === true) { |
218 | - res.render('pay/pay-cod', Object.assign(responseData, result)); | 219 | + aboutModel.about().then(resu => { |
220 | + res.render('pay/pay-cod', Object.assign(responseData, result, {wxFooter: resu})); | ||
221 | + }); | ||
219 | } else { | 222 | } else { |
220 | res.redirect('/'); | 223 | res.redirect('/'); |
221 | } | 224 | } |
@@ -266,7 +269,9 @@ const payAli = (req, res, next) => { | @@ -266,7 +269,9 @@ const payAli = (req, res, next) => { | ||
266 | 269 | ||
267 | payModel.getPayAli(param).then(result => { | 270 | payModel.getPayAli(param).then(result => { |
268 | if (result.match === true) { | 271 | if (result.match === true) { |
269 | - res.render('pay/pay-ali', Object.assign(responseData, result)); | 272 | + aboutModel.about().then(resu => { |
273 | + res.render('pay/pay-ali', Object.assign(responseData, result, {wxFooter: resu})); | ||
274 | + }); | ||
270 | } else { | 275 | } else { |
271 | res.redirect('/'); | 276 | res.redirect('/'); |
272 | } | 277 | } |
@@ -34,7 +34,9 @@ | @@ -34,7 +34,9 @@ | ||
34 | <a href="/">随便逛逛</a> | 34 | <a href="/">随便逛逛</a> |
35 | <a href="{{orderUrl}}">查看订单</a> | 35 | <a href="{{orderUrl}}">查看订单</a> |
36 | </div> | 36 | </div> |
37 | + {{# wxFooter}} | ||
37 | {{> wx-footer}} | 38 | {{> wx-footer}} |
39 | + {{/ wxFooter}} | ||
38 | {{# banner}} | 40 | {{# banner}} |
39 | {{#data}} | 41 | {{#data}} |
40 | <a href="{{url}}" class="ad-pic" alt="{{alt}}"> | 42 | <a href="{{url}}" class="ad-pic" alt="{{alt}}"> |
@@ -32,7 +32,9 @@ | @@ -32,7 +32,9 @@ | ||
32 | <a href="/">随便逛逛</a> | 32 | <a href="/">随便逛逛</a> |
33 | <a href="{{orderUrl}}">查看订单</a> | 33 | <a href="{{orderUrl}}">查看订单</a> |
34 | </div> | 34 | </div> |
35 | + {{# wxFooter}} | ||
35 | {{> wx-footer}} | 36 | {{> wx-footer}} |
37 | + {{/ wxFooter}} | ||
36 | {{# banner}} | 38 | {{# banner}} |
37 | {{#data}} | 39 | {{#data}} |
38 | <a href="{{url}}" class="ad-pic" alt="{{alt}}"> | 40 | <a href="{{url}}" class="ad-pic" alt="{{alt}}"> |
@@ -13,6 +13,7 @@ const stringProcess = require(`${global.utils}/string-process`); | @@ -13,6 +13,7 @@ const stringProcess = require(`${global.utils}/string-process`); | ||
13 | const guangProcess = require(`${global.utils}/guang-process`); | 13 | const guangProcess = require(`${global.utils}/guang-process`); |
14 | const productDetailModel = require('../../product/models/detail'); | 14 | const productDetailModel = require('../../product/models/detail'); |
15 | const headerModel = require('../../../doraemon/models/header'); // 头部model | 15 | const headerModel = require('../../../doraemon/models/header'); // 头部model |
16 | +const aboutModel = require('../../../doraemon/models/about'); | ||
16 | const qs = require('querystring'); | 17 | const qs = require('querystring'); |
17 | const channels = { | 18 | const channels = { |
18 | boys: 1, | 19 | boys: 1, |
@@ -439,15 +440,19 @@ const index = (req, res, next) => { | @@ -439,15 +440,19 @@ const index = (req, res, next) => { | ||
439 | 440 | ||
440 | // 标识有微信分享 | 441 | // 标识有微信分享 |
441 | data.hasWxShare = true; | 442 | data.hasWxShare = true; |
442 | - res.render('info/index', Object.assign({ | ||
443 | - page: 'info-index', | ||
444 | - title: '逛', | ||
445 | - gender: gender, | ||
446 | - wechatShare: true, | ||
447 | - isWeixin: isWeixin, | ||
448 | - localCss: true, | ||
449 | - isShare: isShare | ||
450 | - }, data, parameter)); | 443 | + |
444 | + aboutModel.about().then((resu) => { | ||
445 | + data.guang.wxFooter = resu; | ||
446 | + res.render('info/index', Object.assign({ | ||
447 | + page: 'info-index', | ||
448 | + title: '逛', | ||
449 | + gender: gender, | ||
450 | + wechatShare: true, | ||
451 | + isWeixin: isWeixin, | ||
452 | + localCss: true, | ||
453 | + isShare: isShare | ||
454 | + }, data, parameter)); | ||
455 | + }); | ||
451 | }).catch(next); | 456 | }).catch(next); |
452 | }).catch(next); | 457 | }).catch(next); |
453 | }; | 458 | }; |
@@ -191,9 +191,11 @@ | @@ -191,9 +191,11 @@ | ||
191 | <div class="down-bottom"></div> | 191 | <div class="down-bottom"></div> |
192 | {{/if}} | 192 | {{/if}} |
193 | </div> | 193 | </div> |
194 | + {{# wxFooter}} | ||
194 | <div class="wx-footer-c"> | 195 | <div class="wx-footer-c"> |
195 | {{> wx-footer}} | 196 | {{> wx-footer}} |
196 | </div> | 197 | </div> |
198 | + {{/ wxFooter}} | ||
197 | </div> | 199 | </div> |
198 | 200 | ||
199 | {{!-- wx-share --}} | 201 | {{!-- wx-share --}} |
@@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
5 | */ | 5 | */ |
6 | 'use strict'; | 6 | 'use strict'; |
7 | const headerModel = require('../../../doraemon/models/header'); // 头部model | 7 | const headerModel = require('../../../doraemon/models/header'); // 头部model |
8 | +const aboutModel = require('../../../doraemon/models/about'); | ||
8 | 9 | ||
9 | const privacy = (req, res) => { | 10 | const privacy = (req, res) => { |
10 | 11 | ||
@@ -64,7 +65,9 @@ const about = (req, res) => { | @@ -64,7 +65,9 @@ const about = (req, res) => { | ||
64 | width750: true | 65 | width750: true |
65 | }; | 66 | }; |
66 | 67 | ||
67 | - res.render('agreement/about', responseData); | 68 | + aboutModel.about().then(result => { |
69 | + res.render('agreement/about', Object.assign(responseData, {wxFooter: result})); | ||
70 | + }); | ||
68 | }; | 71 | }; |
69 | 72 | ||
70 | module.exports = { | 73 | module.exports = { |
@@ -4,8 +4,10 @@ | @@ -4,8 +4,10 @@ | ||
4 | <div class="focus-arr"> | 4 | <div class="focus-arr"> |
5 | <img src="{{imgSrc 'img/passport/arr.png'}}" /> | 5 | <img src="{{imgSrc 'img/passport/arr.png'}}" /> |
6 | </div> | 6 | </div> |
7 | + {{# wxFooter}} | ||
7 | <div class="wx-boder"> | 8 | <div class="wx-boder"> |
8 | {{> wx-footer}} | 9 | {{> wx-footer}} |
9 | </div> | 10 | </div> |
11 | + {{/ wxFooter}} | ||
10 | <img class="focus-pic" src="{{imgSrc 'img/passport/focus.png'}}" /> | 12 | <img class="focus-pic" src="{{imgSrc 'img/passport/focus.png'}}" /> |
11 | </div> | 13 | </div> |
@@ -13,8 +13,8 @@ const domains = { | @@ -13,8 +13,8 @@ const domains = { | ||
13 | liveApi: 'http://testapi.live.yohops.com:9999/', | 13 | liveApi: 'http://testapi.live.yohops.com:9999/', |
14 | singleApi: 'http://api-test3.yohops.com:9999/', | 14 | singleApi: 'http://api-test3.yohops.com:9999/', |
15 | 15 | ||
16 | - api: 'http://api-test3.yohops.com:9999/', | ||
17 | - service: 'http://service-test3.yohops.com:9999/', | 16 | + api: 'http://api.yoho.cn/', |
17 | + service: 'http://service.yoho.cn/', | ||
18 | 18 | ||
19 | // liveApi: 'http://api.live.yoho.cn/', | 19 | // liveApi: 'http://api.live.yoho.cn/', |
20 | // singleApi: 'http://single.yoho.cn/', | 20 | // singleApi: 'http://single.yoho.cn/', |
doraemon/models/about.js
0 → 100644
1 | +'use strict'; | ||
2 | + | ||
3 | +const api = global.yoho.API; | ||
4 | + | ||
5 | +const about = () => { | ||
6 | + return api.get('', { | ||
7 | + method: 'app.document.config' | ||
8 | + }, { | ||
9 | + code: 200 | ||
10 | + }).then(result => { | ||
11 | + let resu = {}; | ||
12 | + | ||
13 | + if (result && result.data) { | ||
14 | + resu = { | ||
15 | + wxTitle: result.data.wechatAtten, | ||
16 | + wxTip: result.data.wechatAttenSub | ||
17 | + }; | ||
18 | + } | ||
19 | + return resu; | ||
20 | + }); | ||
21 | +}; | ||
22 | + | ||
23 | +module.exports = { | ||
24 | + about | ||
25 | +}; |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <img src="{{imgSrc 'img/wx-footer.png'}}" /> | 3 | <img src="{{imgSrc 'img/wx-footer.png'}}" /> |
4 | </div> | 4 | </div> |
5 | <div class="wx-text"> | 5 | <div class="wx-text"> |
6 | - <div class="wx-title">微信搜索公众号“有货YOHOBUY”</div> | ||
7 | - <div class="wx-tip">你购物,我买单,关注微信公众号即可赢免单</div> | 6 | + <div class="wx-title">{{wxTitle}}</div> |
7 | + <div class="wx-tip">{{wxTip}}</div> | ||
8 | </div> | 8 | </div> |
9 | </div> | 9 | </div> |
-
Please register or login to post a comment