...
|
...
|
@@ -830,9 +830,9 @@ export function addFavorite() { |
|
|
|
|
|
let favoriteRequest = (shopId, favId, uid) => {
|
|
|
dispatch(addFavoriteRequest());
|
|
|
dispatch(addFavoriteSuccess());
|
|
|
return new BrandStoreService(app.host).addFavorite(shopId, favId, uid)
|
|
|
.then(json => {
|
|
|
dispatch(addFavoriteSuccess());
|
|
|
})
|
|
|
.catch(error => {
|
|
|
dispatch(addFavoriteFailure(error));
|
...
|
...
|
@@ -861,11 +861,11 @@ export function cancelFavorite() { |
|
|
let {shopId} = brandStore;
|
|
|
|
|
|
dispatch(cancelFavoriteRequest());
|
|
|
dispatch(cancelFavoriteSuccess());
|
|
|
ReactNative.NativeModules.YH_CommonHelper.uid()
|
|
|
.then(uid => {
|
|
|
return new BrandStoreService(app.host).cancelFavorite(shopId, shopId, uid)
|
|
|
.then(json => {
|
|
|
dispatch(cancelFavoriteSuccess());
|
|
|
})
|
|
|
.catch(error => {
|
|
|
dispatch(cancelFavoriteFailure(error));
|
...
|
...
|
|