From ad3ac53da1c3a11a96ae62d790aa61a81b9eab91 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 20 三月 2021 18:47:23 +0800 Subject: [PATCH] 完善APP首页顶部标签栏兼容,初步处理推送 --- src/main/webapp/admin/new/add-banner.html | 730 +++++++++++++++++++++++++++++-------------------------- 1 files changed, 381 insertions(+), 349 deletions(-) diff --git a/src/main/webapp/admin/new/add-banner.html b/src/main/webapp/admin/new/add-banner.html index 21dec5b..4d0745a 100644 --- a/src/main/webapp/admin/new/add-banner.html +++ b/src/main/webapp/admin/new/add-banner.html @@ -1,396 +1,428 @@ <html lang="zh-cn"> - <head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="referrer" content="never"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>娣诲姞鎺ㄨ崘Banner</title> - <link href="css/bootstrap.min.css" rel="stylesheet"> - <link href="css/maincontent.css" rel="stylesheet"> - <link href="css/tablestyle.css" rel="stylesheet"> - <style> - .form-group { - margin-bottom: 30px; - } - - .checkbox input[type=checkbox] { - top: 6px; - } - - #container-video { - display: block; - } - - #container-web { - display: none; - } - - #container-special { - display: none; - } - - #dialog-chooselink { - padding: 20px; - } - - #dialog-chooselink select { - width: 100px; - } - - #dialog-chooselink label { - display: inline; - } - - #dialog-chooselink input[type=text] { - display: inline; - width: 500px; - } - - #dialog-chooselink ul { - display: block; - list-style: none; - } - - #dialog-chooselink ul li { - display: inline; - list-style: none; - width: 33%; - float: left; - } - - #dialog-chooselink input[type=radio] { - width: 20px; - height: 20px; - } - - #dialog-chooselink .search-result { - height: 630px; - overflow-y: scroll; - } - </style> - </head> +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="referrer" content="never"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>娣诲姞鎺ㄨ崘Banner</title> + <link href="css/bootstrap.min.css" rel="stylesheet"> + <link href="css/maincontent.css" rel="stylesheet"> + <link href="css/tablestyle.css" rel="stylesheet"> + <style> + .form-group { + margin-bottom: 30px; + } - <body> - <nav class="navbar navbar-default navbar-fixed-top"> - </nav> - <div id="mainbody"> - <div id="sidebar"> - <dl> - </dl> - </div> - <div id="neirong"> - <div class="erjidh"> - <ol class="breadcrumb"> - <li> - <a href="tuijian-lanmuneirong.html">鎺ㄨ崘Banner</a> - </li> - <li class="active">娣诲姞鍐呭</li> - </ol> - </div> - <form class="form-horizontal"> - <div class="form-group"> - <label for="input1" class="changdu1 control-label">鍥剧墖閾炬帴</label> - <div class="col-sm-7"> - <input type="text" class="form-control" id="picture" placeholder="蹇呴』濉啓"> - </div> - </div> + .checkbox input[type=checkbox] { + top: 6px; + } - <div class="form-group"> - <label for="input2" class="changdu1 control-label">鏉冮噸</label> - <div class="col-sm-7"> - <input type="text" class="form-control" id="orderby" placeholder="蹇呴』濉啓"> - </div> - </div> + #container-video { + display: block; + } - <div class="form-group"> - <label for="input3" class="changdu1 control-label">绠�瑕佷粙缁�</label> - <div class="col-sm-7"> - <input type="text" class="form-control" id="introduction" placeholder=""> - </div> - </div> + #container-web { + display: none; + } - <div class="form-group"> - <label for="input4" class="changdu1 control-label">璺宠浆璇︽儏</label> - <div class="col-sm-7"> - <label id="jump-detail"></label> - <input type="hidden" id="linkType" /> - <input type="hidden" id="linkValue" /> + #container-special { + display: none; + } - <a href="javascript:void(0)" class="btn btn-info" id="choose-link">閫夋嫨</a> - </div> - </div> + #dialog-chooselink { + padding: 20px; + } - <div class="form-group"> - <label for="input5" class="changdu1 control-label">澶囨敞</label> - <div class="col-sm-7"> - <textarea class="form-control" id="beizhu"></textarea> - </div> - </div> + #dialog-chooselink select { + width: 100px; + } - <div class="form-group"> - <label for="input7" class="changdu1 control-label">濯掍綋</label> - <div class="col-sm-7 detailsystem"> + #dialog-chooselink label { + display: inline; + } - </div> - </div> + #dialog-chooselink input[type=text] { + display: inline; + width: 500px; + } - <div class="button0"> - <div class="button"> - <button type="button" class="btn btn-primary save">淇濆瓨</button> - </div> - <div class="button"> - <input type="reset" class="btn btn-default" value="閲嶇疆" /> - </div> - </div> - </form> + #dialog-chooselink ul { + display: block; + list-style: none; + } - </div> - <div id="dialog-chooselink" style="display: none;"> - <div class="row" style="height: 690px;"> - <div class="col-lg-3 col-md-3" style="display: inline;"> - <select class="form-control"> - <option value="1">瑙嗛</option> - <option value="2">缃戦〉</option> - <option value="3">鍚堥泦</option> - </select> - </div> - <div class="col-lg-9 col-md-9" style="display: inline;"> - <!--瑙嗛閫夋嫨 --> - <div id="container-video"> - <div class="search"> - <input type="text" class="form-control" placeholder="璇疯緭鍏ュ叧閿瓧" style="width: 200px;display: inline;" /> - <button class="btn btn-info">鎼滅储</button> - </div> + #dialog-chooselink ul li { + display: inline; + list-style: none; + width: 33%; + float: left; + } - <!-- 鎼滅储缁撴灉灞曠ず鍖哄煙--> - <div class="search-result"> - <table class="table"> - <thead> - <th>缂栧彿</th> - <th>鍚嶇О</th> - <th>灏侀潰</th> - <th>鏄惁鏄剧ず</th> - <th>閫夋嫨</th> + #dialog-chooselink input[type=radio] { + width: 20px; + height: 20px; + } - </thead> + #dialog-chooselink .search-result { + height: 630px; + overflow-y: scroll; + } + </style> +</head> - <tbody> +<body> +<nav class="navbar navbar-default navbar-fixed-top"> +</nav> +<div id="mainbody"> + <div id="sidebar"> + <dl> + </dl> + </div> + <div id="neirong"> + <div class="erjidh"> + <ol class="breadcrumb"> + <li> + <a href="tuijian-banner.html">鎺ㄨ崘Banner</a> + </li> + <li class="active">娣诲姞鍐呭</li> + </ol> + </div> + <form class="form-horizontal"> + <div class="form-group"> + <label for="input1" class="changdu1 control-label">鍥剧墖閾炬帴</label> + <div class="col-sm-7"> + <input type="text" class="form-control" id="picture" placeholder="蹇呴』濉啓"> + </div> + </div> - </tbody> - </table> + <div class="form-group"> + <label for="input2" class="changdu1 control-label">椤堕儴鏍囩</label> + <div class="col-sm-7"> + <select class="form-control" id="special" style="max-width: 150px;"> + </select> + </div> + </div> - </div> + <div class="form-group"> + <label for="input2" class="changdu1 control-label">鏉冮噸</label> + <div class="col-sm-7"> + <input type="text" class="form-control" id="orderby" placeholder="蹇呴』濉啓"> + </div> + </div> - </div> - <!--缃戦〉濉啓 --> - <div id="container-web"> - <label>缃戦〉閾炬帴:</label> - <input type="text" class="form-control" /> - </div> - <!--鍚堥泦閫夋嫨 --> - <div id="container-special"> - <label>鍚堥泦鍒楄〃</label> - <ul> - <li> - <div class="checkbox"><label><input type="checkbox" value="46" > 甯冧父褰辫澶у叏Web1</label></div> - </li> - <li> - <div class="checkbox"><label><input type="checkbox" value="46" > 甯冧父褰辫澶у叏Web2</label></div> - </li> + <div class="form-group"> + <label for="input3" class="changdu1 control-label">绠�瑕佷粙缁�</label> + <div class="col-sm-7"> + <input type="text" class="form-control" id="introduction" placeholder=""> + </div> + </div> - </ul> + <div class="form-group"> + <label for="input4" class="changdu1 control-label">璺宠浆璇︽儏</label> + <div class="col-sm-7"> + <label id="jump-detail"></label> + <input type="hidden" id="linkType"/> + <input type="hidden" id="linkValue"/> - </div> - </div> + <a href="javascript:void(0)" class="btn btn-info" id="choose-link">閫夋嫨</a> + </div> + </div> - </div> + <div class="form-group"> + <label for="input5" class="changdu1 control-label">澶囨敞</label> + <div class="col-sm-7"> + <textarea class="form-control" id="beizhu"></textarea> + </div> + </div> - <div style="float: right;"> - <button class="btn btn-info sure">纭畾</button> - <button class="btn btn-default cancel">鍙栨秷</button> - </div> + <div class="form-group"> + <label for="input7" class="changdu1 control-label">濯掍綋</label> + <div class="col-sm-7 detailsystem"> - </div> + </div> + </div> - </div> + <div class="button0"> + <div class="button"> + <button type="button" class="btn btn-primary save">淇濆瓨</button> + </div> + <div class="button"> + <input type="reset" class="btn btn-default" value="閲嶇疆"/> + </div> + </div> + </form> - <script src="//cdn.bootcss.com/jquery/1.10.1/jquery.min.js"></script> - <script src="js/bootstrap.min.js"></script> - <script src="js/nav.js"></script> - <script src="js/common.js"></script> - <script src="layer/layer.js"></script> - <script> - var index; - $(function() { - $.post('/BuWan/admin/new/api/common/detailsystemlist', function(data) { - if(data.code == 0) { - var dsStr = ""; - data.data.forEach(function(ds) { - dsStr += "<div class='checkbox '><label>"; - dsStr += "<input type='checkbox' value=" + ds.id + ">"; - dsStr += " " + ds.name; - dsStr += "</label></div>"; - }); - $(".detailsystem").html(dsStr); - } - }, 'json'); + </div> + <div id="dialog-chooselink" style="display: none;"> + <div class="row" style="height: 690px;"> + <div class="col-lg-3 col-md-3" style="display: inline;"> + <select class="form-control"> + <option value="1">瑙嗛</option> + <option value="2">缃戦〉</option> + <option value="3">鍚堥泦</option> + </select> + </div> + <div class="col-lg-9 col-md-9" style="display: inline;"> + <!--瑙嗛閫夋嫨 --> + <div id="container-video"> + <div class="search"> + <input type="text" class="form-control" placeholder="璇疯緭鍏ュ叧閿瓧" + style="width: 200px;display: inline;"/> + <button class="btn btn-info">鎼滅储</button> + </div> - $(".save").click(function() { - if($("#linkType").val() == undefined || $("#linkType").val().length < 1 || $("#linkType").val() == '') { - layer.msg("璇烽�夋嫨璺宠浆绫诲瀷"); - return; - } + <!-- 鎼滅储缁撴灉灞曠ず鍖哄煙--> + <div class="search-result"> + <table class="table"> + <thead> + <th>缂栧彿</th> + <th>鍚嶇О</th> + <th>灏侀潰</th> + <th>鏄惁鏄剧ず</th> + <th>閫夋嫨</th> - if($("#linkValue").val() == undefined || $("#linkValue").val().length < 1 || $("#linkValue").val() == '') { - layer.msg("璇烽�夋嫨璺宠浆绫诲瀷"); - return; - } + </thead> - var $detailsystems = $(".detailsystem input[type=checkbox]"); - var dess = ""; - for(var i = 0; i < $detailsystems.length; i++) { - if($detailsystems.eq(i).is(":checked")) { - dess += $detailsystems.eq(i).val() + ","; - } - } - if(dess.length > 0) - dess = dess.substr(0, dess.length - 1); + <tbody> - var index = layer.load(0, { - 'shade': false - }); - $.post('/BuWan/admin/new/api/homebanner/addhomead', { - 'picture': $("#picture").val(), - 'orderby': $("#orderby").val(), - 'introduction': $("#introduction").val(), - 'beizhu': $("#beizhu").val(), - 'linkType': $("#linkType").val(), - 'linkValue': $("#linkValue").val(), - 'detailsystemids': dess - }, function(data) { - layer.close(index); - layer.msg(data.msg); - doResponse(data, function() { + </tbody> - }); - }, 'json'); + </table> - }); + </div> - }); - </script> - <script> - $(function() { - $("#dialog-chooselink select").eq(0).change(function() { - var linkType = $(this).val(); - if(linkType == 1) { - $("#container-special").css("display", "none"); - $("#container-video").css("display", "block"); - $("#container-web").css("display", "none"); - } else if(linkType == 2) { - $("#container-special").css("display", "none"); - $("#container-video").css("display", "none"); - $("#container-web").css("display", "block"); - } else if(linkType == 3) { - $("#container-special").css("display", "block"); - $("#container-video").css("display", "none"); - $("#container-web").css("display", "none"); - } - }); + </div> + <!--缃戦〉濉啓 --> + <div id="container-web"> + <label>缃戦〉閾炬帴:</label> + <input type="text" class="form-control"/> + </div> + <!--鍚堥泦閫夋嫨 --> + <div id="container-special"> + <label>鍚堥泦鍒楄〃</label> + <ul> + <li> + <div class="checkbox"><label><input type="checkbox" value="46"> 甯冧父褰辫澶у叏Web1</label> + </div> + </li> + <li> + <div class="checkbox"><label><input type="checkbox" value="46"> 甯冧父褰辫澶у叏Web2</label> + </div> + </li> - //鑾峰彇涓撹緫鍒楄〃 - $.post('/BuWan/admin/new/api/special/getspeciallist', {}, function(data) { - if(data.code == 0) { - $("#container-special ul").empty(); - data.data.forEach(function(special) { - $("#container-special ul").append("<li><div class='checkbox'><label><input type='radio' name='special-choose' value='" + special.id + "' > " + special.name + "</label></div></li>"); - }); - } - }, 'json'); + </ul> - //鎼滅储鐐瑰嚮 - $("#container-video .search button").click(function() { - var key = $("#container-video .search input").val(); - var index = layer.load(0, { - 'shade': false - }); - $.post('/BuWan/admin/new/api/common/searchvideo', { - 'key': key - }, function(data) { - layer.close(index); - if(data.code == 0) { - $(".search-result table tbody").empty(); - var html = ""; - data.data.forEach(function(video) { - html += "<tr><td>" + video.id; - html += "</td><td>" + video.name + "</td><td><img style='width: 80px;' src=" + video.picture + "> </td><td>" + (video.show == 1 ? '鏄剧ず' : '涓嶆樉绀�') + "</td>"; - html += "<td><input type='radio' name='choose-video' value=" + video.id + "></td></tr>"; - }); - $(".search-result table tbody").html(html); - } + </div> + </div> - }, 'json'); - }); + </div> - $("#dialog-chooselink .sure").click(function() { - var type = $("#dialog-chooselink select").eq(0).val(); - var value; - if(type == 1) { - var videoid = $('#dialog-chooselink .search-result input[name="choose-video"]:checked').val(); - console.log(videoid); - if(videoid == undefined || videoid == null) { - layer.msg("璇烽�夋嫨瑙嗛"); - return; - } - value = videoid; - $("#jump-detail").html("瑙嗛:" + videoid); + <div style="float: right;"> + <button class="btn btn-info sure">纭畾</button> + <button class="btn btn-default cancel">鍙栨秷</button> + </div> - } else if(type == 2) { - var url = $("#container-web input[type=text]").val(); - if(url == undefined || url == '' || url.length < 1) { - layer.msg("璇疯緭鍏ョ綉椤甸摼鎺�"); - return; - } - value = url; - $("#jump-detail").html("缃戦〉閾炬帴:" + url); + </div> - } else if(type == 3) { - var specialid = $('#dialog-chooselink #container-special input[name="special-choose"]:checked').val(); - console.log(specialid); - if(specialid == undefined || specialid == null) { - layer.msg("璇烽�夋嫨涓撹緫"); - return; - } - value = specialid; - $("#jump-detail").html("涓撹緫:" + specialid); - } +</div> - $("#linkType").val(type); - $("#linkValue").val(value); - layer.close(index); +<script src="//cdn.bootcss.com/jquery/1.10.1/jquery.min.js"></script> +<script src="js/bootstrap.min.js"></script> +<script src="js/nav.js"></script> +<script src="js/common.js"></script> +<script src="layer/layer.js"></script> +<script> + var index; + $(function () { + $.post('api/homerecommend/getSpcialList', { + "page": 1 + }, function (data) { + if (data.code == 0) { + var datas = data.data.data; + $("#special").empty(); + for (var i = 0; i < datas.length; i++) { + var html = "<option"; + html += " value=" + datas[i].special.dataKey + " >"; + html += datas[i].special.name; + html += "</option>"; + $("#special").append(html); + } - }); + } - $("#dialog-chooselink .cancel").click(function() { - layer.close(index); - }); + }, "json"); - $("#choose-link").click(function() { - index = layer.open({ - type: 1, - title: '閾炬帴閫夋嫨', - shadeClose: true, - shade: 0.8, - area: ['1000px', '800px'], - content: $("#dialog-chooselink") - }); - }); - }); - </script> + $.post('/BuWan/admin/new/api/common/detailsystemlist', function (data) { + if (data.code == 0) { + var dsStr = ""; + data.data.forEach(function (ds) { + dsStr += "<div class='checkbox '><label>"; + dsStr += "<input type='checkbox' value=" + ds.id + ">"; + dsStr += " " + ds.name; + dsStr += "</label></div>"; + }); + $(".detailsystem").html(dsStr); + } + }, 'json'); - </body> + $(".save").click(function () { + if ($("#linkType").val() == undefined || $("#linkType").val().length < 1 || $("#linkType").val() == '') { + layer.msg("璇烽�夋嫨璺宠浆绫诲瀷"); + return; + } + + if ($("#linkValue").val() == undefined || $("#linkValue").val().length < 1 || $("#linkValue").val() == '') { + layer.msg("璇烽�夋嫨璺宠浆绫诲瀷"); + return; + } + + var $detailsystems = $(".detailsystem input[type=checkbox]"); + var dess = ""; + for (var i = 0; i < $detailsystems.length; i++) { + if ($detailsystems.eq(i).is(":checked")) { + dess += $detailsystems.eq(i).val() + ","; + } + } + if (dess.length > 0) + dess = dess.substr(0, dess.length - 1); + + var index = layer.load(0, { + 'shade': false + }); + $.post('/BuWan/admin/new/api/homebanner/addhomead', { + 'picture': $("#picture").val(), + 'orderby': $("#orderby").val(), + 'introduction': $("#introduction").val(), + 'beizhu': $("#beizhu").val(), + 'linkType': $("#linkType").val(), + 'linkValue': $("#linkValue").val(), + 'detailsystemids': dess, + 'specialDataKey': $("#special").val() + }, function (data) { + layer.close(index); + layer.msg(data.msg); + doResponse(data, function () { + + }); + }, 'json'); + + }); + + }); +</script> +<script> + $(function () { + $("#dialog-chooselink select").eq(0).change(function () { + var linkType = $(this).val(); + if (linkType == 1) { + $("#container-special").css("display", "none"); + $("#container-video").css("display", "block"); + $("#container-web").css("display", "none"); + } else if (linkType == 2) { + $("#container-special").css("display", "none"); + $("#container-video").css("display", "none"); + $("#container-web").css("display", "block"); + } else if (linkType == 3) { + $("#container-special").css("display", "block"); + $("#container-video").css("display", "none"); + $("#container-web").css("display", "none"); + } + }); + + //鑾峰彇涓撹緫鍒楄〃 + $.post('/BuWan/admin/new/api/special/getspeciallist', {}, function (data) { + if (data.code == 0) { + $("#container-special ul").empty(); + data.data.forEach(function (special) { + $("#container-special ul").append("<li><div class='checkbox'><label><input type='radio' name='special-choose' value='" + special.id + "' > " + special.name + "</label></div></li>"); + }); + } + }, 'json'); + + //鎼滅储鐐瑰嚮 + $("#container-video .search button").click(function () { + var key = $("#container-video .search input").val(); + var index = layer.load(0, { + 'shade': false + }); + $.post('/BuWan/admin/new/api/common/searchvideo', { + 'key': key + }, function (data) { + layer.close(index); + if (data.code == 0) { + $(".search-result table tbody").empty(); + var html = ""; + data.data.forEach(function (video) { + html += "<tr><td>" + video.id; + html += "</td><td>" + video.name + "</td><td><img style='width: 80px;' src=" + video.picture + "> </td><td>" + (video.show == 1 ? '鏄剧ず' : '涓嶆樉绀�') + "</td>"; + html += "<td><input type='radio' name='choose-video' value=" + video.id + "></td></tr>"; + }); + $(".search-result table tbody").html(html); + } + + }, 'json'); + }); + + $("#dialog-chooselink .sure").click(function () { + var type = $("#dialog-chooselink select").eq(0).val(); + var value; + if (type == 1) { + var videoid = $('#dialog-chooselink .search-result input[name="choose-video"]:checked').val(); + console.log(videoid); + if (videoid == undefined || videoid == null) { + layer.msg("璇烽�夋嫨瑙嗛"); + return; + } + value = videoid; + $("#jump-detail").html("瑙嗛:" + videoid); + + } else if (type == 2) { + var url = $("#container-web input[type=text]").val(); + if (url == undefined || url == '' || url.length < 1) { + layer.msg("璇疯緭鍏ョ綉椤甸摼鎺�"); + return; + } + value = url; + $("#jump-detail").html("缃戦〉閾炬帴:" + url); + + } else if (type == 3) { + var specialid = $('#dialog-chooselink #container-special input[name="special-choose"]:checked').val(); + console.log(specialid); + if (specialid == undefined || specialid == null) { + layer.msg("璇烽�夋嫨涓撹緫"); + return; + } + value = specialid; + $("#jump-detail").html("涓撹緫:" + specialid); + } + + $("#linkType").val(type); + $("#linkValue").val(value); + layer.close(index); + + }); + + $("#dialog-chooselink .cancel").click(function () { + layer.close(index); + }); + + $("#choose-link").click(function () { + index = layer.open({ + type: 1, + title: '閾炬帴閫夋嫨', + shadeClose: true, + shade: 0.8, + area: ['1000px', '800px'], + content: $("#dialog-chooselink") + }); + + }); + }); +</script> + +</body> </html> \ No newline at end of file -- Gitblit v1.8.0