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
5419c681
Commit
5419c681
authored
Jan 16, 2019
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的商户
parent
c4f5a2ca
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
ImageConst.php
application/library/Our/ImageConst.php
+2
-0
ImageUtil.php
application/library/Our/ImageUtil.php
+11
-0
ClassStoreService.php
application/models/Business/Store/ClassStoreService.php
+2
-2
No files found.
application/library/Our/ImageConst.php
View file @
5419c681
...
...
@@ -56,6 +56,8 @@ class ImageConst{
const
defaultStoreBannerName
=
'default_store_banner.jpg'
;
const
defaultCategoryImgName
=
'category-headpic-default.jpg'
;
//图片指向的域名
const
imageDomain
=
"ossHost"
;
...
...
application/library/Our/ImageUtil.php
View file @
5419c681
...
...
@@ -159,6 +159,17 @@ class ImageUtil {
return
$gcImageUrl
;
}
public
static
function
getCategoryHeadPic
(
$gcId
){
$basePath
=
\Bootstrap
::
getUrlIniConfig
(
'source'
);
$commonPath
=
ImageConst
::
defaultPath
;
$fileName
=
ImageConst
::
categoryHeadPicPrefix
.
$gcId
.
\Our\NameConst
::
jpgSuffix
;
$file
=
$basePath
.
$commonPath
.
$fileName
;
if
(
file_exists
(
$file
)){
return
\Our\Common
::
getStaticFile
(
$fileName
,
$commonPath
);
}
else
{
return
\Our\Common
::
getStaticFile
(
ImageConst
::
defaultCategoryImgName
,
$commonPath
);
}
}
/**
* 设置文件名称 不包括 文件路径
...
...
application/models/Business/Store/ClassStoreService.php
View file @
5419c681
...
...
@@ -61,7 +61,7 @@ class ClassStoreServiceModel extends \Business\AbstractModel{
}
if
(
!
isset
(
$newGcStoreList
[
$gcId
])){
$newGcStoreList
[
$gcId
][
'gcName'
]
=
htmlspecialchars_decode
(
$store
[
'gcName'
]);
$newGcStoreList
[
$gcId
][
'gcImg'
]
=
\Our\Common
::
getStaticFile
(
\Our\ImageConst
::
categoryHeadPicPrefix
.
$gcId
.
\Our\NameConst
::
jpgSuffix
,
\Our\ImageConst
::
defaultPath
);
$newGcStoreList
[
$gcId
][
'gcImg'
]
=
\Our\
ImageUtil
::
getCategoryHeadPic
(
$gcId
);
// \Our\
Common::getStaticFile(\Our\ImageConst::categoryHeadPicPrefix.$gcId.\Our\NameConst::jpgSuffix,\Our\ImageConst::defaultPath);
}
unset
(
$store
[
'gcName'
]);
unset
(
$store
[
'gcId'
]);
...
...
@@ -86,7 +86,7 @@ class ClassStoreServiceModel extends \Business\AbstractModel{
$returnData
[
$key
]
=
array
();
$purchasedStore
=
$newStoreList
[
$storeId
];
$returnData
[
$key
][
'gcName'
]
=
htmlspecialchars_decode
(
$purchasedStore
[
'gcName'
]);
$returnData
[
$key
][
'gcImg'
]
=
\Our\Common
::
getStaticFile
(
\Our\ImageConst
::
categoryHeadPicPrefix
.
$purchasedStore
[
'gcId'
]
.
\Our\NameConst
::
jpgSuffix
,
\Our\ImageConst
::
defaultPath
);
$returnData
[
$key
][
'gcImg'
]
=
\Our\
ImageUtil
::
getCategoryHeadPic
(
$purchasedStore
[
'gcId'
]);
//\Our\
Common::getStaticFile(\Our\ImageConst::categoryHeadPicPrefix.$purchasedStore['gcId'].\Our\NameConst::jpgSuffix,\Our\ImageConst::defaultPath);
unset
(
$purchasedStore
[
'gcName'
]);
unset
(
$purchasedStore
[
'gcId'
]);
$purchasedStore
[
'isPurchased'
]
=
\Our\ApiConst
::
one
;
...
...
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