Authored by htoooth

健状性增强

@@ -83,13 +83,15 @@ const _getCacheDataByName = (resourceName) => { @@ -83,13 +83,15 @@ const _getCacheDataByName = (resourceName) => {
83 */ 83 */
84 const _getProductFavoriteDataAsync = (uid, pid, bid) => { 84 const _getProductFavoriteDataAsync = (uid, pid, bid) => {
85 return co(function*() { 85 return co(function*() {
86 -  
87 let result = { 86 let result = {
88 product: false, 87 product: false,
89 brand: false 88 brand: false
90 }; 89 };
91 90
92 - if (uid) { 91 + if (!uid) {
  92 + return result;
  93 + }
  94 +
93 if (pid) { 95 if (pid) {
94 let productData = yield favoriteProductService.isFavoriteAsync(uid, pid); 96 let productData = yield favoriteProductService.isFavoriteAsync(uid, pid);
95 97
@@ -101,10 +103,8 @@ const _getProductFavoriteDataAsync = (uid, pid, bid) => { @@ -101,10 +103,8 @@ const _getProductFavoriteDataAsync = (uid, pid, bid) => {
101 103
102 result.brand = brandData.code && brandData.code === 200 ? true : false; 104 result.brand = brandData.code && brandData.code === 200 ? true : false;
103 } 105 }
104 - }  
105 106
106 return result; 107 return result;
107 -  
108 })(); 108 })();
109 }; 109 };
110 110