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
uedxwg
9 years ago
Commit
59fbb88889d700d02e3d891e50b90f51d49e29be
1 parent
a1502aa1
hotrank
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
77 additions
and
43 deletions
static/js/me/coupons.js
static/js/me/entry.js
static/js/product/newsale/hot-rank.js
static/sass/me/_index.scss
template/m.yohobuy.com/actions/product/newsale/hotlist.phtml
template/m.yohobuy.com/actions/product/newsale/hotrank.phtml
template/m.yohobuy.com/actions/product/newsale/product.phtml
template/m.yohobuy.com/partials/layout/use.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Newsale.php
static/js/me/coupons.js
0 → 100644
View file @
59fbb88
var
$
=
require
(
'jquery'
),
Hammer
=
require
(
'yoho.hammer'
);
var
employ
;
$
(
'.employ span'
).
each
(
function
(
index
)
{
employ
=
new
Hammer
(
$
(
'.employ span'
)[
index
]);
employ
.
on
(
'tap'
,
function
(
e
)
{
$
(
'.employ-list'
).
addClass
(
'none'
).
eq
(
index
).
removeClass
(
'none'
);
$
(
'.employ span'
).
removeClass
(
'active'
).
eq
(
index
).
addClass
(
'active'
);
});
});
\ No newline at end of file
...
...
static/js/me/entry.js
View file @
59fbb88
...
...
@@ -4,4 +4,5 @@
* @date: 2015/11/10
*/
require
(
'./order'
);
\ No newline at end of file
require
(
'./order'
);
require
(
'./coupons'
);
\ No newline at end of file
...
...
static/js/product/newsale/hot-rank.js
View file @
59fbb88
var
$
=
require
(
'jquery'
),
Hammer
=
require
(
'yoho.hammer'
);
var
Lazyload
=
require
(
'yoho.lazyload'
);
Lazyload
(
$
(
'img.lazy'
));
$
.
ajax
({
type
:
'POST'
,
url
:
'http://m.dev.yohobuy.com/product/newsale/selectHotrank'
,
dataType
:
'html'
,
success
:
function
(
date
){
$
(
'#hotRank'
).
append
(
date
);
$
(
'#yoho-footer'
).
css
(
'position'
,
'static'
);
}
})
\ No newline at end of file
...
...
static/sass/me/_index.scss
View file @
59fbb88
@import
"home"
,
"vip-grade"
,
"order"
,
"personal-details"
,
"yoho-coin"
,
"recommend-for-you"
;
\ No newline at end of file
@import
"home"
,
"vip-grade"
,
"order"
,
"coupons"
,
"personal-details"
,
"yoho-coin"
,
"recommend-for-you"
;
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/product/newsale/hotlist.phtml
0 → 100644
View file @
59fbb88
<div class="s-goods-nav goods-nav">
<ul class="swiper-wrapper clearfix">
{{# tabs}}
<li class="swiper-slide nav-item" data-sort="{{sort}}">
{{# title}}
<span>{{name}}</span>
{{/ title}}
</li>
{{/ tabs}}
</ul>
</div>
{{# goods}}
<div class="rank-main">
<ul>
{{# goods}}
<li>
<a class="clearfix" href="{{url}}">
<div class="item-img">
<img class="lazy" data-original="{{thumb}}">
</div>
<div class="item-content">
<i class="rank-icon top">{{rank}}</i>
<h2 {{# active}}class="hasActive"{{/ active}}>{{name}}</h2>
{{# active}}
<p>{{.}}</p>
{{/ active}}
<p>{{salePrice}}<span>{{price}}</span></p>
</div>
</a>
</li>
{{/ goods}}
</ul>
</div>
{{/ goods}}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/product/newsale/hotrank.phtml
View file @
59fbb88
...
...
@@ -3,42 +3,7 @@
{
{#
headerBanner
}
}
{
{>
product/banner_swipe_and_single
}
}
{
{/
headerBanner
}
}
{
{#
listNav
}
}
<div
class=
"s-goods-nav goods-nav"
>
<ul
class=
"swiper-wrapper clearfix"
>
{
{#
list
}
}
<li
class=
"swiper-slide nav-item"
data-sort=
"{{sort}}"
>
<span>
{
{textCn
}
}</span>
</li>
{
{/
list
}
}
</ul>
</div>
{
{/
listNav
}
}
{
{#
rankList
}
}
<div
class=
"rank-main"
>
<ul>
{
{#
list
}
}
<li>
<a
class=
"clearfix"
href=
"{{url}}"
>
<div
class=
"item-img"
>
<img
class=
"lazy"
data-original=
"{{img}}"
>
</div>
<div
class=
"item-content"
>
<i
class=
"rank-icon top"
>
{
{rank
}
}</i>
<h
2
{
{#
active
}
}class=
"hasActive"
{
{/
active
}
}>
{
{title
}
}</h
2
>
{
{#
active
}
}
<p>
{
{.
}
}</p>
{
{/
active
}
}
<p>
{
{sPrice
}
}<span>
{
{price
}
}</span></p>
</div>
</a>
</li>
{
{/
list
}
}
</ul>
</div>
{
{/
rankList
}
}
<div
id=
"hotRank"
></div>
{
{#if
brand
}
}
<input
id=
"brand"
type=
"hidden"
value=
{
{brand
}
}>
{
{/if
}
}
...
...
template/m.yohobuy.com/actions/product/newsale/product.phtml
View file @
59fbb88
{
{#
goods
}
}
{
{>
good
}
}
{
{/
goods
}
}
\ No newline at end of file
{
{/
goods
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/layout/use.phtml
View file @
59fbb88
...
...
@@ -201,4 +201,9 @@
<script>
seajs.use('js/me/order');
</script>
{{/if}}
{{#if couponsPage}}
<script>
seajs.use('js/me/coupons');
</script>
{{/if}}
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
59fbb88
...
...
@@ -168,9 +168,10 @@ class HomeController extends AbstractAction
$uid
=
967016
;
$status
=
$this
->
get
(
'status'
,
0
);
$coupons
=
\Index\UserModel
::
getCouponData
(
$uid
,
$status
);
$coupons
=
array
(
'couponsUrl'
=>
\Index\UserModel
::
getCouponData
(
$uid
,
$status
),
'couponsPage'
=>
true
);
$this
->
_view
->
display
(
'coupons'
,
$coupons
);
}
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Newsale.php
View file @
59fbb88
...
...
@@ -86,9 +86,10 @@ class NewsaleController extends AbstractAction
'headerBanner'
=>
\Product\NewsaleModel
::
getNewFocus
(
$channel
),
'showDownloadApp'
=>
true
,
'pageFooter'
=>
true
,
'cartUrl'
=>
Helpers
::
url
(
'/
cart/index/index
'
,
null
),
'cartUrl'
=>
Helpers
::
url
(
'/
product/newsale/selectHotrank
'
,
null
),
);
// print_r($data);
$this
->
_view
->
display
(
'hotrank'
,
$data
);
}
...
...
@@ -114,6 +115,7 @@ class NewsaleController extends AbstractAction
$result
=
\Product\NewsaleModel
::
selectTopData
(
$data
);
}
// print_r($result);
if
(
empty
(
$result
))
{
echo
' '
;
}
else
{
...
...
Please
register
or
login
to post a comment