<!DOCTYPE html>
|
<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">
|
<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;
|
}
|
</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 href="guanli-zhuanti.html">专题版块</a>
|
</li>
|
<li class="active">添加专题</li>
|
</ol>
|
</div>
|
<div class="header">
|
<h4 class="shujutitle">前端跳转详情</h4>
|
<div class="fenge"></div>
|
</div>
|
<form class="form-horizontal" role="form">
|
<div class="form-group">
|
<label for="input2" class="changdu1 control-label">前端跳转</label>
|
<div class="col-sm-7">
|
<select name="select" class="form-control jdItem">
|
<option></option>
|
</select>
|
</div>
|
</div>
|
<div class="header">
|
<h4 class="shujutitle">首页专题设置</h4>
|
<div class="fenge"></div>
|
</div>
|
<div class="form-group">
|
<label for="input2" class="changdu1 control-label">是否显示</label>
|
<div class="col-sm-7">
|
<div class="checkbox">
|
<label>
|
<input type="checkbox" id="show" value="#">
|
</label>
|
</div>
|
</div>
|
</div>
|
<div class="form-group">
|
<label for="input3" class="changdu1 control-label">名称</label>
|
<div class="col-sm-7">
|
<input type="text" class="form-control" id="name" placeholder="必须填写">
|
</div>
|
</div>
|
<div class="form-group">
|
<label for="input3" class="changdu1 control-label">tag</label>
|
<div class="col-sm-7">
|
<input type="text" class="form-control" id="tag" placeholder="必须填写">
|
</div>
|
</div>
|
<div class="form-group">
|
<label for="input3" class="changdu1 control-label">跳转参数</label>
|
<div class="col-sm-7">
|
<input type="text" class="form-control" id="params" placeholder="必须填写">
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label for="input4" class="changdu1 control-label">图片链接</label>
|
<div class="col-sm-7">
|
<input type="text" class="form-control" id="picture" placeholder="必须填写">
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label for="input6" class="changdu1 control-label">排序权重</label>
|
<div class="col-sm-7">
|
<input type="text" class="form-control" id="orderby" placeholder="必须填写">
|
</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>
|
|
</div>
|
</div>
|
|
<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="layer/layer.js"></script>
|
<script src="js/jdUtlis.js"></script>
|
<script>
|
$(function() {
|
|
setJumpDetail(function(){
|
$(".save").click(function() {
|
save();
|
});
|
});
|
|
});
|
|
function save(){
|
var index = layer.load(0, {
|
'shade': false
|
});
|
var jid = $(".jdItem option:checked").attr("key");
|
$.post("api/v1/systemConfig/get",{"key":"jump"},function(data){
|
if(data.code==0){
|
var value = data.data;
|
value = JSON.stringify(value);
|
value = value.replace("#",$("#params").val());
|
$.post('api/v1/special/addSpecial', {
|
'jumpDetail.id': jid,
|
'tag': $("#tag").val(),
|
'orderby': $("#orderby").val(),
|
'params': value,
|
'show': $("#show").is(":checked") ? true : false,
|
'picture': $("#picture").val(),
|
'name':$("#name").val()
|
}, function(data) {
|
if(data.code == "0") {
|
layer.alert('保存成功!', {
|
icon: 1,
|
skin: 'layer-ext-seaing',
|
yes:function(){
|
location.href="guanli-zhuanti.html?page=1";
|
}
|
});
|
} else {
|
layer.alert('保存失败!', {
|
icon: 2,
|
skin: 'layer-ext-seaing'
|
});
|
}
|
layer.close(index);
|
}, 'json');
|
}else{
|
layer.close(index);
|
layer.msg("加载出错!");
|
}
|
},'json');
|
}
|
</script>
|
</body>
|
|
</html>
|