Authored by aozhe.zhu

修复分享bug

... ... @@ -112,7 +112,7 @@ class GroupPurchaseContainer extends Component {
if (!resource) {
return;
}
let miniProgramPath = '/pages/groupPurchase/groupPurchase?activity_id=' + activityId;
let miniProgramPath = '/pages/groupPurchase/groupPurchase?activityId=' + activityId;
let fromPage = 'GroupPurchase';
let bigImage = shareCodeInfo.get('bigImage');
let productIcon = bigImage ? getSlicedUrl(bigImage,150*DEVICE_WIDTH_RATIO, 120*DEVICE_WIDTH_RATIO, 2) : '';
... ...
... ... @@ -13,9 +13,14 @@ 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());
});
}
}
... ... @@ -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 => {
});
}
}
... ...
... ... @@ -7,7 +7,7 @@ let InitialState = Record({
host: 'http://api.yoho.cn',
serviceHost: 'http://api.yoho.cn',
unionType: '',
uid: '',
uid: 0,
});
export default InitialState;
... ...