...
|
...
|
@@ -919,6 +919,38 @@ const getLimitProductData = (uid, limitProductCode) => { |
|
|
});
|
|
|
};
|
|
|
|
|
|
const product = (params) => {
|
|
|
return api.get('', Object.assign({
|
|
|
method: 'app.product.data'
|
|
|
}, params), {
|
|
|
code: 200
|
|
|
}).then(result => {
|
|
|
if (result.data) {
|
|
|
let storage = 0; // result.storage 的 数值 不可靠,循环累加 库存
|
|
|
const goodsList = result.data.goods_list;
|
|
|
|
|
|
if (goodsList) {
|
|
|
for (let good of goodsList) {
|
|
|
for (let size of good.size_list) {
|
|
|
storage += size.storage_number;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
result.data.storage = storage;
|
|
|
}
|
|
|
|
|
|
return result;
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const getVipData = params => {
|
|
|
return api.get('', {
|
|
|
method: 'app.passport.vip',
|
|
|
uid: params.uid
|
|
|
}, {code: 200});
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
|
|
getProductData,
|
|
|
getProductAsyncData,
|
...
|
...
|
@@ -926,5 +958,7 @@ module.exports = { |
|
|
getUserProfile: _getUserProfile,
|
|
|
productInfoBySkns: _productInfoBySkns,
|
|
|
detailDataPkgAsync: _detailDataPkgAsync,
|
|
|
getLimitProductData
|
|
|
getLimitProductData,
|
|
|
product,
|
|
|
getVipData
|
|
|
}; |
...
|
...
|
|