Authored by 陈峰

套餐优化兼容bundle_skn

@@ -27,13 +27,13 @@ const getBundleBySkn = (productSkn) => { @@ -27,13 +27,13 @@ const getBundleBySkn = (productSkn) => {
27 * @returns {*} 27 * @returns {*}
28 */ 28 */
29 const detail = (params) => { 29 const detail = (params) => {
30 - if (!params.skn) { 30 + if (!params.skn && !params.bundle_skn) {
31 return Promise.resolve({}); 31 return Promise.resolve({});
32 } 32 }
33 let bundleIndex = (params.index || 1); 33 let bundleIndex = (params.index || 1);
34 34
35 --bundleIndex; 35 --bundleIndex;
36 - return getBundleBySkn(params.skn).then(result => { 36 + return getBundleBySkn(params.skn || params.bundle_skn).then(result => {
37 if (_.has(result, `data[${bundleIndex}]`)) { 37 if (_.has(result, `data[${bundleIndex}]`)) {
38 let shareInfo = _.get(result, 'data[0].shareInfo', {}); 38 let shareInfo = _.get(result, 'data[0].shareInfo', {});
39 39