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
yyq
9 years ago
Commit
8a9da7c1c1cb911897ef1bda50dc7a14e35985bc
1 parent
09586a6e
个人中心图片变形处理
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
library/WebPlugin/HelperHome.php
library/WebPlugin/HelperHome.php
View file @
8a9da7c
...
...
@@ -50,9 +50,16 @@ class HelperHome
{
$result
=
array
();
foreach
(
$product
as
$key
=>
$val
)
{
$img
=
(
isset
(
$val
[
'default_images'
])
&&
$val
[
'default_images'
])
?
Images
::
getImageUrl
(
$val
[
'default_images'
],
100
,
100
)
:
''
;
// 强制对图片进行切图规则处理 redmine:12390
if
(
strpos
(
$img
,
'imageView'
))
{
$img
=
strstr
(
$img
,
'imageView'
,
true
)
.
'imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/70'
;
}
$result
[]
=
array
(
'href'
=>
Helpers
::
getUrlBySkc
(
$val
[
'product_id'
],
$val
[
'goods_list'
][
0
][
'product_skc'
],
$val
[
'cn_alphabet'
]),
'thumb'
=>
(
isset
(
$val
[
'default_images'
])
&&
$val
[
'default_images'
])
?
Images
::
getImageUrl
(
$val
[
'default_images'
],
400
,
500
)
:
''
,
'thumb'
=>
$img
,
'name'
=>
$val
[
'product_name'
],
'price'
=>
$val
[
'sales_price'
],
'productId'
=>
$val
[
'product_id'
],
...
...
Please
register
or
login
to post a comment