Merge branch 'release/wap-im' of http://git.yoho.cn/fe/yohobuywap-node into release/wap-im
Showing
5 changed files
with
23 additions
and
7 deletions
@@ -9,8 +9,12 @@ | @@ -9,8 +9,12 @@ | ||
9 | const onlineModel = require('../models/onlineService'); | 9 | const onlineModel = require('../models/onlineService'); |
10 | const headerModel = require('../../../doraemon/models/header'); // 头部model | 10 | const headerModel = require('../../../doraemon/models/header'); // 头部model |
11 | const _ = require('lodash'); | 11 | const _ = require('lodash'); |
12 | +const helpers = global.yoho.helpers; | ||
12 | 13 | ||
13 | const getOnlineServiceInfo = (req, res, next) => { | 14 | const getOnlineServiceInfo = (req, res, next) => { |
15 | + let serviceUrl = _.get(req.app.locals.wap, 'clientService.new', false) ? | ||
16 | + helpers.urlFormat('/service/im') : | ||
17 | + 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info='; | ||
14 | 18 | ||
15 | onlineModel.getOnlineServiceInfo().then((result) => { | 19 | onlineModel.getOnlineServiceInfo().then((result) => { |
16 | 20 | ||
@@ -25,7 +29,7 @@ const getOnlineServiceInfo = (req, res, next) => { | @@ -25,7 +29,7 @@ const getOnlineServiceInfo = (req, res, next) => { | ||
25 | title: '在线客服', | 29 | title: '在线客服', |
26 | pageFooter: true, | 30 | pageFooter: true, |
27 | service: result, | 31 | service: result, |
28 | - serviceUrl: 'http://chat80.live800.com/live800/chatClient/chatbox.jsp?companyID=493979&configID=123576&jid=9277320930' | 32 | + serviceUrl: serviceUrl |
29 | }); | 33 | }); |
30 | }).catch(next); | 34 | }).catch(next); |
31 | }; | 35 | }; |
@@ -6,15 +6,20 @@ | @@ -6,15 +6,20 @@ | ||
6 | 6 | ||
7 | 'use strict'; | 7 | 'use strict'; |
8 | 8 | ||
9 | +const helpers = global.yoho.helpers; | ||
10 | +const _ = require('lodash'); | ||
9 | const headerModel = require('../../../doraemon/models/header'); // 头部model | 11 | const headerModel = require('../../../doraemon/models/header'); // 头部model |
10 | const orderDetailModel = require('../models/orderDetail'); | 12 | const orderDetailModel = require('../models/orderDetail'); |
11 | 13 | ||
12 | const orderDetailData = (req, res, next) => { | 14 | const orderDetailData = (req, res, next) => { |
13 | let uid = req.user.uid; | 15 | let uid = req.user.uid; |
14 | let orderCode = req.query.order_code; | 16 | let orderCode = req.query.order_code; |
17 | + let serviceUrl = _.get(req.app.locals.wap, 'clientService.new', false) ? | ||
18 | + helpers.urlFormat('/service/im') : | ||
19 | + 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info='; | ||
15 | 20 | ||
16 | orderDetailModel.orderDetailData(uid, orderCode).then(result => { | 21 | orderDetailModel.orderDetailData(uid, orderCode).then(result => { |
17 | - result.serviceUrl = 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info='; | 22 | + result.serviceUrl = serviceUrl; |
18 | res.render('orderDetail', { | 23 | res.render('orderDetail', { |
19 | module: 'home', | 24 | module: 'home', |
20 | page: 'order-detail', | 25 | page: 'order-detail', |
@@ -32,6 +32,9 @@ const bind = { | @@ -32,6 +32,9 @@ const bind = { | ||
32 | 32 | ||
33 | let openId = req.query.openId; | 33 | let openId = req.query.openId; |
34 | let sourceType = req.query.sourceType; | 34 | let sourceType = req.query.sourceType; |
35 | + let serviceUrl = _.get(req.app.locals.wap, 'clientService.new', false) ? | ||
36 | + helpers.urlFormat('/service/im') : | ||
37 | + 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info='; | ||
35 | 38 | ||
36 | res.render('bind/index', { | 39 | res.render('bind/index', { |
37 | bindIndex: true, // js标识 | 40 | bindIndex: true, // js标识 |
@@ -44,7 +47,7 @@ const bind = { | @@ -44,7 +47,7 @@ const bind = { | ||
44 | openId: openId, // openId | 47 | openId: openId, // openId |
45 | areaCode: '+86', // 默认区号 | 48 | areaCode: '+86', // 默认区号 |
46 | countrys: RegService.getAreaData(), // 国别码 | 49 | countrys: RegService.getAreaData(), // 国别码 |
47 | - serviceUrl: 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info=', // 在线客服 | 50 | + serviceUrl: serviceUrl, // 在线客服 |
48 | module: 'passport', | 51 | module: 'passport', |
49 | page: 'bind', | 52 | page: 'bind', |
50 | title: '绑定手机号' | 53 | title: '绑定手机号' |
@@ -182,6 +182,10 @@ let codeAction = (req, res, next) => { | @@ -182,6 +182,10 @@ let codeAction = (req, res, next) => { | ||
182 | }); | 182 | }); |
183 | } | 183 | } |
184 | 184 | ||
185 | + let serviceUrl = _.get(req.app.locals.wap, 'clientService.new', false) ? | ||
186 | + helpers.urlFormat('/service/im') : | ||
187 | + 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info='; | ||
188 | + | ||
185 | res.render('reg/code', { | 189 | res.render('reg/code', { |
186 | page: 'code', | 190 | page: 'code', |
187 | title: '注册-验证码', | 191 | title: '注册-验证码', |
@@ -191,7 +195,7 @@ let codeAction = (req, res, next) => { | @@ -191,7 +195,7 @@ let codeAction = (req, res, next) => { | ||
191 | areaCode: area, // 默认的区号 | 195 | areaCode: area, // 默认的区号 |
192 | phoneNum: mobile, // 手机号 | 196 | phoneNum: mobile, // 手机号 |
193 | token: token, // 访问令牌 | 197 | token: token, // 访问令牌 |
194 | - serviceUrl: 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info=' // 在线客服 | 198 | + serviceUrl: serviceUrl // 在线客服 |
195 | }); | 199 | }); |
196 | }; | 200 | }; |
197 | 201 |
@@ -45,14 +45,14 @@ const shop = { | @@ -45,14 +45,14 @@ const shop = { | ||
45 | 45 | ||
46 | params.brand = brandId; | 46 | params.brand = brandId; |
47 | 47 | ||
48 | - let searchParam = { | 48 | + let searchParam = Object.assign({ |
49 | isApp: req.yoho.isApp, | 49 | isApp: req.yoho.isApp, |
50 | brand: brandId, | 50 | brand: brandId, |
51 | type: 'newest', | 51 | type: 'newest', |
52 | order: '1', | 52 | order: '1', |
53 | page: 1, | 53 | page: 1, |
54 | - limit: 4 | ||
55 | - }; | 54 | + limit: 4, |
55 | + }, params); | ||
56 | 56 | ||
57 | if (req.query.from !== 'search' && brandLogo.type === '2' && brandLogo.shopId) { | 57 | if (req.query.from !== 'search' && brandLogo.type === '2' && brandLogo.shopId) { |
58 | req.query.shop_id = brandLogo.shopId; | 58 | req.query.shop_id = brandLogo.shopId; |
-
Please register or login to post a comment