Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
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
micro_app
gk
Commits
747dbb3d
Commit
747dbb3d
authored
Jun 05, 2026
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gk): 新增图片样式
parent
9f98a5a0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
4 deletions
+72
-4
CmptMapper.xml
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
+9
-3
Cmpt.java
...n/java/com/dlbridge/jadp/plugins/cmpt/dao/model/Cmpt.java
+3
-0
CmptService.java
...a/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
+1
-0
index.jsp
src/main/webapp/WEB-INF/views/cmpt/index.jsp
+49
-1
index.js
src/main/webapp/static/js/index.js
+10
-0
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
View file @
747dbb3d
...
...
@@ -33,7 +33,8 @@
cmpt_status cmptStatus,
audit_status auditStatus,
is_year_rank isYearRank,
show_in_list showInList
show_in_list showInList,
IFNULL(time_style, 1) timeStyle
FROM `gk_cmpt`
WHERE cmpt_id = #{id} LIMIT 1
</select>
...
...
@@ -53,7 +54,8 @@
update_by,
update_date,
del_flag,
show_in_list
show_in_list,
time_style
) VALUES (
#{cmptId},
#{cmptName},
...
...
@@ -68,7 +70,8 @@
#{updateBy},
#{updateDate},
#{delFlag},
#{showInList}
#{showInList},
#{timeStyle}
)
</insert>
...
...
@@ -303,6 +306,9 @@
<if
test=
"showInList != null"
>
show_in_list=#{showInList},
</if>
<if
test=
"timeStyle != null"
>
time_style=#{timeStyle},
</if>
<if
test=
"cmptName != null"
>
a.cmpt_name = #{cmptName},
c.cmptName = #{cmptName},
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/Cmpt.java
View file @
747dbb3d
...
...
@@ -83,4 +83,7 @@ public class Cmpt extends JaapRecord<Cmpt> {
@ApiModelProperty
(
value
=
"是否显示在列表中(1:显示,0:不显示)"
,
notes
=
"是否显示在列表中(1:显示,0:不显示)"
)
private
int
showInList
;
@ApiModelProperty
(
value
=
"时间展示样式(1-5)"
,
notes
=
"时间展示样式(1-5)"
)
private
Integer
timeStyle
;
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
View file @
747dbb3d
...
...
@@ -75,6 +75,7 @@ public class CmptService {
localCmpt
.
setLocation
(
cmpt
.
getLocation
());
localCmpt
.
setLogo
(
localCmpt
.
getLogo
());
update
(
localCmpt
);
// timeStyle 为本地字段,从数据库读取后已在 localCmpt 中,无需覆盖
return
localCmpt
;
}
}
catch
(
Exception
ex
)
{
...
...
src/main/webapp/WEB-INF/views/cmpt/index.jsp
View file @
747dbb3d
...
...
@@ -151,6 +151,25 @@
border
:
solid
3px
#e31515
;
}
.time-style-card
{
width
:
160px
;
height
:
80px
;
border-radius
:
6px
;
border
:
2px
solid
#e0e0e0
;
cursor
:
pointer
;
object-fit
:
contain
;
transition
:
all
0.2s
;
box-sizing
:
border-box
;
}
.time-style-card
:hover
{
border-color
:
#999
;
}
.time-style-card.active-style
{
border
:
solid
3px
#e31515
;
}
input
:-ms-input-placeholder
,
textarea
:-ms-input-placeholder
{
color
:
#999999
;
...
...
@@ -319,7 +338,6 @@
</div>
</div>
</div>
<!-- Check List -->
<div
class=
"cmptLogo"
>
<div
class=
"checklist card"
>
<div
class=
"card-header d-flex align-items-center"
>
...
...
@@ -363,6 +381,36 @@
</div>
</div>
</div>
<div
class=
"row line-first"
style=
"margin-top: 10px;"
>
<div
style=
"width: 100%;"
>
<div
class=
"articles card"
>
<div
class=
"card-header d-flex align-items-center"
>
<h2
class=
"h3"
>
时间展示样式
</h2>
</div>
<div
class=
"card-body"
style=
"display: flex;flex-direction: row;align-items: center;flex-wrap: wrap;gap: 15px;padding: 0px 30px;"
id=
"time-style-select"
>
<img
data-style=
"1"
class=
"time-style-card ${(cmpt.timeStyle==1||cmpt.timeStyle==null)?'active-style':''}"
src=
"https://geexekimgoss-sxk.oss-cn-hangzhou.aliyuncs.com/assistant/time/style_01.png"
/>
<img
data-style=
"2"
class=
"time-style-card ${cmpt.timeStyle==2?'active-style':''}"
src=
"https://geexekimgoss-sxk.oss-cn-hangzhou.aliyuncs.com/assistant/time/style_02.png"
/>
<img
data-style=
"3"
class=
"time-style-card ${cmpt.timeStyle==3?'active-style':''}"
src=
"https://geexekimgoss-sxk.oss-cn-hangzhou.aliyuncs.com/assistant/time/style_03.png"
/>
<img
data-style=
"4"
class=
"time-style-card ${cmpt.timeStyle==4?'active-style':''}"
src=
"https://geexekimgoss-sxk.oss-cn-hangzhou.aliyuncs.com/assistant/time/style_04.png"
/>
<img
data-style=
"5"
class=
"time-style-card ${cmpt.timeStyle==5?'active-style':''}"
src=
"https://geexekimgoss-sxk.oss-cn-hangzhou.aliyuncs.com/assistant/time/style_05.png"
/>
<input
type=
"hidden"
name=
"timeStyle"
id=
"timeStyle"
value=
"${cmpt.timeStyle}"
/>
</div>
</div>
</div>
</div>
<div
class=
"row line-first"
>
<div
class=
"title-sec"
>
<h2
class=
"h3 title"
>
赛事小程序码
</h2>
...
...
src/main/webapp/static/js/index.js
View file @
747dbb3d
...
...
@@ -31,6 +31,14 @@ $(function () {
$
(
'#isShowInList'
).
val
(
this
.
checked
?
1
:
0
);
});
// 时间展示样式选择
$
(
"#time-style-select .time-style-card"
).
click
(
function
()
{
var
selectedStyle
=
$
(
this
).
data
(
'style'
);
$
(
"#time-style-select .time-style-card"
).
removeClass
(
'active-style'
);
$
(
this
).
addClass
(
'active-style'
);
$
(
"#timeStyle"
).
val
(
selectedStyle
??
'1'
);
});
$
(
'.savebtn'
).
click
(
function
()
{
let
bg
=
$
(
'#cmptBgColorInput'
).
val
();
...
...
@@ -38,6 +46,7 @@ $(function () {
let
detailStyle
=
$
(
'#detailStyle'
).
val
()?.
trim
();
let
isShowTab
=
$
(
'#isShowInput'
).
val
();
let
showInList
=
$
(
'#isShowInList'
).
val
();
let
timeStyle
=
$
(
'#timeStyle'
).
val
()?.
trim
();
let
cmptId
=
getCId
();
if
(
bg
.
length
!=
6
)
{
layer
.
msg
(
'请输入6位合法字符!'
);
...
...
@@ -45,6 +54,7 @@ $(function () {
}
const
param
=
{
detailStyle
:
detailStyle
==
null
||
detailStyle
.
length
===
0
?
'1'
:
detailStyle
,
timeStyle
:
timeStyle
==
null
||
timeStyle
.
length
===
0
?
'1'
:
timeStyle
,
cmptId
,
logo
,
cmptbgColor
:
"#"
+
bg
,
...
...
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