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
2c50afd8
Commit
2c50afd8
authored
Sep 14, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
广告位问题
parent
d5f7b948
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
AdvConst.php
application/library/Our/AdvConst.php
+1
-1
AdvService.php
application/models/Business/Common/AdvService.php
+7
-4
No files found.
application/library/Our/AdvConst.php
100755 → 100644
View file @
2c50afd8
...
@@ -16,7 +16,7 @@ class AdvConst {
...
@@ -16,7 +16,7 @@ class AdvConst {
const
advPositionHomeMiddle
=
1052
;
//首页中部广告位
const
advPositionHomeMiddle
=
1052
;
//首页中部广告位
const
advPositionPopUp
=
10
50
;
//平台首页弹窗广告
const
advPositionPopUp
=
10
48
;
//平台首页弹窗广告
const
advIntervalSecond
=
2000
;
//广告位默认轮播时间间隔,单位毫秒
const
advIntervalSecond
=
2000
;
//广告位默认轮播时间间隔,单位毫秒
...
...
application/models/Business/Common/AdvService.php
View file @
2c50afd8
...
@@ -71,6 +71,9 @@ class AdvServiceModel extends \Business\AbstractModel{
...
@@ -71,6 +71,9 @@ class AdvServiceModel extends \Business\AbstractModel{
$advInstance
=
\DAO\Adv\AdvModel
::
getInstance
();
$advInstance
=
\DAO\Adv\AdvModel
::
getInstance
();
$advs
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db9\AdvRedisModel
::
getInstance
(),
array
(
&
$advInstance
,
'getPostionAdv'
),
array
(
\Our\AdvConst
::
advPositionHomeTop
),
\Our\ApiConst
::
oneHour
,
array
(
\Our\AdvConst
::
advPositionHomeTop
));
$advs
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db9\AdvRedisModel
::
getInstance
(),
array
(
&
$advInstance
,
'getPostionAdv'
),
array
(
\Our\AdvConst
::
advPositionHomeTop
),
\Our\ApiConst
::
oneHour
,
array
(
\Our\AdvConst
::
advPositionHomeTop
));
if
(
!
$advs
){
$advs
=
array
();
}
return
$advs
;
return
$advs
;
}
}
...
@@ -82,6 +85,9 @@ class AdvServiceModel extends \Business\AbstractModel{
...
@@ -82,6 +85,9 @@ class AdvServiceModel extends \Business\AbstractModel{
$advInstance
=
\DAO\Adv\AdvModel
::
getInstance
();
$advInstance
=
\DAO\Adv\AdvModel
::
getInstance
();
$advInstance
->
getPostionAdv
(
\Our\AdvConst
::
advPositionHomeMiddle
);
$advInstance
->
getPostionAdv
(
\Our\AdvConst
::
advPositionHomeMiddle
);
$advs
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db9\AdvRedisModel
::
getInstance
(),
array
(
&
$advInstance
,
'getPostionAdv'
),
array
(
\Our\AdvConst
::
advPositionHomeMiddle
),
\Our\ApiConst
::
oneHour
,
array
(
\Our\AdvConst
::
advPositionHomeMiddle
));
$advs
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db9\AdvRedisModel
::
getInstance
(),
array
(
&
$advInstance
,
'getPostionAdv'
),
array
(
\Our\AdvConst
::
advPositionHomeMiddle
),
\Our\ApiConst
::
oneHour
,
array
(
\Our\AdvConst
::
advPositionHomeMiddle
));
if
(
!
$advs
){
$advs
=
array
();
}
return
$advs
;
return
$advs
;
}
}
...
@@ -104,10 +110,7 @@ class AdvServiceModel extends \Business\AbstractModel{
...
@@ -104,10 +110,7 @@ class AdvServiceModel extends \Business\AbstractModel{
$return
[
'intervalTime'
]
=
\Our\AdvConst
::
advIntervalSecond
;
$return
[
'intervalTime'
]
=
\Our\AdvConst
::
advIntervalSecond
;
}
}
}
}
if
(
$return
){
return
$return
;
return
$return
;
}
return
false
;
}
}
public
function
getStoreCover
(
$where
){
public
function
getStoreCover
(
$where
){
...
...
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