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
leo
9 years ago
Commit
6b0b0a3fee3436fc9e8a1fae048244799c6bd97d
1 parent
36ce3416
Update: 店铺装修优化,需求编号: 10864
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
8 deletions
code/apps/shop/views/Decoration.html
code/static/js.jquery/module/shop/Decoration.js
code/apps/shop/views/Decoration.html
View file @
6b0b0a3
...
...
@@ -118,7 +118,7 @@
<
div
class
=
"sortList"
><
/div
>
<!--
品牌集合
-->
<
div
class
=
"model-recommend model-brand model-editor"
style
=
"display: none"
data
-
toggle
=
"editor-brand"
data
-
title
=
"品牌集合编辑"
>
<
div
class
=
"recommendTitle"
>
品牌集合
<
/div
>
<
div
class
=
"recommendTitle"
>
[[
resources
.
brandBrowse
.
title
]]
<
/div
>
<
div
class
=
"recommendDetail brandDetail"
>
<
ul
>
[[
each
resources
.
brandBrowse
.
data
as
item
_index
]]
...
...
code/static/js.jquery/module/shop/Decoration.js
View file @
6b0b0a3
...
...
@@ -56,6 +56,7 @@ var resourcesNew = {
},
"brandBrowse"
:
{
"id"
:
""
,
"title"
:
"品牌集合"
,
"data"
:
[]
},
"recommend"
:
{
...
...
@@ -124,6 +125,7 @@ var resourcesNew = {
"recommend_APP"
:
{
"id"
:
""
,
"isUsed"
:
"N"
,
"isDisplay"
:
"Y"
,
"data"
:
[
{
"position"
:
1
,
"name"
:
"默认商品"
,
"enName"
:
""
,
"src"
:
defaultSrc
,
"url"
:
""
,
linkType
:
'1'
,
categoryId
:
'-1'
,
categoryName
:
''
}
]
...
...
@@ -202,10 +204,11 @@ function showMain(){
//弹窗编辑主流程
function
editorIconEvent
(
title
,
id
){
$
(
'.editorIcon'
).
on
(
'click'
,
function
(){
var
content_option
=
getDialogOption
(
title
);
curDialogId
=
id
;
var
option
=
{
title
:
title
,
content
:
"<div class='editorTitle'></div><div class='editor-dialog' id='"
+
id
+
"'></div><div class='editorTip'></div> "
,
content
:
content_option
+
"<div class='editorTitle'></div><div class='editor-dialog' id='"
+
id
+
"'></div><div class='editorTip'></div> "
,
width
:
'70%'
,
button
:[
{
...
...
@@ -242,6 +245,32 @@ function editorIconEvent(title,id){
})
}
// "热门品类"编辑页面上,增加 显示/隐藏 选择项
function
getDialogOption
(
title
)
{
if
(
title
!=
'热门品类编辑'
)
{
return
""
;
}
var
showInApp
=
"Y"
;
var
data
=
jsonClone
.
resources
.
recommend_APP
;
if
(
data
)
{
showInApp
=
data
.
isDisplay
;
}
var
showRecommendOption
=
""
;
var
hideRecommendOption
=
""
;
if
(
"Y"
===
showInApp
)
{
showRecommendOption
=
"<label for='recommandradioY' class='radio-inline'><input type='radio' id='recommandradioY' name='recommandradio' value='Y' checked>显示</label>"
;
hideRecommendOption
=
"<label for='recommandradioN' class='radio-inline'><input type='radio' id='recommandradioN' name='recommandradio' value='N'>隐藏</label>"
;
}
else
{
showRecommendOption
=
"<label for='recommandradioY' class='radio-inline'><input type='radio' id='recommandradioY' name='recommandradio' value='Y'>显示</label>"
;
hideRecommendOption
=
"<label for='recommandradioN' class='radio-inline'><input type='radio' id='recommandradioN' name='recommandradio' value='N' checked>隐藏</label>"
;
}
return
"<div><label class='radio-inline'><span>显示/隐藏热门品类: </span></label>"
+
showRecommendOption
+
hideRecommendOption
;
}
/********************接口Ajax*********************/
//Ajax查询
...
...
@@ -601,6 +630,9 @@ function gridInit(id){
}},
]
});
// 品牌一览标题可编辑
$
(
'.editorTitle'
).
html
(
"<div class='form-inline' style='margin-bottom: 10px'><label>标题名称编辑:</label><input class='form-control' type=text name='title' value='"
+
jsonMain
.
resources
.
brandBrowse
.
title
+
"' /></div> "
);
g
.
__rows
=
""
||
jsonClone
.
resources
.
brandBrowse
.
data
;
g
.
init
(
g
.
__rows
);
break
;
...
...
@@ -1010,6 +1042,8 @@ function freshJson(id,data,status){
case
"editor-brand"
:
if
(
status
==
1
){
var
title
=
$
(
".editorTitle input[name='title']"
).
val
();
jsonMain
.
resources
.
brandBrowse
.
title
=
jsonClone
.
resources
.
brandBrowse
.
title
=
title
;
cloneArr
(
sortJson
(
data
,
1
),
jsonMain
.
resources
.
brandBrowse
.
data
);
}
else
if
(
status
==
0
){
cloneArr
(
jsonMain
.
resources
.
brandBrowse
.
data
,
data
);
...
...
@@ -1246,12 +1280,13 @@ function editorCheck(id){
break
;
case
"editor-recommend"
:
var
title
=
$
(
".editorTitle input[name='title']"
);
if
(
title
.
length
>
0
&&
title
.
val
().
trim
()
==
""
){
title
.
focus
().
addClass
(
"error"
);
common
.
util
.
__tip
(
"模块标题不能为空!"
);
return
false
;
}
// 品牌一览标题可为空,如果为空,前后台不展示标题
// var title = $(".editorTitle input[name='title']");
// if(title.length > 0 && title.val().trim() == ""){
// title.focus().addClass("error");
// common.util.__tip("模块标题不能为空!");
// return false;
// }
if
(
checkNumInput
()
&&
checkCategory
()
&&
checkUrlInput
()){
var
nameList
=
$
(
".grid input[name='name']"
);
for
(
var
i
=
0
;
i
<
nameList
.
length
;
i
++
){
...
...
Please
register
or
login
to post a comment