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
073c2576
Commit
073c2576
authored
Sep 06, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address
parent
a322ae41
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
Store.php
application/controllers/Store.php
+2
-1
StoreService.php
application/models/Business/Store/StoreService.php
+8
-3
No files found.
application/controllers/Store.php
100755 → 100644
View file @
073c2576
...
@@ -13,7 +13,8 @@ class StoreController extends \Our\Controller_AbstractIndex {
...
@@ -13,7 +13,8 @@ class StoreController extends \Our\Controller_AbstractIndex {
* 获取店铺首页头部(公用)
* 获取店铺首页头部(公用)
*/
*/
public
function
getStoreInfoAction
(){
public
function
getStoreInfoAction
(){
$storeInfo
=
$this
->
storeService
->
getStoreInfo
(
$this
->
req
[
\Our\NameConst
::
data
],
$this
->
memberId
);
$address
=
\Business\User\AddressServiceModel
::
getInstance
()
->
getMyAddress
(
$this
->
req
[
\Our\NameConst
::
data
],
$this
->
memberId
);
$storeInfo
=
$this
->
storeService
->
getStoreInfo
(
$this
->
req
[
\Our\NameConst
::
data
],
$this
->
memberId
,
$address
);
//.
//.
$storeInfo
[
'adv'
]
=
array
(
'href'
=>
''
,
'imageUrl'
=>
'http://qmoss-01.oss-cn-hangzhou.aliyuncs.com/data/upload/mall/adv/05715960161498410.jpg'
);
$storeInfo
[
'adv'
]
=
array
(
'href'
=>
''
,
'imageUrl'
=>
'http://qmoss-01.oss-cn-hangzhou.aliyuncs.com/data/upload/mall/adv/05715960161498410.jpg'
);
$storeInfo
[
'share'
]
=
\Business\Common\CommonServiceModel
::
getInstance
()
->
getShareInfo
(
\Our\ApiConst
::
shareStore
,
$this
->
req
[
\Our\NameConst
::
data
][
'storeId'
]);
$storeInfo
[
'share'
]
=
\Business\Common\CommonServiceModel
::
getInstance
()
->
getShareInfo
(
\Our\ApiConst
::
shareStore
,
$this
->
req
[
\Our\NameConst
::
data
][
'storeId'
]);
...
...
application/models/Business/Store/StoreService.php
View file @
073c2576
...
@@ -37,13 +37,18 @@ class StoreServiceModel extends \Business\AbstractModel{
...
@@ -37,13 +37,18 @@ class StoreServiceModel extends \Business\AbstractModel{
* @param $store_id
* @param $store_id
* @param $memberId
* @param $memberId
*/
*/
public
function
getStoreInfo
(
$param
,
$memberId
){
public
function
getStoreInfo
(
$param
,
$memberId
,
$address
){
$storeId
=
intval
(
$param
[
'storeId'
]);
$storeId
=
intval
(
$param
[
'storeId'
]);
if
(
!
$storeId
){
if
(
!
$storeId
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyStoreId
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyStoreId
);
}
}
$lng
=
$param
[
'lng'
];
if
(
$address
)
{
$lat
=
$param
[
'lat'
];
$lng
=
$address
[
'lng'
];
$lat
=
$address
[
'lat'
];
}
else
{
$lng
=
$param
[
'lng'
];
$lat
=
$param
[
'lat'
];
}
if
(
!
$lng
||
!
$lat
){
if
(
!
$lng
||
!
$lat
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyLatLngParam
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyLatLngParam
);
}
}
...
...
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