Merge branch 'gray' into 'master'
Gray See merge request !1288
Showing
4 changed files
with
20 additions
and
14 deletions
@@ -14,12 +14,12 @@ exports.index = (req, res) => { | @@ -14,12 +14,12 @@ exports.index = (req, res) => { | ||
14 | req.yoho.captchaShow = false; | 14 | req.yoho.captchaShow = false; |
15 | res.locals.useGeetest = true; | 15 | res.locals.useGeetest = true; |
16 | 16 | ||
17 | - if (_.has(res, 'locals.loadJs')) { | ||
18 | - res.locals.loadJs.push({ | 17 | + if (_.has(res, 'locals.loadJsBefore')) { |
18 | + res.locals.loadJsBefore.push({ | ||
19 | src: global.yoho.config.geetestJs | 19 | src: global.yoho.config.geetestJs |
20 | }); | 20 | }); |
21 | } else { | 21 | } else { |
22 | - res.locals.loadJs = [ | 22 | + res.locals.loadJsBefore = [ |
23 | { | 23 | { |
24 | src: global.yoho.config.geetestJs | 24 | src: global.yoho.config.geetestJs |
25 | } | 25 | } |
@@ -26,12 +26,12 @@ const load = (req, res, next) => { | @@ -26,12 +26,12 @@ const load = (req, res, next) => { | ||
26 | 26 | ||
27 | res.locals.useGeetest = !req.yoho.captchaShow; | 27 | res.locals.useGeetest = !req.yoho.captchaShow; |
28 | 28 | ||
29 | - if (_.has(res, 'locals.loadJs')) { | ||
30 | - res.locals.loadJs.push({ | 29 | + if (_.has(res, 'locals.loadJsBefore')) { |
30 | + res.locals.loadJsBefore.push({ | ||
31 | src: global.yoho.config.geetestJs | 31 | src: global.yoho.config.geetestJs |
32 | }); | 32 | }); |
33 | } else { | 33 | } else { |
34 | - res.locals.loadJs = [ | 34 | + res.locals.loadJsBefore = [ |
35 | { | 35 | { |
36 | src: global.yoho.config.geetestJs | 36 | src: global.yoho.config.geetestJs |
37 | } | 37 | } |
@@ -13,10 +13,10 @@ const isTest = process.env.NODE_ENV === 'test'; | @@ -13,10 +13,10 @@ const isTest = process.env.NODE_ENV === 'test'; | ||
13 | 13 | ||
14 | const domains = { | 14 | const domains = { |
15 | 15 | ||
16 | - // api: 'http://api.yoho.cn/', | ||
17 | - // service: 'http://service.yoho.cn/', | ||
18 | - // liveApi: 'http://testapi.live.yohops.com:9999/', | ||
19 | - // singleApi: 'http://api-test3.yohops.com:9999/', | 16 | + api: 'http://api.yoho.cn/', |
17 | + service: 'http://service.yoho.cn/', | ||
18 | + liveApi: 'http://testapi.live.yohops.com:9999/', | ||
19 | + singleApi: 'http://api-test3.yohops.com:9999/', | ||
20 | 20 | ||
21 | // gray | 21 | // gray |
22 | // singleApi: 'http://single.gray.yohops.com/', | 22 | // singleApi: 'http://single.gray.yohops.com/', |
@@ -25,10 +25,10 @@ const domains = { | @@ -25,10 +25,10 @@ const domains = { | ||
25 | // platformApi: 'http://172.16.6.210:8088/', | 25 | // platformApi: 'http://172.16.6.210:8088/', |
26 | 26 | ||
27 | 27 | ||
28 | - api: 'http://api-test3.yohops.com:9999/', | ||
29 | - service: 'http://service-test3.yohops.com:9999/', | ||
30 | - liveApi: 'http://testapi.live.yohops.com:9999/', | ||
31 | - singleApi: 'http://api-test3.yohops.com:9999/', | 28 | + // api: 'http://api-test3.yohops.com:9999/', |
29 | + // service: 'http://service-test3.yohops.com:9999/', | ||
30 | + // liveApi: 'http://testapi.live.yohops.com:9999/', | ||
31 | + // singleApi: 'http://api-test3.yohops.com:9999/', | ||
32 | 32 | ||
33 | imSocket: 'ws://socket.yohobuy.com:10240', | 33 | imSocket: 'ws://socket.yohobuy.com:10240', |
34 | imCs: 'http://im.yohobuy.com/api', | 34 | imCs: 'http://im.yohobuy.com/api', |
@@ -132,6 +132,9 @@ | @@ -132,6 +132,9 @@ | ||
132 | var STATIC_RESOURCE_HASH = '{{startTime}}'; | 132 | var STATIC_RESOURCE_HASH = '{{startTime}}'; |
133 | var STATIC_RESOURCE_PATH = '//{{devHost}}:{{port}}'; | 133 | var STATIC_RESOURCE_PATH = '//{{devHost}}:{{port}}'; |
134 | window.jsFiles = [ | 134 | window.jsFiles = [ |
135 | + {{#loadJsBefore}} | ||
136 | + '{{src}}', | ||
137 | + {{/loadJsBefore}} | ||
135 | '//{{devHost}}:{{port}}/libs.js?t={{startTime}}', | 138 | '//{{devHost}}:{{port}}/libs.js?t={{startTime}}', |
136 | '//{{devHost}}:{{port}}/{{module}}.{{page}}.js?t={{startTime}}' | 139 | '//{{devHost}}:{{port}}/{{module}}.{{page}}.js?t={{startTime}}' |
137 | {{#loadJs}} | 140 | {{#loadJs}} |
@@ -144,6 +147,9 @@ | @@ -144,6 +147,9 @@ | ||
144 | var STATIC_RESOURCE_HASH = '{{startTime}}'; | 147 | var STATIC_RESOURCE_HASH = '{{startTime}}'; |
145 | var STATIC_RESOURCE_PATH = '//cdn.yoho.cn/yohobuywap-node/{{version}}'; | 148 | var STATIC_RESOURCE_PATH = '//cdn.yoho.cn/yohobuywap-node/{{version}}'; |
146 | window.jsFiles = [ | 149 | window.jsFiles = [ |
150 | + {{#loadJsBefore}} | ||
151 | + '{{src}}', | ||
152 | + {{/loadJsBefore}} | ||
147 | '//cdn.yoho.cn/yohobuywap-node/{{version}}/libs.js?t={{startTime}}', | 153 | '//cdn.yoho.cn/yohobuywap-node/{{version}}/libs.js?t={{startTime}}', |
148 | '//cdn.yoho.cn/yohobuywap-node/{{version}}/{{module}}.{{page}}.js?t={{startTime}}' | 154 | '//cdn.yoho.cn/yohobuywap-node/{{version}}/{{module}}.{{page}}.js?t={{startTime}}' |
149 | {{#loadJs}} | 155 | {{#loadJs}} |
-
Please register or login to post a comment