领券中心接口请求使用原生接口请求 review by shixiang
Showing
1 changed file
with
2 additions
and
2 deletions
@@ -67,7 +67,7 @@ export function couponCenter(reload = false) { | @@ -67,7 +67,7 @@ export function couponCenter(reload = false) { | ||
67 | 67 | ||
68 | let fetchCouponInfo = (contentCode, uid) => { | 68 | let fetchCouponInfo = (contentCode, uid) => { |
69 | dispatch(couponCenterRequest()); | 69 | dispatch(couponCenterRequest()); |
70 | - return new CouponService(getState().coupon.host).fetchFloors(contentCode, uid) | 70 | + return ReactNative.NativeModules.YH_CouponHelper.couponFloors(contentCode, uid) |
71 | .then(json => { | 71 | .then(json => { |
72 | let payload = parseFloors(json); | 72 | let payload = parseFloors(json); |
73 | dispatch(couponCenterSuccess(payload)); | 73 | dispatch(couponCenterSuccess(payload)); |
@@ -213,7 +213,7 @@ export function getCoupon(couponID) { | @@ -213,7 +213,7 @@ export function getCoupon(couponID) { | ||
213 | } | 213 | } |
214 | 214 | ||
215 | dispatch(getCouponRequest()); | 215 | dispatch(getCouponRequest()); |
216 | - return new CouponService(getState().coupon.host).getCoupon(couponID, uid) | 216 | + return ReactNative.NativeModules.YH_CouponHelper.getCoupon(couponID, uid) |
217 | .then(json => { | 217 | .then(json => { |
218 | success(); | 218 | success(); |
219 | }) | 219 | }) |
-
Please register or login to post a comment