Commit fb617209 authored by daniel's avatar daniel

feat(cmpt): 新增品牌设置

parent 6acb22a8
......@@ -169,7 +169,11 @@
a.create_date AS "createDate",
a.update_by AS "updateBy",
a.update_date AS "updateDate",
a.del_flag AS "delFlag"
a.del_flag AS "delFlag",
c.city as city,
c.province as province,
c.area as area,
c.location as location
from gk_cmpt a left join common.neucmpt b on a.cmpt_id=b.gtCmptId
left join raceenroll.competition c on b.gcmptid=c.cmptid
where a.del_flag=0
......@@ -270,8 +274,12 @@
b.city as city,
b.province as province,
b.area as area,
b.location as location
from common.neucmpt a inner join raceenroll.competition b on a.gcmptid = b.cmptid
b.location as location,
g.detail_style as detailStyle,
g.is_show_tab as isShowTab
from common.neucmpt a
inner join raceenroll.competition b on a.gcmptid = b.cmptid
left join gksite.gk_cmpt g on a.gtCmptid = g.cmpt_id
where a.gtcmptid=#{cmptid}
</select>
......
......@@ -57,6 +57,8 @@ public class CmptService {
localCmpt.setStartTime(cmpt.getStartTime());
localCmpt.setEndTime(cmpt.getEndTime());
localCmpt.setCmptType(cmpt.getCmptType());
localCmpt.setDetailStyle(cmpt.getDetailStyle());
localCmpt.setIsShowTab(cmpt.getIsShowTab());
// by ggb 2025/05/09 设置城市、省份、区域、地址
localCmpt.setCity(cmpt.getCity());
localCmpt.setProvince(cmpt.getProvince());
......
......@@ -384,6 +384,10 @@
{
name: '图片',
value: 6,
},
{
name: '地图',
value: 7,
}
],
},
......
$(function () {
console.log({cmpt})
$('#cmptBgColorInput').bind('keyup', function () {
$('#cmptBgColorInput').val(this.value);
......@@ -7,19 +7,43 @@ $(function () {
cmptBgColorChange();
});
// by ggb 2025-05-30 为图片添加点击事件监听器
$("#style-select img").click(function () {
// 获取当前点击图片的样式值
var selectedStyle = $(this).data('style');
// 移除所有图片的 active-style 样式
$("#style-select img").removeClass('active-style');
// 为当前点击的图片添加 active-style 样式
$(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());
});
$('.savebtn').click(function () {
let bg = $('#cmptBgColorInput').val();
let logo = $('#hdcmptLogo').val();
let detailStyle = $('#detailStyle').val();
let isShowTab = $('#isShowInput').val();
let cmptId = getCId();
if(bg.length != 6){
layer.msg('请输入6位合法字符!');
return ;
}
var param = {};
param.cmptId = cmptId;
param.cmptbgColor = "#"+bg;
param.logo = logo;
const param = {
detailStyle:detailStyle??'style-1',
cmptId,
logo,
cmptbgColor: "#"+bg,
isShowTab:isShowTab?1:0
};
$.ajax({
url: '/gk/cmpt/saveCmpt',
data: JSON.stringify(param),
......@@ -27,7 +51,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});
......
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