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
Plain Diff
Browse Files
Authored by
xuqi
10 years ago
Commit
d6f7a7d0f0e772b295c016daa826b0686891597c
2 parents
22a88016
bf09c644
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
92 additions
and
72 deletions
.gitignore
composer.json
framework
static/js/product/newsale/discount.js
static/js/product/newsale/newarrival.js
static/sass/category/_brand.scss
static/sass/home/_banner-top.scss
static/sass/home/_hot-brands.scss
template/m.yohobuy.com/actions/guang/detail/index.phtml
template/m.yohobuy.com/partials/layout/use.phtml
yohobuy/m.yohobuy.com/application/models/Index/Home.php
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Detail.php
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Plusstar.php
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Newsale.php
.gitignore
View file @
d6f7a7d
...
...
@@ -7,3 +7,5 @@ compile/
assets/
script/nginx/logs
npm-debug.log
composer.lock
vendor/
...
...
composer.json
View file @
d6f7a7d
...
...
@@ -11,7 +11,7 @@
{
"name"
:
"fei.hong"
,
"email"
:
"fei.hong@yoho.cn"
,
"homepage"
:
"www.yoho.cn"
"homepage"
:
"
http://
www.yoho.cn"
}
],
"require"
:
{
...
...
framework
@
75bbc3b0
Subproject commit
119c247f5cf929aa1e059e40609bb16dd6b58f05
Subproject commit
75bbc3b075de19f239532f60c5995d06c5f814e2
...
...
static/js/product/newsale/discount.js
View file @
d6f7a7d
...
...
@@ -56,10 +56,12 @@ var $listNav = $('#list-nav'),
$pre
,
//纪录进入筛选前的active项
searching
;
swiper
=
new
Swiper
(
'.swiper-container'
,
{
lazyLoading
:
true
,
pagination
:
'.swiper-pagination'
});
if
(
$
(
'.swiper-container .swiper-slide'
).
length
>
1
)
{
swiper
=
new
Swiper
(
'.swiper-container'
,
{
lazyLoading
:
true
,
pagination
:
'.swiper-pagination'
});
}
/**
* 筛选注册的回调,筛选子项点击后逻辑
...
...
@@ -132,7 +134,7 @@ function search(opt) {
}
//导航类别
if
(
$pre
===
undefined
||
$pre
.
hasClass
(
'new'
))
{
if
(
$pre
.
hasClass
(
'new'
))
{
navType
=
'newest'
;
}
else
if
(
$pre
.
hasClass
(
'price'
))
{
navType
=
'price'
;
...
...
@@ -308,6 +310,8 @@ $(window).scroll(function() {
//当scroll到1/4$goodsContainer高度后继续请求下一页数据
if
(
$
(
window
).
scrollTop
()
+
winH
>
$
(
document
).
height
()
-
0.25
*
$goodsContainer
.
height
())
{
search
();
if
(
$pre
!==
undefined
)
{
search
();
}
}
});
});
\ No newline at end of file
...
...
static/js/product/newsale/newarrival.js
View file @
d6f7a7d
...
...
@@ -59,10 +59,12 @@ var $listNav = $('#list-nav'),
$pgc
.
addClass
(
'hide'
);
$dgc
.
addClass
(
'hide'
);
swiper
=
new
Swiper
(
'.swiper-container'
,
{
lazyLoading
:
true
,
pagination
:
'.swiper-pagination'
});
if
(
$
(
'.swiper-container .swiper-slide'
).
length
>
1
)
{
swiper
=
new
Swiper
(
'.swiper-container'
,
{
lazyLoading
:
true
,
pagination
:
'.swiper-pagination'
});
}
/**
* 筛选注册的回调,筛选子项点击后逻辑
...
...
@@ -151,7 +153,7 @@ function search(opt) {
}
//导航类别
if
(
$pre
===
undefined
||
$pre
.
hasClass
(
'today'
))
{
if
(
$pre
.
hasClass
(
'today'
))
{
navType
=
'today'
;
dayLimit
=
1
;
}
else
if
(
$pre
.
hasClass
(
'week'
))
{
...
...
@@ -270,7 +272,8 @@ $listNav.delegate('li', 'touchstart', function() {
nav
=
navInfo
[
navType
];
if
(
$this
.
hasClass
(
'hide'
))
{
if
(
!
(
$this
.
hasClass
(
'active'
)))
{
$active
=
$this
.
siblings
(
'.active'
);
$pre
=
$this
;
//$pre为除筛选导航的其他导航项,若当前active的为筛选,则把$pre置为当前点击项
...
...
@@ -314,6 +317,8 @@ $(window).scroll(function() {
//当scroll到1/4$goodsContainer高度后继续请求下一页数据
if
(
$
(
window
).
scrollTop
()
+
winH
>
$
(
document
).
height
()
-
0.25
*
$goodsContainer
.
height
())
{
search
();
if
(
$pre
!==
undefined
)
{
search
();
}
}
});
\ No newline at end of file
...
...
static/sass/category/_brand.scss
View file @
d6f7a7d
...
...
@@ -2,31 +2,32 @@
.newbrand-search
{
width
:
93
.75%
;
height
:
30px
;
padding
:
7px
3
.125%
;
height
:
60rem
/
$pxConvertRem
;
padding
:
14rem
/
$pxConvertRem
3
.125%
;
background-color
:
#f8f8f8
;
left
:
0
;
top
:
44px
;
top
:
88rem
/
$pxConvertRem
;
position
:
fixed
;
z-index
:
2
;
.search-box
{
position
:
relative
;
height
:
30px
;
height
:
60rem
/
$pxConvertRem
;
background-color
:
#FFF
;
border-radius
:
15px
;
padding
:
0
16px
0
26px
;
border-radius
:
30rem
/
$pxConvertRem
;
padding
:
0
32rem
/
$pxConvertRem
0
52rem
/
$pxConvertRem
;
.search-input
{
width
:
100%
;
height
:
30px
;
height
:
60rem
/
$pxConvertRem
;
border
:
0
;
}
.search-icon
{
position
:
absolute
;
font-size
:
12px
;
top
:
16px
;
left
:
24px
;
font-size
:
24rem
/
$pxConvertRem
;
top
:
20rem
/
$pxConvertRem
;
left
:
24rem
/
$pxConvertRem
;
color
:
#bdbdbd
;
}
}
...
...
@@ -62,50 +63,53 @@
color
:
#999999
;
font-weight
:
bold
;
position
:
relative
;
h2
{
width
:
100%
;
height
:
25px
;
line-height
:
25px
;
font-size
:
17px
;
// width: 100%;
padding
:
0
20rem
/
$pxConvertRem
;
height
:
50rem
/
$pxConvertRem
;
line-height
:
50rem
/
$pxConvertRem
;
font-size
:
34rem
/
$pxConvertRem
;
border-top
:
1px
solid
#e6e6e6
;
background-color
:
#f4f4f4
;
}
}
p
{
cursor
:
pointer
;
height
:
25px
;
padding-right
:
10px
;
a
{
display
:
block
;
font-size
:
17px
;
border-bottom
:
1px
solid
#f3f3f3
;
border-top
:
1px
solid
#f9f9f9
;
i
{
position
:
relative
;
top
:
1px
;
color
:
#ff0000
;
padding-left
:
16px
;
}
p
{
cursor
:
pointer
;
// height: 50rem / $pxConvertRem;
padding
:
0
20rem
/
$pxConvertRem
;
a
{
display
:
block
;
padding-top
:
10rem
/
$pxConvertRem
;
height
:
76rem
/
$pxConvertRem
;
line-height
:
76rem
/
$pxConvertRem
;
font-size
:
34rem
/
$pxConvertRem
;
border-bottom
:
1px
solid
#f3f3f3
;
border-top
:
1px
solid
#f9f9f9
;
i
{
position
:
relative
;
top
:
1px
;
color
:
#ff0000
;
padding-left
:
32rem
/
$pxConvertRem
;
}
}
}
}
.right-bar
{
width
:
30px
;
top
:
120px
!
important
;
width
:
60rem
/
$pxConvertRem
;
top
:
240rem
/
$pxConvertRem
!
important
;
overflow
:
hidden
;
position
:
fixed
;
right
:
1px
;
border-radius
:
6px
;
right
:
2rem
/
$pxConvertRem
;
border-radius
:
12rem
/
$pxConvertRem
;
background
:
rgba
(
0
,
0
,
0
,.
8
);
z-index
:
2
;
b
{
height
:
16px
;
height
:
32rem
/
$pxConvertRem
;
line-height
:
14px
;
line-height
:
28rem
/
$pxConvertRem
;
text-align
:
center
;
display
:
block
;
color
:
#999999
;
...
...
@@ -114,6 +118,6 @@
}
.con
{
padding-top
:
5px
;
padding-top
:
10rem
/
$pxConvertRem
;
}
}
\ No newline at end of file
...
...
static/sass/home/_banner-top.scss
View file @
d6f7a7d
...
...
@@ -16,9 +16,10 @@
opacity
:
0
.5
;
margin
:
0
(
9rem
/
$pxConvertRem
);
border-radius
:
50%
;
}
span
.swiper-active-switch
{
opacity
:
1
;
&
.swiper-pagination-bullet-active
{
background
:
#fff
;
opacity
:
1
;
}
}
}
}
...
...
static/sass/home/_hot-brands.scss
View file @
d6f7a7d
...
...
@@ -17,14 +17,15 @@
overflow
:
hidden
;
.brand-logo
{
width
:
100%
;
display
:
table-cell
;
width
:
3
.95rem
;
height
:
128rem
/
$pxConvertRem
;
line-height
:
128rem
/
$pxConvertRem
;
text-align
:
center
;
font-size
:
0
;
vertical-align
:
middle
;
img
{
vertical-align
:
middle
;
max-width
:
100%
;
max-height
:
100%
;
}
...
...
@@ -68,13 +69,13 @@
.brands-swiper
{
background
:
#fff
;
width
:
100%
;
height
:
1
4
0rem
/
$pxConvertRem
;
height
:
1
8
0rem
/
$pxConvertRem
;
margin-bottom
:
28rem
/
$pxConvertRem
;
overflow
:
hidden
;
.brands-list
{
position
:
relative
;
height
:
1
4
0rem
/
$pxConvertRem
;
height
:
1
8
0rem
/
$pxConvertRem
;
li
{
float
:
left
;
...
...
@@ -85,11 +86,12 @@
a
{
position
:
relative
;
display
:
block
;
display
:
table-cell
;
width
:
100%
;
height
:
1
00%
;
height
:
1
40rem
/
$pxConvertRem
;
line-height
:
140rem
/
$pxConvertRem
;
font-size
:
0
;
vertical-align
:
middle
;
}
img
{
...
...
@@ -102,7 +104,8 @@
position
:
absolute
;
left
:
8rem
/
$pxConvertRem
;
right
:
8rem
/
$pxConvertRem
;
bottom
:
8rem
/
$pxConvertRem
;
bottom
:
-32rem
/
$pxConvertRem
;
width
:
100%
;
height
:
28rem
/
$pxConvertRem
;
line-height
:
28rem
/
$pxConvertRem
;
text-align
:
center
;
...
...
template/m.yohobuy.com/actions/guang/detail/index.phtml
View file @
d6f7a7d
...
...
@@ -23,7 +23,7 @@
{
{#
content
}
}
{
{#if
text
}
}
<div
class=
"post-block text-block"
>
{
{
text
}
}
{
{
{text
}
}}
</div>
{
{/if
}
}
...
...
template/m.yohobuy.com/partials/layout/use.phtml
View file @
d6f7a7d
...
...
@@ -108,14 +108,14 @@
{{/if}}
{{!-- 新品到着 --}}
{{#if newArrival}}
{{#if newArrival
Page
}}
<script>
seajs.use('js/product/newsale/newarrival');
</script>
{{/if}}
{{!-- 折扣专区 --}}
{{#if discount}}
{{#if discount
Page
}}
<script>
seajs.use('js/product/newsale/discount');
</script>
...
...
yohobuy/m.yohobuy.com/application/models/Index/Home.php
View file @
d6f7a7d
...
...
@@ -144,7 +144,7 @@ class HomeModel
Cache
::
set
(
CacheConfig
::
KEY_ACTION_BOYS_INDEX
,
$result
);
}
}
return
$result
;
}
...
...
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Detail.php
View file @
d6f7a7d
...
...
@@ -140,10 +140,11 @@ class DetailController extends AbstractAction
if
(
!
empty
(
$detail
[
'getOtherArticle'
]))
{
foreach
(
$detail
[
'getOtherArticle'
]
as
$value
)
{
$value
[
'url'
]
=
'/guang/detail/index?id='
.
$value
[
'id'
];
$value
[
'thumb'
]
=
Helpers
::
getImageUrl
(
$value
[
'thumb'
],
279
,
175
);
$data
[
'relatedInfo'
][]
=
$value
;
}
}
$this
->
_view
->
display
(
'index'
,
$data
);
$detail
=
array
();
...
...
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Plusstar.php
View file @
d6f7a7d
...
...
@@ -79,7 +79,7 @@ class PlusstarController extends AbstractAction
$data
[
'ps'
][
'likeUrl'
]
=
false
;
//"http://guang.m.yohobuy.com/plustar/brandinfo?id=285&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo","param":{"id":285}},"requesturl":{"url":"\/guang\/api\/v1\/favorite\/togglebrand","param":{"brand_id":"701"}},"priority":"Y"}}";
$data
[
'ps'
][
'intro'
]
=
empty
(
$brandInfo
[
'getBrandInfo'
][
'data'
][
'brand_intro'
])
?
''
:
strtr
(
strip_tags
(
$brandInfo
[
'getBrandInfo'
][
'data'
][
'brand_intro'
]),
array
(
' '
=>
' '
));
$data
[
'ps'
][
'newArrival'
]
=
array
();
$data
[
'ps'
][
'newArrival'
][
'moreUrl'
]
=
'
'
;
// @todo 品牌列表页面
$data
[
'ps'
][
'newArrival'
][
'moreUrl'
]
=
'
/product/list/brand?brand='
.
$id
;
// @todo 品牌列表页面
$data
[
'ps'
][
'newArrival'
][
'naList'
]
=
$brandInfo
[
'getNewProduct'
];
$data
[
'ps'
][
'infos'
]
=
array
();
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Newsale.php
View file @
d6f7a7d
...
...
@@ -24,7 +24,7 @@ class NewsaleController extends AbstractAction
$this
->
channelTrans
(
$channel
);
$data
=
array
();
$data
[
'newArrival'
]
=
true
;
$data
[
'newArrival
Page
'
]
=
true
;
$data
[
'headerBanner'
]
=
\Product\NewsaleModel
::
getNewFocus
(
$channel
);
$goodsList
=
\Product\NewsaleModel
::
getNewProducts
(
$channel
,
60
);
if
(
!
empty
(
$goodsList
))
{
...
...
@@ -58,7 +58,7 @@ class NewsaleController extends AbstractAction
$this
->
channelTrans
(
$channel
);
$data
=
array
();
$data
[
'discount'
]
=
true
;
$data
[
'discount
Page
'
]
=
true
;
$data
[
'headerBanner'
]
=
\Product\NewsaleModel
::
getNewFocus
(
$channel
);
$goodsList
=
\Product\NewsaleModel
::
getSaleProducts
(
$channel
,
60
);
if
(
!
empty
(
$goodsList
))
{
...
...
@@ -132,7 +132,7 @@ class NewsaleController extends AbstractAction
$data
=
NewsaleData
::
selectNewSaleProducts
(
$gender
,
$brand
,
$sort
,
$color
,
$size
,
$price
,
$p_d
,
$channel
,
$dayLimit
,
$limit
,
$page
$size
,
$price
,
$p_d
,
$channel
,
$dayLimit
,
$limit
,
$page
,
$order
);
$result
=
\Product\NewsaleModel
::
selectData
(
$data
);
...
...
Please
register
or
login
to post a comment