7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
149 lines
4.8 KiB
HTML
149 lines
4.8 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="renderer" content="webkit">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<title>全国排行-e订通</title>
|
|
<link rel="shortcut icon" type="image/x-icon" href="../favicon.ico" />
|
|
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css">
|
|
<link rel="stylesheet" href="index.css">
|
|
<style>
|
|
body{text-align:left;}
|
|
</style>
|
|
<script src="layuiadmin/layui/layui.js"></script>
|
|
<script src="js/function.js"></script>
|
|
</head>
|
|
<body style="margin-top:10px;" onload="">
|
|
<div class="layui-input-inline" style="width:50px;"><button class="layui-btn layui-btn-primary layui-btn-sm" onclick="window.location.href='my_client.htm'">返回</button></div>
|
|
<div class="layui-input-inline" style="width:10px;"></div><div class="layui-input-inline" style="">请输入完整的登陆账号<input type="text" name="s_dp_username" id="s_dp_username" style="width:100px;height:25px;"> 请输入登陆密码<input type="password" name="s_dp_password" id="s_dp_password" style="width:100px;height:25px;"> <input type="button" value="添加" class="layui-btn layui-btn-primary layui-btn-sm" onclick="mod_client_add(document.getElementById('s_dp_username').value,document.getElementById('s_dp_password').value)"></div>
|
|
<div class="layui-fluid" style="padding-top:10px;">
|
|
<div class="layui-row layui-col-space10" id="show_table">
|
|
</div>
|
|
</div>
|
|
<script>
|
|
//ajax
|
|
function ajaxinit()
|
|
{
|
|
var xmlhttp;
|
|
try {
|
|
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
|
|
} catch (e) {
|
|
try {
|
|
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
|
} catch (E) {
|
|
xmlhttp=false;
|
|
}
|
|
}
|
|
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
|
|
try {
|
|
xmlhttp = new XMLHttpRequest();
|
|
} catch (e) {
|
|
xmlhttp=false;
|
|
}
|
|
}
|
|
if (!xmlhttp && window.createRequest) {
|
|
try {
|
|
xmlhttp = window.createRequest();
|
|
} catch (e) {
|
|
xmlhttp=false;
|
|
}
|
|
}
|
|
return xmlhttp;
|
|
}
|
|
function mod_client_add(username,password){
|
|
var xmlhttp=ajaxinit();
|
|
if(username!=''){
|
|
var url='./?_m=my_client&_a=add_client&username='+username+'&password='+password;
|
|
xmlhttp.open('POST',url,true);
|
|
xmlhttp.setRequestHeader('Cache-Control','no-cache');
|
|
xmlhttp.onreadystatechange=function(){
|
|
if(xmlhttp.readyState==4 && xmlhttp.status==200){
|
|
var msg=xmlhttp.responseText;
|
|
if(msg=='y')
|
|
window.location.reload();
|
|
else
|
|
alert(msg);
|
|
}
|
|
}
|
|
xmlhttp.send(null);
|
|
}else{
|
|
alert('请输入完整的登录账号!');
|
|
}
|
|
}
|
|
//移除
|
|
function mod_client_del(id,title){
|
|
var a=confirm('确认将'+title+'移除吗?');
|
|
if(a==true){
|
|
var xmlhttp=ajaxinit();
|
|
var url='./?_m=my_client&_a=del_client&id='+id;
|
|
xmlhttp.open('POST',url,true);
|
|
xmlhttp.setRequestHeader('Cache-Control','no-cache');
|
|
xmlhttp.onreadystatechange=function(){
|
|
if(xmlhttp.readyState==4 && xmlhttp.status==200){
|
|
var msg=xmlhttp.responseText;
|
|
if(msg=='y')
|
|
window.location.reload();
|
|
else
|
|
alert(msg);
|
|
}
|
|
}
|
|
xmlhttp.send(null);
|
|
}
|
|
}
|
|
//取得url传递参数
|
|
var is_mobile="n";
|
|
layui.config({
|
|
base: './layuiadmin/'
|
|
}).extend({
|
|
index: 'lib/index'
|
|
}).use(['index', 'user','rate'], function(){
|
|
var $ = layui.$
|
|
,setter = layui.setter
|
|
,admin = layui.admin
|
|
,form = layui.form;
|
|
var rate = layui.rate;
|
|
var url="./?_m=my_client&_a=mod_client";
|
|
$.ajax(
|
|
{
|
|
url:url,
|
|
contentType: "application/json",
|
|
method: 'POST',
|
|
async:false,
|
|
success: function (res) {
|
|
var json_data=$.parseJSON(res);
|
|
var res=$.parseJSON(res);
|
|
var html1="";var huanse;var str;
|
|
html1+='<table lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
|
html1+='<tr style="background:#F5F5F5;"><td>店铺名</td><td>登录账号</td><td>操作</td></tr>';
|
|
for(var i=0;i<json_data.tab_mid.length;i++){
|
|
if((i%2)==0) huanse="white";else huanse="#F5F5F5";
|
|
html1+='<tr style="background:'+huanse+';">';
|
|
for(var j=0;j<json_data.tab_mid[i].length;j++){
|
|
if(json_data.tab_mid[i][j].indexOf("caozuo")!="-1"){
|
|
str=json_data.tab_mid[i][j].split("|");
|
|
html1+='<td><input type="button" value="移除" onclick="mod_client_del('+str[1]+')"></td>';
|
|
}else
|
|
html1+='<td>'+json_data.tab_mid[i][j]+'</td>';
|
|
}
|
|
html1+='</tr>';
|
|
}
|
|
html1+='</table>';
|
|
$("#show_table").html(html1);
|
|
|
|
},
|
|
error: function () {
|
|
layui.layer.msg("与服务器通信失败!");
|
|
}
|
|
});
|
|
if(admin.screen()<2)
|
|
is_mobile="y";
|
|
$(window).on('resize', function(){
|
|
//自动
|
|
if(admin.screen()<2)
|
|
is_mobile="y";
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |