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
xuqi
9 years ago
Commit
aedfa26ac17f1cd4d0d31d6839a6032974096fe2
1 parent
71b540c1
cart chose panel default.Review by:@hf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
13 deletions
docs/data-structure.md
static/js/cart/chose-panel.js
template/m.yohobuy.com/partials/cart/chose-panel.phtml
docs/data-structure.md
View file @
aedfa26
...
...
@@ -838,6 +838,14 @@
},
...
],
defaultSizes: [
{
numZero: true,
name: 'X',
numStr: '0/10'
},
...
]
totalNum: 20
}
...
...
static/js/cart/chose-panel.js
View file @
aedfa26
...
...
@@ -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 @
aedfa26
...
...
@@ -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"
>
...
...
Please
register
or
login
to post a comment