| | |
| | | <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> |