Merge branch 'brand_store' of http://git.yoho.cn/mobile/YH_RNComponent into brand_store
Showing
1 changed file
with
8 additions
and
1 deletions
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | 2 | ||
3 | import ReactNative from 'react-native'; | 3 | import ReactNative from 'react-native'; |
4 | import CouponService from '../../services/CouponService'; | 4 | import CouponService from '../../services/CouponService'; |
5 | +const Platform = require('Platform'); | ||
5 | 6 | ||
6 | const { | 7 | const { |
7 | SET_HOST, | 8 | SET_HOST, |
@@ -69,7 +70,13 @@ export function couponCenter(reload = false) { | @@ -69,7 +70,13 @@ export function couponCenter(reload = false) { | ||
69 | dispatch(couponCenterRequest()); | 70 | dispatch(couponCenterRequest()); |
70 | return ReactNative.NativeModules.YH_CouponHelper.couponFloors(contentCode, uid) | 71 | return ReactNative.NativeModules.YH_CouponHelper.couponFloors(contentCode, uid) |
71 | .then(json => { | 72 | .then(json => { |
72 | - let payload = parseFloors(json); | 73 | + let payload; |
74 | + if (Platform.OS === 'android') { | ||
75 | + payload = parseFloors(JSON.parse(json)); | ||
76 | + }else{ | ||
77 | + payload = parseFloors(json); | ||
78 | + } | ||
79 | + | ||
73 | dispatch(couponCenterSuccess(payload)); | 80 | dispatch(couponCenterSuccess(payload)); |
74 | }) | 81 | }) |
75 | .catch(error => { | 82 | .catch(error => { |
-
Please register or login to post a comment