Authored by 孙凯

update uid bug review chenling

... ... @@ -13,9 +13,14 @@ import { fetchShareCodeInfo } from '../groupPurchase/groupPurchaseActions';
export function getUid() {
return async dispatch => {
let uid = await NativeModules.YH_CommonHelper.uid();
NativeModules.YH_CommonHelper.uid()
.then(uid => {
dispatch(setUid(uid));
dispatch(fetchShareCodeInfo());
})
.catch(error => {
dispatch(fetchShareCodeInfo());
});
}
}
... ... @@ -28,8 +33,12 @@ export function setUid(uid) {
export function getUnionType() {
return async dispatch => {
let unionType = await NativeModules.YH_CommonHelper.unionType();;
NativeModules.YH_CommonHelper.unionType()
.then(uid => {
dispatch(setUnionType(unionType))
})
.catch(error => {
});
}
}
... ...
... ... @@ -7,7 +7,7 @@ let InitialState = Record({
host: 'http://api.yoho.cn',
serviceHost: 'http://api.yoho.cn',
unionType: '',
uid: '',
uid: 0,
});
export default InitialState;
... ...