Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yangyang
9 years ago
Commit
06fec77891fc2374eadbc5a34f2c4c29f0f552aa
1 parent
c9b93eaa
save
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
8 deletions
yohobuy/m.yohobuy.com/application/models/Guang/StarClass.php
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/StarClass.php
yohobuy/m.yohobuy.com/application/models/Guang/StarClass.php
View file @
06fec77
...
...
@@ -99,16 +99,26 @@ class StarClassModel
/**
* 星搭配
*/
public
static
function
getCollocation
(
$page
)
public
static
function
getCollocation
()
{
$result
=
array
();
$result
[
'title'
]
=
'星潮教室'
;
$result
[
'headTab'
]
=
self
::
getHeadTab
(
'collocation'
);
return
$result
;
}
/**
* 星搭配
*/
public
static
function
ajaxCollocation
(
$page
)
{
$data
=
StarClassData
::
collocationData
(
$page
);
// print_r($data);
$result
=
array
();
$collocationList
=
array
();
if
(
isset
(
$data
[
'code'
])
&&
$data
[
'code'
]
==
200
)
{
if
(
isset
(
$data
[
'code'
])
&&
$data
[
'code'
]
==
200
&&
!
empty
(
$data
[
'data'
])
)
{
foreach
(
$data
[
'data'
][
'list'
][
'artList'
]
as
$key
=>
$value
)
{
$collocationList
[
$key
][
'img'
]
=
Helpers
::
getImageUrl
(
$value
[
'src'
],
640
,
240
);
$collocationList
[
$key
][
'url'
]
=
$value
[
'url'
];
...
...
@@ -126,7 +136,6 @@ class StarClassModel
return
$result
;
}
//签到操作
public
static
function
sign
(
$uid
)
{
...
...
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/StarClass.php
View file @
06fec77
...
...
@@ -39,19 +39,31 @@ class StarClassController extends AbstractAction
//星潮教室-星搭配
public
function
collocationAction
()
public
function
CollocationAction
()
{
$data
=
StarClassModel
::
getCollocation
();
$this
->
_view
->
display
(
'collocation'
,
array
(
'trendClassCollocation'
=>
$data
));
}
//星潮教室-星搭配
public
function
ajaxCollocationAction
()
{
// if (!$this->isAjax()) {
// return;
// }
$page
=
$this
->
get
(
'page'
,
1
);
$data
=
StarClassModel
::
getCollocation
(
$page
);
$page
=
$this
->
get
(
'page'
,
2
);
$data
=
StarClassModel
::
ajaxCollocation
(
$page
);
if
(
isset
(
$data
)
&&
!
empty
(
$data
))
{
$this
->
_view
->
display
(
'collocation'
,
array
(
'trendClassCollocation'
=>
$data
));
}
else
{
echo
' '
;
}
...
...
Please
register
or
login
to post a comment