Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liuloulou
/
yohobuy-portal-fe2
·
Commits
Go to a project
GitLab
Go to dashboard
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
dongjunjie
9 years ago
Commit
c128554cfbe195a0a18a404c4afc0f7e00c3941a
1 parent
916b09d8
店铺装修销售类目
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
14 deletions
code/apps/shop/views/ShopCategory/Index.html
code/static/js.jquery/module/shop/ShopCategory/Edit.js
code/static/js.jquery/module/shop/ShopCategory/Info.js
server/views/shop/ShopCategory/Index.html
code/apps/shop/views/ShopCategory/Index.html
View file @
c128554
...
...
@@ -29,7 +29,7 @@
<
div
class
=
"form-group"
>
<
label
for
=
"categoryName"
class
=
"col-sm-3 control-label"
>
销售类目名称:
<
/label
>
<
div
class
=
"col-sm-5"
>
<
input
type
=
"text"
id
=
"categoryName"
value
=
"[[data]]"
class
=
"form-control"
/>
<
input
type
=
"text"
id
=
"categoryName"
value
=
"[[data]]"
class
=
"form-control"
maxlength
=
"30"
/>
<
/div
>
<
div
class
=
"col-sm-2"
><
label
style
=
"color: #ff0000; line-height: 40px"
>
*
必填
<
/label></
div
>
<
/div
>
...
...
code/static/js.jquery/module/shop/ShopCategory/Edit.js
View file @
c128554
...
...
@@ -19,8 +19,7 @@ var g1 = new common.grid({
},
columns
:
[
{
display
:
"商品图片"
,
render
:
function
(
item
)
{
//return item.productPic ? '<img src="'+item.productPic+'?imageView/0/w/78/h/78">' : '';
return
item
.
productPic
?
'<img src="'
+
item
.
productPic
+
'">'
:
''
;
return
item
.
productPic
?
'<img src="'
+
item
.
productPic
+
'?imageView/0/w/40/h/60">'
:
''
;
}},
{
display
:
"SKN"
,
name
:
"productSKN"
},
{
display
:
"厂家编号"
,
name
:
"factoryCode"
},
...
...
@@ -36,7 +35,8 @@ var g1 = new common.grid({
categoryList
+=
'<li>'
+
item
.
saleCategory
[
i
]
+
'</li>'
}
categoryList
+=
'</ul>'
+
'<a href="javascript:" class="moreCategory" style="display: block;text-align: center;color:#999">显示更多</a>'
;
'<a href="javascript:" class="moreCategory" style="display: block;text-align: center;color:#999" data-num="'
+
(
item
.
saleCategory
.
length
-
1
)
+
'">'
+
'显示更多('
+
(
item
.
saleCategory
.
length
-
1
)
+
')</a>'
;
}
return
categoryList
;
}},
...
...
@@ -66,8 +66,7 @@ var g2 = new common.grid({
},
columns
:
[
{
display
:
"商品图片"
,
render
:
function
(
item
)
{
//return item.productPic ? '<img src="'+item.productPic+'?imageView/0/w/78/h/78">' : '';
return
item
.
productPic
?
'<img src="'
+
item
.
productPic
+
'">'
:
''
;
return
item
.
productPic
?
'<img src="'
+
item
.
productPic
+
'?imageView/0/w/40/h/60">'
:
''
;
}},
{
display
:
"SKN"
,
name
:
"productSKN"
},
{
display
:
"厂家编号"
,
name
:
"factoryCode"
},
...
...
@@ -83,7 +82,8 @@ var g2 = new common.grid({
categoryList
+=
'<li>'
+
item
.
saleCategory
[
i
]
+
'</li>'
}
categoryList
+=
'</ul>'
+
'<a href="javascript:" class="moreCategory" style="display: block;text-align: center;color:#999">显示更多</a>'
;
'<a href="javascript:" class="moreCategory" style="display: block;text-align: center;color:#999" data-num="'
+
(
item
.
saleCategory
.
length
-
1
)
+
'">'
+
'显示更多('
+
(
item
.
saleCategory
.
length
-
1
)
+
')</a>'
;
}
return
categoryList
;
}},
...
...
@@ -194,10 +194,11 @@ $(document).on("click", ".cancelAll", function () {
//查看更多销售类目
$
(
document
).
on
(
"click"
,
".moreCategory"
,
function
()
{
var
num
=
$
(
this
).
data
(
'num'
);
if
(
$
(
this
).
hasClass
(
'open'
)){
$
(
this
).
text
(
'显示更多'
).
removeClass
(
'open'
).
prev
(
'ul'
).
hide
().
prev
(
'span'
).
show
();
$
(
this
).
text
(
'显示更多
('
+
num
+
')
'
).
removeClass
(
'open'
).
prev
(
'ul'
).
hide
().
prev
(
'span'
).
show
();
}
else
{
$
(
this
).
text
(
'收起
更多
'
).
addClass
(
'open'
).
prev
(
'ul'
).
show
().
prev
(
'span'
).
hide
();
$
(
this
).
text
(
'收起'
).
addClass
(
'open'
).
prev
(
'ul'
).
show
().
prev
(
'span'
).
hide
();
}
});
...
...
code/static/js.jquery/module/shop/ShopCategory/Info.js
View file @
c128554
...
...
@@ -15,7 +15,7 @@ var g = new common.grid({
},
columns
:
[
{
display
:
"商品图片"
,
render
:
function
(
item
)
{
return
item
.
productPic
?
'<img src="'
+
item
.
productPic
+
'">'
:
''
;
return
item
.
productPic
?
'<img src="'
+
item
.
productPic
+
'
?imageView/0/w/40/h/60
">'
:
''
;
}},
{
display
:
"SKN"
,
name
:
"productSKN"
},
{
display
:
"厂家编号"
,
name
:
"factoryCode"
},
...
...
@@ -31,7 +31,8 @@ var g = new common.grid({
categoryList
+=
'<li>'
+
item
.
saleCategory
[
i
]
+
'</li>'
}
categoryList
+=
'</ul>'
+
'<a href="javascript:" class="moreCategory" style="display: block;text-align: center;color:#999">显示更多</a>'
;
'<a href="javascript:" class="moreCategory" style="display: block;text-align: center;color:#999" data-num="'
+
(
item
.
saleCategory
.
length
-
1
)
+
'">'
+
'显示更多('
+
(
item
.
saleCategory
.
length
-
1
)
+
')</a>'
;
}
return
categoryList
;
}}
...
...
@@ -59,10 +60,11 @@ Bll.init();
//查看更多销售类目
$
(
document
).
on
(
"click"
,
".moreCategory"
,
function
()
{
var
num
=
$
(
this
).
data
(
'num'
);
if
(
$
(
this
).
hasClass
(
'open'
)){
$
(
this
).
text
(
'显示更多'
).
removeClass
(
'open'
).
prev
(
'ul'
).
hide
().
prev
(
'span'
).
show
();
$
(
this
).
text
(
'显示更多
('
+
num
+
')
'
).
removeClass
(
'open'
).
prev
(
'ul'
).
hide
().
prev
(
'span'
).
show
();
}
else
{
$
(
this
).
text
(
'收起
更多
'
).
addClass
(
'open'
).
prev
(
'ul'
).
show
().
prev
(
'span'
).
hide
();
$
(
this
).
text
(
'收起'
).
addClass
(
'open'
).
prev
(
'ul'
).
show
().
prev
(
'span'
).
hide
();
}
});
...
...
server/views/shop/ShopCategory/Index.html
View file @
c128554
...
...
@@ -29,7 +29,7 @@
<
div
class
=
"form-group"
>
<
label
for
=
"categoryName"
class
=
"col-sm-3 control-label"
>
销售类目名称:
<
/label
>
<
div
class
=
"col-sm-5"
>
<
input
type
=
"text"
id
=
"categoryName"
value
=
"[[data]]"
class
=
"form-control"
/>
<
input
type
=
"text"
id
=
"categoryName"
value
=
"[[data]]"
class
=
"form-control"
maxlength
=
"30"
/>
<
/div
>
<
div
class
=
"col-sm-2"
><
label
style
=
"color: #ff0000; line-height: 40px"
>
*
必填
<
/label></
div
>
<
/div
>
...
...
Please
register
or
login
to post a comment