<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;
|
}
|
|
#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>
|
|
<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 onclick="return history.go(-1)">返回</a>
|
</li>
|
</ol>
|
</div>
|
<form class="form-horizontal">
|
|
<div class="form-group">
|
<label for="input4" class="changdu1 control-label">名称</label>
|
<div class="col-sm-7" id="input1">
|
</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="input2" placeholder="权重">
|
</div>
|
</div>
|
|
<div class="button0">
|
<div class="button">
|
<button type="button" id="save" class="btn btn-primary save">保存</button>
|
</div>
|
</div>
|
</form>
|
|
</div>
|
|
</div>
|
|
<script src="js/jquery-1.9.1.min.js"></script>
|
<script src="js/bootstrap.min.js"></script>
|
<script src="js/nav.js"></script>
|
<script src="layer/layer.js"></script>
|
|
<script>
|
var id;
|
$(function(){
|
id = getArgsFromHref(location.href,"id");
|
$.post("api/class/getArea",{"id":id},function(data){
|
if(data.code==0){
|
$("#input1").text(data.data.name);
|
$("#input2").val(data.data.orderby);
|
}else{
|
layer.alert("参数错误!");
|
}
|
},'json')
|
});
|
|
$(".save").bind("click",function(){
|
$.post("api/class/updateArea",{"id":id,"orderBy":$("#input2").val()},function(data){
|
if(data.code==0){
|
layer.alert("修改成功!");
|
}else{
|
layer.alert("修改失败!");
|
}
|
},'json')
|
});
|
|
|
</script>
|
|
<script>
|
|
function getArgsFromHref(sHref, sArgName){
|
var args = sHref.split("?");
|
var retval = "";
|
|
if(args[0] == sHref) /*参数为空*/
|
{
|
return retval; /*无需做任何处理*/
|
}
|
var str = args[1];
|
args = str.split("&");
|
for(var i = 0; i < args.length; i ++)
|
{
|
str = args[i];
|
var arg = str.split("=");
|
if(arg.length <= 1) continue;
|
if(arg[0] == sArgName) retval = arg[1];
|
}
|
return retval;
|
}
|
</script>
|
|
|
|
</body>
|
|
</html>
|