Authored by 郝肖肖

'cache开关开启'

... ... @@ -15,9 +15,7 @@ module.exports = class extends global.yoho.BaseModel {
return this.get({data: {
method: 'web.brand.banner',
brand_id: bid
}, params: {
cache: config.apiCache
}});
}, param: config.apiCache});
}
};
... ...
... ... @@ -17,8 +17,6 @@ module.exports = class extends global.yoho.BaseModel {
product_id: pid
};
return this.get({data, params: {
cache: config.apiCache
}});
return this.get({data, param: config.apiCache});
}
};
... ...
... ... @@ -73,9 +73,7 @@ module.exports = class extends global.yoho.BaseModel {
data: {
method: 'web.productBanner.data',
product_id: pid
}, params: {
cache: config.apiCache
}
}, param: config.apiCache
});
}
... ... @@ -87,9 +85,7 @@ module.exports = class extends global.yoho.BaseModel {
data: {
method: 'h5.product.intro',
productskn: skn
}, params: {
cache: config.apiCache
}
}, param: config.apiCache
});
}
... ... @@ -101,9 +97,7 @@ module.exports = class extends global.yoho.BaseModel {
data: {
method: 'web.product.refundExchange',
product_skn: skn
}, params: {
cache: config.apiCache
}
}, param: config.apiCache
});
}
... ... @@ -115,9 +109,7 @@ module.exports = class extends global.yoho.BaseModel {
data: {
method: 'web.productComfort.data',
product_id: pid
}, params: {
cache: config.apiCache
}
}, param: config.apiCache
});
}
... ... @@ -129,9 +121,7 @@ module.exports = class extends global.yoho.BaseModel {
data: {
method: 'web.productModelTry.data',
product_skn: skn
}, params: {
cache: config.apiCache
}
}, param: config.apiCache
});
}
... ... @@ -165,9 +155,7 @@ module.exports = class extends global.yoho.BaseModel {
}
return this.get({
data, params: {
cache: config.apiCache
}
data, param: config.apiCache
});
}
... ... @@ -181,9 +169,7 @@ module.exports = class extends global.yoho.BaseModel {
};
return this.get({
data, params: {
cache: config.apiCache
}
data, param: config.apiCache
});
}
... ... @@ -205,9 +191,7 @@ module.exports = class extends global.yoho.BaseModel {
}
return this.get({
data, params: {
cache: config.apiCache
}
data, param: config.apiCache
});
}
... ... @@ -246,9 +230,7 @@ module.exports = class extends global.yoho.BaseModel {
method: 'web.search.findLike',
limit: limit || 10,
product_skn: skn
}, params: {
cache: 86400
}
}, param: config.apiCache
});
}
... ...
... ... @@ -27,7 +27,7 @@ module.exports = class extends global.yoho.BaseModel {
return this.get({
url: 'product/api/v2/detail/getlist',
data: finalParams,
params: {cache: config.apiCache},
param: config.apiCache,
api: global.yoho.GlobalAPI
});
}
... ... @@ -39,7 +39,7 @@ module.exports = class extends global.yoho.BaseModel {
physical_channel: channelNum,
product_skn: skn
},
params: { cache: config.apiCache },
param: config.apiCache,
api: global.yoho.GlobalAPI
});
}
... ... @@ -52,7 +52,7 @@ module.exports = class extends global.yoho.BaseModel {
product_skn: skn,
return_type: 'html'
},
params: {cache: config.apiCache},
param: config.apiCache,
api: global.yoho.GlobalAPI
});
}
... ... @@ -61,7 +61,7 @@ module.exports = class extends global.yoho.BaseModel {
return this.get({
url: 'editor/api/v1/brand/get',
data: { brandId: brand },
params: {cache: config.apiCache},
param: config.apiCache,
api: global.yoho.GlobalAPI
});
}
... ...
... ... @@ -54,7 +54,7 @@ module.exports = class extends global.yoho.BaseModel {
size: params.size || 0,
yh_channel: yhChannel[tempChannel].channel,
type: params.type || 0
}, params: {cache: config.apiCache}
}, param: config.apiCache
});
}
... ... @@ -67,7 +67,7 @@ module.exports = class extends global.yoho.BaseModel {
return this.get({
url: 'operations/api/v5/resource/home',
data: params,
params: {cache: config.apiCache},
param: config.apiCache,
api: global.yoho.ServiceAPI
});
}
... ... @@ -89,7 +89,7 @@ module.exports = class extends global.yoho.BaseModel {
stocknumber: 1, // 过滤出库存 > 1的商品
limit: params.limit || 5,
outlets: params.outlets || 1 // 默认取奥莱商品
}, params: {cache: config.apiCache}
}, param: config.apiCache
});
}
... ... @@ -123,6 +123,6 @@ module.exports = class extends global.yoho.BaseModel {
tempParams[paramsName] = params[paramsName];
}
});
return this.get({data: tempParams, params: {cache: config.apiCache}});
return this.get({data: tempParams, param: config.apiCache});
}
};
... ...
... ... @@ -47,7 +47,7 @@ module.exports = class extends global.yoho.BaseModel {
finalParams.yh_channel = yhChannel[params.channel].channel;
}
return this.get({data: Object.assign(finalParams, params), params: {cache: config.apiCache}});
return this.get({data: Object.assign(finalParams, params), param: config.apiCache});
}
/**
... ... @@ -61,7 +61,7 @@ module.exports = class extends global.yoho.BaseModel {
data: {
method: 'app.sale.getBreakingSort',
yh_channel: yhChannel[tempChannel].channel
}, params: {cache: config.apiCache}
}, param: config.apiCache
});
}
... ... @@ -79,7 +79,7 @@ module.exports = class extends global.yoho.BaseModel {
sort: '2',
plateform: '1',
yh_channel: tempChannel.channel
}, params: {cache: config.apiCache}
}, param: config.apiCache
});
}
... ... @@ -93,7 +93,7 @@ module.exports = class extends global.yoho.BaseModel {
data: {
content_code: cCode
},
params: {cache: config.apiCache},
param: config.apiCache,
api: global.yoho.ServiceAPI
});
}
... ... @@ -106,7 +106,7 @@ module.exports = class extends global.yoho.BaseModel {
return this.get({
data: {
method: 'app.sort.get'
}, params: {cache: config.apiCache}
}, param: config.apiCache
});
}
... ...
... ... @@ -143,7 +143,7 @@ function getSeoProductList(params, from) {
}
function getSortListOrig(finalParams) {
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
/**
... ... @@ -221,7 +221,7 @@ function getSortIntro(params) {
};
Object.assign(finalParams, params);
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
/**
... ... @@ -234,7 +234,7 @@ function getSortAds(params) {
};
Object.assign(finalParams, params);
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
/**
... ... @@ -256,7 +256,7 @@ function getBrandShopSeries(params) {
});
}
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
/**
... ... @@ -278,7 +278,7 @@ function getBrandShopFolder(params) {
});
}
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
/**
... ... @@ -292,7 +292,7 @@ function getNodeContent(params) {
node: params.node || ''
};
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
/**
... ... @@ -306,7 +306,7 @@ function getWeekNew(params) {
};
Object.assign(finalParams, params);
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
function getBrandCouponAsync(brandId, uid) {
... ... @@ -334,7 +334,7 @@ function getBrandShop(query) {
method: 'web.search.shopListInfo'
};
return this.get({data: Object.assign(finalParams, {keyword: query}), params: {cache: config.apiCache}});
return this.get({data: Object.assign(finalParams, {keyword: query}), param: config.apiCache});
}
/**
... ... @@ -401,7 +401,7 @@ function getSuggest(params) {
keyword: params.keyword || ''
};
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
... ... @@ -415,7 +415,7 @@ function getBrandData(params) {
domain: params.domain || ''
};
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
/**
... ... @@ -444,7 +444,7 @@ function getShopInfo(shopId, uid) {
uid: uid || 0
};
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
... ... @@ -454,7 +454,7 @@ function getShopInfo(shopId, uid) {
function getShopBrands(shopId) {
return this.get({
data: {method: 'app.shops.getShopsBrands', shop_id: shopId || 0},
params: {cache: config.apiCache}
param: config.apiCache
});
}
... ... @@ -464,7 +464,7 @@ function getShopBrands(shopId) {
function getShopDecorator(shopId) {
return this.get({
data: {method: 'app.shopsdecorator.getList', shop_id: shopId || 0},
params: {cache: config.apiCache}
param: config.apiCache
});
}
... ...
... ... @@ -18,7 +18,7 @@ module.exports = class extends global.yoho.BaseModel {
data: {
method: 'app.shopsdecorator.getList',
shop_id: shopId
}, params: {cache: config.apiCache}
}, param: config.apiCache
});
}
... ... @@ -75,7 +75,7 @@ module.exports = class extends global.yoho.BaseModel {
return this.get({
data: finalParams,
params: {cache: config.apiCache}
param: config.apiCache
});
}
};
... ...
... ... @@ -22,7 +22,7 @@ module.exports = class extends global.yoho.BaseModel {
*/
getVerifiedTotal() {
return this.get({data: {method: 'app.student.verifiedStudentTotal'}, params: {cache: config.apiCache}});
return this.get({data: {method: 'app.student.verifiedStudentTotal'}, param: config.apiCache});
}
/**
... ... @@ -31,7 +31,7 @@ module.exports = class extends global.yoho.BaseModel {
*/
getEduLevelList() {
return this.get({data: {method: 'app.studentMarket.getEducationLevelList'}, params: {cache: config.apiCache}});
return this.get({data: {method: 'app.studentMarket.getEducationLevelList'}, param: config.apiCache});
}
/**
... ... @@ -43,7 +43,7 @@ module.exports = class extends global.yoho.BaseModel {
method: 'app.studentMarket.getAddressList'
};
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
/**
... ... @@ -56,7 +56,7 @@ module.exports = class extends global.yoho.BaseModel {
areaCode: areaCode
};
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
/**
... ... @@ -71,7 +71,7 @@ module.exports = class extends global.yoho.BaseModel {
};
Object.assign(finalParams, params);
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
/**
... ... @@ -87,7 +87,7 @@ module.exports = class extends global.yoho.BaseModel {
page_url: pageUrl
};
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
/**
... ... @@ -104,7 +104,7 @@ module.exports = class extends global.yoho.BaseModel {
enrollment_year: enrollmentYear
};
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
/**
... ... @@ -122,7 +122,7 @@ module.exports = class extends global.yoho.BaseModel {
finalParams.uid = uid;
}
return this.get({data: finalParams, params: {cache: config.apiCache}});
return this.get({data: finalParams, param: config.apiCache});
}
... ...
... ... @@ -138,7 +138,7 @@ module.exports = {
},
UNIVERSAL_CAPTCHA: 'yoho4946abcdef#$%&!@',
apiCache: {
cache: false
cache: true
},
zookeeperServer: '192.168.102.168:2188',
maxQps: 1200,
... ...