Showing
3 changed files
with
15 additions
and
3 deletions
@@ -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 |
-
Please register or login to post a comment