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
3faf2693
Commit
3faf2693
authored
Nov 22, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
store
parent
dd8b9e03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
17 deletions
+6
-17
Store.php
application/controllers/Store.php
+0
-7
StoreService.php
application/models/Business/Store/StoreService.php
+6
-10
No files found.
application/controllers/Store.php
View file @
3faf2693
...
...
@@ -60,13 +60,6 @@ class StoreController extends \Our\Controller_AbstractIndex {
$this
->
success
(
$recommendWord
);
}
/**
* 获取商家资质
*/
public
function
getStoreQualificationAction
()
{
$pics
=
$this
->
storeService
->
getStoreQualification
(
$this
->
req
[
\Our\NameConst
::
data
]);
$this
->
success
(
$pics
);
}
/**
* 获取推荐分类对应推荐店铺
*/
...
...
application/models/Business/Store/StoreService.php
View file @
3faf2693
...
...
@@ -165,7 +165,7 @@ class StoreServiceModel extends \Business\AbstractModel{
}
list
(
$storeInfo
,
$storeLabel
)
=
\DAO\StoreModel
::
getInstance
()
->
get
(
$storeId
);
//
资质
图片
//
展示
图片
$detailImg
=
[];
if
(
$storeInfo
[
'store_detail_image'
]){
$storeDetailImg
=
unserialize
(
$storeInfo
[
'store_detail_image'
]);
...
...
@@ -201,7 +201,8 @@ class StoreServiceModel extends \Business\AbstractModel{
$returnClass
[]
=
$v
[
'gc_name'
];
}
}
return
array
(
'storeName'
=>
$storeInfo
[
'store_name'
],
'storeLabel'
=>
$storeLabel
,
'fansCount'
=>
\DAO\FavoritesStoreModel
::
getInstance
()
->
getFavoritesStoreCountByStoreId
(
$storeId
),
'clazz'
=>
$returnClass
,
'address'
=>
$address
,
'storePhone'
=>
$storeInfo
[
'store_phone'
],
'openingHours'
=>
$openingHours
,
'storeService'
=>
$storeInfo
[
'store_notice'
],
"qualificationImage"
=>
$detailImg
);
$qualificationPics
=
$this
->
getStoreQualification
(
$storeId
,
$storeInfo
[
'member_id'
]);
return
array
(
'storeName'
=>
$storeInfo
[
'store_name'
],
'storeLabel'
=>
$storeLabel
,
'fansCount'
=>
\DAO\FavoritesStoreModel
::
getInstance
()
->
getFavoritesStoreCountByStoreId
(
$storeId
),
'clazz'
=>
$returnClass
,
'address'
=>
$address
,
'storePhone'
=>
$storeInfo
[
'store_phone'
],
'openingHours'
=>
$openingHours
,
'storeService'
=>
$storeInfo
[
'store_notice'
],
"qualificationImage"
=>
$qualificationPics
,
'showImage'
=>
$detailImg
);
}
public
function
getRecommendGoodsCache
(
$param
,
$memberId
){
$storeId
=
intval
(
$param
[
'storeId'
]);
...
...
@@ -419,16 +420,11 @@ class StoreServiceModel extends \Business\AbstractModel{
return
true
;
}
public
function
getStoreQualification
(
$param
)
{
$storeId
=
$param
[
'storeId'
];
if
(
!
$storeId
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyStoreId
);
}
$storeInfo
=
\DAO\StoreModel
::
getInstance
()
->
get
(
$param
[
'storeId'
],
false
);
public
function
getStoreQualification
(
$storeId
,
$memberId
)
{
$pics
=
\DAO\Store\QmStoreApplyClassModel
::
getInstance
()
->
getApplyPicCache
(
$storeId
,
'file_name'
);
$join
=
\DAO\Store\StoreJoininModel
::
getInstance
()
->
getOneByMemberIdCache
(
$
storeInfo
[
'member_id'
]
,
'business_licence_photo'
);
$join
=
\DAO\Store\StoreJoininModel
::
getInstance
()
->
getOneByMemberIdCache
(
$
memberId
,
'business_licence_photo'
);
$join
[
'business_licence_photo'
]
&&
$pics
[]
=
\Our\Common
::
getStaticFile
(
$join
[
'business_licence_photo'
],
\Our\ImageConst
::
Register
,
'ossHost'
);
return
array
(
'qualificationPics'
=>
\DAO\Store\QmStoreApplyClassModel
::
getInstance
()
->
addWaterMark
(
$pics
)
);
return
\DAO\Store\QmStoreApplyClassModel
::
getInstance
()
->
addWaterMark
(
$pics
);
}
/**
* 获取搜索页推荐关键字
...
...
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