You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

130 lines
4.3 KiB

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<!--#include file="/widget/head.html"-->
<style>
.col-md-4,
.col-md-1 {
display: inline !important;
float: left;
}
.inline {
display: inline !important;
}
</style>
</head>
<body class="layui-layout-body" layadmin-themealias="default">
<div id="wrapper">
<!--#include file="/widget/nav.html"-->
<div id="page-wrapper" class="layui-body layadmin-tabsbody-item layui-show layui-fluid layui-row layui-col-space15">
<div class="layui-card" id="card-page-wrapper">
<div class="row layui-fluid">
<div class="container" style="margin-left: 2px">
<div class="col-md-1" style="width:100px;">
<p style="font-size: 18px;line-height: 35px;float: right">公会ID:</p>
</div>
<div class="col-md-4" style="width:200px;">
<input type="text" class="layui-input " id="unionId" placeholder="Enter unionId">
</div>
<div class="col-md-1">
<button type="button" class="layui-btn pull-right" id="sele">立刻查询</button>
</div>
<div class="col-md-1">
<button type="button" class="layui-btn pull-right" id="costItemDiv">改名字</button>
</div>
</div>
</div>
<div class="row table-responsive" style="width:100%">
<pre id='preId' class="layui-row layui-card" style="white-space: pre-line;"></pre>
</div>
</div>
</div>
</div>
</div>
<!--#include file="/widget/tail.html"-->
<script type="text/javascript">
$("#sele").click(function () {
var unionId = $("#unionId").val();
if (unionId == null || unionId == "") {
layer.alert('请输入账号', { icon: 2 });
return;
}
$.get(Page.SvrIp + "/api/search_union",
{
Account: unionId,
target_id: unionId,
token: cookie.get("token"),
},
function (d) {
$("#preId").val('');
console.dir('request info :')
console.dir(d)
if (d.code == 0) {
document.getElementById('preId').innerHTML = d.data;
} else {
layer.alert('输入错误,请检查', { icon: 2 });
$("#preId").val('');
}
});
});
$("#costItemDiv").click(function(){
var unionId = $("#unionId").val();
opennotice(unionId)
});
var packageIds
function opennotice(unionId) {
layer.prompt({title: '修改公会:'+unionId+"的名字", formType: 0}, function(name, index){
$.ajax({
type: "get",
url: Page.SvrIp + "/api/update_union_name",
data: {name:name,unionId:unionId,token:cookie.get("token")},
dataType: "json",
success: function (d) {
layer.msg('操作完成');
if (d.ret == 0) {
parent.layer.close(parent.layer.getFrameIndex(window.name));
parent.location.reload();
}
},
error: function (status) {
console.dir(status)
parent.layer.close(parent.layer.getFrameIndex(window.name));
parent.location.reload();
}
});
});
}
function getLocalTime(nS) {
return new Date(parseInt(nS) * 1000).toLocaleString().replace(/:\d{1,2}$/, ' ');
}
$(function () {
initPage('工会数据查询');
});
</script>
<script src="../js/coupon.js"></script>
</body>
</html>