Authored by htoooth

fix

... ... @@ -758,7 +758,7 @@ module.exports = class extends global.yoho.BaseModel {
return this.get({
url: 'operations/api/v5/resource/home',
data,
params: {
param: {
cache: true,
code: 200
},
... ... @@ -949,7 +949,7 @@ module.exports = class extends global.yoho.BaseModel {
return this.get({
url: 'operations/api/v5/resource/get',
data: { content_code: code },
params: { cache: config.apiCache },
param: config.apiCache,
api: global.yoho.ServiceAPI
}).then(data => {
let result = data && data.data[0] && data.data[0].data[0];
... ... @@ -1117,7 +1117,7 @@ module.exports = class extends global.yoho.BaseModel {
data: Object.assign({
method: method
}, data),
params: {cache: true}
param: {cache: true}
}));
});
... ... @@ -1323,7 +1323,7 @@ module.exports = class extends global.yoho.BaseModel {
return this.get({
url: 'operations/api/v6/category/getCategory',
data: params,
params: config.apiCache,
param: config.apiCache,
api: global.yoho.ServiceAPI
});
}
... ...
... ... @@ -13,7 +13,7 @@ const indexService = require('./index-service');
/**
* 获得图片
*/
const getLeftBannerAsync = (resourceCode) => {
function getLeftBannerAsync(resourceCode) {
const DEFAULT_VALUE = {
img: 'https://img12.static.yhbimg.com/' +
'yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190',
... ... @@ -35,7 +35,7 @@ const getLeftBannerAsync = (resourceCode) => {
return value;
})();
};
}
/**
* 国家数据
... ...
... ... @@ -12,12 +12,12 @@ module.exports = class extends global.yoho.BaseModel {
}
getBannerInfoAsync(bid) {
return this.get({data: {
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 });
}
};
... ...
... ... @@ -71,9 +71,8 @@ module.exports = class extends global.yoho.BaseModel {
data: {
method: 'web.productBanner.data',
product_id: pid
}, params: {
cache: config.apiCache
}
}, param: config.apiCache
});
}
... ... @@ -85,9 +84,7 @@ module.exports = class extends global.yoho.BaseModel {
data: {
method: 'h5.product.intro',
productskn: skn
}, params: {
cache: config.apiCache
}
}, param: config.apiCache
});
}
... ... @@ -99,9 +96,7 @@ module.exports = class extends global.yoho.BaseModel {
data: {
method: 'web.product.refundExchange',
product_skn: skn
}, params: {
cache: config.apiCache
}
}, param: config.apiCache
});
}
... ... @@ -113,9 +108,7 @@ module.exports = class extends global.yoho.BaseModel {
data: {
method: 'web.productComfort.data',
product_id: pid
}, params: {
cache: config.apiCache
}
}, param: config.apiCache
});
}
... ... @@ -127,9 +120,7 @@ module.exports = class extends global.yoho.BaseModel {
data: {
method: 'web.productModelTry.data',
product_skn: skn
}, params: {
cache: config.apiCache
}
}, param: config.apiCache
});
}
... ... @@ -162,11 +153,7 @@ module.exports = class extends global.yoho.BaseModel {
data.current_vip_level = vipLevel;
}
return this.get({
data, params: {
cache: config.apiCache
}
});
return this.get({ data, param: config.apiCache });
}
/**
... ... @@ -178,11 +165,7 @@ module.exports = class extends global.yoho.BaseModel {
product_skn: skn
};
return this.get({
data, params: {
cache: config.apiCache
}
});
return this.get({ data, param: config.apiCache });
}
/**
... ... @@ -202,11 +185,7 @@ module.exports = class extends global.yoho.BaseModel {
data.product_skn = skn;
}
return this.get({
data, params: {
cache: config.apiCache
}
});
return this.get({ data, param: config.apiCache });
}
/**
... ... @@ -244,7 +223,7 @@ module.exports = class extends global.yoho.BaseModel {
method: 'web.search.findLike',
limit: limit || 10,
product_skn: skn
}, params: {
}, param: {
cache: 86400
}
});
... ...
... ... @@ -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
});
}
... ... @@ -126,7 +126,7 @@ module.exports = class extends global.yoho.BaseModel {
data: {
method: 'app.passport.profile',
uid: uid
}, params: {cache: true}
}, param: {cache: true}
});
}
... ... @@ -141,7 +141,7 @@ module.exports = class extends global.yoho.BaseModel {
method: 'app.resources.getOneSpecial',
special_id: specialId
},
params: {
param: {
code: 200,
cache: true
}
... ...
... ... @@ -45,7 +45,7 @@ function getKeyActivityAsync(query) {
data: {
method: 'app.search.word',
query: query
}, params: {
}, param: {
catch: true,
code: 200
}
... ... @@ -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: {cache: config.apiCache}});
}
function getBrandCouponAsync(brandId, uid) {
... ... @@ -321,7 +321,7 @@ function getBrandCouponAsync(brandId, uid) {
method: 'app.brand.getBrandIntro',
brand_id: brandId,
uid: uid
}, params: extra
}, param: extra
});
}
... ... @@ -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
});
}
... ... @@ -39,7 +39,7 @@ module.exports = class extends global.yoho.BaseModel {
method: 'shop.coupons.list',
shop_id: shopId,
uid: uid
}, params: extra
}, param: extra
});
}
... ... @@ -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});
}
... ...