记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
1186e597
Commit
1186e597
authored
Jan 10, 2022
by
dongchun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交部分逻辑
parent
815e55c7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
926 additions
and
58 deletions
+926
-58
index.html
...ces/templates/zhengzai/store/goodsIntersection/index.html
+272
-0
RubikArea.html
...resources/templates/zhengzai/store/homeSet/RubikArea.html
+152
-19
kingArea.html
.../resources/templates/zhengzai/store/homeSet/kingArea.html
+241
-14
searchStore.html
...sources/templates/zhengzai/store/homeSet/searchStore.html
+62
-12
topBanner.html
...resources/templates/zhengzai/store/homeSet/topBanner.html
+199
-13
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/store/goodsIntersection/index.html
0 → 100644
View file @
1186e597
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
xmlns:shiro=
"http://www.pollix.at/thymeleaf/shiro"
>
<head>
<th:block
th:include=
"include :: header('商品合集')"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
<style>
.layui-layer-btn0
{
padding
:
0
;
}
.paddings
{
padding
:
0
!important
;
}
#addClassify
{
display
:
none
;
width
:
540px
;
padding
:
20px
;
}
#addClassify
.selectClassify
{
display
:
flex
;
align-items
:
center
;
}
#addClassify
.selectClassify
label
{
display
:
flex
;
margin-right
:
20px
;
align-items
:
center
;
}
#addClassify
.selectClassify
label
input
{
margin
:
0
;
margin-right
:
2px
;
}
.shadeCss
,
.layui-layer-shade
{
background-color
:
rgb
(
0
,
0
,
0
,
0.5
)
!important
;
}
.select-list
ul
{
display
:
flex
;
justify-content
:
space-between
;
}
.selectClassifyOne
{
display
:
flex
;
align-items
:
center
;
margin
:
12px
0
;
}
.selectClassifyOne
span
{
width
:
45px
;
}
.tagStore
.fixed-table-toolbar
{
display
:
flex
;
}
.tagStore
.fixed-table-toolbar
.bs-bars
{
flex
:
1
;
}
.tagStore
.fixed-table-toolbar
.bs-bars
.btn-group-sm
{
display
:
flex
;
justify-content
:
space-between
;
}
.leftSearchBox
{
display
:
flex
;
align-items
:
center
;
}
.leftSearchBox
input
,
.leftSearchBox
select
{
width
:
200px
;
height
:
34px
;
margin-right
:
12px
;
}
.ibox-content
{
border-style
:
none
;
padding
:
0
;
}
.kv-hidden
{
display
:
none
!important
;
}
</style>
</head>
<body
class=
"tagStore"
>
<div
class=
"container-div"
>
<div
class=
"row"
>
<div
class=
"btn-group-sm"
id=
"toolbar"
></div>
<div
class=
"col-sm-12 search-collapse"
>
<form
id=
"coupon-form"
>
<div
class=
"select-list"
>
<ul>
<div
class=
"leftSearchBox"
>
<input
class=
"form-control"
type=
"text"
placeholder=
"请输入名字"
>
类型:
<select
class=
"type form-control"
data-first-title=
"请选择"
>
<option
value=
""
>
请选择
</option>
</select>
<li>
<a
class=
"btn btn-primary btn-rounded btn-sm"
onclick=
"$.table.search()"
><i
class=
"fa fa-search"
></i>
搜索
</a>
<a
class=
"btn btn-warning btn-rounded btn-sm"
onclick=
"$.form.reset()"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</li>
</div>
<div>
<a
class=
"btn btn-success"
id=
"button-open-10"
>
<i
class=
"fa fa-plus"
></i>
创建分类
</a>
<a
class=
"btn btn-warning"
id=
"button-open-11"
>
<i
class=
"fa fa-download"
></i>
导出Excel
</a>
</div>
</ul>
</div>
</form>
</div>
<div
class=
"col-sm-12 select-table table-striped"
>
<table
id=
"bootstrap-table"
></table>
</div>
<div
id=
"addClassify"
>
<div
class=
"selectClassify"
>
<span>
LOGO:
</span>
<img
id=
"viewImg"
src=
""
alt=
""
style=
"max-height:150px;"
>
<div
class=
"ibox-content"
>
<div
class=
"form-group"
>
<div
class=
"file-loading"
>
<input
id=
"fileinput"
type=
"file"
name=
"file"
data-browse-on-zone-click=
"true"
data-theme=
"fas"
>
</div>
</div>
</div>
</div>
<div
class=
"selectClassifyOne"
>
<span>
昵称:
</span>
<input
class=
"form-control"
type=
"text"
>
</div>
<div
class=
"selectClassify"
>
<span>
类别:
</span>
<label>
<input
type=
"radio"
checked
value=
"1"
id=
"optionsRadios1"
name=
"optionsRadios"
><span>
音乐人
</span></label>
<label>
<input
type=
"radio"
value=
"2"
id=
"optionsRadios1"
name=
"optionsRadios"
><span>
艺术家
</span></label>
<label>
<input
type=
"radio"
value=
"3"
id=
"optionsRadios1"
name=
"optionsRadios"
><span>
IP
</span></label>
</div>
</div>
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<script
th:inline=
"javascript"
>
var
dicCouponBusiType
=
[[
$
{@
dict
.
getType
(
'zhengzai_coupon_busi_type'
)}]];
var
dicCouponBindType
=
[[
$
{@
dict
.
getType
(
'zhengzai_coupon_bind_type'
)}]];
var
platformUrl
=
[[
$
{
platformUrl
}]];
var
prefix
=
ctx
+
"candy/coupon/mgt"
;
var
prefix2
=
ctx
+
"local"
;
var
viewMgtCouponFlag
=
[[
$
{@
permission
.
hasPermi
(
'candy:coupon:mgt:detail'
)}]];
var
cancelMgtCouponFlag
=
[[
$
{@
permission
.
hasPermi
(
'candy:coupon:mgt:cancel'
)}]];
var
couType
=
[[
$
{
couType
}]];
$
(
function
()
{
var
options
=
{
url
:
prefix
+
"/list"
,
createUrl
:
prefix
+
"/add/{id}"
,
detailUrl
:
prefix2
+
"/shopDetail"
,
removeUrl
:
prefix
+
"/cancel/{id}"
,
// updateUrl: prefix + "/edit/{id}",
// exportUrl: prefix + "/export",
onCheck
:
onCheck
,
sortName
:
"createdAt"
,
sortOrder
:
"desc"
,
modalName
:
"代金券"
,
showSearch
:
false
,
showRefresh
:
true
,
showColumns
:
false
,
showToggle
:
false
,
columns
:
[
{
checkbox
:
true
},
{
field
:
'valFace'
,
title
:
'头像'
},
{
field
:
'bindType'
,
title
:
'名称'
,
formatter
:
function
(
value
,
row
,
index
)
{
// $('.pull-right').hide()
return
$
.
table
.
selectDictLabel
(
dicCouponBindType
,
value
);
}
},
{
field
:
'bindType'
,
title
:
'类型'
,
formatter
:
function
(
value
,
row
,
index
)
{
return
$
.
table
.
selectDictLabel
(
dicCouponBindType
,
value
);
}
},
{
title
:
'操作'
,
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
)
{
return
`<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="del('
${
row
.
itemId
}
', 7, '确定下架此商品吗?')">删除</a>
<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="del('
${
row
.
itemId
}
', 7, '确定下架此商品吗?')">查看</a>`
}
}]
};
$
.
table
.
init
(
options
);
});
$
(
"#button-open-10"
).
click
(
function
(){
var
btn
=
[
'<span style="display:inline-block;padding:0 15px;height:100%;" onclick="yes(1,2)">确定</span>'
,
'取消'
];
layer
.
open
({
type
:
1
,
shade
:
true
,
title
:
'创建分类'
,
//不显示标题
btn
,
content
:
$
(
'#addClassify'
),
//捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
success
:
function
()
{
console
.
log
(
1111
)
$
(
".layui-layer-btn0"
).
addClass
(
'paddings'
)
$
(
".layui-layer-shade"
).
addClass
(
'shadeCss'
)
},
cancel
:
function
(
res
){
console
.
log
(
res
,
'111'
)
// layer.msg('捕获就是从页面已经存在的元素上,包裹layer的结构', {time: 5000, icon:6});
}
});
})
$
(
"#button-open-11"
).
click
(
function
(){
$
(
"button[name=refresh]"
).
click
()
})
function
onCheck
(
row
,
$element
)
{
console
.
log
(
row
,
$element
)
}
function
yes
(
index
,
layero
)
{
console
.
log
(
index
,
layero
)
}
function
del
(
id
,
status
,
notice
)
{
$
.
modal
.
confirm
(
notice
,
function
()
{
$
.
ajax
({
type
:
'put'
,
url
:
'/stone/item/change/status'
,
data
:
{
itemId
:
id
,
status
},
success
:
function
(
e
)
{
layer
.
msg
(
"操作成功!"
)
$
(
"button[name=refresh]"
).
click
()
}
})
});
}
$
(
function
(){
$
(
"#fileinput"
).
fileinput
({
'theme'
:
'explorer-fas'
,
'uploadUrl'
:
platformUrl
+
"/platform/basicServices/alOss/upload"
,
"uploadExtraData"
:
{
"pathName"
:
"banner"
,
"buckType"
:
1
},
autoReplace
:
true
,
showCaption
:
false
,
showPreview
:
false
,
showRemove
:
false
,
showUpload
:
false
,
showCancel
:
false
,
showClose
:
false
,
autoReplace
:
true
,
dropZoneTitle
:
"请上传文件"
,
maxFileCount
:
1
}).
on
(
"filebatchselected"
,
function
(
event
,
files
)
{
//默认上传
$
(
this
).
fileinput
(
"upload"
);
})
.
on
(
"fileuploaded"
,
function
(
event
,
data
)
{
//上传回调事件
showPicture
=
'https://img.zhengzai.tv/'
+
data
.
response
.
data
.
ossPath
;
$
(
"#viewImg"
).
attr
(
'src'
,
showPicture
)
})
})
</script>
</body>
</html>
\ No newline at end of file
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/store/homeSet/RubikArea.html
View file @
1186e597
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
xmlns:shiro=
"http://www.pollix.at/thymeleaf/shiro"
>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
xmlns:shiro=
"http://www.pollix.at/thymeleaf/shiro"
>
<head>
<head>
<th:block
th:include=
"include :: header('
顶部banner
')"
/>
<th:block
th:include=
"include :: header('
魔方
')"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
<style>
<style>
.home_page
{
.home_page
{
...
@@ -124,11 +124,11 @@
...
@@ -124,11 +124,11 @@
<label>
<label>
<input
type=
"radio"
checked
value=
"1"
id=
"optionsRadios1"
name=
"optionsRadios"
><span>
一行一个
</span></label>
<input
type=
"radio"
checked
value=
"1"
id=
"optionsRadios1"
name=
"optionsRadios"
><span>
一行一个
</span></label>
<label>
<label>
<input
type=
"radio"
value=
"2"
id=
"optionsRadios
1
"
name=
"optionsRadios"
><span>
一行两个
</span></label>
<input
type=
"radio"
value=
"2"
id=
"optionsRadios
2
"
name=
"optionsRadios"
><span>
一行两个
</span></label>
<label>
<label>
<input
type=
"radio"
value=
"3"
id=
"optionsRadios
1
"
name=
"optionsRadios"
><span>
一行三个
</span></label>
<input
type=
"radio"
value=
"3"
id=
"optionsRadios
3
"
name=
"optionsRadios"
><span>
一行三个
</span></label>
<label>
<label>
<input
type=
"radio"
value=
"4"
id=
"optionsRadios
1
"
name=
"optionsRadios"
><span>
上一下三
</span></label>
<input
type=
"radio"
value=
"4"
id=
"optionsRadios
4
"
name=
"optionsRadios"
><span>
上一下三
</span></label>
</div>
</div>
</div>
</div>
<div
class=
"function_btn"
>
<div
class=
"function_btn"
>
...
@@ -155,17 +155,93 @@
...
@@ -155,17 +155,93 @@
<script
th:inline=
"javascript"
>
<script
th:inline=
"javascript"
>
var
prefix2
=
ctx
+
"local"
;
var
prefix2
=
ctx
+
"local"
;
var
platformUrl
=
[[
$
{
platformUrl
}]];
var
platformUrl
=
[[
$
{
platformUrl
}]];
let
num
=
1
;
let
count
=
1
;
let
compilationsId
=
''
;
let
createTime
=
''
;
let
cubeId
=
''
;
let
mid
=
''
;
let
updateTime
=
''
;
$
(
function
()
{
$
(
function
()
{
addItem
(
1
);
// addItem (1);
promiseMethods
(
'/goblin-front-cube/list'
,
'post'
).
then
(
res
=>
{
console
.
log
(
res
)
let
{
data
}
=
res
;
if
(
data
&&
data
.
length
>
0
)
{
let
arr
=
data
[
0
].
spuId
.
split
(
','
);
if
(
data
.
length
==
1
)
{
$
(
"#optionsRadios1"
).
attr
(
'checked'
,
true
).
parent
().
siblings
().
children
().
removeAttr
(
'checked'
);
}
else
if
(
data
.
length
==
2
)
{
$
(
"#optionsRadios2"
).
attr
(
'checked'
,
true
).
parent
().
siblings
().
children
().
removeAttr
(
'checked'
);
}
else
if
(
data
.
length
==
3
)
{
$
(
"#optionsRadios3"
).
attr
(
'checked'
,
true
).
parent
().
siblings
().
children
().
removeAttr
(
'checked'
);
}
else
{
$
(
"#optionsRadios4"
).
attr
(
'checked'
,
true
).
parent
().
siblings
().
children
().
removeAttr
(
'checked'
);
}
console
.
log
(
arr
)
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
let
str
=
''
;
str
+=
`<div class="items" data-id="
${
data
[
i
].
mid
}
">
<div class="first_content">
<div class="hot_title">
页面属性:
</div>
<div class="tags">
<label>
<input type="radio" checked value="1" id="pageAttribute
${
i
}
" name="pageAttribute
${
i
}
"><span>单商品</span></label>
</div>
</div>
<div class="first_content" style="align-items: flex-start;">
<div class="hot_title">
选择商品:
</div>
<div class="tags_content" style="width: 553px;">
<div class="input-group">
<input id="goodsName
${
i
}
" data-id="
${
arr
[
i
]}
" type="text" class="form-control storeList" placeholder="
${
data
[
i
].
goblinGoods
.
name
}
">
<div class="input-group-btn">
<ul class="dropdown-menu dropdown-menu-right" role="menu">
</ul>
</div>
</div>
<div class="img_box">
<img id="goodsImg
${
i
}
" src="
${
data
[
i
].
goblinGoods
.
coverPic
}
" alt="" style="max-height: 180px;max-width:180px;margin: 12px 0;">
<p id="goodsTitle
${
i
}
" style="width:180px;">
${
data
[
i
].
goblinGoods
.
name
}
</p>
<p id="goodsPrice
${
i
}
">
${
data
[
i
].
goblinGoods
.
priceLe
}
</p>
</div>
<button id="del
${
i
}
" type="button" class="btn btn-danger" style="width: 60px;" onclick="del('
${
i
}
')">删除</button>
</div>
</div>
<div class="first_content" style="align-items: flex-start;">
<div class="hot_title">
推荐文案:
</div>
<div class="tags">`
;
if
(
i
==
0
)
{
str
+=
`<textarea id="text
${
i
}
" class="form-control txtIpt" value="" name="" style="width: 553px;height: 150px;">
${
data
[
i
].
informationA
}
</textarea>`
}
else
if
(
i
==
1
)
{
str
+=
`<textarea id="text
${
i
}
" class="form-control txtIpt" value="" name="" style="width: 553px;height: 150px;">
${
data
[
i
].
informationB
}
</textarea>`
}
else
if
(
i
==
2
)
{
str
+=
`<textarea id="text
${
i
}
" class="form-control txtIpt" value="" name="" style="width: 553px;height: 150px;">
${
data
[
i
].
informationC
}
</textarea>`
}
else
{
str
+=
`<textarea id="text
${
i
}
" class="form-control txtIpt" value="" name="" style="width: 553px;height: 150px;">
${
data
[
i
].
informationD
}
</textarea>`
}
str
+=
`</div>
</div>
</div>`
$
(
"#bannerList"
).
append
(
str
);
common
(
i
)
}
}
// refreshItem()
})
})
})
$
(
"input[name=optionsRadios]"
).
change
(
function
(
e
){
$
(
"input[name=optionsRadios]"
).
change
(
function
(
e
){
$
(
"#bannerList"
).
empty
();
$
(
"#bannerList"
).
empty
();
let
num
=
e
.
target
.
value
;
count
=
e
.
target
.
value
;
addItem
(
num
);
addItem
(
count
);
})
})
function
addItem
(
num
)
{
function
addItem
(
num
)
{
console
.
log
(
num
,
'221212'
)
console
.
log
(
num
,
'221212
颠三倒四多
'
)
let
str
=
''
;
let
str
=
''
;
for
(
var
i
=
0
;
i
<
num
;
i
++
)
{
for
(
var
i
=
0
;
i
<
num
;
i
++
)
{
str
=
`<div class="items">
str
=
`<div class="items">
...
@@ -176,8 +252,6 @@
...
@@ -176,8 +252,6 @@
<div class="tags">
<div class="tags">
<label>
<label>
<input type="radio" checked value="1" id="pageAttribute
${
i
}
" name="pageAttribute
${
i
}
"><span>单商品</span></label>
<input type="radio" checked value="1" id="pageAttribute
${
i
}
" name="pageAttribute
${
i
}
"><span>单商品</span></label>
<label>
<input type="radio" value="2" id="pageAttribute
${
i
}
" name="pageAttribute
${
i
}
"><span>合集</span></label>
</div>
</div>
</div>
</div>
<div class="first_content" style="align-items: flex-start;">
<div class="first_content" style="align-items: flex-start;">
...
@@ -193,9 +267,9 @@
...
@@ -193,9 +267,9 @@
</div>
</div>
</div>
</div>
<div class="img_box">
<div class="img_box">
<img id="goodsImg
${
i
}
" src="
https://img.zhengzai.tv/banner/2022/01/06/d4e7ef3aeabb4151a3a8dd9ab7a272a8.png
" alt="" style="max-height: 180px;max-width:180px;margin: 12px 0;">
<img id="goodsImg
${
i
}
" src="" alt="" style="max-height: 180px;max-width:180px;margin: 12px 0;">
<p id="goodsTitle
${
i
}
" style="width:180px;">
2021草莓音乐节主页(RE)连帽卫衣
</p>
<p id="goodsTitle
${
i
}
" style="width:180px;"></p>
<p id="goodsPrice
${
i
}
">
¥99
</p>
<p id="goodsPrice
${
i
}
"></p>
</div>
</div>
<button id="del
${
i
}
" type="button" class="btn btn-danger" style="width: 60px;" onclick="del('
${
i
}
')">删除</button>
<button id="del
${
i
}
" type="button" class="btn btn-danger" style="width: 60px;" onclick="del('
${
i
}
')">删除</button>
</div>
</div>
...
@@ -205,7 +279,7 @@
...
@@ -205,7 +279,7 @@
推荐文案:
推荐文案:
</div>
</div>
<div class="tags">
<div class="tags">
<textarea id="text
${
i
}
" class="form-control" name="" id="" style="width: 553px;height: 150px;"></textarea>
<textarea id="text
${
i
}
" class="form-control
txtIpt
" name="" id="" style="width: 553px;height: 150px;"></textarea>
</div>
</div>
</div>
</div>
</div>`
</div>`
...
@@ -214,7 +288,44 @@
...
@@ -214,7 +288,44 @@
}
}
}
}
function
save
()
{
function
save
()
{
refreshItem
()
let
data
=
[{
compilationsId
:
compilationsId
||
''
,
createTime
:
createTime
||
''
,
cubeId
:
cubeId
||
''
,
goblinGoods
:
{},
informationA
:
''
,
informationB
:
''
,
informationC
:
''
,
informationD
:
''
,
mid
:
mid
||
'0'
,
pageType
:
'1'
,
rowType
:
count
,
spuId
:
[],
spuName
:
''
,
updateTime
:
updateTime
||
''
}];
let
domData
=
$
(
'.items'
);
Array
.
prototype
.
forEach
.
call
(
domData
,
function
(
item
,
index
)
{
console
.
log
(
item
.
querySelector
(
'.txtIpt'
).
value
,
'item'
)
data
[
0
].
spuId
.
push
(
item
.
querySelector
(
'.storeList'
).
getAttribute
(
'data-id'
)
||
''
);
if
(
index
==
0
)
{
data
[
0
].
informationA
=
item
.
querySelector
(
'.txtIpt'
).
value
;
}
else
if
(
index
==
1
)
{
data
[
0
].
informationB
=
item
.
querySelector
(
'.txtIpt'
).
value
;
}
else
if
(
index
==
2
)
{
data
[
0
].
informationC
=
item
.
querySelector
(
'.txtIpt'
).
value
;
}
else
{
data
[
0
].
informationD
=
item
.
querySelector
(
'.txtIpt'
).
value
;
}
});
//foreach js6章封装
data
[
0
].
spuId
=
data
[
0
].
spuId
.
toString
();
console
.
log
(
data
)
promiseMethods
(
'/goblin-front-cube/updateOrCreate'
,
'post'
,
JSON
.
stringify
(
data
),
'application/json'
).
then
(
res
=>
{
console
.
log
(
res
)
refreshItem
()
})
}
}
function
del
(
num
)
{
function
del
(
num
)
{
console
.
log
(
num
)
console
.
log
(
num
)
...
@@ -226,25 +337,47 @@
...
@@ -226,25 +337,47 @@
}
}
function
common
(
num
)
{
function
common
(
num
)
{
$
(
".storeList"
).
bsSuggest
({
$
(
".storeList"
).
bsSuggest
({
idField
:
'spuId'
,
// data.value 的第几个数据,作为input输入框的内容
keyField
:
'name'
,
// data.value 的第几个数据,作为input输入框的内容
allowNoKeyword
:
false
,
//是否允许无关键字时请求数据
allowNoKeyword
:
false
,
//是否允许无关键字时请求数据
showBtn
:
false
,
showBtn
:
false
,
multiWord
:
true
,
//以分隔符号分割的多关键字支持
multiWord
:
true
,
//以分隔符号分割的多关键字支持
hideOnSelect
:
true
,
hideOnSelect
:
true
,
getDataMethod
:
"url"
,
//获取数据的方式,总是从 URL 获取
getDataMethod
:
"url"
,
//获取数据的方式,总是从 URL 获取
url
:
ctx
+
'kylin/base/performance/status?status=(3,6)&title='
,
effectiveFields
:
[
'name'
],
url
:
'/compilations/goodsList?name='
,
/*如果从 url 获取数据,并且需要跨域,则该参数必须设置*/
/*如果从 url 获取数据,并且需要跨域,则该参数必须设置*/
processData
:
function
(
json
)
{
// url 获取数据时,对数据的处理,作为 getData 的回调函数
processData
:
function
(
json
)
{
// url 获取数据时,对数据的处理,作为 getData 的回调函数
//字符串转化为 js 对象
//字符串转化为 js 对象
return
json
;
let
data
=
{};
data
.
value
=
json
.
data
return
data
}
}
}).
on
(
'onDataRequestSuccess'
,
function
(
e
,
result
)
{
}).
on
(
'onDataRequestSuccess'
,
function
(
e
,
result
)
{
console
.
log
(
'onDataRequestSuccess: '
,
e
,
result
);
console
.
log
(
'onDataRequestSuccess: '
,
e
,
result
);
}).
on
(
'onSetSelectValue'
,
function
(
e
,
selectedData
,
selectedRawData
)
{
// 当前行的所有值都能拿到
}).
on
(
'onSetSelectValue'
,
function
(
e
,
selectedData
,
selectedRawData
)
{
// 当前行的所有值都能拿到
console
.
log
(
'211: '
,
e
.
target
.
value
,
selectedData
,
selectedRawData
);
let
index
=
e
.
target
.
id
.
replace
(
/
[^\d]
/g
,
''
);
// 选中的是第几组
$
(
"#goodsImg"
+
index
+
""
).
attr
(
'src'
,
selectedRawData
.
coverPic
);
$
(
"#goodsTitle"
+
index
+
""
).
text
(
selectedRawData
.
name
);
$
(
"#goodsPrice"
+
index
+
""
).
text
(
'¥'
+
selectedRawData
.
priceLe
);
$
(
'#del'
+
index
+
''
).
show
();
}).
on
(
'onUnsetSelectValue'
,
function
(
e
)
{
}).
on
(
'onUnsetSelectValue'
,
function
(
e
)
{
console
.
log
(
"onUnsetSelectValue"
,
e
);
console
.
log
(
"onUnsetSelectValue"
,
e
);
});;
});;
}
}
function
promiseMethods
(
url
,
type
,
data
,
contentType
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
$
.
ajax
({
url
,
type
,
data
,
contentType
,
success
:
function
(
res
)
{
resolve
(
res
);
}
})
})
}
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/store/homeSet/kingArea.html
View file @
1186e597
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
<label>
<label>
<input
type=
"radio"
checked
value=
"1"
id=
"optionsRadios1"
name=
"optionsRadios"
><span>
一行
</span></label>
<input
type=
"radio"
checked
value=
"1"
id=
"optionsRadios1"
name=
"optionsRadios"
><span>
一行
</span></label>
<label>
<label>
<input
type=
"radio"
value=
"2"
id=
"optionsRadios
1
"
name=
"optionsRadios"
><span>
两行
</span></label>
<input
type=
"radio"
value=
"2"
id=
"optionsRadios
2
"
name=
"optionsRadios"
><span>
两行
</span></label>
</div>
</div>
</div>
</div>
<div
class=
"function_btn"
>
<div
class=
"function_btn"
>
...
@@ -143,18 +143,127 @@
...
@@ -143,18 +143,127 @@
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<th:block
th:include=
"include :: bootstrap-suggest-js"
/>
<script
th:inline=
"javascript"
>
<script
th:inline=
"javascript"
>
var
prefix2
=
ctx
+
"local"
;
var
prefix2
=
ctx
+
"local"
;
var
platformUrl
=
[[
$
{
platformUrl
}]];
var
platformUrl
=
[[
$
{
platformUrl
}]];
let
num
=
0
;
let
num
=
0
;
let
jumpType
=
1
;
let
hang
=
1
;
$
(
function
()
{
$
(
function
()
{
addItem
(
4
);
promiseMethods
(
'/navigation/list'
,
'post'
).
then
(
res
=>
{
console
.
log
(
res
,
12121
)
let
{
data
}
=
res
;
if
(
data
&&
data
.
length
>
0
)
{
if
(
data
[
0
].
displayType
==
1
)
{
console
.
log
(
'zhe?'
)
$
(
'#optionsRadios1'
).
attr
(
'checked'
,
true
)
$
(
'#optionsRadios2'
).
removeAttr
(
'checked'
)
}
else
{
$
(
'#optionsRadios2'
).
attr
(
'checked'
,
true
)
$
(
'#optionsRadios1'
).
removeAttr
(
'checked'
)
}
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
let
str
=
''
;
str
+=
`<div class="banner_item" data-id="
${
data
[
i
].
mid
}
">
<div class="img_show">
<div class="title">
图片展示:
</div>
<div class="ibox-content" style="border: none;">
<img id="viewImg
${
i
}
" class="imgBox" src="
${
data
[
i
].
picUrl
}
" alt="">
<div class="form-group">
<div class="file-loading">
<input id="fileinput
${
i
}
" type="file" name="file" data-browse-on-zone-click="true" data-theme="fas">
</div>
</div>
</div>
</div>
<div class="set_method" style="margin-bottom: 20px;">
<div class="jump">
<div class="title">
类型:
</div>
<div class="iptOrSelect" style="margin-right: 12px;">
<select id="jumpType
${
i
}
" onchange="changeJump(this)" value="
${
data
[
i
].
navigationType
}
" class="type form-control" data-first-title="请选择">
<option value="1">分类</option>
<option value="2">专题页</option>
<option value="3">商品单品</option>
</select>
</div>
</div>
<div class="ticket_name">
<div class="title titleDiv
${
i
}
">
选择分类:
</div>
<div class="typeSelect
${
i
}
" style="display:flex;flex:1">
<div class="iptOrSelect">
<select id="jumpSelect
${
i
}
" class="type form-control" data-first-title="请选择">
<option value="">请选择</option>
</select>
</div>
<div class="iptOrSelect">
<select id="jumpSelect
${
i
}
" class="type form-control" data-first-title="请选择">
<option value="">请选择</option>
</select>
</div>
</div>`
if
(
data
[
i
].
goblinGoods
)
{
str
+=
`<div class="input-group iptOrSelect shwoSelect
${
i
}
" style="display:none;">
<input id="searchIpt
${
i
}
" type="text" class="form-control storeList" onFocus="focusMethod(this)" value="
${
data
[
i
].
goblinGoods
.
spuId
}
" placeholder="
${
data
[
i
].
goblinGoods
.
name
}
">
<div class="input-group-btn">
<ul class="dropdown-menu dropdown-menu-right" role="menu">
</ul>
</div>
</div>`
}
else
{
str
+=
`<div class="input-group iptOrSelect shwoSelect
${
i
}
" style="display:none;">
<input id="searchIpt
${
i
}
" type="text" class="form-control storeList" onFocus="focusMethod(this)" value="" placeholder="">
<div class="input-group-btn">
<ul class="dropdown-menu dropdown-menu-right" role="menu">
</ul>
</div>
</div>`
}
str
+=
`<div class="link
${
i
}
" style="display:none;">
<input id="linkUrl
${
i
}
" type="text" class="layui-input form-control linkUrl" value="
${
data
[
i
].
activityUrl
}
" placeholder="请输入活动链接">
</div>
</div>
</div>
<div class="set_function">
<div class="set_function_time">
<div class="title">
标题:
</div>
<div class="select_tiem">
<input type="text" class="layui-input form-control titleIpt" id="startTime
${
i
}
" value="
${
data
[
i
].
title
}
" autocomplete="off" placeholder="请输入标题">
</div>
</div>
</div>
</div>`
$
(
"#bannerList"
).
append
(
str
);
common
(
i
)
// setTimeout(() => {
let
type
=
data
[
i
].
navigationType
;
showOrhide
(
type
,
i
)
$
(
"#jumpType"
+
i
+
" option[value="
+
type
+
"]"
).
attr
(
'selected'
,
'selected'
);
// }, 500);
}
}
else
{
addItem
(
4
);
}
})
})
})
$
(
"input[name=optionsRadios]"
).
change
(
function
(
e
){
$
(
"input[name=optionsRadios]"
).
change
(
function
(
e
){
$
(
"#bannerList"
).
empty
();
$
(
"#bannerList"
).
empty
();
if
(
e
.
target
.
value
==
2
)
{
if
(
e
.
target
.
value
==
2
)
{
hang
=
2
;
addItem
(
8
);
addItem
(
8
);
}
else
{
}
else
{
hang
=
1
;
addItem
(
4
);
addItem
(
4
);
}
}
})
})
...
@@ -181,24 +290,38 @@
...
@@ -181,24 +290,38 @@
类型:
类型:
</div>
</div>
<div class="iptOrSelect" style="margin-right: 12px;">
<div class="iptOrSelect" style="margin-right: 12px;">
<select id="jumpSelect
${
i
}
" class="type form-control" data-first-title="请选择">
<select id="jumpType
${
i
}
" onchange="changeJump(this)" class="type form-control" data-first-title="请选择">
<option value="">请选择</option>
<option value="1">分类</option>
<option value="2">专题页</option>
<option value="3">商品单品</option>
</select>
</select>
</div>
</div>
</div>
</div>
<div class="ticket_name">
<div class="ticket_name">
<div class="title">
<div class="title
titleDiv
${
i
}
">
选择分类:
选择分类:
</div>
</div>
<div class="iptOrSelect">
<div class="typeSelect
${
i
}
" style="display:flex;flex:1">
<select id="jumpSelect
${
i
}
" class="type form-control" data-first-title="请选择">
<div class="iptOrSelect">
<option value="">请选择</option>
<select id="jumpSelect
${
i
}
" class="type form-control" data-first-title="请选择">
</select>
<option value="">请选择</option>
</select>
</div>
<div class="iptOrSelect">
<select id="jumpSelect
${
i
}
" class="type form-control" data-first-title="请选择">
<option value="">请选择</option>
</select>
</div>
</div>
</div>
<div class="iptOrSelect">
<div class="input-group iptOrSelect shwoSelect
${
i
}
" style="display:none;">
<select id="jumpSelect
${
i
}
" class="type form-control" data-first-title="请选择">
<input id="searchIpt
${
i
}
" type="text" class="form-control storeList" onFocus="focusMethod(this)" placeholder="请输入商品名称">
<option value="">请选择</option>
<div class="input-group-btn">
</select>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
</ul>
</div>
</div>
<div class="link
${
i
}
" style="display:none;">
<input id="linkUrl
${
i
}
" type="text" class="layui-input form-control linkUrl" placeholder="请输入活动链接">
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -208,17 +331,47 @@
...
@@ -208,17 +331,47 @@
标题:
标题:
</div>
</div>
<div class="select_tiem">
<div class="select_tiem">
<input type="text" class="layui-input form-control
" id="startTime
${
i
}
" autocomplete="off" placeholder="配置活动时间
">
<input type="text" class="layui-input form-control
titleIpt" id="startTime
${
i
}
" autocomplete="off" placeholder="请输入标题
">
</div>
</div>
</div>
</div>
</div>
</div>
</div>`
</div>`
$
(
"#bannerList"
).
append
(
str
);
$
(
"#bannerList"
).
append
(
str
);
common
(
i
)
common
(
i
)
}
}
}
}
function
save
()
{
function
save
()
{
let
itmeLength
=
$
(
".banner_item"
);
let
arr
=
[];
let
obj
=
{};
Array
.
prototype
.
forEach
.
call
(
itmeLength
,
function
(
item
,
index
)
{
if
(
$
(
"jumpType"
+
index
+
""
).
val
()
==
2
)
{
obj
[
'activityUrl'
]
=
item
.
querySelector
(
".linkUrl"
).
value
;
obj
[
'spuId'
]
=
''
;
}
else
if
(
$
(
"jumpType"
+
index
+
""
).
val
()
==
3
)
{
obj
[
'activityUrl'
]
=
''
;
obj
[
'spuId'
]
=
item
.
querySelector
(
".storeList"
).
data
-
id
;
}
obj
[
'categoryType'
]
=
''
;
obj
[
'createTime'
]
=
''
;
obj
[
'delTag'
]
=
'0'
;
obj
[
'displayType'
]
=
hang
;
obj
[
'indexs'
]
=
index
;
obj
[
'mid'
]
=
item
.
getAttribute
(
'data-id'
)
||
0
;
obj
[
'navigationId'
]
=
''
;
obj
[
'navigationType'
]
=
$
(
"jumpType"
+
index
+
""
).
val
();
obj
[
'spuName'
]
=
''
;
obj
[
'picUrl'
]
=
item
.
querySelector
(
".imgBox"
).
getAttribute
(
'src'
);
obj
[
'title'
]
=
item
.
querySelector
(
".titleIpt"
).
value
;
obj
[
'updateTime'
]
=
''
;
arr
.
push
({...
obj
})
});
//foreach js6章封装的方法
console
.
log
(
arr
,
'12121212'
)
promiseMethods
(
'/navigation/createOrUpdate'
,
'post'
,
JSON
.
stringify
(
arr
),
'application/json'
).
then
(
res
=>
{
console
.
log
(
res
,
12121
)
})
refreshItem
()
refreshItem
()
}
}
function
common
(
num
)
{
function
common
(
num
)
{
...
@@ -247,6 +400,80 @@
...
@@ -247,6 +400,80 @@
$
(
"#viewImg"
+
num
+
""
).
attr
(
'src'
,
showPicture
)
$
(
"#viewImg"
+
num
+
""
).
attr
(
'src'
,
showPicture
)
})
})
}
}
function
changeJump
(
e
)
{
let
index
=
$
(
e
).
attr
(
'id'
).
replace
(
/
[^\d]
/g
,
''
);
// 选中的是第几组
let
jumpType
=
$
(
e
).
val
();
// 选中的跳转类型
showOrhide
(
jumpType
,
index
)
}
function
showOrhide
(
jumpType
,
index
)
{
console
.
log
(
jumpType
,
index
,
'sfsf'
)
switch
(
jumpType
.
toString
())
{
case
'1'
:
$
(
'.shwoSelect'
+
index
+
''
).
hide
();
$
(
'.link'
+
index
+
''
).
hide
();
$
(
'.typeSelect'
+
index
+
''
).
show
();
$
(
".titleDiv"
+
index
+
""
).
text
(
'选择分类:'
);
break
;
case
'2'
:
$
(
'.shwoSelect'
+
index
+
''
).
hide
();
$
(
'.link'
+
index
+
''
).
show
();
$
(
'.typeSelect'
+
index
+
''
).
hide
();
$
(
".titleDiv"
+
index
+
""
).
text
(
'活动链接:'
);
break
;
case
'3'
:
$
(
".titleDiv"
+
index
+
""
).
text
(
'商品名称:'
);
$
(
'.shwoSelect'
+
index
+
''
).
show
();
$
(
'.link'
+
index
+
''
).
hide
();
$
(
'.typeSelect'
+
index
+
''
).
hide
();
break
;
default
:
// $(".titleDiv"+index+"").text('商品聚合:');
// $('.shwoSelect'+index+'').show();
// $('.link'+index+'').hide();
// $('.typeSelect'+index+'').hide();
}
}
function
focusMethod
(
e
)
{
let
index
=
$
(
e
).
attr
(
'id'
).
replace
(
/
[^\d]
/g
,
''
);
// 选中的是第几组
let
url
=
''
;
$
(
".storeList"
).
bsSuggest
({
idField
:
'spuId'
,
// data.value 的第几个数据,作为input输入框的内容
keyField
:
'name'
,
// data.value 的第几个数据,作为input输入框的内容
allowNoKeyword
:
false
,
//是否允许无关键字时请求数据
showBtn
:
false
,
multiWord
:
true
,
//以分隔符号分割的多关键字支持
hideOnSelect
:
true
,
getDataMethod
:
"url"
,
//获取数据的方式,总是从 URL 获取
effectiveFields
:
[
'name'
],
url
:
'/compilations/goodsList?name='
,
/*如果从 url 获取数据,并且需要跨域,则该参数必须设置*/
processData
:
function
(
json
)
{
// url 获取数据时,对数据的处理,作为 getData 的回调函数
//字符串转化为 js 对象
let
data
=
{};
data
.
value
=
json
.
data
return
data
}
}).
on
(
'onDataRequestSuccess'
,
function
(
e
,
result
)
{
console
.
log
(
'onDataRequestSuccess: '
,
e
,
result
);
}).
on
(
'onSetSelectValue'
,
function
(
e
,
selectedData
,
selectedRawData
)
{
// 当前行的所有值都能拿到
console
.
log
(
'211: '
,
e
.
target
.
value
,
selectedData
,
selectedRawData
);
}).
on
(
'onUnsetSelectValue'
,
function
(
e
)
{
console
.
log
(
"onUnsetSelectValue"
,
e
);
});;
}
function
promiseMethods
(
url
,
type
,
data
,
contentType
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
$
.
ajax
({
url
,
type
,
data
,
contentType
,
success
:
function
(
res
)
{
resolve
(
res
);
}
})
})
}
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/store/homeSet/searchStore.html
View file @
1186e597
...
@@ -97,13 +97,13 @@
...
@@ -97,13 +97,13 @@
</div>
</div>
<div
class=
"add_tags"
>
<div
class=
"add_tags"
>
<div>
<div>
<input
type=
"text"
class=
"layui-input form-control"
id=
"test1"
style=
"margin-left: 10px;"
placeholder=
"
请选择时间
"
><button
type=
"button"
class=
"btn btn-success"
onclick=
"addItems()"
>
添加
</button>
<input
type=
"text"
class=
"layui-input form-control"
id=
"test1"
style=
"margin-left: 10px;"
placeholder=
"
输入热门关键词
"
><button
type=
"button"
class=
"btn btn-success"
onclick=
"addItems()"
>
添加
</button>
</div>
</div>
<p
style=
"margin-left: 10px;"
>
允许添加多个关键词,默认显示第一个
</p>
<p
style=
"margin-left: 10px;"
>
允许添加多个关键词,默认显示第一个
</p>
</div>
</div>
<div
class=
"hot_set"
>
<div
class=
"hot_set"
>
热词设置:滚动
热词设置:滚动
<p><input
type=
"text"
class=
"layui-input form-control"
id=
"t
est1
"
style=
"margin-left: 10px;"
placeholder=
"请选择时间"
>
M
</p>
<p><input
type=
"text"
class=
"layui-input form-control"
id=
"t
ime
"
style=
"margin-left: 10px;"
placeholder=
"请选择时间"
>
M
</p>
</div>
</div>
<div
class=
"footer_btn"
>
<div
class=
"footer_btn"
>
<button
type=
"button"
class=
"btn btn-success"
onclick=
"save()"
>
保存
</button>
<button
type=
"button"
class=
"btn btn-success"
onclick=
"save()"
>
保存
</button>
...
@@ -122,25 +122,75 @@
...
@@ -122,25 +122,75 @@
<script
th:inline=
"javascript"
>
<script
th:inline=
"javascript"
>
var
prefix2
=
ctx
+
"local"
;
var
prefix2
=
ctx
+
"local"
;
let
num
=
0
;
let
num
=
0
;
function
goArea
(
num
)
{
let
hotArr
=
[];
console
.
log
(
num
)
let
mid
=
0
;
switch
(
num
)
{
let
createTime
=
''
;
case
5
:
let
hotWordId
=
''
;
$
.
modal
.
openTab
(
'商品搜索'
,
prefix2
+
"/searchStore?id="
+
1212
)
let
updateTime
=
''
;
break
;
$
(
function
(){
}
promiseMethods
(
'/hotWord/list'
,
'post'
).
then
(
res
=>
{
}
let
data
=
res
.
data
[
0
];
mid
=
data
.
mid
;
createTime
=
data
.
createTime
;
hotWordId
=
data
.
hotWordId
;
updateTime
=
data
.
updateTime
;
let
hotStr
=
data
.
word
.
split
(
','
);
console
.
log
(
hotStr
,
'hotStr'
)
for
(
var
i
=
0
;
i
<
hotStr
.
length
;
i
++
)
{
console
.
log
(
1
,
'1'
)
num
++
let
str
=
`<div class="tag" id="item
${
num
}
">
${
hotStr
[
i
]}
<span onclick="delTags('
${
num
}
')">x</span></div>`
;
hotArr
.
push
(
hotStr
[
i
])
$
(
".tags"
).
append
(
str
);
}
})
})
function
addItems
()
{
function
addItems
()
{
if
(
!
$
(
"#test1"
).
val
())
{
if
(
!
$
(
"#test1"
).
val
())
{
return
layer
.
msg
(
'输入内容不能为空!'
)
return
layer
.
msg
(
'输入内容不能为空!'
)
}
}
num
++
num
++
let
str
=
`<div class="tag">
${
$
(
"#test1"
).
val
()}
<span onclick="delTags('
${
num
}
')">x</span></div>`
;
let
str
=
`<div class="tag" id="item
${
num
}
">
${
$
(
"#test1"
).
val
()}
<span onclick="delTags('
${
num
}
')">x</span></div>`
;
hotArr
.
push
(
$
(
'#test1'
).
val
())
$
(
".tags"
).
append
(
str
);
$
(
".tags"
).
append
(
str
);
$
(
"#test1"
).
val
(
''
);
$
(
"#test1"
).
val
(
''
);
}
}
function
delTags
(
num
)
{
let
name
=
$
(
"#item"
+
num
+
""
).
text
().
slice
(
0
,
$
(
"#item"
+
num
+
""
).
text
().
length
-
1
)
hotArr
.
splice
(
hotArr
.
indexOf
(
name
),
1
);
$
(
"#item"
+
num
+
""
).
remove
();
}
function
save
()
{
function
save
()
{
refreshItem
()
let
data
=
{
"changeTime"
:
$
(
'#time'
).
val
()
*
60
,
"changeType"
:
1
,
"createTime"
:
createTime
?
createTime
:
""
,
"delTag"
:
0
,
"hotWordId"
:
hotWordId
?
hotWordId
:
""
,
"indexs"
:
1
,
"mid"
:
mid
?
mid
:
0
,
"status"
:
''
,
"updateTime"
:
updateTime
?
updateTime
:
''
,
"word"
:
hotArr
.
toString
()
}
console
.
log
(
data
,
'data'
)
promiseMethods
(
'/hotWord/updateOrCreate'
,
'post'
,
JSON
.
stringify
(
data
),
'application/json'
).
then
(
res
=>
{
console
.
log
(
res
,
121212
)
})
// refreshItem()
}
function
promiseMethods
(
url
,
type
,
data
,
contentType
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
$
.
ajax
({
url
,
type
,
data
,
contentType
,
success
:
function
(
res
)
{
resolve
(
res
);
}
})
})
}
}
</script>
</script>
</body>
</body>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/store/homeSet/topBanner.html
View file @
1186e597
...
@@ -66,6 +66,19 @@
...
@@ -66,6 +66,19 @@
border-radius
:
10px
;
border-radius
:
10px
;
padding
:
12px
;
padding
:
12px
;
margin-bottom
:
20px
;
margin-bottom
:
20px
;
position
:
relative
;
}
.banner_item
.del
{
position
:
absolute
;
right
:
-8px
;
top
:
-8px
;
width
:
20px
;
height
:
20px
;
line-height
:
18px
;
border
:
1px
solid
#ccc
;
border-radius
:
50%
;
text-align
:
center
;
cursor
:
pointer
;
}
}
.img_show
,
.set_method
,
.set_function
{
.img_show
,
.set_method
,
.set_function
{
display
:
flex
;
display
:
flex
;
...
@@ -112,7 +125,7 @@
...
@@ -112,7 +125,7 @@
选择照片:
选择照片:
</div>
</div>
<div
class=
"tags"
>
<div
class=
"tags"
>
<button
type=
"button"
class=
"btn btn-warning"
style=
"margin-right: 12px;"
onclick=
"addItem()"
>
添加banner
</button>
<button
type=
"button"
class=
"btn btn-warning"
style=
"margin-right: 12px;"
onclick=
"addItem(
0
)"
>
添加banner
</button>
<span
id=
"tall"
>
(最多允许添加10张图,建议宽度750像素)
</span>
<span
id=
"tall"
>
(最多允许添加10张图,建议宽度750像素)
</span>
</div>
</div>
</div>
</div>
...
@@ -135,6 +148,7 @@
...
@@ -135,6 +148,7 @@
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<th:block
th:include=
"include :: bootstrap-suggest-js"
/>
<script
th:inline=
"javascript"
>
<script
th:inline=
"javascript"
>
var
prefix2
=
ctx
+
"local"
;
var
prefix2
=
ctx
+
"local"
;
var
platformUrl
=
[[
$
{
platformUrl
}]];
var
platformUrl
=
[[
$
{
platformUrl
}]];
...
@@ -148,13 +162,89 @@
...
@@ -148,13 +162,89 @@
if
(
type
==
2
)
{
if
(
type
==
2
)
{
$
(
"#tall"
).
html
(
'至少添加8张图,建议尺寸1:1'
)
$
(
"#tall"
).
html
(
'至少添加8张图,建议尺寸1:1'
)
}
}
let
data
=
{
type
:
1
}
promiseMethods
(
'/frontBanner/list'
,
'post'
,
data
).
then
(
res
=>
{
console
.
log
(
res
,
121212121
)
let
{
data
}
=
res
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
let
str
=
`<div class="banner_item" data-id="
${
data
[
i
].
bannerId
}
" data-index="
${
data
[
i
].
mid
}
">
<span class="del" onclick="delItem('
${
i
+
1
}
', '
${
index
}
')">x</span>
<div class="img_show">
<div class="title">
图片展示:
</div>
<div class="ibox-content" style="border: none;">
<img id="viewImg
${
num
}
" class="imgBox" src="" alt="">
<div class="form-group">
<div class="file-loading">
<input id="fileinput
${
num
}
" type="file" name="file" data-browse-on-zone-click="true" data-theme="fas">
</div>
</div>
</div>
</div>
<div class="set_method" style="margin-bottom: 20px;">
<div class="jump">
<div class="title">
跳转方式:
</div>
<div class="iptOrSelect" style="margin-right: 12px;">
<select id="jumpSelect
${
num
}
" onchange="changeJump(this)" class="type form-control" data-first-title="请选择">
<option value="1">票务</option>
<option value="2">商品</option>
<option value="3">H5</option>
</select>
</div>
</div>
<div class="ticket_name">
<div class="title">
<span class="change
${
num
}
">票务名称</span>:
</div>
<div class="input-group iptOrSelect shwoSelect
${
num
}
"">
<input id="ticketName
${
num
}
" type="text" class="form-control storeList" onFocus="focusMethod(this)" placeholder="请输入查询信息">
<div class="input-group-btn">
<ul class="dropdown-menu dropdown-menu-right" role="menu">
</ul>
</div>
</div>
<div class="iptOrSelect shwoH5
${
num
}
" style="display:none;">
<input id="ticketName
${
num
}
" type="text" class="layui-input form-control" placeholder="请输入活动链接">
</div>
</div>
</div>
<div class="set_function">
<div class="set_function_time">
<div class="title">
时间设置:
</div>
<div class="select_tiem">
<input type="text" class="layui-input form-control timeStart" id="startTime
${
num
}
" autocomplete="off" placeholder="配置活动时间">
</div>
</div>
<div class="set_function_time" style="width: 40%;">
<div class="title">
排序:
</div>
<div class="select_tiem">
<input id="px
${
num
}
" type="text" class="layui-input form-control px" placeholder="请输入顺序数字">
</div>
</div>
</div>
</div>`
;
$
(
"#bannerList"
).
append
(
str
);
common
(
num
)
}
})
//
})
})
function
addItem
()
{
function
addItem
(
index
)
{
if
(
num
==
10
)
{
if
(
num
==
10
)
{
return
layer
.
msg
(
'最多可添加10张图片'
)
return
layer
.
msg
(
'最多可添加10张图片'
)
}
}
num
++
num
++
let
str
=
`<div class="banner_item">
let
str
=
`<div class="banner_item" data-id="" data-index="">
<span class="del" onclick="delItem('
${
num
}
', '
${
index
}
')">x</span>
<div class="img_show">
<div class="img_show">
<div class="title">
<div class="title">
图片展示:
图片展示:
...
@@ -174,17 +264,26 @@
...
@@ -174,17 +264,26 @@
跳转方式:
跳转方式:
</div>
</div>
<div class="iptOrSelect" style="margin-right: 12px;">
<div class="iptOrSelect" style="margin-right: 12px;">
<select id="jumpSelect
${
num
}
" class="type form-control" data-first-title="请选择">
<select id="jumpSelect
${
num
}
" onchange="changeJump(this)" class="type form-control" data-first-title="请选择">
<option value="">请选择</option>
<option value="1">票务</option>
<option value="2">商品</option>
<option value="3">H5</option>
</select>
</select>
</div>
</div>
</div>
</div>
<div class="ticket_name">
<div class="ticket_name">
<div class="title">
<div class="title">
票务名称:
<span class="change
${
num
}
">票务名称</span>:
</div>
<div class="input-group iptOrSelect shwoSelect
${
num
}
"">
<input id="ticketName
${
num
}
" type="text" class="form-control storeList" onFocus="focusMethod(this)" placeholder="请输入查询信息">
<div class="input-group-btn">
<ul class="dropdown-menu dropdown-menu-right" role="menu">
</ul>
</div>
</div>
</div>
<div class="iptOrSelect">
<div class="iptOrSelect
shwoH5
${
num
}
" style="display:none;
">
<input id="ticketName
${
num
}
" type="text" class="layui-input form-control">
<input id="ticketName
${
num
}
" type="text" class="layui-input form-control"
placeholder="请输入活动链接"
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -194,7 +293,7 @@
...
@@ -194,7 +293,7 @@
时间设置:
时间设置:
</div>
</div>
<div class="select_tiem">
<div class="select_tiem">
<input type="text" class="layui-input form-control" id="startTime
${
num
}
" autocomplete="off" placeholder="配置活动时间">
<input type="text" class="layui-input form-control
timeStart
" id="startTime
${
num
}
" autocomplete="off" placeholder="配置活动时间">
</div>
</div>
</div>
</div>
<div class="set_function_time" style="width: 40%;">
<div class="set_function_time" style="width: 40%;">
...
@@ -202,7 +301,7 @@
...
@@ -202,7 +301,7 @@
排序:
排序:
</div>
</div>
<div class="select_tiem">
<div class="select_tiem">
<input id="px
${
num
}
" type="text" class="layui-input form-control" placeholder="请输入顺序数字">
<input id="px
${
num
}
" type="text" class="layui-input form-control
px
" placeholder="请输入顺序数字">
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -211,10 +310,84 @@
...
@@ -211,10 +310,84 @@
common
(
num
)
common
(
num
)
}
}
function
save
()
{
function
save
()
{
if
(
type
==
2
)
{
let
obj
=
{};
if
(
num
<
8
)
return
layer
.
msg
(
'请添加至少8张图'
)
let
itmeLength
=
$
(
".banner_item"
);
let
data
=
[]
Array
.
prototype
.
forEach
.
call
(
itmeLength
,
function
(
item
,
index
,
arr
)
{
obj
.
activityUrl
=
item
.
querySelector
(
'#ticketName'
+
(
index
+
1
)
+
''
).
value
;
obj
.
bannerId
=
item
.
getAttribute
(
'data-id'
);
obj
.
bannerType
=
1
;
obj
.
createTime
=
''
;
obj
.
delTag
=
'0'
;
obj
.
endTime
=
''
;
obj
.
indexs
=
item
.
querySelector
(
'.px'
).
value
;;
obj
.
jumpType
=
item
.
querySelector
(
'#jumpSelect'
+
(
index
+
1
)
+
''
).
value
;
obj
.
mid
=
item
.
getAttribute
(
'data-index'
)
||
0
;
obj
.
picUrl
=
item
.
querySelector
(
'.imgBox'
).
getAttribute
(
'src'
);
obj
.
startTime
=
item
.
querySelector
(
'.timeStart'
).
value
;
obj
.
updateTime
=
''
;
obj
.
ticketId
=
''
;
obj
.
ticketName
=
''
;
data
.
push
({...
obj
})
});
//foreach js6章封装的方法
console
.
log
(
data
,
'data'
)
promiseMethods
(
'/frontBanner/updateOrCreate'
,
'post'
,
JSON
.
stringify
(
data
),
'application/json'
).
then
(
res
=>
{
console
.
log
(
res
)
})
// refreshItem()
}
function
focusMethod
(
e
)
{
let
index
=
$
(
e
).
attr
(
'id'
).
replace
(
/
[^\d]
/g
,
''
);
// 选中的是第几组
let
url
=
''
;
$
(
".storeList"
).
bsSuggest
({
allowNoKeyword
:
false
,
//是否允许无关键字时请求数据
showBtn
:
false
,
multiWord
:
true
,
//以分隔符号分割的多关键字支持
hideOnSelect
:
true
,
getDataMethod
:
"url"
,
//获取数据的方式,总是从 URL 获取
url
:
ctx
+
'kylin/base/performance/status?status=(3,6)&title='
,
/*如果从 url 获取数据,并且需要跨域,则该参数必须设置*/
processData
:
function
(
json
)
{
// url 获取数据时,对数据的处理,作为 getData 的回调函数
//字符串转化为 js 对象
return
json
;
}
}).
on
(
'onDataRequestSuccess'
,
function
(
e
,
result
)
{
console
.
log
(
'onDataRequestSuccess: '
,
e
,
result
);
}).
on
(
'onSetSelectValue'
,
function
(
e
,
selectedData
,
selectedRawData
)
{
// 当前行的所有值都能拿到
console
.
log
(
'211: '
,
e
.
target
.
value
,
selectedData
,
selectedRawData
);
}).
on
(
'onUnsetSelectValue'
,
function
(
e
)
{
console
.
log
(
"onUnsetSelectValue"
,
e
);
});;
}
function
delItem
(
num
)
{
console
.
log
(
num
)
}
function
changeJump
(
e
)
{
let
index
=
$
(
e
).
attr
(
'id'
).
replace
(
/
[^\d]
/g
,
''
);
// 选中的是第几组
let
jumpType
=
$
(
e
).
val
();
// 选中的跳转类型
switch
(
jumpType
)
{
case
'1'
:
$
(
'.shwoH5'
+
index
+
''
).
hide
();
$
(
'.shwoSelect'
+
index
+
''
).
show
();
$
(
".change"
+
index
+
""
).
text
(
'票务名称'
);
break
;
case
'2'
:
$
(
'.shwoH5'
+
index
+
''
).
hide
();
$
(
'.shwoSelect'
+
index
+
''
).
show
();
$
(
".change"
+
index
+
""
).
text
(
'商品名称'
);
break
;
case
'3'
:
$
(
".change"
+
index
+
""
).
text
(
'活动链接'
);
$
(
'.shwoH5'
+
index
+
''
).
show
();
$
(
'.shwoSelect'
+
index
+
''
).
hide
();
break
;
default
:
$
(
'.shwoH5'
+
index
+
''
).
hide
();
$
(
'.shwoSelect'
+
index
+
''
).
show
();
$
(
".change"
+
index
+
""
).
text
(
'商品集合'
);
}
}
refreshItem
()
}
}
function
common
(
num
)
{
function
common
(
num
)
{
layui
.
use
(
'laydate'
,
function
(){
layui
.
use
(
'laydate'
,
function
(){
...
@@ -250,6 +423,19 @@
...
@@ -250,6 +423,19 @@
$
(
"#viewImg"
+
num
+
""
).
attr
(
'src'
,
showPicture
)
$
(
"#viewImg"
+
num
+
""
).
attr
(
'src'
,
showPicture
)
})
})
}
}
function
promiseMethods
(
url
,
type
,
data
,
contentType
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
$
.
ajax
({
url
,
type
,
data
,
contentType
,
success
:
function
(
res
)
{
resolve
(
res
);
}
})
})
}
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment