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
ea078ecd
Commit
ea078ecd
authored
May 30, 2025
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(cmpt): 问题修复
parent
fb617209
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
119 additions
and
15 deletions
+119
-15
index.jsp
src/main/webapp/WEB-INF/views/cmpt/index.jsp
+116
-9
index.js
src/main/webapp/static/js/index.js
+3
-6
No files found.
src/main/webapp/WEB-INF/views/cmpt/index.jsp
View file @
ea078ecd
...
...
@@ -30,7 +30,8 @@
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/font-css.css"
>
<!-- theme stylesheet-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/style.default.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
id=
"theme-stylesheet"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/style.default.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
id=
"theme-stylesheet"
>
<!-- Custom stylesheet - for your changes-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<!-- Favicon-->
...
...
@@ -95,6 +96,7 @@
justify-content
:
center
;
align-items
:
center
;
}
.cmpt-status-div
{
width
:
100%
;
height
:
380px
;
...
...
@@ -128,11 +130,15 @@
top
:
105px
;
border-radius
:
50%
;
}
input
:-moz-placeholder
,
textarea
:-moz-placeholder
{
color
:
#999999
;
font-size
:
14px
;
}
.active-style
{
border
:
solid
3px
#e31515
;
}
input
:-ms-input-placeholder
,
textarea
:-ms-input-placeholder
{
...
...
@@ -145,9 +151,70 @@
color
:
#999999
;
font-size
:
14px
;
}
.jscolor
{
background-color
:
rgba
(
250
,
250
,
250
,
1
)
!important
;
color
:
#333
!important
;
.jscolor
{
background-color
:
rgba
(
250
,
250
,
250
,
1
)
!important
;
color
:
#333
!important
;
}
/* 开关样式 */
.switch
{
position
:
relative
;
display
:
inline-block
;
width
:
60px
;
height
:
34px
;
}
.switch
input
{
opacity
:
0
;
width
:
0
;
height
:
0
;
}
.slider
{
position
:
absolute
;
cursor
:
pointer
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background-color
:
#ccc
;
-webkit-transition
:
.4s
;
transition
:
.4s
;
}
.slider
:before
{
position
:
absolute
;
content
:
""
;
height
:
26px
;
width
:
26px
;
left
:
4px
;
bottom
:
4px
;
background-color
:
white
;
-webkit-transition
:
.4s
;
transition
:
.4s
;
}
input
:checked
+
.slider
{
background-color
:
#2196F3
;
}
input
:focus
+
.slider
{
box-shadow
:
0
0
1px
#2196F3
;
}
input
:checked
+
.slider
:before
{
-webkit-transform
:
translateX
(
26px
);
-ms-transform
:
translateX
(
26px
);
transform
:
translateX
(
26px
);
}
/* Rounded sliders */
.slider.round
{
border-radius
:
34px
;
}
.slider.round
:before
{
border-radius
:
50%
;
}
</style>
</head>
...
...
@@ -173,12 +240,16 @@
<div
class=
"card-header d-flex align-items-center"
>
<h2
class=
"h3"
>
主色
</h2>
</div>
<input
id=
"color_c"
type=
"text"
class=
"input_cxcolor"
readonly
style=
"background: ${cmpt.cmptbgColor == null ? "
#
49b4b7
"
:cmpt
.
cmptbgColor
}"
>
<input
class=
"maincolorcode jscolor"
id=
"cmptBgColorInput"
placeholder=
"请输入主题颜色,例:#000000"
onchange=
"cmptBgColorChange()"
value=
'${cmpt.cmptbgColor == null ? "#49b4b7":cmpt.cmptbgColor}'
style=
""
>
<input
id=
"color_c"
type=
"text"
class=
"input_cxcolor"
readonly
style=
"background: ${cmpt.cmptbgColor == null ? "
#
49b4b7
"
:cmpt
.
cmptbgColor
}"
>
<input
class=
"maincolorcode jscolor"
id=
"cmptBgColorInput"
placeholder=
"请输入主题颜色,例:#000000"
onchange=
"cmptBgColorChange()"
value=
'${cmpt.cmptbgColor == null ? "#49b4b7":cmpt.cmptbgColor}'
style=
""
>
</div>
<input
type=
"hidden"
name=
"hdcmptBgColorInput"
id=
"hdcmptBgColorInput"
value=
"${cmpt.cmptbgColor}"
/>
<input
type=
"hidden"
name=
"hdcmptBgColorInput"
id=
"hdcmptBgColorInput"
value=
"${cmpt.cmptbgColor}"
/>
</div>
<!-- Check List -->
<div
class=
"cmptLogo"
>
...
...
@@ -203,6 +274,41 @@
</div>
</div>
</div>
<div
class=
"row line-first"
style=
"margin-top: 10px;"
>
<!-- Trending Articles-->
<div
class=
"maincolor"
>
<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-display:row;align-items: center"
id=
"style-select"
>
<img
data-style=
"1"
class=
"${(cmpt.detailStyle==1||cmpt.detailStyle==null)?'active-style':''}"
style=
"width: 120px;height:200px;box-sizing: border-box;"
src=
"https://geexekimgoss-sxk.oss-cn-hangzhou.aliyuncs.com/gk/common/detail-style/style-1.png"
/>
<img
data-style=
"2"
class=
"${cmpt.detailStyle==2?'active-style':''}"
style=
"width: 120px;height:200px;margin-left:20px;box-sizing: border-box;"
src=
"https://geexekimgoss-sxk.oss-cn-hangzhou.aliyuncs.com/gk/common/detail-style/style-2.png"
/>
<input
type=
"hidden"
name=
"detailStyle"
id=
"detailStyle"
value=
"${cmpt.detailStyle}"
/>
</div>
</div>
</div>
<!-- Check List -->
<div
class=
"cmptLogo"
>
<div
class=
"checklist card"
>
<div
class=
"card-header d-flex align-items-center"
>
<h2
class=
"h3"
>
赛事详情tab是否开启
</h2>
<div
style=
"margin-left: 20px;"
>
<!-- 模拟 switch 开关 -->
<label
class=
"switch"
>
<input
type=
"checkbox"
id=
"isShowTabSwitch"
${
cmpt
.
isShowTab=
=1
?
'
checked
'
:
''}
>
<span
class=
"slider round"
></span>
</label>
<input
type=
"hidden"
id=
"isShowInput"
value=
"${cmpt.isShowTab ? 'true' : 'false'}"
/>
</div>
</div>
</div>
</div>
</div>
<div
class=
"row line-first"
>
<div
class=
"title-sec"
>
<h2
class=
"h3 title"
>
赛事小程序码
</h2>
...
...
@@ -220,7 +326,8 @@
<span
class=
"warning"
>
注
</span>
<span
class=
"tip-txt"
>
上传赛事logo后,将替换小程序码中的赛客LOGO
</span>
</div>
<div><span
class=
"tip-txt"
style=
"padding-left: 10px"
>
微信扫描小程序码直接进入小程序中赛事首页
</span>
<div><span
class=
"tip-txt"
style=
"padding-left: 10px"
>
微信扫描小程序码直接进入小程序中赛事首页
</span>
</div>
</div>
</div>
...
...
src/main/webapp/static/js/index.js
View file @
ea078ecd
$
(
function
()
{
console
.
log
({
cmpt
})
$
(
'#cmptBgColorInput'
).
bind
(
'keyup'
,
function
()
{
$
(
'#cmptBgColorInput'
).
val
(
this
.
value
);
...
...
@@ -17,13 +16,11 @@ $(function () {
$
(
this
).
addClass
(
'active-style'
);
// 将选中的样式值存储到隐藏的 input 中
$
(
"#detailStyle"
).
val
(
selectedStyle
);
console
.
log
(
'当前选中样式: '
,
selectedStyle
);
});
// by ggb 2025-05-30 是否显示 底部的tab
$
(
'#isShowTabSwitch'
).
change
(
function
()
{
// 根据 checkbox 状态更新隐藏 input 的值
$
(
'#isShowInput'
).
val
(
this
.
checked
?
'true'
:
'false'
);
console
.
log
(
'isShowTab 的值为: '
,
$
(
'#isShowInput'
).
val
());
$
(
'#isShowInput'
).
val
(
this
.
checked
?
1
:
0
);
});
...
...
@@ -42,7 +39,7 @@ $(function () {
cmptId
,
logo
,
cmptbgColor
:
"#"
+
bg
,
isShowTab
:
isShowTab
?
1
:
0
isShowTab
};
$
.
ajax
({
url
:
'/gk/cmpt/saveCmpt'
,
...
...
@@ -51,7 +48,7 @@ $(function () {
type
:
'post'
,
success
:
function
(
data
)
{
if
(
data
.
status
)
{
//
window.location.reload();
window
.
location
.
reload
();
layer
.
msg
(
'保存成功'
,
{
icon
:
1
,
time
:
1500
});
}
else
{
layer
.
msg
(
'保存失败'
,
{
icon
:
5
,
time
:
1500
});
...
...
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