Commit 4bc4f9dc by 杨树贤

加上状态判断

parent ccb0ad46
/.idea
Homestead.json
Homestead.yaml
/storage
......@@ -108,6 +108,11 @@ class SelfBrandModel extends Model
return json_decode($value, true);
}, $brandList);
//只要status=1的品牌
$brandList = array_values(array_filter($brandList, function ($value) {
return $value['status'] == 1;
}));
//如果要有地区筛选,则需要做数据处理
if (!empty($map['brand_area']) && !empty($brandList)) {
$brandListByArea = [];
......@@ -121,7 +126,7 @@ class SelfBrandModel extends Model
return $brandListByArea;
}
//如果有id筛选,就要做数据处理
if (!empty($map['brand_id'])&&!empty($brandList)) {
if (!empty($map['brand_id']) && !empty($brandList)) {
$brandListByBrandId = [];
$brandIds = explode(',', $map['brand_id']);
foreach ($brandList as $key => $brand) {
......
......@@ -59,6 +59,12 @@ class SelfClassifyModel extends Model
$classList = array_map(function ($value) {
return json_decode($value, true);
}, $classList);
//只要status=1的分类
$classList = array_values(array_filter($classList, function ($value) {
return $value['status'] == 1;
}));
$classList = $this->transform($classList);
if (!$classList) {
return Cache::remember('classList', $classificationsExpireMinute, function () {
......
<<<<<<< Updated upstream
1576223712a:6:{s:8:"brand_id";i:5290;s:10:"brand_name";s:20:"CJIANG(长江微电)";s:10:"brand_logo";s:83:"//img.sensorhunt.com/test/images/cms/201912/09/1b65e9e4ad5ad5d568c623dd6eec4581.png";s:10:"brand_desc";s:546:"<p><span style="color: rgb(51, 51, 51); font-family: &quot;Open Sans&quot;, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 微软雅黑, STHeiti, &quot;WenQuanYi Micro Hei&quot;, SimSun, sans-serif;">&nbsp;猎芯网是由深圳市猎芯科技有限公司开发运营的行业领先B2B全球元器件一站式采购商城,于2015年7月上线。目前已获得著名VC经纬中国、微光、五岳华诺、京东战投、海通证券等多轮投资,是中国本土崛起最快速的电子元器件知名电商。</span></p>";s:11:"brand_brief";s:310:"猎芯网是由深圳市猎芯科技有限公司开发运营的行业领先B2B全球元器件一站式采购商城,于2015年7月上线。目前已获得著名VC经纬中国、微光、五岳华诺、京东战投、海通证券等多轮投资,是中国本土崛起最快速的电子元器件知名电商。";s:10:"brand_area";i:4;}
=======
1576482343a:6:{s:8:"brand_id";i:5290;s:10:"brand_name";s:20:"CJIANG(长江微电)";s:10:"brand_logo";s:83:"//img.sensorhunt.com/test/images/cms/201912/09/1b65e9e4ad5ad5d568c623dd6eec4581.png";s:10:"brand_desc";s:546:"<p><span style="color: rgb(51, 51, 51); font-family: &quot;Open Sans&quot;, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 微软雅黑, STHeiti, &quot;WenQuanYi Micro Hei&quot;, SimSun, sans-serif;">&nbsp;猎芯网是由深圳市猎芯科技有限公司开发运营的行业领先B2B全球元器件一站式采购商城,于2015年7月上线。目前已获得著名VC经纬中国、微光、五岳华诺、京东战投、海通证券等多轮投资,是中国本土崛起最快速的电子元器件知名电商。</span></p>";s:11:"brand_brief";s:310:"猎芯网是由深圳市猎芯科技有限公司开发运营的行业领先B2B全球元器件一站式采购商城,于2015年7月上线。目前已获得著名VC经纬中国、微光、五岳华诺、京东战投、海通证券等多轮投资,是中国本土崛起最快速的电子元器件知名电商。";s:10:"brand_area";i:4;}
>>>>>>> Stashed changes
1576482377a:6:{s:8:"brand_id";i:8;s:10:"brand_name";s:17:"EVERLIGHT(亿光)";s:10:"brand_logo";s:0:"";s:10:"brand_desc";s:0:"";s:11:"brand_brief";s:0:"";s:10:"brand_area";i:3;}
\ No newline at end of file
<<<<<<< Updated upstream
1576224054a:6:{s:8:"brand_id";i:2;s:10:"brand_name";s:14:"ADI(亚德诺)";s:10:"brand_logo";s:83:"//img.sensorhunt.com/test/images/cms/201912/09/b1d9690395ea74111d1cbd7ed8306659.png";s:10:"brand_desc";s:0:"";s:11:"brand_brief";s:0:"";s:10:"brand_area";i:1;}
=======
1576481021a:6:{s:8:"brand_id";i:2;s:10:"brand_name";s:14:"ADI(亚德诺)";s:10:"brand_logo";s:83:"//img.sensorhunt.com/test/images/cms/201912/09/b1d9690395ea74111d1cbd7ed8306659.png";s:10:"brand_desc";s:0:"";s:11:"brand_brief";s:0:"";s:10:"brand_area";i:1;}
>>>>>>> Stashed changes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment