...
|
...
|
@@ -358,3 +358,25 @@ export function cancelFavorite() { |
|
|
});
|
|
|
};
|
|
|
}
|
|
|
|
|
|
export function getFavoriteState() {
|
|
|
return (dispatch, getState) => {
|
|
|
let {app, detail} = getState();
|
|
|
let {brandId} = detail;
|
|
|
|
|
|
ReactNative.NativeModules.YH_CommonHelper.uid()
|
|
|
.then(uid => {
|
|
|
return new DetailService(app.host).isFavorite(brandId, uid)
|
|
|
.then(json => {
|
|
|
if (json) {
|
|
|
|
|
|
}
|
|
|
})
|
|
|
.catch(error => {
|
|
|
|
|
|
});
|
|
|
})
|
|
|
.catch(error => {
|
|
|
});
|
|
|
};
|
|
|
} |
...
|
...
|
|