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
Plain Diff
Browse Files
Authored by
毕凯
9 years ago
Commit
9d55e1d7ed6e6ac2ac9e6ee1405f389d84951d35
2 parents
adf13136
7147e496
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
16 deletions
docs/data-structure.md
static/js/cart/chose-panel.js
template/m.yohobuy.com/partials/cart/chose-panel.phtml
web-static/js/common/new-arrivls.js
web-static/js/home/home.js
docs/data-structure.md
View file @
9d55e1d
...
...
@@ -838,6 +838,14 @@
},
...
],
defaultSizes: [
{
numZero: true,
name: 'X',
numStr: '0/10'
},
...
]
totalNum: 20
}
...
...
static/js/cart/chose-panel.js
View file @
9d55e1d
...
...
@@ -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 @
9d55e1d
...
...
@@ -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"
>
...
...
web-static/js/common/new-arrivls.js
View file @
9d55e1d
...
...
@@ -95,14 +95,14 @@ module.exports = function(data) {
var
load
=
new
InfiniteLoad
({
offset
:
{
height
:
function
()
{
return
parseFloat
(
$container
.
offset
().
top
)
+
parseFloat
(
$container
.
height
())
-
200
;
return
parseFloat
(
$container
.
offset
().
top
)
+
parseFloat
(
$container
.
height
())
-
200
;
}
}
});
var
options
;
var
url
=
data
.
url
;
var
firstCount
=
data
.
firstCount
;
var
pageCount
=
data
.
pageCount
;
var
pageCount
=
data
.
pageCount
;
delete
data
.
url
;
delete
data
.
firstCount
;
...
...
@@ -116,7 +116,7 @@ module.exports = function(data) {
pageIndex
:
p
.
index
});
data
.
pageCount
=
(
data
.
pageIndex
==
1
)
?
firstCount
:
pageCount
;
data
.
pageCount
=
(
data
.
pageIndex
==
=
1
)
?
firstCount
:
pageCount
;
options
=
{
type
:
'POST'
,
...
...
web-static/js/home/home.js
View file @
9d55e1d
...
...
@@ -27,6 +27,11 @@ if ($.inArray(homePage, ['boys','girls','kids','lifestyle']) > -1) {
firstCount
:
homePage
===
(
'boys'
||
'lifestyle'
)
?
'25'
:
'20'
,
pageCount
:
homePage
===
(
'boys'
||
'lifestyle'
)
?
'15'
:
'12'
});
window
.
setCookie
(
'_Channel'
,
homePage
,
{
domain
:
'.yohobuy.com'
,
path
:
'/'
,
expires
:
365
});
}
...
...
@@ -55,3 +60,4 @@ if (homePage === 'boys') {
$
(
'.img-slider-wrapper'
).
slider2
();
}
...
...
Please
register
or
login
to post a comment