Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
郝肖肖
9 years ago
Commit
b29446c7f374bb66f9c9c936fb46ac8df4f205cb
1 parent
e741a57f
基础模板 水牌位 https
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
15 deletions
library/Plugin/Helpers.php
library/WebPlugin/HelperSearch.php
library/WebPlugin/Helpers.php
yohobuy/www.yohobuy.com/application/models/Product/Brands.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
library/Plugin/Helpers.php
View file @
b29446c
...
...
@@ -943,10 +943,6 @@ class Helpers
*/
public
static
function
getUrlSafe
(
$url
)
{
if
(
stripos
(
$url
,
'http://'
)
!==
false
)
{
return
'//'
.
ltrim
(
strtr
(
$url
,
array
(
'http://'
=>
''
,
'https://'
=>
''
)),
'//'
);
}
return
$url
;
return
strtr
(
$url
,
array
(
'http://'
=>
'//'
,
'https://'
=>
'//'
));
}
}
...
...
library/WebPlugin/HelperSearch.php
View file @
b29446c
...
...
@@ -752,6 +752,8 @@ class HelperSearch
$color
=
$filter
[
'color'
];
if
(
isset
(
$color
[
'color_id'
]))
{
$checked
=
isset
(
self
::
$params
[
'color'
])
&&
self
::
$params
[
'color'
]
==
$color
[
'color_id'
]
?
true
:
false
;
$color
[
'color_value'
]
=
empty
(
$color
[
'color_value'
])
?
''
:
Helpers
::
getUrlSafe
(
$color
[
'color_value'
]);
$result
[]
=
array
(
'name'
=>
$color
[
'color_name'
],
'rgb'
=>
empty
(
$color
[
'color_value'
])
?
'#'
.
$color
[
'color_code'
]
:
"url(
{
$color
[
'color_value'
]})
",
...
...
@@ -765,6 +767,7 @@ class HelperSearch
else {
foreach (
$color
as
$v
) {
$checked
= false;
$v['color_value']
= empty(
$v['color_value']
) ? '' : Helpers::getUrlSafe(
$v['color_value']
);
//设置已选中
if (
$v['color_id']
==
$colorId
) {
$background
= empty(
$v['color_value']
) ? '#' .
$v['color_code']
: "
url
(
" .
$v['color_value']
. "
)
";
...
...
library/WebPlugin/Helpers.php
View file @
b29446c
...
...
@@ -1109,10 +1109,6 @@ class Helpers
*/
public
static
function
getUrlSafe
(
$url
)
{
if
(
stripos
(
$url
,
'http://'
)
!==
false
)
{
return
'//'
.
ltrim
(
strtr
(
$url
,
array
(
'http://'
=>
''
,
'https://'
=>
''
)),
'//'
);
}
return
$url
;
return
strtr
(
$url
,
array
(
'http://'
=>
'//'
,
'https://'
=>
'//'
));
}
}
...
...
yohobuy/www.yohobuy.com/application/models/Product/Brands.php
View file @
b29446c
...
...
@@ -163,7 +163,7 @@ class BrandsModel
if
(
!
empty
(
$brandInfo
[
'data'
])
&&
$brandInfo
[
'code'
]
==
200
)
{
$result
[
'brandId'
]
=
isset
(
$brandInfo
[
'data'
][
'id'
])
?
$brandInfo
[
'data'
][
'id'
]
:
''
;
$result
[
'node'
]
=
isset
(
$brandInfo
[
'data'
][
'static_content_code'
])
?
$brandInfo
[
'data'
][
'static_content_code'
]
:
false
;
$result
[
'brandBanner'
]
=
isset
(
$brandInfo
[
'data'
][
'brand_banner'
])
?
$brandInfo
[
'data'
][
'brand_banner'
]
:
''
;
$result
[
'brandBanner'
]
=
isset
(
$brandInfo
[
'data'
][
'brand_banner'
])
?
Helpers
::
getUrlSafe
(
$brandInfo
[
'data'
][
'brand_banner'
])
:
''
;
$result
[
'brandNameEn'
]
=
isset
(
$brandInfo
[
'data'
][
'brand_name_en'
])
?
$brandInfo
[
'data'
][
'brand_name_en'
]
:
''
;
$result
[
'brandNameCn'
]
=
isset
(
$brandInfo
[
'data'
][
'brand_name_cn'
])
?
$brandInfo
[
'data'
][
'brand_name_cn'
]
:
''
;
$result
[
'brandAbout'
]
=
isset
(
$brandInfo
[
'data'
][
'brand_intro'
])
?
$brandInfo
[
'data'
][
'brand_intro'
]
:
''
;
...
...
@@ -197,7 +197,7 @@ class BrandsModel
if
(
isset
(
$series
[
'data'
])
&&
$series
[
'code'
]
===
200
)
{
foreach
(
$series
[
'data'
]
as
$value
)
{
$result
[
'list'
][
$index
][
'href'
]
=
'?series='
.
$value
[
'id'
];
$result
[
'list'
][
$index
][
'src'
]
=
$value
[
'series_banner'
]
;
$result
[
'list'
][
$index
][
'src'
]
=
Helpers
::
getUrlSafe
(
$value
[
'series_banner'
])
;
++
$index
;
}
//title设置为经典系列
...
...
@@ -207,7 +207,7 @@ class BrandsModel
if
(
isset
(
$advNav
[
'data'
])
&&
$advNav
[
'code'
]
===
200
)
{
foreach
(
$advNav
[
'data'
]
as
$value
)
{
$result
[
'list'
][
$index
][
'href'
]
=
'?folder_id='
.
$value
[
'id'
];
$result
[
'list'
][
$index
][
'src'
]
=
$value
[
'brand_sort_ico'
]
;
$result
[
'list'
][
$index
][
'src'
]
=
Helpers
::
getUrlSafe
(
$value
[
'brand_sort_ico'
])
;
++
$index
;
}
//title设置为经典系列
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
b29446c
...
...
@@ -132,14 +132,13 @@ class IndexController extends WebAction
return
''
;
}
$node
=
$this
->
post
(
'node'
);
//$mode = $this->post('mode');
if
(
!
isset
(
$node
))
{
return
''
;
}
$nodeContent
=
BrandData
::
getByNodeContent
(
$node
);
if
(
isset
(
$nodeContent
[
'code'
])
&&
$nodeContent
[
'code'
]
==
200
)
{
echo
'<br>'
,
$nodeContent
[
'data'
]
;
echo
'<br>'
,
Helpers
::
getUrlSafe
(
$nodeContent
[
'data'
])
;
}
}
...
...
Please
register
or
login
to post a comment