Authored by Rock Zhang

修复收藏的品牌,商品中链接错误的问题

@@ -178,7 +178,7 @@ class UserModel @@ -178,7 +178,7 @@ class UserModel
178 foreach ($favProduct['data']['product_list'] as $val) { 178 foreach ($favProduct['data']['product_list'] as $val) {
179 $product = array(); 179 $product = array();
180 $product['fav_id'] = $val['product_id']; 180 $product['fav_id'] = $val['product_id'];
181 - $product['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : ''; 181 + $product['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_id'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : '';
182 $product['imgUrl'] = Helpers::getImageUrl($val['image'], 447, 596); 182 $product['imgUrl'] = Helpers::getImageUrl($val['image'], 447, 596);
183 ; 183 ;
184 $product['title'] = $val['product_name']; 184 $product['title'] = $val['product_name'];
@@ -231,13 +231,13 @@ class UserModel @@ -231,13 +231,13 @@ class UserModel
231 $brand['brandName'] = $val['brand_name']; 231 $brand['brandName'] = $val['brand_name'];
232 $brand['update'] = $val['new_product_num']; 232 $brand['update'] = $val['new_product_num'];
233 $brand['discount'] = $val['product_discount_num']; 233 $brand['discount'] = $val['product_discount_num'];
234 - $brand['link'] = Helpers::url('', array('query' => $val['brand_name']), 'search'); 234 + $brand['link'] = Helpers::url('', array(), $val['brand_domain']);
235 235
236 // 处理品牌产品 236 // 处理品牌产品
237 $product = array(); 237 $product = array();
238 foreach ($val['new_product'] as $one) { 238 foreach ($val['new_product'] as $one) {
239 $product = array(); 239 $product = array();
240 - $product['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : ''; 240 + $product['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_id'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : '';
241 $product['imgUrl'] = (isset($one['default_images']) && !empty($one['default_images'])) ? Images::getImageUrl($one['default_images'], 235, 314) : ''; 241 $product['imgUrl'] = (isset($one['default_images']) && !empty($one['default_images'])) ? Images::getImageUrl($one['default_images'], 235, 314) : '';
242 $product['price'] = !empty($one['market_price']) ? '¥' . $one['market_price'] : 0; 242 $product['price'] = !empty($one['market_price']) ? '¥' . $one['market_price'] : 0;
243 $product['discount'] = !empty($one['sales_price']) ? '¥' . $one['sales_price'] : 0; 243 $product['discount'] = !empty($one['sales_price']) ? '¥' . $one['sales_price'] : 0;