Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-shop-fe2
·
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
ZhongW
8 years ago
Commit
4213755804fec61c11244c9502d60d785e0cd6cc
2 parents
f0c276b1
c5425058
Merge branch 'hotfix-网销保存文本报错'
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
40 deletions
code/static/js.jquery/module/goods/partials/basic-info.js
code/static/js.jquery/module/goods/partials/basic-info.js
View file @
4213755
...
...
@@ -115,42 +115,32 @@ $(document).ready(function(){
});
function
initInfo
(
basicInfo
)
{
$
(
"#ageLevel"
).
val
(
basicInfo
.
ageLevel
);
$
(
"#seasons"
).
val
(
basicInfo
.
seasons
);
$
(
"#gender"
).
val
(
basicInfo
.
gender
);
$
(
"#grade"
).
val
(
basicInfo
.
grade
);
$
(
"#grade"
).
val
(
basicInfo
.
grade
||
'0'
);
$
(
"#isLimited"
).
val
(
basicInfo
.
isLimited
);
$
(
"#isOutlets"
).
val
(
basicInfo
.
isOutLets
);
var
ageLevel
=
basicInfo
.
ageLevel
;
$
(
":checkbox[name=ageLevel]"
).
each
(
function
(){
if
(
ageLevel
.
indexOf
(
$
(
this
).
val
())
>-
1
){
$
(
this
).
prop
(
"checked"
,
true
)
}
});
$
(
":checkbox[name=seasons]"
).
each
(
function
(){
if
(
basicInfo
.
seasons
.
indexOf
(
$
(
this
).
val
())
>-
1
){
$
(
this
).
prop
(
"checked"
,
true
)
}
});
$
(
":radio[name=gender]"
).
each
(
function
(){
if
(
basicInfo
.
gender
.
indexOf
(
$
(
this
).
val
())
>-
1
){
if
(
basicInfo
.
seasons
!=
null
&&
basicInfo
.
seasons
!=
undefined
&&
basicInfo
.
seasons
!=
''
&&
basicInfo
.
seasons
.
indexOf
(
$
(
this
).
val
())
>-
1
){
$
(
this
).
prop
(
"checked"
,
true
)
}
});
$
(
":radio[name=grade]"
).
each
(
function
(){
if
(
basicInfo
.
grade
.
indexOf
(
$
(
this
).
val
())
>-
1
){
if
(
basicInfo
.
grade
!=
null
&&
basicInfo
.
grade
!=
undefined
&&
basicInfo
.
grade
!=
''
&&
basicInfo
.
grade
.
indexOf
(
$
(
this
).
val
())
>-
1
){
$
(
this
).
prop
(
"checked"
,
true
)
}
});
$
(
":radio[name=isLimited]"
).
each
(
function
(){
if
(
basicInfo
.
isLimited
.
indexOf
(
$
(
this
).
val
())
>-
1
){
if
(
basicInfo
.
isLimited
!=
null
&&
basicInfo
.
isLimited
!=
undefined
&&
basicInfo
.
isLimited
!=
''
&&
basicInfo
.
isLimited
.
indexOf
(
$
(
this
).
val
())
>-
1
){
$
(
this
).
prop
(
"checked"
,
true
)
}
});
$
(
":radio[name=isOutLets]"
).
each
(
function
(){
if
(
basicInfo
.
isOutLets
.
indexOf
(
$
(
this
).
val
())
>-
1
){
if
(
basicInfo
.
isOutLets
!=
null
&&
basicInfo
.
isOutLets
!=
undefined
&&
basicInfo
.
isOutLets
!=
''
&&
basicInfo
.
isOutLets
.
indexOf
(
$
(
this
).
val
())
>-
1
){
$
(
this
).
prop
(
"checked"
,
true
)
}
});
...
...
@@ -218,22 +208,6 @@ common.util.__ajax({
},
true
);
$
(
'#product-ext'
).
html
(
common
.
util
.
__template2
(
$
(
'#productExtBoTemp'
).
html
(),
productExtBo
));
$
(
document
).
on
(
"change"
,
":checkbox[name=ageLevel]"
,
function
()
{
var
value
=
$
(
this
).
val
();
var
c
=
$
(
":checkbox[name=ageLevel]"
);
if
(
$
(
this
).
is
(
":checked"
))
{
if
(
value
==
1
)
{
c
.
slice
(
1
,
5
).
prop
(
"checked"
,
false
);
}
else
{
c
.
eq
(
0
).
prop
(
"checked"
,
false
);
}
}
var
arr
=
[];
$
(
":checked[name=ageLevel]"
).
each
(
function
()
{
arr
.
push
(
$
(
this
).
val
())
});
$
(
"#ageLevel"
).
val
(
arr
.
join
(
'|'
));
});
$
(
document
).
on
(
"change"
,
":checkbox[name=seasons]"
,
function
(){
var
value
=
$
(
this
).
val
();
...
...
@@ -252,9 +226,6 @@ $(document).on("change",":checkbox[name=seasons]",function(){
$
(
"#seasons"
).
val
(
arr
.
join
(
','
));
});
$
(
document
).
on
(
"change"
,
":radio[name=gender]"
,
function
(){
$
(
"#gender"
).
val
(
$
(
this
).
val
());
});
$
(
document
).
on
(
"change"
,
":radio[name=isOutLets]"
,
function
(){
$
(
"#isOutlets"
).
val
(
$
(
this
).
val
());
});
...
...
@@ -299,8 +270,6 @@ GOLABDATA.on("LYbasicInfo", function () {
data
.
productSkn
=
$
(
'#productSkn'
).
val
();
data
.
sellChannels
=
data
.
sellChannels
.
split
(
'|'
).
join
(
','
);
data
.
shopIds
=
data
.
shopIds
?
data
.
shopIds
.
split
(
'|'
).
join
(
','
)
:
''
;
data
.
ageLevel
=
common
.
util
.
__input
(
'ageLevel'
);
data
.
gender
=
common
.
util
.
__input
(
'gender'
);
data
.
grade
=
common
.
util
.
__input
(
'grade'
)
||
'0'
;
data
.
isLimited
=
common
.
util
.
__input
(
'isLimited'
)
||
'N'
;
data
.
isOutlets
=
$
(
'#isOutlets'
).
val
()
||
'N'
;
...
...
Please
register
or
login
to post a comment