|
@@ -13,9 +13,14 @@ import { fetchShareCodeInfo } from '../groupPurchase/groupPurchaseActions'; |
|
@@ -13,9 +13,14 @@ import { fetchShareCodeInfo } from '../groupPurchase/groupPurchaseActions'; |
13
|
|
13
|
|
14
|
export function getUid() {
|
14
|
export function getUid() {
|
15
|
return async dispatch => {
|
15
|
return async dispatch => {
|
16
|
- let uid = await NativeModules.YH_CommonHelper.uid();
|
16
|
+ NativeModules.YH_CommonHelper.uid()
|
|
|
17
|
+ .then(uid => {
|
17
|
dispatch(setUid(uid));
|
18
|
dispatch(setUid(uid));
|
18
|
dispatch(fetchShareCodeInfo());
|
19
|
dispatch(fetchShareCodeInfo());
|
|
|
20
|
+ })
|
|
|
21
|
+ .catch(error => {
|
|
|
22
|
+ dispatch(fetchShareCodeInfo());
|
|
|
23
|
+ });
|
19
|
}
|
24
|
}
|
20
|
}
|
25
|
}
|
21
|
|
26
|
|
|
@@ -28,8 +33,12 @@ export function setUid(uid) { |
|
@@ -28,8 +33,12 @@ export function setUid(uid) { |
28
|
|
33
|
|
29
|
export function getUnionType() {
|
34
|
export function getUnionType() {
|
30
|
return async dispatch => {
|
35
|
return async dispatch => {
|
31
|
- let unionType = await NativeModules.YH_CommonHelper.unionType();;
|
36
|
+ NativeModules.YH_CommonHelper.unionType()
|
|
|
37
|
+ .then(uid => {
|
32
|
dispatch(setUnionType(unionType))
|
38
|
dispatch(setUnionType(unionType))
|
|
|
39
|
+ })
|
|
|
40
|
+ .catch(error => {
|
|
|
41
|
+ });
|
33
|
}
|
42
|
}
|
34
|
}
|
43
|
}
|
35
|
|
44
|
|