记得上下班打卡 | git大法好,push需谨慎

Commit a867cf6e authored by xuchen's avatar xuchen

修改代理管理

parent 0903f472
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('黑名单管理')"/>
<th:block th:include="include :: bootstrap-fileinput-css" />
<style>
</style>
</head>
<body>
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>手机号:</label>
<input type="number" name=""/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
<!-- <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i-->
<!-- class="fa fa-refresh"></i>&nbsp;重置</a>-->
</li>
</ul>
</div>
</form>
</div>
<div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
</body>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
$(function(){
let options = {
url: '/smile/user/listByState',
columns: [
{
field: 'uid',
title: 'ID'
},
{
field: 'name',
title: '姓名'
},
{
field: 'sex',
title: '性别',
formatter:function(value,row,index){
return row.sex === 1? '男' : '女'
}
},
{
field: 'phone',
title: '手机号'
},
{
field: 'idCard',
title: '身份证号'
},
{
field: 'province',
title: '地区'
},
{
field: 'schoolName',
title: '学校'
},
{
field: 'identity',
title: '身份',
formatter: function(value, row, index) {
if (value == 1) {
return '在校学生';
} else {
return '已毕业';
}
}
},
{
field: 'uid',
title: '拉黑原因'
},
{
field: 'updatedDate',
title: '拉黑时间'
},
{
title: '操作',
formatter:function(value,row,index){
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="goDetail(\''+row.type+'\',\''+row.uid+'\')"><i class="fa fa-edit"></i>查看</a> ');
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="updateUserStateById(\'' + row.uid + '\',\'' + 0 + '\')"><i class="fa fa-edit"></i>恢复</a> ');
return actions.join('');
}
},
]
}
$.table.init(options);
})
function goDetail (type,id) {
if(type === '5'){
let url = ctx+'local/specialDetail?id=' + id;
$.modal.openTab("特邀用户详情", url);
}else{
let url = ctx+'local/smileDetail?id=' + id;
$.modal.openTab("用户详情", url);
}
}
function updateUserStateById(uid,state) {
let postData = {
uid: uid,
state: state
}
$.ajax({
type: 'post',
url: ctx + 'smile/user/updateUserStateByUid',
headers: {"Content-Type": "application/json;charset=UTF-8"},
data: JSON.stringify(postData),
success: function (e) {
// alert(e.msg)
location.reload();
}
});
}
</script>
</html>
\ No newline at end of file
......@@ -31,6 +31,10 @@
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
let dialog = `<div class="dialog" style="height:200px;width:500px;display: flex;flex-direction: column;justify-content: space-around;align-items: center;">
<div class="title">请输入拉黑原因</div>
<textarea name="" id="" cols="50" rows="10"></textarea>
</div>`
var detailFlag = [[${@permission.hasPermi('smile:performances:detail')}]];
var smilePrefix = ctx + "smile/user";
console.log(smilePrefix);
......@@ -151,19 +155,21 @@
/*加入黑名单*/
function updateUserStateById(uid,state) {
let postData = {
uid: uid,
state: state
}
$.ajax({
type: 'post',
url: ctx + 'smile/user/updateUserStateByUid',
headers: {"Content-Type": "application/json;charset=UTF-8"},
data: JSON.stringify(postData),
success: function (e) {
// alert(e.msg)
location.reload();
$.modal.confirm(dialog,() =>{
let postData = {
uid: uid,
state: state
}
$.ajax({
type: 'post',
url: ctx + 'smile/user/updateUserStateByUid',
headers: {"Content-Type": "application/json;charset=UTF-8"},
data: JSON.stringify(postData),
success: function (e) {
// alert(e.msg)
location.reload();
}
});
});
}
// var updateFlag = [[${@permission.hasPermi('sweet:integralActivity:create')}]];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment