记得上下班打卡 | 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
fac85886
Commit
fac85886
authored
Apr 23, 2026
by
姜秀龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
100042 修改需求
parent
78f562bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
7 deletions
+103
-7
AdamCaomeiBadgeController.java
...b/controller/zhengzai/adam/AdamCaomeiBadgeController.java
+7
-1
badge_add.html
...urces/templates/zhengzai/adam/caomei/badge/badge_add.html
+45
-3
badge_edit.html
...rces/templates/zhengzai/adam/caomei/badge/badge_edit.html
+51
-3
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/adam/AdamCaomeiBadgeController.java
View file @
fac85886
...
@@ -18,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -18,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -36,6 +37,9 @@ public class AdamCaomeiBadgeController extends BaseController {
...
@@ -36,6 +37,9 @@ public class AdamCaomeiBadgeController extends BaseController {
@Autowired
@Autowired
private
IAdamCaomeiBadgeAdminService
adamCaomeiBadgeAdminService
;
private
IAdamCaomeiBadgeAdminService
adamCaomeiBadgeAdminService
;
@Value
(
"${liquidnet.client.admin.platformUrl}"
)
private
String
platformUrl
;
@RequiresPermissions
(
"adam:caomei:badge:list"
)
@RequiresPermissions
(
"adam:caomei:badge:list"
)
@GetMapping
()
@GetMapping
()
public
String
view
()
{
public
String
view
()
{
...
@@ -53,7 +57,8 @@ public class AdamCaomeiBadgeController extends BaseController {
...
@@ -53,7 +57,8 @@ public class AdamCaomeiBadgeController extends BaseController {
@RequiresPermissions
(
"adam:caomei:badge:add"
)
@RequiresPermissions
(
"adam:caomei:badge:add"
)
@GetMapping
(
"add"
)
@GetMapping
(
"add"
)
public
String
add
()
{
public
String
add
(
ModelMap
mmap
)
{
mmap
.
put
(
"platformUrl"
,
platformUrl
);
return
prefix
+
"/badge_add"
;
return
prefix
+
"/badge_add"
;
}
}
...
@@ -136,6 +141,7 @@ public class AdamCaomeiBadgeController extends BaseController {
...
@@ -136,6 +141,7 @@ public class AdamCaomeiBadgeController extends BaseController {
Wrappers
.
lambdaQuery
(
AdamCaomeiBadge
.
class
).
eq
(
AdamCaomeiBadge:
:
getBadgeId
,
badgeId
),
false
Wrappers
.
lambdaQuery
(
AdamCaomeiBadge
.
class
).
eq
(
AdamCaomeiBadge:
:
getBadgeId
,
badgeId
),
false
);
);
mmap
.
put
(
"badge"
,
badge
);
mmap
.
put
(
"badge"
,
badge
);
mmap
.
put
(
"platformUrl"
,
platformUrl
);
return
prefix
+
"/badge_edit"
;
return
prefix
+
"/badge_edit"
;
}
}
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/adam/caomei/badge/badge_add.html
View file @
fac85886
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<head>
<th:block
th:include=
"include :: header('新增徽章')"
/>
<th:block
th:include=
"include :: header('新增徽章')"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
</head>
</head>
<body
class=
"white-bg"
>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
...
@@ -15,7 +16,14 @@
...
@@ -15,7 +16,14 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
徽章图标:
</label>
<label
class=
"col-sm-3 control-label is-required"
>
徽章图标:
</label>
<div
class=
"col-sm-8"
>
<div
class=
"col-sm-8"
>
<input
name=
"icon"
class=
"form-control"
type=
"text"
placeholder=
"输入Emoji或图片URL"
required
>
<input
type=
"hidden"
name=
"icon"
id=
"badgeIconUrl"
value=
""
>
<div
id=
"badgeIconPreviewWrap"
class=
"m-b"
style=
"display:none;"
>
<img
id=
"badgeIconPreview"
src=
""
alt=
"预览"
style=
"max-height:96px;border-radius:4px;border:1px solid #eee;"
/>
</div>
<div
class=
"file-loading"
>
<input
id=
"fileinput-badge-icon"
type=
"file"
name=
"file"
data-browse-on-zone-click=
"true"
>
</div>
<span
class=
"help-block m-b-none"
><i
class=
"fa fa-info-circle"
></i>
支持 jpg、png、gif、webp,单张最大 5M;上传后自动保存为图片地址。
</span>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
@@ -51,8 +59,10 @@
...
@@ -51,8 +59,10 @@
</form>
</form>
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: footer"
/>
<script
type=
"text/javascript"
>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<script
type=
"text/javascript"
th:inline=
"javascript"
>
var
prefix
=
ctx
+
"adam/caomei/badge"
;
var
prefix
=
ctx
+
"adam/caomei/badge"
;
var
platformUrl
=
/*[[${platformUrl}]]*/
''
;
function
typeChange
(
val
)
{
function
typeChange
(
val
)
{
if
(
val
==
2
)
{
if
(
val
==
2
)
{
...
@@ -70,10 +80,42 @@
...
@@ -70,10 +80,42 @@
});
});
function
submitHandler
()
{
function
submitHandler
()
{
if
(
!
$
(
"#badgeIconUrl"
).
val
())
{
$
.
modal
.
msgWarning
(
"请先上传徽章图标"
);
return
;
}
if
(
$
.
validate
.
form
())
{
if
(
$
.
validate
.
form
())
{
$
.
operate
.
save
(
prefix
+
"/add"
,
$
(
'#form-badge-add'
).
serialize
());
$
.
operate
.
save
(
prefix
+
"/add"
,
$
(
'#form-badge-add'
).
serialize
());
}
}
}
}
$
(
function
()
{
$
(
"#fileinput-badge-icon"
).
fileinput
({
'theme'
:
'explorer-fas'
,
'uploadUrl'
:
platformUrl
+
"/platform/basicServices/alOss/upload/unsm"
,
"uploadExtraData"
:
{
"pathName"
:
"other"
,
"buckType"
:
1
},
autoReplace
:
true
,
dropZoneTitle
:
"点击或拖拽上传徽章图标"
,
maxFileCount
:
1
,
maxFileSize
:
5120
,
allowedFileExtensions
:
[
'jpg'
,
'jpeg'
,
'png'
,
'gif'
,
'webp'
],
msgSizeTooLarge
:
'文件 "{name}" ({size} KB) 超过了允许大小 {maxSize} KB,最大支持上传5M文件'
}).
on
(
"filebatchselected"
,
function
()
{
$
(
this
).
fileinput
(
"upload"
);
}).
on
(
"fileuploaded"
,
function
(
event
,
data
)
{
if
(
!
data
.
response
||
!
data
.
response
.
data
||
!
data
.
response
.
data
.
ossPath
)
{
$
.
modal
.
alertWarning
((
data
.
response
&&
data
.
response
.
msg
)
?
data
.
response
.
msg
:
"图片上传失败"
);
return
;
}
var
fullUrl
=
"https://img.zhengzai.tv/"
+
data
.
response
.
data
.
ossPath
;
$
(
"#badgeIconUrl"
).
val
(
fullUrl
);
$
(
"#badgeIconPreview"
).
attr
(
"src"
,
fullUrl
);
$
(
"#badgeIconPreviewWrap"
).
show
();
});
});
</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/adam/caomei/badge/badge_edit.html
View file @
fac85886
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<head>
<th:block
th:include=
"include :: header('修改徽章')"
/>
<th:block
th:include=
"include :: header('修改徽章')"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
</head>
</head>
<body
class=
"white-bg"
>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
...
@@ -16,7 +17,21 @@
...
@@ -16,7 +17,21 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
徽章图标:
</label>
<label
class=
"col-sm-3 control-label is-required"
>
徽章图标:
</label>
<div
class=
"col-sm-8"
>
<div
class=
"col-sm-8"
>
<input
name=
"icon"
th:field=
"*{icon}"
class=
"form-control"
type=
"text"
placeholder=
"输入Emoji或图片URL"
required
>
<input
type=
"hidden"
name=
"icon"
id=
"badgeIconUrl"
th:value=
"*{icon}"
>
<div
id=
"badgeIconPreviewWrap"
class=
"m-b"
th:style=
"${badge.icon != null and (#strings.startsWith(badge.icon, 'http') or #strings.startsWith(badge.icon, '/'))} ? '' : 'display:none;'"
>
<img
id=
"badgeIconPreview"
alt=
"当前图标"
th:src=
"${badge.icon != null and (#strings.startsWith(badge.icon, 'http') or #strings.startsWith(badge.icon, '/'))} ? ${badge.icon} : ''"
style=
"max-height:96px;border-radius:4px;border:1px solid #eee;"
/>
</div>
<p
id=
"badgeIconLegacyHint"
class=
"help-block"
th:if=
"${badge.icon != null and !(#strings.startsWith(badge.icon, 'http') or #strings.startsWith(badge.icon, '/'))}"
>
当前为 Emoji 文本:
<strong
th:text=
"${badge.icon}"
></strong>
,上传图片保存后将替换为图片地址。
</p>
<div
class=
"file-loading"
>
<input
id=
"fileinput-badge-icon"
type=
"file"
name=
"file"
data-browse-on-zone-click=
"true"
>
</div>
<span
class=
"help-block m-b-none"
><i
class=
"fa fa-info-circle"
></i>
支持 jpg、png、gif、webp,单张最大 5M;重新上传将覆盖地址。
</span>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
@@ -52,8 +67,10 @@
...
@@ -52,8 +67,10 @@
</form>
</form>
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: footer"
/>
<script
type=
"text/javascript"
>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<script
type=
"text/javascript"
th:inline=
"javascript"
>
var
prefix
=
ctx
+
"adam/caomei/badge"
;
var
prefix
=
ctx
+
"adam/caomei/badge"
;
var
platformUrl
=
/*[[${platformUrl}]]*/
''
;
function
typeChange
(
val
)
{
function
typeChange
(
val
)
{
if
(
val
==
2
||
val
==
'2'
)
{
if
(
val
==
2
||
val
==
'2'
)
{
...
@@ -68,6 +85,33 @@
...
@@ -68,6 +85,33 @@
$
(
function
()
{
$
(
function
()
{
typeChange
(
$
(
'input[name="type"]'
).
val
());
typeChange
(
$
(
'input[name="type"]'
).
val
());
$
(
"#fileinput-badge-icon"
).
fileinput
({
'theme'
:
'explorer-fas'
,
'uploadUrl'
:
platformUrl
+
"/platform/basicServices/alOss/upload/unsm"
,
"uploadExtraData"
:
{
"pathName"
:
"other"
,
"buckType"
:
1
},
autoReplace
:
true
,
dropZoneTitle
:
"点击或拖拽上传徽章图标(可选,用于更换)"
,
maxFileCount
:
1
,
maxFileSize
:
5120
,
allowedFileExtensions
:
[
'jpg'
,
'jpeg'
,
'png'
,
'gif'
,
'webp'
],
msgSizeTooLarge
:
'文件 "{name}" ({size} KB) 超过了允许大小 {maxSize} KB,最大支持上传5M文件'
}).
on
(
"filebatchselected"
,
function
()
{
$
(
this
).
fileinput
(
"upload"
);
}).
on
(
"fileuploaded"
,
function
(
event
,
data
)
{
if
(
!
data
.
response
||
!
data
.
response
.
data
||
!
data
.
response
.
data
.
ossPath
)
{
$
.
modal
.
alertWarning
((
data
.
response
&&
data
.
response
.
msg
)
?
data
.
response
.
msg
:
"图片上传失败"
);
return
;
}
var
fullUrl
=
"https://img.zhengzai.tv/"
+
data
.
response
.
data
.
ossPath
;
$
(
"#badgeIconUrl"
).
val
(
fullUrl
);
$
(
"#badgeIconPreview"
).
attr
(
"src"
,
fullUrl
);
$
(
"#badgeIconPreviewWrap"
).
show
();
$
(
"#badgeIconLegacyHint"
).
hide
();
});
});
});
$
(
"#form-badge-edit"
).
validate
({
$
(
"#form-badge-edit"
).
validate
({
...
@@ -75,10 +119,14 @@
...
@@ -75,10 +119,14 @@
});
});
function
submitHandler
()
{
function
submitHandler
()
{
if
(
!
$
(
"#badgeIconUrl"
).
val
())
{
$
.
modal
.
msgWarning
(
"请先上传徽章图标(若为历史 Emoji 数据,请上传一张图片作为图标)"
);
return
;
}
if
(
$
.
validate
.
form
())
{
if
(
$
.
validate
.
form
())
{
$
.
operate
.
save
(
prefix
+
"/edit"
,
$
(
'#form-badge-edit'
).
serialize
());
$
.
operate
.
save
(
prefix
+
"/edit"
,
$
(
'#form-badge-edit'
).
serialize
());
}
}
}
}
</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