<html lang="zh-cn">
|
|
<head>
|
<meta charset="utf-8">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="referrer" content="never">
|
<title>添加栏目</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;
|
}
|
img{
|
margin-bottom: 10px;
|
}
|
</style>
|
</head>
|
|
<body>
|
<div>
|
<div style="width: 700px;margin: 50px auto">
|
<form class="form-horizontal" role="form">
|
<div class="form-group">
|
<label for="input1" class="changdu1 control-label">封面横图</label>
|
|
<div class="col-sm-7">
|
<img style="width: 200px;" class="picture-img-h"/>
|
<input type="text" class="form-control" id="hPosterPicture" placeholder="">
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label for="input2" class="changdu1 control-label">封面竖图</label>
|
<div class="col-sm-7">
|
<img style="width: 200px;" class="picture-img-v"/>
|
<input type="text" class="form-control" id="vPosterPicture" placeholder="">
|
</div>
|
</div>
|
</form>
|
<div class="button0">
|
<div class="button">
|
<button type="button" class="btn btn-primary save">保存</button>
|
</div>
|
<!--<div class="button">-->
|
<!--<button type="reset" class="btn btn-primary reset">重置</button>-->
|
<!--</div>-->
|
</div>
|
</div>
|
</div>
|
|
<script src="js/jquery-1.9.1.min.js"></script>
|
<script src="js/bootstrap.min.js"></script>
|
<script src="js/common.js"></script>
|
<script src="layer/layer.js"></script>
|
<script>
|
function getQueryString(name) {
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
var r = window.location.search.substr(1).match(reg);
|
if (r != null) return unescape(r[2]);
|
return null;
|
}
|
|
$(function () {
|
//获取参数
|
var id = getQueryString("id");
|
console.log(id);
|
var index = layer.load(0, {
|
'shade': false
|
});
|
$.post('../new/api/video/getVideoInfoExtra', {
|
'id': id
|
}, function (data) {
|
layer.close(index);
|
if (data.code == 0) {
|
if (data.data.hPosterPicture) {
|
$("#hPosterPicture").val(data.data.hPosterPicture);
|
$(".picture-img-h").attr("src", data.data.hPosterPicture);
|
}
|
|
if (data.data.vPosterPicture) {
|
$("#vPosterPicture").val(data.data.vPosterPicture);
|
$(".picture-img-v").attr("src", data.data.vPosterPicture);
|
}
|
|
|
}
|
|
}, 'json');
|
|
$(".save").click(function () {
|
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);
|
|
$.post('../new/api/video/updateVideoInfoExtra', {
|
'id': id,
|
'vPicture': $("#vPosterPicture").val(),
|
'hPicture': $("#hPosterPicture").val(),
|
}, function (data) {
|
layer.close(index);
|
if (data.code == 0) {
|
layer.msg("修改成功");
|
} else {
|
layer.msg(data.msg);
|
}
|
|
doResponse(data, function () {
|
|
});
|
}, 'json');
|
|
});
|
|
});
|
</script>
|
</body>
|
|
</html>
|