Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
uedxwg
9 years ago
Commit
6056ad4953f76eb66d298ca670d33d366aa74b70
1 parent
3e8d9b73
'hotrank'
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
static/js/product/newsale/hot-rank.js
yohobuy/m.yohobuy.com/application/controllers/Home.php
static/js/product/newsale/hot-rank.js
View file @
6056ad4
...
...
@@ -8,10 +8,11 @@ var page = 1,
hotnav
,
listTop
,
navSwiper
,
notab
,
sort
=
''
,
id
=
''
;
function
hotrank
(
page
,
sort
,
tabId
)
{
function
hotrank
(
page
,
sort
,
tabId
,
notab
)
{
$
.
ajax
({
type
:
'GET'
,
url
:
'/product/newsale/selectHotrank'
,
...
...
@@ -19,13 +20,19 @@ function hotrank(page, sort, tabId) {
data
:
{
page
:
page
,
sort
:
sort
,
tab_id
:
tabId
tab_id
:
tabId
,
notab
:
notab
},
success
:
function
(
data
)
{
if
(
page
===
1
)
{
$
(
'
#hotRank
'
).
html
(
''
);
$
(
'
.rank-main
'
).
html
(
''
);
}
$
(
'#hotRank'
).
append
(
data
);
console
.
log
(
notab
);
if
(
notab
===
1
)
{
$
(
'.rank-main'
).
append
(
data
);
}
else
{
$
(
'#hotRank'
).
append
(
data
);
};
lazyLoad
(
$
(
'img.lazy'
));
$
(
'#yoho-footer'
).
css
(
'position'
,
'static'
);
$
(
'.rank-main ul li:gt(2)'
).
find
(
'.item-content i'
).
removeClass
(
'top'
);
...
...
@@ -43,9 +50,9 @@ function hotrank(page, sort, tabId) {
var
navItme
=
$
(
'.s-goods-nav .nav-item'
).
eq
(
index
);
id
=
navItme
.
data
(
'id'
)
?
navItme
.
data
(
'id'
)
:
''
;
sort
=
navItme
.
data
(
'sort'
)
?
navItme
.
data
(
'sort'
)
:
''
;
page
=
1
;
hotrank
(
page
,
sort
,
id
);
notab
=
1
;
hotrank
(
page
,
sort
,
id
,
notab
);
});
});
}
...
...
@@ -60,7 +67,8 @@ $(window).scroll(function () {
return
;
}
page
=
2
;
hotrank
(
page
,
sort
,
id
);
notab
=
1
;
hotrank
(
page
,
sort
,
id
,
notab
);
});
hotrank
(
page
,
sort
,
id
);
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
6056ad4
...
...
@@ -166,12 +166,14 @@ class HomeController extends AbstractAction
$this
->
setTitle
(
'优惠券'
);
$this
->
setNavHeader
(
'优惠券'
,
true
,
SITE_MAIN
);
// $uid = $this->getUid();
$uid
=
967016
;
$uid
=
8826435
;
$status
=
$this
->
get
(
'status'
,
0
);
$coupons
=
array
(
'couponsUrl'
=>
\Index\UserModel
::
getCouponData
(
$uid
,
$status
),
'couponsPage'
=>
true
);
print_r
(
$coupons
);
$this
->
_view
->
display
(
'coupons'
,
$coupons
);
}
...
...
Please
register
or
login
to post a comment