Authored by lijing

微信文案调接口

... ... @@ -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,7 +34,9 @@
<a href="/">随便逛逛</a>
<a href="{{orderUrl}}">查看订单</a>
</div>
{{# wxFooter}}
{{> wx-footer}}
{{/ wxFooter}}
{{# banner}}
{{#data}}
<a href="{{url}}" class="ad-pic" alt="{{alt}}">
... ...
... ... @@ -32,7 +32,9 @@
<a href="/">随便逛逛</a>
<a href="{{orderUrl}}">查看订单</a>
</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);
};
... ...
... ... @@ -191,9 +191,11 @@
<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) => {
... ... @@ -64,7 +65,9 @@ const about = (req, res) => {
width750: true
};
res.render('agreement/about', responseData);
aboutModel.about().then(result => {
res.render('agreement/about', Object.assign(responseData, {wxFooter: result}));
});
};
module.exports = {
... ...
... ... @@ -4,8 +4,10 @@
<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.png'}}" />
</div>
... ...
... ... @@ -13,8 +13,8 @@ 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/',
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
// 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
};
... ...
... ... @@ -3,7 +3,7 @@
<img src="{{imgSrc 'img/wx-footer.png'}}" />
</div>
<div class="wx-text">
<div class="wx-title">微信搜索公众号“有货YOHOBUY”</div>
<div class="wx-tip">你购物,我买单,关注微信公众号即可赢免单</div>
<div class="wx-title">{{wxTitle}}</div>
<div class="wx-tip">{{wxTip}}</div>
</div>
</div>
... ...