记得上下班打卡 | 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
a5e4d8b2
Commit
a5e4d8b2
authored
Oct 12, 2022
by
dongchun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新建yb
parent
c4b52ad6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
494 additions
and
1 deletion
+494
-1
LocalAdminController.java
...t/admin/web/controller/zhengzai/LocalAdminController.java
+11
-1
bannerList.html
.../src/main/resources/templates/zhengzai/yb/bannerList.html
+285
-0
creatAndEdit.html
...rc/main/resources/templates/zhengzai/yb/creatAndEdit.html
+198
-0
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/LocalAdminController.java
View file @
a5e4d8b2
...
@@ -21,6 +21,7 @@ public class LocalAdminController extends BaseController
...
@@ -21,6 +21,7 @@ public class LocalAdminController extends BaseController
private
final
String
smilePrefix
=
"zhengzai/smile"
;
private
final
String
smilePrefix
=
"zhengzai/smile"
;
private
final
String
activityPrefix
=
"zhengzai/sweet"
;
private
final
String
activityPrefix
=
"zhengzai/sweet"
;
private
final
String
candyPrefix
=
"zhengzai/candy"
;
private
final
String
candyPrefix
=
"zhengzai/candy"
;
private
final
String
ybPrefix
=
"zhengzai/yb"
;
@Value
(
"${liquidnet.client.admin.platformUrl}"
)
@Value
(
"${liquidnet.client.admin.platformUrl}"
)
private
String
platformUrl
;
private
String
platformUrl
;
...
@@ -221,5 +222,14 @@ public class LocalAdminController extends BaseController
...
@@ -221,5 +222,14 @@ public class LocalAdminController extends BaseController
{
{
return
activityPrefix
+
"/affiliatedActivity/edit"
;
return
activityPrefix
+
"/affiliatedActivity/edit"
;
}
}
@GetMapping
(
"/bannerList"
)
// yb banner列表
public
String
bannerList
()
{
return
ybPrefix
+
"/bannerList"
;
}
@GetMapping
(
"/creatAndEdit"
)
// yb banner列表
public
String
creatAndEdit
(
ModelMap
mmap
)
{
mmap
.
put
(
"platformUrl"
,
platformUrl
);
return
ybPrefix
+
"/creatAndEdit"
;
}
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/yb/bannerList.html
0 → 100644
View file @
a5e4d8b2
<!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
;
}
.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
;
}
.gray-bg
.fixed-table-toolbar
{
display
:
flex
;
}
.gray-bg
.fixed-table-toolbar
.bs-bars
{
flex
:
1
;
}
.gray-bg
.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=
"gray-bg"
>
<div
class=
"container-div"
>
<div
class=
"row"
>
<div
class=
"col-sm-12 search-collapse"
>
<form
id=
"role-form"
>
<div
class=
"select-list"
>
<ul>
<li
class=
"leftSearchBox"
>
<input
class=
"form-control"
type=
"text"
name=
"title"
placeholder=
"请输入名字"
>
时间:
<input
type=
"text"
class=
"layui-input form-control"
id=
"test1"
name=
"startTime"
placeholder=
"请选择时间"
>
~
<input
type=
"text"
class=
"layui-input form-control"
id=
"test1"
name=
"endTime"
style=
"margin-left: 10px;"
placeholder=
"请选择时间"
>
<li>
<a
id=
"searchBtns"
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=
"ceshi()"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</li>
</li>
<li>
</li>
</ul>
</div>
</form>
</div>
<div
class=
"btn-group-sm"
id=
"toolbar"
>
<div>
<a
class=
"btn btn-success"
id=
"addActivity"
onclick=
"creatAndEdit(1)"
>
<i
class=
"fa fa-plus"
></i>
新增banner
</a>
<a
class=
"btn btn-warning"
id=
"button-open-11"
>
<i
class=
"fa fa-download"
></i>
导出Excel
</a>
</div>
</div>
<div
class=
"col-sm-12 select-table table-striped"
>
<table
id=
"bootstrap-table"
></table>
</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'
)}]];
let
rowData
=
{};
var
couType
=
[[
$
{
couType
}]];
$
(
function
()
{
var
options
=
{
url
:
"/sweet/activity/list"
,
type
:
'get'
,
createUrl
:
prefix2
+
"/addNewActivity"
,
detailUrl
:
prefix2
+
"/addNewActivity?id={id}"
,
removeUrl
:
prefix
+
"/cancel/{id}"
,
openTab
:
prefix2
+
"/activityStoreList/id={id}"
,
// exportUrl: prefix + "/export",
onCheck
:
onCheck
,
// onCheckAll: onCheckAll,
sortName
:
"createdAt"
,
sortOrder
:
"desc"
,
modalName
:
"活动"
,
columns
:
[
// {
// radio: true
// },
{
field
:
'name'
,
title
:
'活动名称'
},
{
field
:
'status'
,
title
:
'状态'
,
formatter
:
function
(
value
,
row
,
index
)
{
// $('.pull-right').hide()
if
(
value
==
-
1
)
{
return
'全部'
}
else
if
(
value
==
0
)
{
return
'等待开始'
}
else
if
(
value
==
1
)
{
return
'进行中'
}
else
if
(
value
==
2
)
{
return
'活动结束'
}
else
{
return
'停用'
}
}
},
{
field
:
'bindType'
,
title
:
'有效期'
,
formatter
:
function
(
value
,
row
,
index
)
{
return
row
.
startTime
+
' - '
+
row
.
endTime
}
},
{
field
:
'createdAt'
,
title
:
'创建时间'
},
{
field
:
'storeCount'
,
title
:
'店铺数量'
},
{
title
:
'操作'
,
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
)
{
return
`<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="$.operate.detailTab('
${
row
.
selfMarketId
}
')">编辑活动</a>
<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="goToStore_list('
${
row
.
name
}
','
${
row
.
selfMarketId
}
','
${
row
.
startTime
}
-
${
row
.
endTime
}
')">查看详情</a>`
}
}]
};
$
.
table
.
init
(
options
);
});
function
ceshi
()
{
$
.
form
.
reset
();
$
(
"button[name=refresh]"
).
click
();
}
function
creatAndEdit
(
num
,
id
)
{
let
name
=
'创建banner'
if
(
!
num
)
{
name
=
'编辑banner'
}
$
.
modal
.
open
(
`
${
name
}
`
,
prefix2
+
"/creatAndEdit?id="
+
id
,
900
,
560
,
callback
)
// $.modal.open('新品推荐', prefix2 + "/newRecommended?id=" + num,900,560, callback)
}
function
callback
(
index
,
layero
)
{
let
bodyDom
=
$
(
layero
).
find
(
"iframe"
)[
0
].
contentWindow
;
let
data
=
{
title
:
bodyDom
.
document
.
getElementById
(
"ybTitle"
).
value
,
startTime
:
bodyDom
.
document
.
getElementById
(
"startTime"
).
value
,
endTime
:
bodyDom
.
document
.
getElementById
(
"endTime"
).
value
,
cover
:
bodyDom
.
document
.
getElementById
(
"viewImg"
).
getAttribute
(
'src'
)
}
for
(
var
i
in
data
)
{
if
(
!
data
[
i
])
return
layer
.
msg
(
'请将必填项填写完整~!'
)
}
data
.
activityId
=
''
;
promiseMethods
(
'/sweet/activity/insert'
,
'post'
,
JSON
.
stringify
(
data
)).
then
(
res
=>
{
$
.
operate
.
successCallback
(
res
);
})
}
function
functionBtn
(
type
)
{
let
status
=
''
;
if
(
type
==
1
)
{
status
=
0
;
}
else
if
(
type
==
2
)
{
status
=
7
;
}
else
{
status
=
-
1
;
}
let
data
=
{
marketId
:
rowData
.
selfMarketId
}
data
.
status
=
status
;
promiseMethods
(
'/goblin/marketing/zhengzai/status'
,
'post'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
type
==
3
)
{
layer
.
msg
(
'删除成功!'
)
}
else
{
layer
.
msg
(
'修改状态成功!'
)
}
setTimeout
(()
=>
{
$
(
"#searchBtns"
).
click
();
},
500
);
}
})
}
$
(
"#button-open-11"
).
click
(
function
(){
$
(
"button[name=refresh]"
).
click
()
})
function
goToStore_list
(
name
,
id
,
time
)
{
$
.
modal
.
openTab
(
name
,
prefix2
+
"/activityStoreList?id="
+
id
+
'&time='
+
time
+
'&name='
+
name
)
}
function
onCheck
(
row
,
$element
)
{
rowData
=
row
;
}
function
onCheckAll
(
row
,
$element
)
{
rowData
=
row
;
}
function
yes
(
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
(
"操作成功!"
)
setTimeout
(()
=>
{
$
(
"#searchBtns"
).
click
();
},
1500
);
}
})
});
}
layui
.
use
(
'laydate'
,
function
(){
var
laydate
=
layui
.
laydate
;
//执行一个laydate实例
laydate
.
render
({
elem
:
'#test1'
,
//指定元素
type
:
'datetime'
});
});
function
promiseMethods
(
url
,
type
,
data
,
contentType
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
$
.
ajax
({
url
,
type
,
data
,
contentType
,
success
:
function
(
res
)
{
resolve
(
res
);
}
})
})
}
</script>
</body>
</html>
\ No newline at end of file
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/yb/creatAndEdit.html
0 → 100644
View file @
a5e4d8b2
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<th:block
th:include=
"include :: header('新增活动')"
/>
<th:block
th:include=
"include :: select2-css"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
<link
rel=
"stylesheet"
href=
""
>
<style>
input
{
height
:
34
PX
;
line-height
:
34
PX
;
}
.required
{
font-style
:
normal
;
color
:
red
;
}
.content_item
{
padding
:
20px
;
}
/* .content_item .content_title {
display: flex;
} */
.content_item
.content_title
h3
span
{
display
:
inline-block
;
width
:
4px
;
height
:
18px
;
background
:
skyblue
;
margin-right
:
6px
;
vertical-align
:
top
;
}
.basis_data
{
display
:
flex
;
font-size
:
14px
;
padding
:
0
20px
;
margin-top
:
20px
;
/* align-items: center; */
}
.basis_data
span
{
width
:
100px
;
text-align
:
right
;
}
#startTime
,
#endTime
{
width
:
272px
;
margin-right
:
10px
;
}
.storeList
,
#selectShow
,
.dropdown-menu
,
.input-group
{
width
:
270px
!important
;
}
.activityStore_item
{
display
:
flex
;
margin-bottom
:
12px
;
}
#basis_data
{
align-items
:
flex-start
;
}
.form-control
,
.layui-input
{
height
:
34px
;
line-height
:
34px
;
}
.kv-upload-progress
{
display
:
none
!important
;
}
.ibox-content
.imgBox
{
max-width
:
350px
;
max-height
:
180px
;
}
</style>
</head>
<body>
<div>
<div
class=
"content_item"
>
<div
class=
"content_title"
>
<!-- <h3><span></span>基础信息</h3> -->
</div>
<div
class=
"basis_data"
>
<span>
<em
class=
"required"
>
*
</em>
标题:
</span>
<div
class=
"input-group"
style=
"width: 300px;"
>
<input
type=
"text"
class=
"form-control"
id=
"ybTitle"
placeholder=
"请输入活动名称"
>
</div>
</div>
<div
class=
"basis_data ibox-content"
style=
"border: none;display: flex;"
>
<span>
<em
class=
"required"
>
*
</em>
活动图片:
</span>
<div>
<img
id=
"viewImg"
class=
"imgBox"
src=
""
alt=
""
>
<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>
<!-- <span style="color: #ccc; font-size: 12px;">适配图片尺寸:660*344</span> -->
</div>
</div>
</div>
<div
class=
"basis_data"
>
<span>
<em
class=
"required"
>
*
</em>
起止时间:
</span>
<input
type=
"text"
class=
"layui-input form-control editDisabled"
id=
"startTime"
autocomplete=
"off"
placeholder=
"请选择活动开始时间"
>
~
<input
type=
"text"
class=
"layui-input form-control editDisabled"
id=
"endTime"
style=
"margin-left: 10px;"
autocomplete=
"off"
placeholder=
"请选择活动结束时间"
>
</div>
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<th:block
th:include=
"include :: bootstrap-suggest-js"
/>
</body>
<script
th:inline=
"javascript"
>
let
count
=
1
;
var
prefix2
=
ctx
+
"local"
;
let
marketId
=
''
;
let
editDatas
=
0
;
var
platformUrl
=
[[
$
{
platformUrl
}]];
$
(
function
()
{
let
name
=
'id'
;
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
layui
.
use
(
'laydate'
,
function
(){
var
laydate
=
layui
.
laydate
;
//执行一个laydate实例
laydate
.
render
({
elem
:
'#startTime'
,
//指定元素
type
:
'datetime'
});
laydate
.
render
({
elem
:
'#endTime'
,
//指定元素
type
:
'datetime'
});
});
if
(
unescape
(
r
[
2
])
&&
unescape
(
r
[
2
])
!=
'undefined'
)
{
marketId
=
unescape
(
r
[
2
]);
// $(".editDisabled").attr('disabled', true);
// $(".editshow").hide()
let
data
=
{
marketId
}
let
searchActivity
=
promiseMethods
(
'/goblin/marketing/zhengzai/details'
,
'post'
,
data
);
let
searchActivityStore
=
promiseMethods
(
'/goblin/marketing/zhengzai/store/list'
,
'post'
,
data
);
Promise
.
all
([
searchActivity
,
searchActivityStore
]).
then
(
res
=>
{
let
basisData
=
res
[
0
];
let
{
data
}
=
res
[
1
];
editDatas
=
data
.
length
;
$
(
"#viewImg"
).
attr
(
'src'
,
basisData
.
data
.
performanceImg
);
$
(
"#startTime"
).
val
(
basisData
.
data
.
startTime
);
$
(
"#endTime"
).
val
(
basisData
.
data
.
endTime
);
$
(
".content_item"
).
show
();
})
}
$
(
"#fileinput"
).
fileinput
({
'theme'
:
'explorer-fas'
,
// 'uploadUrl': "https://devplatform.zhengzai.tv/platform/basicServices/alOss/upload",
'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
)
{
//上传回调事件
let
showPicture
=
'https://img.zhengzai.tv/'
+
data
.
response
.
data
.
ossPath
;
$
(
"#viewImg"
).
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>
</html>
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