Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-portal-fe
·
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
姜敏
9 years ago
Commit
2ba79e91472d3815f1931ff97b95660ccf201d4f
2 parents
919fad2a
314645c9
Merge branch 'develop' of
http://git.dev.yoho.cn/platform/yohobuy-portal-fe
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
215 additions
and
106 deletions
client/js/common/util.js
client/js/guang/contentEdit.js
client/sass/module/_edit.scss
server/config/common.js
server/interface/common_select.js
server/interface/guang.js
server/stub/service/yohosearch.js
server/views/pages/guang/contentEdit.html
server/views/partials/resource/weiqingting.html
client/js/common/util.js
View file @
2ba79e9
...
...
@@ -321,9 +321,9 @@ var util = {
var
result
=
{};
if
(
$
.
isArray
(
data
)){
data
.
forEach
(
function
(
item
,
index
){
result
[
index
]
=
item
;
result
[
index
]
=
util
.
__ArrayToObj
(
item
)
;
});
}
else
if
(
typeof
data
==
"string"
){
}
else
if
(
typeof
data
==
"string"
||
typeof
data
==
"number"
||
typeof
data
==
"boolean"
){
result
=
data
;
}
else
{
...
...
@@ -346,7 +346,7 @@ var util = {
result
[
name
]
=
util
.
__ObjToArray
(
data
[
name
]);
}
}
}
else
if
(
typeof
data
==
"string"
){
}
else
if
(
typeof
data
==
"string"
||
typeof
data
==
"number"
||
typeof
data
==
"boolean"
){
result
=
data
;
}
else
{
/*基本不会被运行到,需要优化*/
...
...
client/js/guang/contentEdit.js
View file @
2ba79e9
...
...
@@ -15,7 +15,7 @@ if(param&¶m.length==1){
async
:
false
},
function
(
res
){
ViewModel
=
res
.
data
;
});
}
,
true
);
}
console
.
log
(
"ViewModel"
,
ViewModel
);
...
...
@@ -59,6 +59,15 @@ var Bll = {
});
},
renderBrandPic
:
function
(
Brdata
)
{
var
map2
=
{};
Brdata
.
forEach
(
function
(
item
){
map2
[
item
.
id
]
=
item
;
});
Brdata
=
[];
for
(
var
key
in
map2
){
Brdata
.
push
(
map2
[
key
]);
}
var
Brands2
=
[];
Brdata
.
forEach
(
function
(
item
,
index
)
{
if
(
!
item
.
brandIco
){
...
...
@@ -75,6 +84,7 @@ var Bll = {
$
(
"#addPic"
).
prepend
(
common
.
util
.
__template2
(
$
(
"#template3"
).
html
(),
{
Brands
:
Brands2
}));
return
Brdata
;
},
contentDatas
:
[],
module
:
null
,
...
...
@@ -90,7 +100,6 @@ var Bll = {
//TODO
!!~
index
?
Bll
.
contentDatas
[
index
]
=
module
:
Bll
.
contentDatas
.
push
(
module
);
Bll
.
__render
(
"#add-content"
,
"template_content"
,{
modules
:
Bll
.
contentDatas
});
console
.
log
(
Bll
.
contentDatas
);
d
.
close
();
}
...
...
@@ -114,7 +123,6 @@ var Bll = {
Bll
.
module
.
contentData
.
data
=
common
.
util
.
__buildobj
(
names
,
'.'
,
Bll
.
module
.
contentData
.
data
,
function
(
o
,
name
)
{
o
[
name
]
=
obj
.
data
;
});
console
.
log
(
Bll
.
module
.
contentData
.
data
);
}
});
...
...
@@ -152,6 +160,8 @@ if(ViewModel.articleContent){
Bll
.
contentDatas
.
push
(
item
);
});
}
/*第三部解析楼层*/
Bll
.
__render
(
"#add-content"
,
"template_content"
,{
modules
:
Bll
.
contentDatas
});
...
...
@@ -164,7 +174,7 @@ new common.dropDown({
ajax
:
"guangGetSortList"
,
params
:
function
()
{
return
{
p
i
d
:
0
p
arentI
d
:
0
};
}
});
...
...
@@ -173,7 +183,7 @@ new common.dropDown({
ajax
:
"guangGetSortList"
,
params
:
function
()
{
return
{
p
i
d
:
$
(
"#maxSortId"
).
val
()
p
arentI
d
:
$
(
"#maxSortId"
).
val
()
};
}
});
...
...
@@ -226,14 +236,22 @@ $(document).on("click", "#addBrands", function() {
Brdata
:
Bll
.
Brdata
.
join
(
'|'
)
}),
function
()
{
//todo
Bll
.
Brdata
=
$
(
"#brandCheckBox"
).
val
().
split
(
'|'
);
Bll
.
Brdata
=
Bll
.
Brdata
.
map
(
function
(
item
,
index
)
{
return
{
"brandCategory"
:
"1"
,
// Bll.Brdata = $("#brandCheckBox").val().split('|');
// Bll.Brdata = Bll.Brdata.map(function(item, index) {
// return {
// "brandCategory": "1",
// "id": item
// }
// });
$
(
"#brandCheckBox"
).
val
().
split
(
'|'
).
forEach
(
function
(
item
){
Bll
.
Brdata
.
push
({
"brandCategory"
:
"1"
,
"id"
:
item
}
});
Bll
.
renderBrandPic
(
Bll
.
Brdata
);
});
});
Bll
.
Brdata
=
Bll
.
renderBrandPic
(
Bll
.
Brdata
);
});
e
.
init
();
});
...
...
@@ -322,7 +340,7 @@ $("#content_btns").html(common.util.__template2($("#template_content_btns").html
$
(
document
).
on
(
"click"
,
".add_btn"
,
function
()
{
var
item
=
Button
[
$
(
this
).
data
(
"index"
)];
Bll
.
module
=
{};
Bll
.
module
=
{
templateKey
:
item
.
template_name
};
Bll
.
module
.
contentData
=
$
.
extend
(
true
,
{},
item
);
Bll
.
toast
(
-
1
,
Bll
.
module
);
});
...
...
@@ -337,13 +355,11 @@ $(document).on("change", ".observe", function() {
Bll
.
module
.
contentData
.
data
=
common
.
util
.
__buildobj
(
name
,
'.'
,
Bll
.
module
.
contentData
.
data
,
function
(
obj
,
name
)
{
obj
[
name
]
=
$this
.
val
();
});
console
.
log
(
"module"
,
Bll
.
module
.
contentData
.
data
);
});
$
(
document
).
on
(
"click"
,
".edit"
,
function
()
{
var
index
=
$
(
this
).
data
(
"index"
);
var
item
=
Bll
.
contentDatas
[
index
];
console
.
log
(
Bll
.
contentDatas
);
Bll
.
module
=
$
.
extend
(
true
,
{},
item
);
Bll
.
toast
(
index
,
Bll
.
module
);
});
...
...
@@ -371,7 +387,6 @@ var goodsgird = new common.grid({
},
{
display
:
"产品图片"
,
render
:
function
(
item
)
{
console
.
log
(
item
);
if
(
item
.
images_url
)
{
item
.
images_url
=
common
.
util
.
__joinImg
(
"goodsimg"
,
item
.
images_url
);
}
...
...
@@ -413,7 +428,7 @@ $(document).on("click", "#goodsSelectBtn", function () {
button
:
[{
value
:
"确定"
,
callback
:
function
()
{
Bll
.
module
.
data
=
goodsgird
.
selected
.
map
(
function
(
item
,
index
)
{
Bll
.
module
.
contentData
.
data
=
goodsgird
.
selected
.
map
(
function
(
item
,
index
)
{
return
{
src
:
item
.
images_url
,
id
:
item
.
product_skn
,
...
...
@@ -432,8 +447,9 @@ $(document).on("click", "#goodsSelectBtn", function () {
});
//点击“添加组”按钮(添加商品组)
$
(
document
).
on
(
"click"
,
"#goodsaddBtn"
,
function
()
{
Bll
.
module
.
data
.
push
(
Button
[
4
].
data
[
0
]);
console
.
log
(
Bll
.
module
.
data
);
if
(
Bll
.
module
.
contentData
.
data
[
0
].
list
.
length
){
Bll
.
module
.
contentData
.
data
.
push
(
Button
[
4
].
data
[
0
]);
}
Bll
.
__render
(
"#groupsgoods"
,
"template_dialog_remgoodsgroup"
,
Bll
.
module
);
});
//点击“选择标签”按钮(添加商品组)
...
...
@@ -447,14 +463,14 @@ $(document).on("click", ".goodsSelectBtn", function () {
value
:
"确定"
,
callback
:
function
()
{
goodsgird
.
selected
.
forEach
(
function
(
item
,
i
)
{
Bll
.
module
.
data
[
index
].
list
[
i
]
=
{
Bll
.
module
.
contentData
.
data
[
index
].
list
[
i
]
=
{
src
:
item
.
images_url
,
id
:
item
.
product_skn
,
product_skc
:
item
.
product_skc
,
maxSortId
:
item
.
max_sort_id
};
if
(
!
i
)
{
Bll
.
module
.
data
[
index
].
cover
=
{
Bll
.
module
.
contentData
.
data
[
index
].
cover
=
{
cover
:
item
.
images_url
,
maxSortId
:
item
.
max_sort_id
};
...
...
@@ -469,9 +485,9 @@ $(document).on("click", ".goodsSelectBtn", function () {
});
//删除图片按钮
$
(
document
).
on
(
"click"
,
".removepic"
,
function
()
{
Bll
.
module
.
data
.
splice
(
$
(
this
).
data
(
"index"
),
1
);
Bll
.
module
.
contentData
.
data
.
splice
(
$
(
this
).
data
(
"index"
),
1
);
$
(
"#goodspic"
).
html
(
common
.
util
.
__template2
(
$
(
"#template_dialog_goodsimgs"
).
html
(),
{
datas
:
Bll
.
module
.
data
datas
:
Bll
.
module
.
contentData
.
data
}));
});
...
...
@@ -481,7 +497,11 @@ var e = new common.edit("#panel-body", {
bucket
:
"article"
});
e
.
init
();
e
.
on
(
"validate"
,
function
(){
if
(
Bll
.
contentDatas
.
length
==
0
&&
$
(
"#url"
).
val
()
==
""
){
return
"内容和链接不可为空"
;
}
})
$
(
document
).
on
(
"click"
,
"#submit"
,
function
()
{
e
.
submit
(
$
(
"#panel-body"
).
attr
(
"action"
),
function
(
option
)
{
if
(
param
&&
param
.
length
==
1
){
...
...
@@ -491,31 +511,23 @@ $(document).on("click", "#submit", function() {
option
.
data
.
contentData
=
[];
Bll
.
contentDatas
.
forEach
(
function
(
item
,
index
)
{
var
data
=
common
.
util
.
__ArrayToObj
({
data
:
item
.
data
,
template_name
:
item
.
template_name
,
template_intro
:
item
.
template_intro
});
option
.
data
.
contentData
.
push
({
"templateKey"
:
item
.
template_name
,
"contentData"
:
data
});
item
.
contentData
=
common
.
util
.
__ArrayToObj
(
item
.
contentData
);
option
.
data
.
contentData
.
push
(
item
);
});
console
.
log
(
"Bll.contentDatas"
,
Bll
.
Brd
ata
);
console
.
log
(
"Bll.contentDatas"
,
option
.
data
.
contentD
ata
);
option
.
data
.
contentData
=
JSON
.
stringify
(
option
.
data
.
contentData
);
option
.
data
.
brands
=
JSON
.
stringify
(
Bll
.
Brdata
);
option
.
data
.
tag
=
Bll
.
Tags
.
join
(
','
);
console
.
log
(
"submit"
,
option
.
data
);
option
.
success
=
function
(
res
){
res
=
res
.
data
;
if
(
res
.
code
==
"200"
)
{
e
.
$tip
(
"提交成功"
,
function
()
{
//location.href="/supplier/baseproduct
/index"
location
.
href
=
"/guang/article
/index"
},
'growl-success'
);
}
else
{
e
.
$tip
(
res
.
message
);
...
...
@@ -526,6 +538,87 @@ $(document).on("click", "#submit", function() {
}
});
});
/*交互部分*/
/*选择分类 自动切换 图片类型*/
var
TypeAToT
=
{
"潮品"
:
"1"
,
"搭配"
:
"2"
,
"话题"
:
"1"
,
"潮人"
:
"2"
,
"小贴士"
:
"1"
};
$
(
document
).
on
(
"change"
,
"#maxSortId"
,
function
(){
var
id
=
$
(
this
).
val
();
var
name
=
$
(
this
).
find
(
"option[value='"
+
id
+
"']"
).
text
();
$
(
":radio[name=coverImageType]"
).
each
(
function
(){
if
(
$
(
this
).
val
()
==
TypeAToT
[
name
]){
$
(
":radio[name=coverImageType]"
).
prop
(
"checked"
,
false
);
$
(
this
).
prop
(
"checked"
,
true
);
$
(
"#articleGender"
).
val
(
$
(
this
).
val
());
}
});
});
$
(
document
).
on
(
"click"
,
"#brandAutoBtn"
,
function
(){
var
product_skc
=
[];
Bll
.
contentDatas
.
forEach
(
function
(
item
,
index
){
if
(
item
.
templateKey
==
"goodsGroup"
){
item
.
contentData
.
data
.
forEach
(
function
(
datas
,
i
){
datas
.
list
.
forEach
(
function
(
data
,
j
){
product_skc
.
push
(
data
.
id
);
});
});
}
if
(
item
.
templateKey
==
"goods"
){
item
.
contentData
.
data
.
forEach
(
function
(
datas
,
i
){
product_skc
.
push
(
datas
.
id
);
});
}
});
//product_skc=["51022754","51178582","50030519","51128961","51146105","51055462","51143090","51153133","51010047","51153223","51152761","51149414","51082157","51149561","51079256"];
if
(
product_skc
.
length
>
0
){
common
.
util
.
__ajax
({
url
:
'/yohosearch/search'
,
data
:{
status
:
1
,
query
:
product_skc
.
join
(
','
)
}
},
function
(
res
){
if
(
res
.
code
==
200
){
var
map
=
{};
console
.
log
(
res
.
data
.
list
);
res
.
data
.
list
.
forEach
(
function
(
item
,
index
){
map
[
item
.
product_skn
]
=
{
id
:
item
.
brand_id
,
brandIco
:
item
.
brand_ico
,
brandName
:
item
.
brand_name
,
brandCategory
:
1
};
});
console
.
log
(
map
);
var
b
=
[];
product_skc
.
forEach
(
function
(
item
,
index
){
if
(
map
[
item
]){
b
.
push
(
map
[
item
]);
}
});
//console.log(b);
Bll
.
Brdata
=
(
ViewModel
.
brandList
||
[]).
concat
(
b
);
// var map2={};
// Bll.Brdata.forEach(function(item){
// map2[item.id]=item;
// });
// Bll.Brdata=[];
// for(var key in map2){
// Bll.Brdata.push(map2[key]);
// }
Bll
.
Brdata
=
Bll
.
renderBrandPic
(
Bll
.
Brdata
);
}
},
true
);
}
});
...
...
client/sass/module/_edit.scss
View file @
2ba79e9
...
...
@@ -290,8 +290,8 @@ span.tag{
text-decoration
:
none
;
font-size
:
11px
;
}
#source-m
.small-pic
.small-pic-list2
img
{
width
:
25%
;
float
:
left
;
border
:
1px
solid
#fff
;
.custom-group
img
{
width
:
100%
;
height
:
100%
;
display
:
block
;
}
\ No newline at end of file
...
...
server/config/common.js
View file @
2ba79e9
...
...
@@ -19,13 +19,13 @@ var config = {
// domain: 'http://172.16.6.214:8088/platform',//陈超
//http://172.16.6.124:8088/platform/product/queryAllProductAttr
//domain: 'http://172.16.6.146:8088/platform', //玛丽
//domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超
domain
:
'http://192.168.102.202:8088/platform'
,
domain
:
'http://172.16.6.157:8080/yohobuy-platform-web'
,
//葛超
// domain: 'http://192.168.102.202:8088/platform',
//domain: 'http://172.16.6.239:8080', //孙杰翔
//domain:'http://172.16.6.189:8088/platform', //李健1
//domain:'http://192.168.102.216:8180/platform', //李健2
//domain: 'http://172.16.6.243:8088/platform', //谭玲
yohoSearch
:
'http://
192.168.102.208:8087
/yohosearch'
,
yohoSearch
:
'http://
x.yohobuy.com
/yohosearch'
,
loggers
:
{
api
:
{
level
:
'verbose'
...
...
server/interface/common_select.js
View file @
2ba79e9
...
...
@@ -145,7 +145,7 @@ exports.res = [
method
:
'POST'
,
url
:
'/guang/article/getSortList'
,
params
:[
{
name
:
"p
i
d"
,
type
:
"Number"
}
{
name
:
"p
arentI
d"
,
type
:
"Number"
}
]
}
...
...
server/interface/guang.js
View file @
2ba79e9
...
...
@@ -563,7 +563,8 @@ exports.res = [
view
:
'pages/guang/contentEdit'
,
src
:
'/guang/contentEdit'
,
data
:{
action
:
"/ajax/guang/article/addArticle"
action
:
"/ajax/guang/article/addArticle"
,
pageTitle
:
"添加文章"
}
},
{
...
...
@@ -615,7 +616,8 @@ exports.res = [
view
:
'pages/guang/contentEdit'
,
src
:
'/guang/contentEdit'
,
data
:{
action
:
"/ajax/guang/article/updateArticle"
action
:
"/ajax/guang/article/updateArticle"
,
pageTitle
:
"修改文章"
},
params
:[
{
name
:
"id"
,
type
:
"Number"
}
...
...
server/stub/service/yohosearch.js
View file @
2ba79e9
...
...
@@ -10,11 +10,15 @@ exports.brandlist = function (req, res) {
exports
.
search
=
function
(
req
,
res
)
{
var
size
=
10
;
//每页数据量
var
page
=
1
;
var
price
=
req
.
body
.
price
;
if
(
req
.
body
.
page
)
{
page
=
req
.
body
.
page
;
// var price=req.body.price;
// if (req.body.page) {
// page = req.body.page;
// }
var
params
=
[];
for
(
var
key
in
req
.
body
)
{
params
.
push
(
key
+
"="
+
req
.
body
[
key
]);
}
var
url
=
searchDomain
+
"/search.json?viewNum="
+
size
+
"&
query="
+
req
.
body
.
query
+
"&page="
+
page
+
"&price="
+
price
;
var
url
=
searchDomain
+
"/search.json?viewNum="
+
size
+
"&
"
+
params
.
join
(
'&'
)
;
console
.
log
(
"请求url"
,
url
);
request
({
url
:
url
},
function
(
error
,
response
,
body
)
{
var
data
=
{};
...
...
@@ -37,7 +41,7 @@ exports.search = function (req, res) {
data
.
totalPage
=
body
.
data
.
page_total
;
data
.
nums
=
data
.
list
.
length
;
//记录每一页数据量
//console.log("最终data", data);
res
.
json
({
data
:
{
data
:
data
}});
res
.
json
({
data
:
{
data
:
data
,
code
:
200
}});
});
};
...
...
server/views/pages/guang/contentEdit.html
View file @
2ba79e9
...
...
@@ -7,11 +7,11 @@
<ul
class=
"breadcrumb"
>
<li><a
href=
""
><i
class=
"glyphicon glyphicon-home"
></i></a></li>
<li><a
href=
"/guang/article/index"
>
文章管理
</a></li>
<li>
添加文章
</li>
<li>
{{pageTitle}}
</li>
</ul>
<div>
<h4>
添加文章
</h4>
<h4>
{{pageTitle}}
</h4>
</div>
</div>
</div>
<!-- media -->
...
...
@@ -132,7 +132,7 @@
<
label
class
=
"col-sm-2 control-label"
>
链接:
<
/label
>
<
div
class
=
"col-sm-7"
>
<
input
type
=
"text"
name
=
"url"
id
=
"url"
value
=
'[[url]]'
class
=
"form-control"
placeholder
=
"请输入内容链接"
readonly
=
"true"
required
>
<
input
type
=
"text"
name
=
"url"
id
=
"url"
value
=
'[[url]]'
class
=
"form-control"
placeholder
=
"请输入内容链接"
readonly
=
"true"
>
<
p
style
=
"color:#999"
>
注:链接中不能有英文单引号
<
/p
>
<
/div
>
<
div
class
=
"col-sm-1"
>
...
...
@@ -172,6 +172,15 @@
<
/li
>
<
/ul
>
<
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
div
class
=
"col-sm-2"
>
<
/div
>
<
div
class
=
"col-sm-8"
>
<
button
class
=
"btn btn-info"
type
=
"button"
id
=
"brandAutoBtn"
>
自动获取品牌
<
/button
>
<
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-2 control-label"
>
选择标签:
<
/label
>
...
...
@@ -263,48 +272,44 @@
<script
type=
"text/template"
id=
"template_content"
>
<!--
文本内容
-->
[[
each
modules
as
module
index
]]
<
li
class
=
"custom-group"
data
-
index
=
"[[index]]"
>
<
li
class
=
"
form-group
custom-group"
data
-
index
=
"[[index]]"
>
[[
if
module
.
contentData
.
template_name
==
'text'
]]
<
div
class
=
"co
n"
>
[[
module
.
contentData
.
data
.
text
]]
<
/div
>
<
div
class
=
"co
l-sm-12"
><
h3
>
[[
module
.
contentData
.
data
.
text
]]
<
/h3>
</
div
>
[[
else
if
module
.
contentData
.
template_name
==
'singleImage'
]]
<
div
class
=
"
list
"
>
<
div
class
=
"
col-sm-12
"
>
<
img
src
=
"[[module.contentData.data[0].src]]"
title
=
"[[module.contentData.data[0].title]]"
>
<
/div
>
[[
else
if
module
.
contentData
.
template_name
==
'smallPic'
]]
<
div
class
=
"small-pic"
>
<
ul
class
=
"small-pic-list"
>
[[
each
module
.
contentData
.
data
as
item
i
]]
<
img
src
=
"[[item.src]]"
title
=
"[[item.title]]"
>
<
div
class
=
"col-sm-6"
>
<
img
src
=
"[[item.src]]"
title
=
"[[item.title]]"
>
<
/div
>
[[
/each]
]
<
/ul
>
<
/div
>
[[
else
if
module
.
contentData
.
template_name
==
'goods'
]]
<
div
class
=
"small-pic"
>
<
ul
class
=
"small-pic-list"
>
[[
each
module
.
contentData
.
data
as
item
i
]]
<
img
src
=
"[[item.src]]"
title
=
"[[item.id]]"
>
<
div
class
=
"col-sm-6"
>
<
img
src
=
"[[item.src]]"
title
=
"[[item.title]]"
>
<
/div
>
[[
/each]
]
<
/ul
>
<
/div
>
[[
else
if
module
.
template_name
==
'link'
]]
<
div
class
=
"list"
>
<
h3
>
添加链接
<
/h3
>
<
/div
>
[[
else
if
module
.
template_name
==
'goodsGroup'
]]
<
div
class
=
"small-pic"
>
<
div
class
=
"small-pic-list2"
>
[[
each
module
.
data
as
items
i
]]
[[
else
if
module
.
contentData
.
template_name
==
'link'
]]
<
div
class
=
"col-sm-12"
>
<
h3
>
添加链接
<
/h3
>
<
/div
>
[[
else
if
module
.
contentData
.
template_name
==
'goodsGroup'
]]
<
div
class
=
"form-group"
>
[[
each
module
.
contentData
.
data
as
items
i
]]
<
div
class
=
"col-sm-3"
>
<
img
src
=
"[[items.cover.cover]]"
>
<
/div
>
[[
/each]
]
<
/div
>
<
div
class
=
"small-pic-list"
>
[[
each
module
.
data
[
0
].
list
as
item
index
]]
<
img
src
=
"[[item.src]]"
title
=
"[[item.id]]"
>
[[
/each]
]
[[
each
module
.
contentData
.
data
[
0
].
list
as
item
index
]]
<
div
class
=
"col-sm-6"
>
<
img
src
=
"[[item.src]]"
title
=
"[[item.id]]"
>
<
/div
>
[[
/each]
]
<
/ul
>
<
/div
>
[[
/if]
]
...
...
@@ -420,7 +425,7 @@
<!-- 推荐商品 -->
<script
type=
"text/tempalte"
id=
"template_dialog_remgoods"
>
<
div
class
=
"rows"
id
=
"groupsgoods"
>
[[
each
data
as
items
i
]]
[[
each
contentData
.
data
as
items
i
]]
<
div
class
=
"form-group"
>
<
div
class
=
"col-sm-10"
>
<
ul
class
=
"cover-image-list col-sm-10"
id
=
"goodspic-0"
>
...
...
@@ -453,7 +458,7 @@
</script>
<script
type=
"text/template"
id=
"template_dialog_remgoodsgroup"
>
[[
each
data
as
items
i
]]
[[
each
contentData
.
data
as
items
i
]]
<
div
class
=
"form-group"
>
<
div
class
=
"col-sm-10"
>
<
ul
class
=
"cover-image-list col-sm-10"
id
=
"goodspic-0"
>
...
...
@@ -481,7 +486,7 @@
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-2 control-label"
>
选择跳转目的地:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
select
class
=
"form-control observe"
data
-
field
=
"0.url.action"
value
=
'[[data[0].url.action]]'
>
<
select
class
=
"form-control observe"
data
-
field
=
"0.url.action"
value
=
'[[
contentData.
data[0].url.action]]'
>
[[
layout
template_default_1
]]
<
/select
>
...
...
@@ -491,7 +496,7 @@
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-2 control-label"
>
跳转地址:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
textarea
rows
=
"2"
class
=
"form-control observe"
placeholder
=
"跳转地址"
data
-
field
=
"0.url.url"
>
[[
data
[
0
].
url
.
url
]]
<
/textarea
>
<
textarea
rows
=
"2"
class
=
"form-control observe"
placeholder
=
"跳转地址"
data
-
field
=
"0.url.url"
>
[[
contentData
.
data
[
0
].
url
.
url
]]
<
/textarea
>
<
/div
>
<
/div
>
...
...
server/views/partials/resource/weiqingting.html
View file @
2ba79e9
<script
type=
"text/template"
id=
"template_content"
>
<!--
文本内容
-->
[[
each
modules
as
module
index
]]
<
li
class
=
"custom-group
text
"
data
-
index
=
"[[index]]"
>
<
li
class
=
"custom-group"
data
-
index
=
"[[index]]"
>
[[
if
module
.
contentData
.
template_name
==
'text'
]]
<
div
class
=
"con"
>
[[
module
.
contentData
.
data
.
text
]]
<
/div
>
[[
else
if
module
.
contentData
.
template_name
==
'singleImage'
]]
<
div
class
=
"list"
>
<
img
src
=
"[[module.
data[0].src]]"
title
=
"[[module
.data[0].title]]"
>
<
img
src
=
"[[module.
contentData.data[0].src]]"
title
=
"[[module.contentData
.data[0].title]]"
>
<
/div
>
[[
else
if
module
.
contentData
.
template_name
==
'smallPic'
]]
<
div
class
=
"small-pic"
>
...
...
@@ -46,7 +44,7 @@
<
/ul
>
<
/div
>
{{
>
resource
/
taoyu2
}}
{{
>
resource
/
taoyu2
}}
[[
/if]
]
<
div
class
=
"actions-box"
>
<
div
class
=
"actions-wrap"
>
...
...
@@ -81,7 +79,7 @@
[[
each
contentData
.
data
as
item
index
]]
<
tr
>
<
td
>
[[
index
+
1
]]
<
/td
>
<
td
><
input
type
=
"file"
name
=
"file"
id
=
"src-[[index]]"
value
=
"[[item.src]]"
data
-
index
=
"[[index]]"
/><
/td
>
<
td
><
input
type
=
"file"
name
=
"file"
id
=
"src-[[index]]"
value
=
"[[item.src]]"
data
-
field
=
"[[index]].src"
data
-
index
=
"[[index]]"
/><
/td
>
<
/tr
>
[[
/each]
]
<
/tbody
>
...
...
@@ -96,7 +94,7 @@
<
div
class
=
"form-group"
>
<
div
class
=
"col-sm-12"
>
<
ul
class
=
"cover-image-list col-sm-10"
id
=
"goodspic"
>
[[
each
data
as
item
index
]]
[[
each
contentData
.
data
as
item
index
]]
<
li
class
=
"cover-image-item image-list"
data
-
index
=
"2"
>
<
div
class
=
"goods-img"
>
<
a
class
=
"fileinput-button-icon"
href
=
"javascript:void(0);"
>
...
...
@@ -131,14 +129,21 @@
[[
/each]
]
</script>
<!--添加商品/商品组--选择标签界面模板-->
<script
type=
"text/template"
id=
"template_dialog_goodsgird"
>
<
div
class
=
"rows"
>
<
div
class
=
"form-group"
>
<
div
class
=
"col-sm-4"
>
<
input
class
=
"form-control"
placeholder
=
"输入SKN"
/>
<
div
class
=
"panel-col2"
>
<
input
class
=
"form-control"
id
=
"skns"
placeholder
=
"输入SKN(多个skn以逗号分隔)"
/>
<
/div
>
<
div
class
=
"col-sm-4"
>
<
input
class
=
"form-control"
placeholder
=
"输入标签"
/>
<
div
class
=
"panel-col"
>
<
input
type
=
"number"
id
=
"beginPrice"
name
=
"begin_price"
class
=
"form-control"
placeholder
=
"起始价"
value
=
""
>
<
/div
>
<
div
class
=
"panel-col"
>
<
input
type
=
"number"
id
=
"endPrice"
name
=
"end_price"
class
=
"form-control"
placeholder
=
"结束价"
value
=
""
>
<
/div
>
<
div
class
=
"col-sm-1"
>
<
input
type
=
"button"
id
=
"search"
class
=
"btn btn-primary mr5"
value
=
"搜索"
/>
...
...
@@ -153,7 +158,7 @@
<!-- 推荐商品 -->
<script
type=
"text/tempalte"
id=
"template_dialog_remgoods"
>
<
div
class
=
"rows"
id
=
"groupsgoods"
>
[[
each
data
as
items
i
]]
[[
each
contentData
.
data
as
items
i
]]
<
div
class
=
"form-group"
>
<
div
class
=
"col-sm-10"
>
<
ul
class
=
"cover-image-list col-sm-10"
id
=
"goodspic-0"
>
...
...
@@ -186,7 +191,7 @@
</script>
<script
type=
"text/template"
id=
"template_dialog_remgoodsgroup"
>
[[
each
data
as
items
i
]]
[[
each
contentData
.
data
as
items
i
]]
<
div
class
=
"form-group"
>
<
div
class
=
"col-sm-10"
>
<
ul
class
=
"cover-image-list col-sm-10"
id
=
"goodspic-0"
>
...
...
@@ -214,7 +219,7 @@
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-2 control-label"
>
选择跳转目的地:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
select
class
=
"form-control observe"
data
-
index
=
"0"
data
-
field
=
"url.action"
value
=
'[[
data[0].url.action]]'
>
<
select
class
=
"form-control observe"
data
-
field
=
"0.url.action"
value
=
'[[contentData.
data[0].url.action]]'
>
[[
layout
template_default_1
]]
<
/select
>
...
...
@@ -224,7 +229,7 @@
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-2 control-label"
>
跳转地址:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
textarea
rows
=
"2"
class
=
"form-control observe"
placeholder
=
"跳转地址"
data
-
field
=
"
url.url"
data
-
index
=
"0"
>
[[
data
[
0
].
url
.
url
]]
<
/textarea
>
<
textarea
rows
=
"2"
class
=
"form-control observe"
placeholder
=
"跳转地址"
data
-
field
=
"
0.url.url"
>
[[
contentData
.
data
[
0
].
url
.
url
]]
<
/textarea
>
<
/div
>
<
/div
>
...
...
Please
register
or
login
to post a comment