...
|
...
|
@@ -13,10 +13,15 @@ import { fetchShareCodeInfo } from '../groupPurchase/groupPurchaseActions'; |
|
|
|
|
|
export function getUid() {
|
|
|
return async dispatch => {
|
|
|
let uid = await NativeModules.YH_CommonHelper.uid();
|
|
|
dispatch(setUid(uid));
|
|
|
dispatch(fetchShareCodeInfo());
|
|
|
}
|
|
|
NativeModules.YH_CommonHelper.uid()
|
|
|
.then(uid => {
|
|
|
dispatch(setUid(uid));
|
|
|
dispatch(fetchShareCodeInfo());
|
|
|
})
|
|
|
.catch(error => {
|
|
|
dispatch(fetchShareCodeInfo());
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
export function setUid(uid) {
|
...
|
...
|
@@ -28,8 +33,12 @@ export function setUid(uid) { |
|
|
|
|
|
export function getUnionType() {
|
|
|
return async dispatch => {
|
|
|
let unionType = await NativeModules.YH_CommonHelper.unionType();
|
|
|
dispatch(setUnionType(unionType));
|
|
|
NativeModules.YH_CommonHelper.unionType()
|
|
|
.then(unionType => {
|
|
|
dispatch(setUnionType(unionType))
|
|
|
})
|
|
|
.catch(error => {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|