<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">
|
<style type="text/css">
|
.appname .checkbox input {
|
margin-left: 0 !important;
|
}
|
|
.appname label input {
|
margin-right: 50px;
|
}
|
|
.appname label span {
|
margin-left: 20px;
|
}
|
</style>
|
</head>
|
|
<body>
|
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
</nav>
|
<div id="mainbody">
|
<div id="sidebar">
|
<dl>
|
</dl>
|
</div>
|
<div id="neirong">
|
<div class="erjidh">
|
<table class="table">
|
<tbody>
|
<tr>
|
<td class="xiala">
|
<select name="select" class="form-control select-detailsystem">
|
</select>
|
</td>
|
<td>
|
<form class="form-inline" role="form">
|
<div class="form-group" role="search">
|
<input type="text" class="form-control searchText" style="width:200px;"
|
placeholder="搜索">
|
</div>
|
<button type="button" class="btn btn-default search" @click="requestConfigs(1)">搜索</button>
|
</form>
|
</td>
|
<td>
|
<div class="tianjia">
|
<a href="add-ad-area-config.html" class="btn btn-primary" role="button">添加内容 +</a>
|
</div>
|
</td>
|
</tr>
|
</tbody>
|
</table>
|
</div>
|
<div class="zhuti">
|
<div class="zhutisousuo">
|
<table class="table">
|
<thead>
|
<tr>
|
<th width="30px">选择</th>
|
<th width="30px">编号</th>
|
<th width="100px">APP名称</th>
|
<th width="40px">渠道</th>
|
<th width="30px">广告类型</th>
|
<th width="150px">广告位置</th>
|
<th width="100px">省份</th>
|
<th width="100px">城市</th>
|
<th width="40px">生效开始时间</th>
|
<th width="40px">生效结束时间</th>
|
<th width="40px">创建时间</th>
|
<th width="40px">更新时间</th>
|
<th width="40px">删除</th>
|
<th width="40px">编辑</th>
|
</tr>
|
</thead>
|
<tbody>
|
<tr v-for="item in datas">
|
<td>
|
<label>
|
<input type="checkbox" value="" :key="item.id">
|
</label>
|
</td>
|
<td>
|
{{item.id}}
|
</td>
|
<td>
|
<div>{{item.detailSystem.appName}}</div>
|
</td>
|
<td>
|
|
<div>{{item.channel}}</div>
|
|
</td>
|
<td>
|
<div>{{item.adType}}</div>
|
</td>
|
|
<td>
|
<div><span v-for="(citem, cindex) in item.positions">{{citem.name}}<span v-if="cindex < item.positions.length-1">、</span></span></div>
|
</td>
|
|
<td>
|
<div><span v-for="(citem, cindex) in item.provinces">{{citem}}<span v-if="cindex < item.provinces.length-1">、</span></span></div>
|
</td>
|
<td>
|
<div><span v-for="(citem, cindex) in item.citys">{{citem}}<span v-if="cindex < item.citys.length-1">、</span></span></div>
|
</td>
|
|
<td>
|
<div>{{item.startTime}}</div>
|
</td>
|
<td>
|
<div>{{item.endTime}}</div>
|
</td>
|
<td>
|
<div>{{item.createTime}}</div>
|
</td>
|
|
<td>
|
<div>{{item.updateTime}}</div>
|
</td>
|
|
<td>
|
<a class="anniu shanchu"><img src="image/dustbin.png" @click = "deleteConfig(item.id)"></a></td>
|
<td>
|
<a class="anniu bianji"><img src="image/bianji.png" @click="updateConfig(item.id)"/></a>
|
</td>
|
|
</tr>
|
|
</tbody>
|
</table>
|
</div>
|
<div class="liebiao">
|
<div class="bottom">
|
<div class="page">
|
<ul class="pagination">
|
<li class="disabled pre">
|
<a href="#">«</a>
|
</li>
|
<li>
|
<a href="#" class="next">»</a>
|
</li>
|
</ul>
|
<div class="form-group">
|
<div class="tzan">
|
<button type="button" class="btn btn-primary">跳转</button>
|
</div>
|
<div class="tz">
|
<input class="form-control" type="text" placeholder="页数">
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<script src="js/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="js/page.js"></script>
|
<script src="layer/layer.js"></script>
|
<script src="js/vue.min.js"></script>
|
</body>
|
<script>
|
$(function () {
|
var app = new Vue({
|
el: "#mainbody",
|
data: {
|
datas: []
|
},
|
methods: {
|
requestConfigs: function (page) {
|
var sys = $(".xiala .select-detailsystem > option:checked").val();
|
if (sys == undefined) {
|
sys = 0;
|
}
|
$.post("api/adAreaConfig/list", {"page": page, "detailSystem": sys}, function (data) {
|
if (data.code == 0) {
|
app.datas = data.data;
|
fillPage(data.pageEntity, function (pageIndex) {
|
app.requestConfigs(pageIndex);
|
});
|
} else {
|
alert("加载失败");
|
}
|
}, 'json')
|
},
|
requestPositionList: function () {
|
$.post("api/adAreaConfig/getPositionList", {}, function (data) {
|
if (data.code == 0) {
|
|
} else {
|
|
}
|
}, 'json')
|
|
},
|
deleteConfig: function (id) {
|
$.post("api/adAreaConfig/delete", {id:id}, function (data) {
|
if (data.code == 0) {
|
layer.msg("删除成功");
|
app.requestConfigs(1);
|
} else {
|
layer.msg(data.msg);
|
}
|
}, 'json')
|
},
|
updateConfig:function(id){
|
window.location.href = "update-ad-area-config.html?id="+id;
|
}
|
}
|
});
|
app.requestConfigs(1);
|
});
|
</script>
|
|
</html>
|