Merge branch '8.1.5' into 8.3.0
# Conflicts: # js/groupPurchase/reducers/app/appActions.js
Showing
3 changed files
with
14 additions
and
5 deletions
@@ -116,7 +116,7 @@ class GroupPurchaseContainer extends Component { | @@ -116,7 +116,7 @@ class GroupPurchaseContainer extends Component { | ||
116 | if (!resource) { | 116 | if (!resource) { |
117 | return; | 117 | return; |
118 | } | 118 | } |
119 | - let miniProgramPath = '/pages/groupPurchase/groupPurchase?activity_id=' + activityId; | 119 | + let miniProgramPath = '/pages/groupPurchase/groupPurchase?activityId=' + activityId; |
120 | let fromPage = 'GroupPurchase'; | 120 | let fromPage = 'GroupPurchase'; |
121 | let bigImage = shareCodeInfo.get('bigImage'); | 121 | let bigImage = shareCodeInfo.get('bigImage'); |
122 | let productIcon = bigImage ? getSlicedUrl(bigImage,150*DEVICE_WIDTH_RATIO, 120*DEVICE_WIDTH_RATIO, 2) : ''; | 122 | let productIcon = bigImage ? getSlicedUrl(bigImage,150*DEVICE_WIDTH_RATIO, 120*DEVICE_WIDTH_RATIO, 2) : ''; |
@@ -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(); | ||
32 | - dispatch(setUnionType(unionType)); | 36 | + NativeModules.YH_CommonHelper.unionType() |
37 | + .then(unionType => { | ||
38 | + dispatch(setUnionType(unionType)) | ||
39 | + }) | ||
40 | + .catch(error => { | ||
41 | + }); | ||
33 | } | 42 | } |
34 | } | 43 | } |
35 | 44 |
@@ -7,7 +7,7 @@ let InitialState = Record({ | @@ -7,7 +7,7 @@ let InitialState = Record({ | ||
7 | host: 'http://api.yoho.cn', | 7 | host: 'http://api.yoho.cn', |
8 | serviceHost: 'http://api.yoho.cn', | 8 | serviceHost: 'http://api.yoho.cn', |
9 | unionType: '', | 9 | unionType: '', |
10 | - uid: '', | 10 | + uid: 0, |
11 | }); | 11 | }); |
12 | 12 | ||
13 | export default InitialState; | 13 | export default InitialState; |
-
Please register or login to post a comment