Merge branch 'feature/wxPublic' into 'release/5.6'
Feature/wx public See merge request !453
Showing
18 changed files
with
165 additions
and
62 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,13 +34,9 @@ | @@ -34,13 +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 | - <div class="wx-footer"> | ||
38 | - <div class="icon-pic"></div> | ||
39 | - <div class="tips"> | ||
40 | - <div class="copy">你购物,我买单。</div> | ||
41 | - <div class="intro">微信搜索公众号“有货YOHOBUY"关注赢免单!</div> | ||
42 | - </div> | ||
43 | - </div> | 37 | + {{# wxFooter}} |
38 | + {{> wx-footer}} | ||
39 | + {{/ wxFooter}} | ||
44 | {{# banner}} | 40 | {{# banner}} |
45 | {{#data}} | 41 | {{#data}} |
46 | <a href="{{url}}" class="ad-pic" alt="{{alt}}"> | 42 | <a href="{{url}}" class="ad-pic" alt="{{alt}}"> |
@@ -32,13 +32,9 @@ | @@ -32,13 +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 | - <div class="wx-footer"> | ||
36 | - <div class="icon-pic"></div> | ||
37 | - <div class="tips"> | ||
38 | - <div class="copy">你购物,我买单。</div> | ||
39 | - <div class="intro">微信搜索公众号“有货YOHOBUY"关注赢免单!</div> | ||
40 | - </div> | ||
41 | - </div> | 35 | + {{# wxFooter}} |
36 | + {{> wx-footer}} | ||
37 | + {{/ wxFooter}} | ||
42 | {{# banner}} | 38 | {{# banner}} |
43 | {{#data}} | 39 | {{#data}} |
44 | <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 | }; |
@@ -186,11 +186,16 @@ | @@ -186,11 +186,16 @@ | ||
186 | </ul> | 186 | </ul> |
187 | </div> | 187 | </div> |
188 | {{/if}} | 188 | {{/if}} |
189 | - | 189 | + |
190 | {{#if isShare}} | 190 | {{#if isShare}} |
191 | <div class="down-bottom"></div> | 191 | <div class="down-bottom"></div> |
192 | {{/if}} | 192 | {{/if}} |
193 | </div> | 193 | </div> |
194 | + {{# wxFooter}} | ||
195 | + <div class="wx-footer-c"> | ||
196 | + {{> wx-footer}} | ||
197 | + </div> | ||
198 | + {{/ wxFooter}} | ||
194 | </div> | 199 | </div> |
195 | 200 | ||
196 | {{!-- 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 | ||
@@ -52,9 +53,27 @@ const agreement = (req, res) => { | @@ -52,9 +53,27 @@ const agreement = (req, res) => { | ||
52 | }, parameter)); | 53 | }, parameter)); |
53 | }; | 54 | }; |
54 | 55 | ||
56 | +const about = (req, res, next) => { | ||
57 | + let responseData = { | ||
58 | + pageHeader: headerModel.setNav({ | ||
59 | + navTitle: '关于有货', | ||
60 | + navBtn: false | ||
61 | + }), | ||
62 | + module: 'passport', | ||
63 | + page: 'agreement', | ||
64 | + title: '关于有货', | ||
65 | + width750: true | ||
66 | + }; | ||
67 | + | ||
68 | + aboutModel.about().then(result => { | ||
69 | + res.render('agreement/about', Object.assign(responseData, {wxFooter: result})); | ||
70 | + }).catch(next); | ||
71 | +}; | ||
72 | + | ||
55 | module.exports = { | 73 | module.exports = { |
56 | privacy, | 74 | privacy, |
57 | newpower, | 75 | newpower, |
58 | aboutYoho, | 76 | aboutYoho, |
59 | - agreement | 77 | + agreement, |
78 | + about | ||
60 | }; | 79 | }; |
@@ -138,6 +138,7 @@ router.get('/passport/privacy', agreement.privacy);// 隐私条款 | @@ -138,6 +138,7 @@ router.get('/passport/privacy', agreement.privacy);// 隐私条款 | ||
138 | router.get('/passport/newpower', agreement.newpower);// 新力传媒 | 138 | router.get('/passport/newpower', agreement.newpower);// 新力传媒 |
139 | router.get('/passport/yohobuy', agreement.aboutYoho);// 关于有货 | 139 | router.get('/passport/yohobuy', agreement.aboutYoho);// 关于有货 |
140 | router.get('/passport/agreement', agreement.agreement);// 服务条款 | 140 | router.get('/passport/agreement', agreement.agreement);// 服务条款 |
141 | +router.get('/passport/about', agreement.about);// 关注有货 | ||
141 | 142 | ||
142 | // 验证码 | 143 | // 验证码 |
143 | let captcha = require('./controllers/captcha'); | 144 | let captcha = require('./controllers/captcha'); |
1 | +<div class="wx-focus-c"> | ||
2 | + <p class="title">YOHOBUY!有货</p> | ||
3 | + <p class="title">如何关注我们的微信公众号?</p> | ||
4 | + <div class="focus-arr"> | ||
5 | + <img src="{{imgSrc 'img/passport/arr.png'}}" /> | ||
6 | + </div> | ||
7 | + {{# wxFooter}} | ||
8 | + <div class="wx-boder"> | ||
9 | + {{> wx-footer}} | ||
10 | + </div> | ||
11 | + {{/ wxFooter}} | ||
12 | + <img class="focus-pic" src="{{imgSrc 'img/passport/focus.jpg'}}" /> | ||
13 | +</div> |
@@ -12,10 +12,8 @@ const isTest = process.env.NODE_ENV === 'test'; | @@ -12,10 +12,8 @@ const isTest = process.env.NODE_ENV === 'test'; | ||
12 | const domains = { | 12 | 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 | - | ||
16 | // api: 'http://api-test3.yohops.com:9999/', | 15 | // api: 'http://api-test3.yohops.com:9999/', |
17 | // service: 'http://service-test3.yohops.com:9999/', | 16 | // service: 'http://service-test3.yohops.com:9999/', |
18 | - | ||
19 | // liveApi: 'http://api.live.yoho.cn/', | 17 | // liveApi: 'http://api.live.yoho.cn/', |
20 | // singleApi: 'http://single.yoho.cn/', | 18 | // singleApi: 'http://single.yoho.cn/', |
21 | 19 |
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 | +}; |
doraemon/views/partial/wx-footer.hbs
0 → 100644
public/img/passport/arr.png
0 → 100644

2.03 KB
public/img/passport/focus.jpg
0 → 100644

49.9 KB
public/img/wx-footer.png
0 → 100644

1.88 KB
@@ -140,36 +140,4 @@ | @@ -140,36 +140,4 @@ | ||
140 | position: absolute; | 140 | position: absolute; |
141 | z-index: 3; | 141 | z-index: 3; |
142 | } | 142 | } |
143 | - | ||
144 | - .wx-footer { | ||
145 | - width: 100%; | ||
146 | - min-height: 95px; | ||
147 | - background-color: #fff; | ||
148 | - border-bottom: solid 1px #e0e0e0; | ||
149 | - padding: 0 25px 20px; | ||
150 | - | ||
151 | - .icon-pic { | ||
152 | - width: 49px; | ||
153 | - height: 49px; | ||
154 | - background-image: resolve("home/wechat.png"); | ||
155 | - background-size: 100%; | ||
156 | - float: left; | ||
157 | - } | ||
158 | - | ||
159 | - .tips { | ||
160 | - margin-left: 20px; | ||
161 | - float: left; | ||
162 | - width: 520px; | ||
163 | - | ||
164 | - .copy { | ||
165 | - font-size: 24px; | ||
166 | - color: #444; | ||
167 | - } | ||
168 | - | ||
169 | - .intro { | ||
170 | - font-size: 18px; | ||
171 | - color: #b0b0b0; | ||
172 | - } | ||
173 | - } | ||
174 | - } | ||
175 | } | 143 | } |
@@ -213,3 +213,39 @@ button { | @@ -213,3 +213,39 @@ button { | ||
213 | .icon-cb-radio:before { | 213 | .icon-cb-radio:before { |
214 | content: "\e646"; | 214 | content: "\e646"; |
215 | } | 215 | } |
216 | + | ||
217 | +.wx-footer-c { | ||
218 | + margin-top: 30px; | ||
219 | +} | ||
220 | + | ||
221 | +.wx-footer { | ||
222 | + padding: 20px 0; | ||
223 | + border-top: 1px solid #e0e0e0; | ||
224 | + background-color: #fff; | ||
225 | + | ||
226 | + .wx-pic { | ||
227 | + width: 15%; | ||
228 | + float: left; | ||
229 | + padding: 15px 25px 0; | ||
230 | + | ||
231 | + img { | ||
232 | + width: 100%; | ||
233 | + height: auto; | ||
234 | + } | ||
235 | + } | ||
236 | + | ||
237 | + .wx-text { | ||
238 | + float: left; | ||
239 | + width: 85%; | ||
240 | + | ||
241 | + .wx-title { | ||
242 | + font-size: 28px; | ||
243 | + color: #444; | ||
244 | + } | ||
245 | + | ||
246 | + .wx-tip { | ||
247 | + font-size: 24px; | ||
248 | + color: #b0b0b0; | ||
249 | + } | ||
250 | + } | ||
251 | +} |
@@ -112,3 +112,30 @@ | @@ -112,3 +112,30 @@ | ||
112 | } | 112 | } |
113 | } | 113 | } |
114 | } | 114 | } |
115 | + | ||
116 | +.wx-focus-c { | ||
117 | + padding: 40px 30px 0; | ||
118 | + | ||
119 | + .title { | ||
120 | + font-size: 32px; | ||
121 | + color: #444; | ||
122 | + text-align: center; | ||
123 | + line-height: 50px; | ||
124 | + } | ||
125 | + | ||
126 | + .wx-boder { | ||
127 | + border: 1px solid #e0e0e0; | ||
128 | + border-top: 0; | ||
129 | + margin-top: 30px; | ||
130 | + } | ||
131 | + | ||
132 | + .focus-pic { | ||
133 | + margin-top: 70px; | ||
134 | + } | ||
135 | + | ||
136 | + .focus-arr { | ||
137 | + width: 48px; | ||
138 | + height: 60px; | ||
139 | + margin: 30px auto 0; | ||
140 | + } | ||
141 | +} |
-
Please register or login to post a comment