...
|
...
|
@@ -7,49 +7,61 @@ |
|
|
const api = global.yoho.API;
|
|
|
|
|
|
const getProductBannerAsync = (pid) => {
|
|
|
return api.get('', {
|
|
|
method: 'web.productBanner.data',
|
|
|
product_id: pid
|
|
|
});
|
|
|
return api.get(
|
|
|
'', {
|
|
|
method: 'web.productBanner.data',
|
|
|
product_id: pid
|
|
|
}
|
|
|
);
|
|
|
|
|
|
};
|
|
|
|
|
|
const sizeInfoAsync = skn => {
|
|
|
return api.get('', {
|
|
|
method: 'h5.product.intro',
|
|
|
productskn: skn
|
|
|
});
|
|
|
return api.get(
|
|
|
'', {
|
|
|
method: 'h5.product.intro',
|
|
|
productskn: skn
|
|
|
}
|
|
|
);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 退换支持
|
|
|
const isSupportReturnedSale = skn => {
|
|
|
return api.get('', {
|
|
|
method: 'app.product.refundExchange',
|
|
|
product_skn: skn
|
|
|
});
|
|
|
return api.get(
|
|
|
'', {
|
|
|
method: 'app.product.refundExchange',
|
|
|
product_skn: skn
|
|
|
}
|
|
|
);
|
|
|
};
|
|
|
|
|
|
const getProductComfortAsync = pid => {
|
|
|
return api.get('', {
|
|
|
method: 'web.productComfort.data',
|
|
|
product_id: pid
|
|
|
});
|
|
|
return api.get(
|
|
|
'', {
|
|
|
method: 'web.productComfort.data',
|
|
|
product_id: pid
|
|
|
}
|
|
|
);
|
|
|
|
|
|
};
|
|
|
|
|
|
const getProductModelCardAsync = pid => {
|
|
|
return api.get('', {
|
|
|
method: 'web.productModelcard.list',
|
|
|
product_id: pid
|
|
|
});
|
|
|
return api.get(
|
|
|
'', {
|
|
|
method: 'web.productModelcard.list',
|
|
|
product_id: pid
|
|
|
}
|
|
|
);
|
|
|
};
|
|
|
|
|
|
const getProductModelTryAsync = skn => {
|
|
|
return api.get('', {
|
|
|
method: 'web.productModelTry.data',
|
|
|
product_skn: skn
|
|
|
});
|
|
|
return api.get(
|
|
|
'', {
|
|
|
method: 'web.productModelTry.data',
|
|
|
product_skn: skn
|
|
|
}
|
|
|
);
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -104,88 +116,107 @@ const getLimitedProductStatusAsync = (code, uid, skn) => { |
|
|
};
|
|
|
|
|
|
const getCouponAsync = (bid, skn, uid) => {
|
|
|
//let params = {
|
|
|
// method: 'app.coupons.queryProdPageCoupons',
|
|
|
// brandId: bid,
|
|
|
// skn: skn
|
|
|
//};
|
|
|
//
|
|
|
//if (uid) {
|
|
|
// params.uid = uid;
|
|
|
//}
|
|
|
//
|
|
|
//return api.get('', params);
|
|
|
|
|
|
return Promise.resolve({
|
|
|
"alg": "SALT_MD5",
|
|
|
"code": 200,
|
|
|
"data": [
|
|
|
{
|
|
|
"couponName": "满¥199减10",
|
|
|
"amount": 10,
|
|
|
"acquireStatus": 3,
|
|
|
"createTime": 1476358043,
|
|
|
"startTime": 1476633600,
|
|
|
"lifeTime": "2016.10.17-2016.10.28",
|
|
|
"endTime": 1477584000,
|
|
|
"couponId": 14200
|
|
|
},
|
|
|
{
|
|
|
"couponName": "满¥199减10",
|
|
|
"amount": 22,
|
|
|
"acquireStatus": 3,
|
|
|
"createTime": 1475152374,
|
|
|
"startTime": 1474992000,
|
|
|
"lifeTime": "2016.09.28-2016.11.17",
|
|
|
"endTime": 1479312000,
|
|
|
"couponId": 14144
|
|
|
// let params = {
|
|
|
// method: 'app.coupons.queryProdPageCoupons',
|
|
|
// brandId: bid,
|
|
|
// skn: skn
|
|
|
// };
|
|
|
//
|
|
|
// if (uid) {
|
|
|
// params.uid = uid;
|
|
|
// }
|
|
|
//
|
|
|
// return api.get('', params);
|
|
|
|
|
|
return Promise.resolve(
|
|
|
{
|
|
|
'alg': 'SALT_MD5',
|
|
|
'code': 200,
|
|
|
'data': {
|
|
|
newList: {
|
|
|
title: '可领取的券',
|
|
|
body: [
|
|
|
{
|
|
|
'couponName': '满¥199减10',
|
|
|
'amount': 10,
|
|
|
'acquireStatus': 1,
|
|
|
'createTime': 1476358043,
|
|
|
'startTime': 1476633600,
|
|
|
'lifeTime': '2016.10.17-2016.10.28',
|
|
|
'endTime': 1477584000,
|
|
|
'couponId': 14200,
|
|
|
'rule4ShortName': '满¥100减10元'
|
|
|
},
|
|
|
{
|
|
|
'couponName': '满¥199减10',
|
|
|
'amount': 22,
|
|
|
'acquireStatus': 1,
|
|
|
'createTime': 1475152374,
|
|
|
'startTime': 1474992000,
|
|
|
'lifeTime': '2016.09.28-2016.11.17',
|
|
|
'endTime': 1479312000,
|
|
|
'couponId': 14144,
|
|
|
'rule4ShortName': '满¥100减10元'
|
|
|
},
|
|
|
{
|
|
|
'couponName': '满¥199减10',
|
|
|
'amount': 15,
|
|
|
'acquireStatus': 1,
|
|
|
'createTime': 1476358258,
|
|
|
'startTime': 1476115200,
|
|
|
'lifeTime': '2016.10.11-2016.11.18',
|
|
|
'endTime': 1479398400,
|
|
|
'couponId': 14202,
|
|
|
'rule4ShortName': '满¥100减10元'
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
"couponName": "满¥199减10",
|
|
|
"amount": 15,
|
|
|
"acquireStatus": 3,
|
|
|
"createTime": 1476358258,
|
|
|
"startTime": 1476115200,
|
|
|
"lifeTime": "2016.10.11-2016.11.18",
|
|
|
"endTime": 1479398400,
|
|
|
"couponId": 14202
|
|
|
},
|
|
|
{
|
|
|
"couponName": "满¥199减10",
|
|
|
"amount": 10,
|
|
|
"acquireStatus": 3,
|
|
|
"createTime": 1476358043,
|
|
|
"startTime": 1476633600,
|
|
|
"lifeTime": "2016.10.17-2016.10.28",
|
|
|
"endTime": 1477584000,
|
|
|
"couponId": 14200
|
|
|
},
|
|
|
{
|
|
|
"couponName": "满¥199减10",
|
|
|
"amount": 22,
|
|
|
"acquireStatus": 3,
|
|
|
"createTime": 1475152374,
|
|
|
"startTime": 1474992000,
|
|
|
"lifeTime": "2016.09.28-2016.11.17",
|
|
|
"endTime": 1479312000,
|
|
|
"couponId": 14144
|
|
|
},
|
|
|
{
|
|
|
"couponName": "满¥199减10",
|
|
|
"amount": 15,
|
|
|
"acquireStatus": 3,
|
|
|
"createTime": 1476358258,
|
|
|
"startTime": 1476115200,
|
|
|
"lifeTime": "2016.10.11-2016.11.18",
|
|
|
"endTime": 1479398400,
|
|
|
"couponId": 14202
|
|
|
oldList: {
|
|
|
title: '已领取的券',
|
|
|
body: [
|
|
|
{
|
|
|
'couponName': '满¥199减10',
|
|
|
'amount': 10,
|
|
|
'acquireStatus': 3,
|
|
|
'createTime': 1476358043,
|
|
|
'startTime': 1476633600,
|
|
|
'lifeTime': '2016.10.17-2016.10.28',
|
|
|
'endTime': 1477584000,
|
|
|
'couponId': 14200,
|
|
|
'rule4ShortName': '满¥100减10元'
|
|
|
},
|
|
|
{
|
|
|
'couponName': '满¥199减10',
|
|
|
'amount': 22,
|
|
|
'acquireStatus': 3,
|
|
|
'createTime': 1475152374,
|
|
|
'startTime': 1474992000,
|
|
|
'lifeTime': '2016.09.28-2016.11.17',
|
|
|
'endTime': 1479312000,
|
|
|
'couponId': 14144,
|
|
|
'rule4ShortName': '满¥100减10元'
|
|
|
},
|
|
|
{
|
|
|
'couponName': '满¥199减10',
|
|
|
'amount': 15,
|
|
|
'acquireStatus': 3,
|
|
|
'createTime': 1476358258,
|
|
|
'startTime': 1476115200,
|
|
|
'lifeTime': '2016.10.11-2016.11.18',
|
|
|
'endTime': 1479398400,
|
|
|
'couponId': 14202,
|
|
|
'rule4ShortName': '满¥100减10元'
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
],
|
|
|
"md5": "fe8f6e48b14c8f0b5044cb73d7c79900",
|
|
|
"message": "操作成功"
|
|
|
},
|
|
|
'md5': 'fe8f6e48b14c8f0b5044cb73d7c79900',
|
|
|
'message': '操作成功'
|
|
|
}
|
|
|
);
|
|
|
};
|
|
|
)
|
|
|
;
|
|
|
}
|
|
|
;
|
|
|
|
|
|
module.exports = {
|
|
|
getProductBannerAsync,
|
...
|
...
|
|