From d0204d5a1f99851880d945e8a46c5d0801dd512b Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期一, 09 六月 2025 16:52:13 +0800 Subject: [PATCH] bug修改 --- cloud-server-management/src/main/webapp/static/modular/system/advertisement/advertisement.js | 92 +++++++++++++++++++++++++++++++++++++++------ 1 files changed, 79 insertions(+), 13 deletions(-) diff --git a/cloud-server-management/src/main/webapp/static/modular/system/advertisement/advertisement.js b/cloud-server-management/src/main/webapp/static/modular/system/advertisement/advertisement.js index 166152c..d042a33 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/advertisement/advertisement.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/advertisement/advertisement.js @@ -21,10 +21,10 @@ TSite.initColumn = function () { return [ {field: 'selectItem', checkbox: true}, - {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, + {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, {title: '广告类型', field: 'position', visible: true, align: 'center', valign: 'middle',width:'20%', formatter:function (data) { - return {1:"首页banner",2:"线上课得积分",3:"看视频得奖励",4:"常见问题"}[data] + return {1:"首页banner",2:"线上课得积分",3:"看视频得奖励",4:"常见问题",6:"社区世界杯顶部",7:"社区世界杯底部"}[data] } }, {title: '广告名称', field: 'name', visible: true, align: 'center', valign: 'middle'}, @@ -138,6 +138,34 @@ }); this.layerIndex = index; }; +/** + * 跳转基础页面配置 + */ +TSite.basic = function () { + var index = layer.open({ + type: 2, + title: "基础页面配置", + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/advertisement/config' + }); + this.layerIndex = index; +}; +/** + * 跳转福利页面配置 + */ +TSite.benefits = function () { + var index = layer.open({ + type: 2, + title: "福利页面配置", + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/advertisement/benefits' + }); + this.layerIndex = index; +}; /** * 打开查看详情页面 @@ -207,7 +235,32 @@ ajax.set("province",province); ajax.start(); }; - +TSite.addConfig = function(){ + $("#cover1").val(); + $("#cover2").val(); + $("#cover7").val(); + var ajax = new $ax(Feng.ctxPath + "/advertisement/updateConfig", function (data) { + Feng.success("基础页面设置成功") + }); + ajax.set("p1",$("#cover1").val()) + ajax.set("p2",$("#cover2").val()) + ajax.set("p7",$("#cover7").val()) + ajax.start(); +} +TSite.addBenefits = function(){ + $("#cover3").val(); + $("#cover4").val(); + $("#cover5").val(); + $("#cover6").val(); + var ajax = new $ax(Feng.ctxPath + "/advertisement/updateBenefits", function (data) { + Feng.success("基础页面设置成功") + }); + ajax.set("p3",$("#cover3").val()) + ajax.set("p4",$("#cover4").val()) + ajax.set("p5",$("#cover5").val()) + ajax.set("p6",$("#cover6").val()) + ajax.start(); +} TSite.addSubmit = function(){ var data1 = { @@ -264,17 +317,17 @@ return; } } - if(name !='0') { - if ($("#roleType").val() == 1) { - if ($("#type").val() == '') { + console.log("====pagepagepage==============="+$("#page").val()) + if(name !='0'){ + if ($("#type").val() == ''&&$("#page").val()!=2&&$("#page").val()!=25&&$("#page").val()!=27&&$("#page").val()!=37&&$("#page").val()!=28) { Feng.info("请选择跳转类型") return; } - } + } if(name !='0') { if ($("#roleType").val() == 1) { - if ($('#type option:selected').text() == "详情") { + if ($('#type option:selected').text() == "详情"&&$('#type option:selected').text() == "指定商品"&&$('#type option:selected').text() == "指定折扣") { if ($("#pageId").val() == '') { Feng.info("请输入跳转ID") return; @@ -360,7 +413,7 @@ } if(name !='0') { if ($("#roleType").val() == 1) { - if ($("#type").val() == '') { + if ($("#type").val() == ''&&$("#page").val()!=2&&$("#page").val()!=25&&$("#page").val()!=27&&$("#page").val()!=37&&$("#page").val()!=28) { Feng.info("请选择跳转类型") return; } @@ -368,7 +421,7 @@ } if(name !='0') { if ($("#roleType").val() == 1) { - if ($('#type option:selected').text() == "详情") { + if ($('#type option:selected').text() == "详情"&&$('#type option:selected').text() == "指定商品"&&$('#type option:selected').text() == "指定折扣") { if ($("#pageId").val() == '') { Feng.info("请输入跳转ID") return; @@ -422,11 +475,24 @@ } $(function () { + var carPhoto1 = new $WebUpload("cover1"); + carPhoto1.setUploadBarId("progressBar"); + carPhoto1.init(); + + var carPhoto2 = new $WebUpload("cover2"); + carPhoto2.setUploadBarId("progressBar"); + carPhoto2.init(); + + var carPhoto7 = new $WebUpload("cover7"); + carPhoto7.setUploadBarId("progressBar"); + carPhoto7.init(); + var carPhoto = new $WebUpload("img"); + carPhoto.setUploadBarId("progressBar"); + carPhoto.init(); + var defaultColunms = TSite.initColumn(); var table = new BSTable(TSite.id, "/advertisement/listAll", defaultColunms); table.setPaginationType("client"); TSite.table = table.init(); - var carPhoto = new $WebUpload("img"); - carPhoto.setUploadBarId("progressBar"); - carPhoto.init(); + }); -- Gitblit v1.7.1