Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
LC_server_goods
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4bc4f9dc
authored
Dec 16, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
加上状态判断
parent
ccb0ad46
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
1 deletions
.gitignore
app/Model/SelfBrandModel.php
app/Model/SelfClassifyModel.php
storage/framework/cache/1f/4a/1f4a184b1120e82e739c7cccc1e2f0951e15ce36
storage/framework/cache/7f/cc/7fcca6b23a72e2a55f2c2b0c850bdd92ccfddcdb
storage/framework/cache/c6/58/c65895849a7627a204c3bcf2d8efe0b394589763
.gitignore
View file @
4bc4f9dc
/.idea
Homestead.json
Homestead.yaml
/storage
app/Model/SelfBrandModel.php
View file @
4bc4f9dc
...
...
@@ -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
)
{
...
...
app/Model/SelfClassifyModel.php
View file @
4bc4f9dc
...
...
@@ -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
()
{
...
...
storage/framework/cache/1f/4a/1f4a184b1120e82e739c7cccc1e2f0951e15ce36
View file @
4bc4f9dc
<<<<<<< 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: "Open Sans", Arial, "Hiragino Sans GB", "Microsoft YaHei", 微软雅黑, STHeiti, "WenQuanYi Micro Hei", SimSun, sans-serif;"> 猎芯网是由深圳市猎芯科技有限公司开发运营的行业领先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: "Open Sans", Arial, "Hiragino Sans GB", "Microsoft YaHei", 微软雅黑, STHeiti, "WenQuanYi Micro Hei", SimSun, sans-serif;"> 猎芯网是由深圳市猎芯科技有限公司开发运营的行业领先B2B全球元器件一站式采购商城,于2015年7月上线。目前已获得著名VC经纬中国、微光、五岳华诺、京东战投、海通证券等多轮投资,是中国本土崛起最快速的电子元器件知名电商。</span></p>";s:11:"brand_brief";s:310:"猎芯网是由深圳市猎芯科技有限公司开发运营的行业领先B2B全球元器件一站式采购商城,于2015年7月上线。目前已获得著名VC经纬中国、微光、五岳华诺、京东战投、海通证券等多轮投资,是中国本土崛起最快速的电子元器件知名电商。";s:10:"brand_area";i:4;}
>>>>>>> Stashed changes
storage/framework/cache/7f/cc/7fcca6b23a72e2a55f2c2b0c850bdd92ccfddcdb
0 → 100644
View file @
4bc4f9dc
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
storage/framework/cache/c6/58/c65895849a7627a204c3bcf2d8efe0b394589763
View file @
4bc4f9dc
<<<<<<< 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment