Authored by 毕凯

Merge branch 'master' into release/6.5.2

... ... @@ -14,12 +14,12 @@ exports.index = (req, res) => {
req.yoho.captchaShow = false;
res.locals.useGeetest = true;
if (_.has(res, 'locals.loadJs')) {
res.locals.loadJs.push({
if (_.has(res, 'locals.loadJsBefore')) {
res.locals.loadJsBefore.push({
src: global.yoho.config.geetestJs
});
} else {
res.locals.loadJs = [
res.locals.loadJsBefore = [
{
src: global.yoho.config.geetestJs
}
... ...
... ... @@ -76,15 +76,6 @@ exports.couponSend = (req, res, next) => {
data: ''
};
// APP时用参数中的ID
if (!uid) {
uid = app && app.uid ? app.uid : 0;
}
if (uid === '' || uid === 0 || token === '' || token === 0) {
return res.jsonp(resultData);
}
// 接口要加 session 校验,跨域异步请求未添加相关参数
if (req.yoho.isApp) {
if (app.app_version && app.client_type && app.session_key && app.uid) {
... ... @@ -102,6 +93,10 @@ exports.couponSend = (req, res, next) => {
}
}
if (uid === '' || uid === 0 || token === '' || token === 0) {
return res.jsonp(resultData);
}
model.couponSend(uid, token).then(result => {
res.set({
'Cache-Control': 'no-cache',
... ...
... ... @@ -26,12 +26,12 @@ const load = (req, res, next) => {
res.locals.useGeetest = !req.yoho.captchaShow;
if (_.has(res, 'locals.loadJs')) {
res.locals.loadJs.push({
if (_.has(res, 'locals.loadJsBefore')) {
res.locals.loadJsBefore.push({
src: global.yoho.config.geetestJs
});
} else {
res.locals.loadJs = [
res.locals.loadJsBefore = [
{
src: global.yoho.config.geetestJs
}
... ...
... ... @@ -13,9 +13,10 @@ const isTest = process.env.NODE_ENV === 'test';
const domains = {
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// liveApi: 'http://testapi.live.yohops.com:9999/',
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/',
// gray
// api: 'http://apigray.yoho.cn/',
... ... @@ -23,9 +24,11 @@ const domains = {
// platformApi: 'http://172.16.6.210:8088/',
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
liveApi: 'http://testapi.live.yohops.com:9999/',
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/',
imSocket: 'ws://socket.yohobuy.com:10240',
imCs: 'http://im.yohobuy.com/api',
global: 'http://api-global.yohobuy.com',
... ...
... ... @@ -132,6 +132,9 @@
var STATIC_RESOURCE_HASH = '{{startTime}}';
var STATIC_RESOURCE_PATH = '//{{devHost}}:{{port}}';
window.jsFiles = [
{{#loadJsBefore}}
'{{src}}',
{{/loadJsBefore}}
'//{{devHost}}:{{port}}/libs.js?t={{startTime}}',
'//{{devHost}}:{{port}}/{{module}}.{{page}}.js?t={{startTime}}'
{{#loadJs}}
... ... @@ -144,6 +147,9 @@
var STATIC_RESOURCE_HASH = '{{startTime}}';
var STATIC_RESOURCE_PATH = '//cdn.yoho.cn/yohobuywap-node/{{version}}';
window.jsFiles = [
{{#loadJsBefore}}
'{{src}}',
{{/loadJsBefore}}
'//cdn.yoho.cn/yohobuywap-node/{{version}}/libs.js?t={{startTime}}',
'//cdn.yoho.cn/yohobuywap-node/{{version}}/{{module}}.{{page}}.js?t={{startTime}}'
{{#loadJs}}
... ...
{
"name": "yohobuywap-node",
"version": "6.5.3",
"version": "6.5.4",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...