Authored by 孙凯

点击收藏 先刷新UI 在发请求 review by 红魔

... ... @@ -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));
... ...
... ... @@ -54,8 +54,8 @@ const {
RESET_LIST_PAGE_INFO,
RESETRECEIVECOUPONRES,
FILTER_LIST_VIEW,
FILTER_MORE_VIEW,
FILTER_LIST_VIEW,
FILTER_MORE_VIEW,
} = require('../../constants/actionTypes').default;
... ...