Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-portal-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
Email Patches
Plain Diff
Browse Files
Authored by
liyalin
8 years ago
Commit
9df8d1c508590fdad100a761971e83780d69901e
1 parent
2c4c28a3
店铺装修基础模板
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
6 deletions
code/apps/shop/views/modular/templates/app-template.html
code/apps/shop/views/modular/templates/pc-template.html
code/static/assets/images/decorator/pc-product-list.png
code/static/js.jquery/module/shop/modular/Decorator.js
code/apps/shop/views/modular/templates/app-template.html
View file @
9df8d1c
...
...
@@ -30,6 +30,11 @@
<
img
src
=
"/static/assets/images/decorator/app-product-list.png"
alt
=
"#"
>
<
/div
>
[[
/if]
]
[[
if
item
.
moduleType
==
'ProductListImg'
]]
<
div
class
=
"app-product-list"
non
-
delete
=
"true"
non
-
added
=
"true"
data
-
type
=
"ProductListImg"
data
-
title
=
"编辑商品列表模块"
data
-
index
=
"[[index]]"
>
<
img
src
=
"/static/assets/images/decorator/app-product-list.png"
alt
=
"#"
>
<
/div
>
[[
/if]
]
[[
/each]
]
<
div
id
=
"app-dragable"
>
<!--
可拖拽的模块区域
-->
...
...
@@ -185,10 +190,14 @@
[[
/each]
]
<
/div
>
<!--
增加模块区域
-->
<!--
增加模块区域
过滤基础模板
-->
[[
each
data
as
item
index
]]
[[
if
item
.
templateId
!=
3
&&
index
==
0
]]
<
div
class
=
"btn add-modular-area"
title
=
"添加模块"
style
=
"[[data.length > 1 ? 'margin-top: -5px;': '']]"
>
<
span
class
=
"glyphicon glyphicon-plus"
style
=
"top: -4px;"
><
/span
>
<
/div
>
[[
/if]
]
[[
/each]
]
<
/div
>
</script>
...
...
code/apps/shop/views/modular/templates/pc-template.html
View file @
9df8d1c
...
...
@@ -147,11 +147,23 @@
[[
/if]
]
<
/div
>
[[
/if]
]
[[
if
item
.
moduleType
==
'ProductListImg'
]]
<
div
class
=
"recommend-product"
non
-
delete
=
"true"
non
-
added
=
"true"
data
-
type
=
"ProductListImg"
data
-
title
=
"编辑推荐商品模块"
data
-
index
=
"[[index]]"
>
[[
if
item
.
moduleData
]]
[[
else
]]
<
img
src
=
"/static/assets/images/decorator/pc-product-list.png"
alt
=
"#"
class
=
"logo"
>
[[
/if]
]
<
/div
>
[[
/if]
]
[[
/each]
]
<
/div
>
[[
each
data
as
item
index
]]
[[
if
item
.
templateId
!=
3
&&
index
==
0
]]
<
div
class
=
"btn add-modular-area"
title
=
"添加模块"
data
-
style
-
area
=
"2"
>
<
span
class
=
"glyphicon glyphicon-plus"
style
=
"top: -4px;"
><
/span
>
<
/div
>
[[
/if]
]
[[
/each]
]
<
/div
>
<
/div
>
</script>
\ No newline at end of file
...
...
code/static/assets/images/decorator/pc-product-list.png
0 → 100644
View file @
9df8d1c
134 KB
code/static/js.jquery/module/shop/modular/Decorator.js
View file @
9df8d1c
...
...
@@ -5,10 +5,18 @@ var $ = require('jquery'),
base
=
require
(
'./partials/Base'
);
// 默认系统模板
var
systemTemplates
=
var
systemTemplates
_1
=
{
shopId
:
0
,
templateName
:
'系统默认'
,
templateName
:
'基础模板'
,
templateId
:
3
,
createTime
:
'2016-12-14 14:42:00'
};
var
systemTemplates_2
=
{
shopId
:
0
,
templateName
:
'经典模板'
,
templateId
:
1
,
createTime
:
'2016-12-14 14:42:00'
...
...
@@ -16,7 +24,24 @@ var systemTemplates =
var
shopTemplates
=
[];
var
defaultModuleData
=
[
var
defaultModuleData_1
=
[
{
dataValid
:
false
,
// 系统模板,默认只包含模块信息,并不包含模块内容;新增的模块,也不包含模块内容。默认数据是非法的
moduleType
:
"ShopBanner"
,
templateId
:
3
},
{
dataValid
:
true
,
moduleType
:
"ProductSort"
,
templateId
:
3
},
{
dataValid
:
true
,
moduleType
:
"ProductListImg"
,
templateId
:
3
}
];
var
defaultModuleData_2
=
[
{
dataValid
:
false
,
// 系统模板,默认只包含模块信息,并不包含模块内容;新增的模块,也不包含模块内容。默认数据是非法的
moduleType
:
"ShopBanner"
,
...
...
@@ -31,6 +56,7 @@ var defaultModuleData = [
}
];
var
t
=
new
common
.
tab
({
el
:
"#platformTab"
,
click
:
function
()
{
...
...
@@ -155,7 +181,8 @@ var Bll = {
template
.
createTime
=
common
.
util
.
__dateFormat
(
new
Date
(
template
.
createTime
*
1000
),
'yyyy-MM-dd hh:mm:ss'
);
}
});
shopTemplates
.
unshift
(
systemTemplates
);
shopTemplates
.
unshift
(
systemTemplates_2
);
shopTemplates
.
unshift
(
systemTemplates_1
);
}
},
true
)
},
...
...
@@ -167,7 +194,11 @@ var Bll = {
var
index
=
$
(
curTemplate
).
data
(
'index'
);
// index = 0:系统模板,默认数据即可,不查询
if
(
index
==
0
)
{
Bll
.
moduleDataList
=
defaultModuleData
;
Bll
.
moduleDataList
=
defaultModuleData_1
;
return
;
}
if
(
index
==
1
)
{
Bll
.
moduleDataList
=
defaultModuleData_2
;
return
;
}
...
...
Please
register
or
login
to post a comment