Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
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
lore-w
9 years ago
Commit
2735c04d49a86c64b21a1dfc8e6d690e25117c53
2 parents
4acd4aa4
9d55e1d7
Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
81 additions
and
38 deletions
docs/data-structure.md
static/js/cart/chose-panel.js
template/m.yohobuy.com/partials/cart/chose-panel.phtml
template/www.yohobuy.com/partials/product/filter-box.phtml
web-static/js/common.js
web-static/js/common/new-arrivls.js
web-static/js/home/home.js
web-static/sass/product/_filter-box.scss
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index1.php
docs/data-structure.md
View file @
2735c04
...
...
@@ -838,6 +838,14 @@
},
...
],
defaultSizes: [
{
numZero: true,
name: 'X',
numStr: '0/10'
},
...
]
totalNum: 20
}
...
...
static/js/cart/chose-panel.js
View file @
2735c04
...
...
@@ -18,7 +18,6 @@ var $chosePanel = $('#chose-panel'),
$chosed
,
$imgsThumb
,
$leftNum
,
$leftNumHtml
,
leftNum
,
confirming
,
curColorIndex
,
...
...
@@ -32,7 +31,6 @@ var $chosePanel = $('#chose-panel'),
queryString
,
$yohoPage
=
$
(
'.yoho-page'
);
//初始化购物车面板显示
function
init
()
{
hasChooseColor
=
false
;
...
...
@@ -43,8 +41,6 @@ function init() {
$allChoseItems
=
$
(
'.chose-items'
);
$sizeRowList
=
$
(
'.size-list ul'
);
$leftNum
=
$
(
'#left-num'
);
$leftNumHtml
=
$sizeRowList
.
eq
(
0
).
toggleClass
(
'hide'
);
}
function
checkColorSizeNum
()
{
...
...
template/m.yohobuy.com/partials/cart/chose-panel.phtml
View file @
2735c04
...
...
@@ -34,16 +34,22 @@
<div
class=
"size-list block-list"
>
<span>尺码</span>
{
{#
sizes
}
}
<ul
class=
"size-row clearfix hide"
>
{
{#
size
}
}
<li
class=
"block {{#if chosed}}chosed{{/if}} {{#unless sizeNum}}zero-stock{{/unless}}"
data-id=
"{{id}}"
data-colorid=
"{{colorId}}"
data-num=
"{{sizeNum}}"
data-numstr=
"{{colorNumStr}}"
data-skuid=
"{{skuId}}"
data-goodid=
"{{goodsId}}"
>
{
{name
}
}
</li>
{
{/
size
}
}
</ul>
<ul
class=
"size-row clearfix hide"
>
{
{#
size
}
}
<li
class=
"block {{#if chosed}}chosed{{/if}} {{#unless sizeNum}}zero-stock{{/unless}}"
data-id=
"{{id}}"
data-colorid=
"{{colorId}}"
data-num=
"{{sizeNum}}"
data-numstr=
"{{colorNumStr}}"
data-skuid=
"{{skuId}}"
data-goodid=
"{{goodsId}}"
>
{
{name
}
}
</li>
{
{/
size
}
}
</ul>
{
{/
sizes
}
}
{
{#if
defaultSizes
}
}
<ul
class=
"size-row clearfix default-size"
>
{
{#each
defaultSizes
}
}
<li
class=
"block {{#if numZero}}zero-stock{{/if}}"
data-numstr=
"{{numStr}}"
>
{
{name
}
}</li>
{
{/each
}
}
</ul>
{
{/if
}
}
</div>
<p>
<div
class=
"num"
>
...
...
template/www.yohobuy.com/partials/product/filter-box.phtml
View file @
2735c04
...
...
@@ -26,7 +26,7 @@
<div class="attr-content clearfix">
{{#each channel}}
<a class="attr" href="{{href}}">
<a class="attr
{{#if checked}}checked{{/if}}
" href="{{href}}">
{{name}}
</a>
{{/each}}
...
...
@@ -42,7 +42,7 @@
<ul class="sort-pre clearfix">
{{#each sort}}
<li>
<span class="attr">
<span class="attr
{{#if checked}}checked{{/if}}
">
{{name}}
</span>
</li>
...
...
@@ -53,7 +53,7 @@
{{#each sort}}
<ul class="sort-sub clearfix hide">
{{#each sub}}
<li class="attr">
<li class="attr
{{#if checked}}checked{{/if}}
">
<a href="{{href}}">{{name}}</a>
</li>
{{/each}}
...
...
@@ -71,7 +71,7 @@
<div class="attr-content">
<ul class="default clearfix">
{{# default}}
<li class="attr">
<li class="attr
{{#if checked}}checked{{/if}}
">
<a href="{{href}}" title="{{name}}">{{name}}</a>
</li>
{{/ default}}
...
...
@@ -82,7 +82,7 @@
<em>更多</em>
<i class="iconfont"></i>
</span>
<span id="brand-multi" class="multi-select">多选 +</span>
</div>
...
...
@@ -128,7 +128,7 @@
<div class="attr-content clearfix">
{{# price}}
<a class="attr" href="{{href}}">¥{{name}}</a>
<a class="attr
{{#if checked}}checked{{/if}}
" href="{{href}}">¥{{name}}</a>
{{/ price}}
<div class="ud-price-range">
...
...
@@ -146,10 +146,10 @@
{{#if color}}
<div class="color section">
<span class="title">颜色:</span>
<div class="attr-content clearfix">
{{# color}}
<a class="attr" href="{{href}}">
<a class="attr
{{#if checked}}checked{{/if}}
" href="{{href}}">
<i class="color-block" style="background: {{rgb}}"></i>
{{name}}
</a>
...
...
@@ -164,7 +164,7 @@
<div class="attr-content clearfix">
{{# size}}
<a class="attr" href="{{href}}">{{name}}</a>
<a class="attr
{{#if checked}}checked{{/if}}
" href="{{href}}">{{name}}</a>
{{/ size}}
</div>
</div>
...
...
@@ -194,7 +194,7 @@
{{/if}}
<ul class="clearfix check-container">
{{#each sub}}
<li class="attr">
<li class="attr
{{#if checked}}checked{{/if}}
">
<a href="{{href}}">
<span class="iconfont checkbox" data-id="{{id}}"></span>
<span>{{name}}</span>
...
...
@@ -212,4 +212,4 @@
</div>
</div>
{{/if}}
</div>
\ No newline at end of file
</div>
...
...
web-static/js/common.js
View file @
2735c04
...
...
@@ -6,6 +6,7 @@
var
$
=
require
(
'yoho.jquery'
);
require
(
'./footer'
);
require
(
'./simple-header'
);
require
(
'./header'
);
function
cookie
(
name
)
{
...
...
web-static/js/common/new-arrivls.js
View file @
2735c04
...
...
@@ -95,14 +95,19 @@ module.exports = function(data) {
var
load
=
new
InfiniteLoad
({
offset
:
{
height
:
function
()
{
return
parseFloat
(
$container
.
offset
().
top
)
+
parseFloat
(
$container
.
height
());
return
parseFloat
(
$container
.
offset
().
top
)
+
parseFloat
(
$container
.
height
())
-
200
;
}
}
});
var
options
;
var
url
=
data
.
url
;
var
firstCount
=
data
.
firstCount
;
var
pageCount
=
data
.
pageCount
;
delete
data
.
url
;
delete
data
.
firstCount
;
delete
data
.
pageCount
;
load
.
on
(
'after'
,
function
(
p
)
{
...
...
@@ -111,6 +116,8 @@ module.exports = function(data) {
pageIndex
:
p
.
index
});
data
.
pageCount
=
(
data
.
pageIndex
===
1
)
?
firstCount
:
pageCount
;
options
=
{
type
:
'POST'
,
url
:
url
,
...
...
web-static/js/home/home.js
View file @
2735c04
...
...
@@ -24,7 +24,13 @@ if ($.inArray(homePage, ['boys','girls','kids','lifestyle']) > -1) {
require
(
'../common/new-arrivls'
)({
type
:
homePage
,
url
:
'/common/getNewArrival'
,
pageCount
:
homePage
===
'boys'
?
'15'
:
'20'
firstCount
:
homePage
===
(
'boys'
||
'lifestyle'
)
?
'25'
:
'20'
,
pageCount
:
homePage
===
(
'boys'
||
'lifestyle'
)
?
'15'
:
'12'
});
window
.
setCookie
(
'_Channel'
,
homePage
,
{
domain
:
'.yohobuy.com'
,
path
:
'/'
,
expires
:
365
});
}
...
...
@@ -54,3 +60,4 @@ if (homePage === 'boys') {
$
(
'.img-slider-wrapper'
).
slider2
();
}
...
...
web-static/sass/product/_filter-box.scss
View file @
2735c04
...
...
@@ -12,7 +12,7 @@
}
}
.title
{
.title
{
float
:
left
;
width
:
90px
;
line-height
:
30px
;
...
...
@@ -44,6 +44,14 @@
margin-left
:
0
;
}
&
.checked
{
color
:
#e01
;
a
{
color
:
#e01
;
}
}
-moz-user-select
:
none
;
}
...
...
@@ -287,4 +295,4 @@
.multi
.checkbox
{
display
:
inline
;
}
}
\ No newline at end of file
}
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index1.php
View file @
2735c04
...
...
@@ -44,7 +44,8 @@ class Index1Controller extends AbstractAction
'channel'
=>
array
(
array
(
'href'
=>
'/?gender=1,3'
,
'name'
=>
'BOYS'
'name'
=>
'BOYS'
,
'checked'
=>
true
),
array
(
'href'
=>
'/?gender=2,3'
,
...
...
@@ -63,10 +64,12 @@ class Index1Controller extends AbstractAction
array
(
'id'
=>
'1'
,
'name'
=>
'上衣'
,
'checked'
=>
true
,
'sub'
=>
array
(
array
(
'href'
=>
''
,
'name'
=>
'T恤'
'name'
=>
'T恤'
,
'checked'
=>
true
),
array
(
'href'
=>
''
,
...
...
@@ -95,7 +98,8 @@ class Index1Controller extends AbstractAction
'default'
=>
array
(
array
(
'href'
=>
''
,
'name'
=>
'CLOT'
'name'
=>
'CLOT'
,
'checked'
=>
true
),
array
(
'href'
=>
''
,
...
...
@@ -133,7 +137,8 @@ class Index1Controller extends AbstractAction
'brandIndex'
=>
array
(
array
(
'index'
=>
'all'
,
'name'
=>
'全部'
'name'
=>
'全部'
,
'checked'
=>
true
),
array
(
'index'
=>
'0-9'
,
...
...
@@ -185,7 +190,8 @@ class Index1Controller extends AbstractAction
'price'
=>
array
(
array
(
'href'
=>
''
,
'name'
=>
'0-239'
'name'
=>
'0-239'
,
'checked'
=>
true
),
array
(
'href'
=>
''
,
...
...
@@ -196,7 +202,8 @@ class Index1Controller extends AbstractAction
array
(
'href'
=>
''
,
'name'
=>
'黑色'
,
'rgb'
=>
'#000'
'rgb'
=>
'#000'
,
'checked'
=>
true
),
array
(
'href'
=>
''
,
...
...
@@ -207,7 +214,8 @@ class Index1Controller extends AbstractAction
'size'
=>
array
(
array
(
'href'
=>
''
,
'name'
=>
'S'
'name'
=>
'S'
,
'checked'
=>
true
),
array
(
'href'
=>
''
,
...
...
@@ -223,7 +231,8 @@ class Index1Controller extends AbstractAction
array
(
'id'
=>
'1'
,
'href'
=>
''
,
'name'
=>
'街头'
'name'
=>
'街头'
,
'checked'
=>
true
),
array
(
'id'
=>
'2'
,
...
...
@@ -239,7 +248,8 @@ class Index1Controller extends AbstractAction
array
(
'id'
=>
'1'
,
'href'
=>
''
,
'name'
=>
'春天'
'name'
=>
'春天'
,
'checked'
=>
true
),
array
(
'id'
=>
'2'
,
...
...
@@ -1544,4 +1554,4 @@ class Index1Controller extends AbstractAction
$this
->
echoJson
(
$data
);
}
}
\ No newline at end of file
}
...
...
Please
register
or
login
to post a comment