Showing
2 changed files
with
8 additions
and
7 deletions
@@ -99,14 +99,14 @@ class Sale { | @@ -99,14 +99,14 @@ class Sale { | ||
99 | * @param {[object]} params | 99 | * @param {[object]} params |
100 | * @return {[array]} | 100 | * @return {[array]} |
101 | */ | 101 | */ |
102 | - static discount(params) { | ||
103 | - params = params || {}; | ||
104 | - | ||
105 | - return api.get('', sign.apiSign(Object.assign({ | 102 | + static discount(yhChannel) { |
103 | + yhChannel = yhChannel || 'boys'; | ||
104 | + return api.get('', sign.apiSign({ | ||
106 | method: 'app.activity.get', | 105 | method: 'app.activity.get', |
107 | sort: 2, | 106 | sort: 2, |
108 | - plateform: 3 | ||
109 | - }, params))); | 107 | + plateform: 3, |
108 | + yh_channel: channelType[yhChannel] || '1' | ||
109 | + })); | ||
110 | } | 110 | } |
111 | 111 | ||
112 | /** | 112 | /** |
@@ -312,7 +312,7 @@ class Sale { | @@ -312,7 +312,7 @@ class Sale { | ||
312 | static getDiscountData(params) { | 312 | static getDiscountData(params) { |
313 | const discountData = {}; | 313 | const discountData = {}; |
314 | 314 | ||
315 | - return Sale.discount().then((result) => { | 315 | + return Sale.discount(params).then((result) => { |
316 | if (result && result.code === 200) { | 316 | if (result && result.code === 200) { |
317 | discountData.data = Sale.processDiscount(result.data, params); | 317 | discountData.data = Sale.processDiscount(result.data, params); |
318 | return discountData; | 318 | return discountData; |
-
Please register or login to post a comment