Authored by 郝肖肖

招架合丢的代码,优惠券和逛相关品牌€

@@ -121,7 +121,7 @@ class InfoModel @@ -121,7 +121,7 @@ class InfoModel
121 //相关品牌 121 //相关品牌
122 $result['brands'] = array(); 122 $result['brands'] = array();
123 if (isset($data['brands']) && !empty($data['brands'])) { 123 if (isset($data['brands']) && !empty($data['brands'])) {
124 - $result['brands'][] = array_map(function($val) { 124 + $result['brands'] = array_map(function($val) {
125 $val['thumb'] = Helpers::getUrlSafe($val['thumb']); 125 $val['thumb'] = Helpers::getUrlSafe($val['thumb']);
126 $val['url'] = Helpers::getUrlSafe($val['url']); 126 $val['url'] = Helpers::getUrlSafe($val['url']);
127 return $val; 127 return $val;
@@ -45,7 +45,7 @@ class CouponModel @@ -45,7 +45,7 @@ class CouponModel
45 foreach ($couponlistval['data'] as $focus) { 45 foreach ($couponlistval['data'] as $focus) {
46 $result['slide']['list'][] = array( 46 $result['slide']['list'][] = array(
47 'href' => Helpers::getUrlSafe($focus['url']), //banner跳转链接 47 'href' => Helpers::getUrlSafe($focus['url']), //banner跳转链接
48 - 'img' => Images::getImageUrl($focus['src'])//banner图片 48 + 'img' => Images::getForceSourceUrl($focus['src'])//banner图片
49 ); 49 );
50 } 50 }
51 } 51 }
@@ -61,7 +61,7 @@ class CouponModel @@ -61,7 +61,7 @@ class CouponModel
61 foreach ($couponlistval['data'] as $couponskey => $couponsval) { 61 foreach ($couponlistval['data'] as $couponskey => $couponsval) {
62 $result['categories'][$i]['coupons'][$couponskey] = array( 62 $result['categories'][$i]['coupons'][$couponskey] = array(
63 'id' => $couponsval['couponID'], //优惠券号 63 'id' => $couponsval['couponID'], //优惠券号
64 - 'img' => Images::getImageUrl($couponsval['image']['src']), //优惠券图片 64 + 'img' => Images::getForceSourceUrl($couponsval['image']['src']), //优惠券图片
65 'url' => Helpers::getUrlSafe($couponsval['image']['url']) //去逛逛链接 65 'url' => Helpers::getUrlSafe($couponsval['image']['url']) //去逛逛链接
66 ); 66 );
67 67