Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenchuanwen
my-yaf-project
Commits
124b1116
Commit
124b1116
authored
Nov 07, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sale
parent
0156bf37
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ImageUtil.php
application/library/Our/ImageUtil.php
+2
-2
Store.php
application/models/DAO/Store.php
+2
-2
No files found.
application/library/Our/ImageUtil.php
View file @
124b1116
...
@@ -117,8 +117,8 @@ class ImageUtil {
...
@@ -117,8 +117,8 @@ class ImageUtil {
* @return mixed|string 返回图片路径
* @return mixed|string 返回图片路径
*/
*/
public
static
function
getGoodsImgUrl
(
$goodsImg
,
$width
=
\Our\ImageConst
::
goodsListImgSize
,
$height
=
0
){
public
static
function
getGoodsImgUrl
(
$goodsImg
,
$width
=
\Our\ImageConst
::
goodsListImgSize
,
$height
=
0
){
$width
=
$width
*
\Our\ImageConst
::
sizeScale
;
$width
=
ceil
(
$width
*
\Our\ImageConst
::
sizeScale
)
;
$height
?
$height
=
$height
*
\Our\ImageConst
::
sizeScale
:
$height
=
$width
;
$height
?
$height
=
ceil
(
$height
*
\Our\ImageConst
::
sizeScale
)
:
$height
=
$width
;
if
(
empty
(
$goodsImg
))
{
if
(
empty
(
$goodsImg
))
{
$directory
=
\Our\ImageConst
::
defaultPath
;
$directory
=
\Our\ImageConst
::
defaultPath
;
//$goodsImg = str_ireplace('.', '_' . $type . '.', 'default_goods_image.gif');
//$goodsImg = str_ireplace('.', '_' . $type . '.', 'default_goods_image.gif');
...
...
application/models/DAO/Store.php
View file @
124b1116
...
@@ -85,8 +85,8 @@ class StoreModel extends \DAO\AbstractModel
...
@@ -85,8 +85,8 @@ class StoreModel extends \DAO\AbstractModel
*/
*/
public
function
getStoreLabelSrc
(
$storeLabel
,
$width
=
\Our\ImageConst
::
circleStoreLabel
,
$height
=
0
)
public
function
getStoreLabelSrc
(
$storeLabel
,
$width
=
\Our\ImageConst
::
circleStoreLabel
,
$height
=
0
)
{
{
$width
=
$width
*
\Our\ImageConst
::
sizeScale
;
$width
=
ceil
(
$width
*
\Our\ImageConst
::
sizeScale
)
;
$height
?
$height
=
$height
*
\Our\ImageConst
::
sizeScale
:
$height
=
$width
;
$height
?
$height
=
ceil
(
$height
*
\Our\ImageConst
::
sizeScale
)
:
$height
=
$width
;
if
(
$storeLabel
)
{
if
(
$storeLabel
)
{
$storeLabel
=
\Our\Common
::
getStaticFile
(
$storeLabel
,
\Our\ImageConst
::
storeLabel
,
'ossHost'
);
$storeLabel
=
\Our\Common
::
getStaticFile
(
$storeLabel
,
\Our\ImageConst
::
storeLabel
,
'ossHost'
);
}
else
{
}
else
{
...
...
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