Authored by htoooth

Merge branch 'feature/ufo' of http://git.yoho.cn/fe/yoho-app-web into feature/ufo

... ... @@ -34,6 +34,7 @@ const request = async({url, method, reqParams = {}, context}) => {
'User-Agent': 'yoho/nodejs'
};
try {
if (apiInfo.service) {
return await serviceApi.get(`${apiInfo.api}${apiInfo.path}`, params, {
cache: cache,
... ... @@ -53,6 +54,12 @@ const request = async({url, method, reqParams = {}, context}) => {
headers
});
}
} catch (error) {
return Promise.reject({
code: error.code || 500,
message: error.message || '服务器错误'
});
}
};
export const createApi = context => {
... ...
... ... @@ -9,7 +9,7 @@
<span class="unit">码</span>
</div>
<div class="middle">
<p class="size-store">¥{{value.goodsInfo.goodPrice}},{{value.goodsInfo.storageNum}}个库存</p>
<p class="size-store">¥{{value.goodsInfo.price}},{{value.goodsInfo.storageNum}}个库存</p>
<p class="low-price">当前最低价¥{{value.goodsInfo.leastPrice}}</p>
</div>
<div class="right">
... ...
... ... @@ -71,11 +71,11 @@ module.exports = async(req, res, next) => {
return res.json({
code: 400
});
} catch (e) {
logger.error(e);
} catch (error) {
logger.error(error);
return res.json({
code: 400,
message: e
code: error.code || 500,
message: error.message || '服务器错误'
});
}
};
... ...