Commit ea078ecd authored by daniel's avatar daniel

fix(cmpt): 问题修复

parent fb617209
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/font-css.css"> <link rel="stylesheet" href="${ctxStatic}/newdermon/css/font-css.css">
<!-- theme stylesheet--> <!-- 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--> <!-- Custom stylesheet - for your changes-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/custom.css?v=<%=System.currentTimeMillis()%>"> <link rel="stylesheet" href="${ctxStatic}/newdermon/css/custom.css?v=<%=System.currentTimeMillis()%>">
<!-- Favicon--> <!-- Favicon-->
...@@ -95,6 +96,7 @@ ...@@ -95,6 +96,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.cmpt-status-div { .cmpt-status-div {
width: 100%; width: 100%;
height: 380px; height: 380px;
...@@ -128,11 +130,15 @@ ...@@ -128,11 +130,15 @@
top: 105px; top: 105px;
border-radius: 50%; border-radius: 50%;
} }
input:-moz-placeholder, input:-moz-placeholder,
textarea:-moz-placeholder { textarea:-moz-placeholder {
color: #999999; color: #999999;
font-size: 14px; font-size: 14px;
} }
.active-style {
border: solid 3px #e31515;
}
input:-ms-input-placeholder, input:-ms-input-placeholder,
textarea:-ms-input-placeholder { textarea:-ms-input-placeholder {
...@@ -145,9 +151,70 @@ ...@@ -145,9 +151,70 @@
color: #999999; color: #999999;
font-size: 14px; font-size: 14px;
} }
.jscolor{
background-color: rgba(250, 250, 250, 1)!important; .jscolor {
color: #333!important; 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> </style>
</head> </head>
...@@ -173,12 +240,16 @@ ...@@ -173,12 +240,16 @@
<div class="card-header d-flex align-items-center"> <div class="card-header d-flex align-items-center">
<h2 class="h3">主色</h2> <h2 class="h3">主色</h2>
</div> </div>
<input id="color_c" type="text" class="input_cxcolor" readonly style="background: ${cmpt.cmptbgColor == null ? "#49b4b7":cmpt.cmptbgColor}"> <input id="color_c" type="text" class="input_cxcolor" readonly
<input class="maincolorcode jscolor" id="cmptBgColorInput" placeholder="请输入主题颜色,例:#000000" style="background: ${cmpt.cmptbgColor == null ? "#49b4b7":cmpt.cmptbgColor}">
onchange="cmptBgColorChange()" value='${cmpt.cmptbgColor == null ? "#49b4b7":cmpt.cmptbgColor}' style=""> <input class="maincolorcode jscolor" id="cmptBgColorInput"
placeholder="请输入主题颜色,例:#000000"
onchange="cmptBgColorChange()"
value='${cmpt.cmptbgColor == null ? "#49b4b7":cmpt.cmptbgColor}' style="">
</div> </div>
<input type="hidden" name="hdcmptBgColorInput" id="hdcmptBgColorInput" value="${cmpt.cmptbgColor}"/> <input type="hidden" name="hdcmptBgColorInput" id="hdcmptBgColorInput"
value="${cmpt.cmptbgColor}"/>
</div> </div>
<!-- Check List --> <!-- Check List -->
<div class="cmptLogo"> <div class="cmptLogo">
...@@ -203,6 +274,41 @@ ...@@ -203,6 +274,41 @@
</div> </div>
</div> </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="row line-first">
<div class="title-sec"> <div class="title-sec">
<h2 class="h3 title">赛事小程序码</h2> <h2 class="h3 title">赛事小程序码</h2>
...@@ -220,7 +326,8 @@ ...@@ -220,7 +326,8 @@
<span class="warning">注</span> <span class="warning">注</span>
<span class="tip-txt">上传赛事logo后,将替换小程序码中的赛客LOGO</span> <span class="tip-txt">上传赛事logo后,将替换小程序码中的赛客LOGO</span>
</div> </div>
<div><span class="tip-txt" style="padding-left: 10px">微信扫描小程序码直接进入小程序中赛事首页</span> <div><span class="tip-txt"
style="padding-left: 10px">微信扫描小程序码直接进入小程序中赛事首页</span>
</div> </div>
</div> </div>
</div> </div>
......
$(function () { $(function () {
console.log({cmpt})
$('#cmptBgColorInput').bind('keyup', function () { $('#cmptBgColorInput').bind('keyup', function () {
$('#cmptBgColorInput').val(this.value); $('#cmptBgColorInput').val(this.value);
...@@ -17,13 +16,11 @@ $(function () { ...@@ -17,13 +16,11 @@ $(function () {
$(this).addClass('active-style'); $(this).addClass('active-style');
// 将选中的样式值存储到隐藏的 input 中 // 将选中的样式值存储到隐藏的 input 中
$("#detailStyle").val(selectedStyle); $("#detailStyle").val(selectedStyle);
console.log('当前选中样式: ', selectedStyle);
}); });
// by ggb 2025-05-30 是否显示 底部的tab // by ggb 2025-05-30 是否显示 底部的tab
$('#isShowTabSwitch').change(function () { $('#isShowTabSwitch').change(function () {
// 根据 checkbox 状态更新隐藏 input 的值 // 根据 checkbox 状态更新隐藏 input 的值
$('#isShowInput').val(this.checked ? 'true' : 'false'); $('#isShowInput').val(this.checked ? 1 : 0);
console.log('isShowTab 的值为: ', $('#isShowInput').val());
}); });
...@@ -42,7 +39,7 @@ $(function () { ...@@ -42,7 +39,7 @@ $(function () {
cmptId, cmptId,
logo, logo,
cmptbgColor: "#"+bg, cmptbgColor: "#"+bg,
isShowTab:isShowTab?1:0 isShowTab
}; };
$.ajax({ $.ajax({
url: '/gk/cmpt/saveCmpt', url: '/gk/cmpt/saveCmpt',
...@@ -51,7 +48,7 @@ $(function () { ...@@ -51,7 +48,7 @@ $(function () {
type: 'post', type: 'post',
success: function (data) { success: function (data) {
if (data.status) { if (data.status) {
// window.location.reload(); window.location.reload();
layer.msg('保存成功', {icon: 1, time: 1500}); layer.msg('保存成功', {icon: 1, time: 1500});
} else { } else {
layer.msg('保存失败', {icon: 5, time: 1500}); layer.msg('保存失败', {icon: 5, time: 1500});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment