Authored by htoooth

健状性增强

... ... @@ -83,13 +83,15 @@ const _getCacheDataByName = (resourceName) => {
*/
const _getProductFavoriteDataAsync = (uid, pid, bid) => {
return co(function*() {
let result = {
product: false,
brand: false
};
if (uid) {
if (!uid) {
return result;
}
if (pid) {
let productData = yield favoriteProductService.isFavoriteAsync(uid, pid);
... ... @@ -101,10 +103,8 @@ const _getProductFavoriteDataAsync = (uid, pid, bid) => {
result.brand = brandData.code && brandData.code === 200 ? true : false;
}
}
return result;
})();
};
... ...