generated from root/miduo_server
权限管理已经优化
parent
50f1c179f3
commit
7c62795d5c
|
|
@ -155,7 +155,10 @@ public class CdkInfoController {
|
|||
String startTime = JsonUtil.date3TimeStamp(parameterMap.get("startTime"));
|
||||
String endTime = JsonUtil.date3TimeStamp(parameterMap.get("endTime"));
|
||||
String goodsInfo = parameterMap.get("goodsInfo");
|
||||
String reward = parameterMap.get("reward");
|
||||
String reward = JsonUtil.getInstence().getReward(request);
|
||||
if (reward.isEmpty()){
|
||||
throw new Exception("item erro !!!");
|
||||
}
|
||||
SCdkInfo sCdkInfo = new SCdkInfo();
|
||||
sCdkInfo.setId(seqUtils.getSequence("cdk_goods_id"));
|
||||
sCdkInfo.setGoodsInfo(goodsInfo);
|
||||
|
|
|
|||
|
|
@ -2,13 +2,21 @@ package com.jmfy.controller;
|
|||
|
||||
import com.jmfy.dao.CUserDao;
|
||||
import com.jmfy.model.CAdmin;
|
||||
import com.jmfy.model.vo.CAdminVo;
|
||||
import com.jmfy.model.vo.PowersVo;
|
||||
import com.jmfy.utils.JsonUtil;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.jmfy.WebSecurityConfig;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by huangds on 2017/10/24.
|
||||
|
|
@ -28,7 +36,7 @@ public class LoginController {
|
|||
}
|
||||
|
||||
@PostMapping("/loginVerify")
|
||||
public String loginVerify(String userName,String password,HttpSession session) throws Exception {
|
||||
public String loginVerify(String userName,String password,HttpSession session,ModelMap map) throws Exception {
|
||||
CAdmin admin = cUserDao.findAdmin(userName);
|
||||
boolean verify = false;
|
||||
if (admin != null){
|
||||
|
|
@ -38,30 +46,165 @@ public class LoginController {
|
|||
}
|
||||
if (verify) {
|
||||
session.setAttribute(WebSecurityConfig.SESSION_KEY, userName);
|
||||
PowersVo powersVo = new PowersVo();
|
||||
updatePowers(powersVo,admin.getPowers());
|
||||
map.put("powersVo",powersVo);
|
||||
return "index";
|
||||
} else {
|
||||
return "redirect:/login";
|
||||
}
|
||||
}
|
||||
|
||||
private void updatePowers(PowersVo powersVo,List<Integer> powerList) {
|
||||
if (powerList.size() ==0){
|
||||
powersVo.setServerInfo(0);
|
||||
powersVo.setNoticeInfo(0);
|
||||
powersVo.setCDKinfo(0);
|
||||
powersVo.setFlowInfo(0);
|
||||
powersVo.setGMinfo(0);
|
||||
powersVo.setUserInfo(0);
|
||||
powersVo.setFamilyInfo(0);
|
||||
powersVo.setArenaInfo(0);
|
||||
powersVo.setTitleGame(0);
|
||||
powersVo.setAdminList(0);
|
||||
return;
|
||||
}
|
||||
for (Integer str : powerList) {
|
||||
switch (str) {
|
||||
case 1:
|
||||
powersVo.setServerInfo(0);
|
||||
break;
|
||||
case 2:
|
||||
powersVo.setNoticeInfo(0);
|
||||
break;
|
||||
case 3:
|
||||
powersVo.setCDKinfo(0);
|
||||
break;
|
||||
case 4:
|
||||
powersVo.setFlowInfo(0);
|
||||
break;
|
||||
case 5:
|
||||
powersVo.setGMinfo(0);
|
||||
break;
|
||||
case 6:
|
||||
powersVo.setUserInfo(0);
|
||||
break;
|
||||
case 7:
|
||||
powersVo.setFamilyInfo(0);
|
||||
break;
|
||||
case 8:
|
||||
powersVo.setArenaInfo(0);
|
||||
break;
|
||||
case 9:
|
||||
powersVo.setTitleGame(0);
|
||||
break;
|
||||
case 10:
|
||||
powersVo.setAdminList(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@GetMapping("/logout")
|
||||
public String logout(HttpSession session){
|
||||
session.removeAttribute(WebSecurityConfig.SESSION_KEY);
|
||||
return "redirect:/login";
|
||||
}
|
||||
|
||||
@GetMapping("/register")
|
||||
public String register(HttpSession session) throws Exception {
|
||||
@PostMapping("/register")
|
||||
public @ResponseBody int register(HttpSession session, HttpServletRequest request) throws Exception {
|
||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||
String userName = parameterMap.get("userName");
|
||||
String password = parameterMap.get("password");
|
||||
CAdmin admin = cUserDao.findAdmin(userName);
|
||||
if (admin != null){
|
||||
return 1;
|
||||
}
|
||||
CAdmin cAdmin = new CAdmin();
|
||||
cAdmin.setUserName("admin");
|
||||
cAdmin.setPassword("123");
|
||||
cAdmin.setUserName(userName);
|
||||
cAdmin.setPassword(password);
|
||||
String[] powers = request.getParameterValues("power[]");
|
||||
if (powers != null){
|
||||
for (String prw : powers){
|
||||
cAdmin.getPowers().add(Integer.valueOf(prw));
|
||||
}
|
||||
}
|
||||
cUserDao.registerAdmin(cAdmin);
|
||||
return "";
|
||||
// List<CAdmin> adminList = cUserDao.findAdminList();
|
||||
// map.addAttribute("adminList",adminList);
|
||||
return 0;
|
||||
}
|
||||
@RequestMapping(value = "/welcome", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public String welcome() {
|
||||
|
||||
return "welcome";
|
||||
}
|
||||
@RequestMapping(value = "/findmemberlist", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public String findmemberlist(ModelMap map) throws Exception {
|
||||
List<CAdmin> adminList = cUserDao.findAdminList();
|
||||
List<CAdminVo> cAdminVoList = new ArrayList<>();
|
||||
for (CAdmin cAdmin:adminList){
|
||||
CAdminVo cAdminVo = new CAdminVo();
|
||||
cAdminVo.setUserName(cAdmin.getUserName());
|
||||
String power;
|
||||
List<Integer> powerList = cAdmin.getPowers();
|
||||
if (powerList.size() != 0) {
|
||||
power = getPower(powerList);
|
||||
} else {
|
||||
power = "管理员,所有权限";
|
||||
|
||||
}
|
||||
cAdminVo.setPowers(power);
|
||||
cAdminVoList.add(cAdminVo);
|
||||
}
|
||||
map.addAttribute("adminList",cAdminVoList);
|
||||
return "member-list";
|
||||
}
|
||||
|
||||
private String getPower(List<Integer> powerList) {
|
||||
StringBuilder power = new StringBuilder();
|
||||
for (Integer str : powerList) {
|
||||
String powers = "";
|
||||
switch (str) {
|
||||
case 1:
|
||||
powers = "服务器管理";
|
||||
break;
|
||||
case 2:
|
||||
powers = "公告管理";
|
||||
break;
|
||||
case 3:
|
||||
powers = "序列號管理";
|
||||
break;
|
||||
case 4:
|
||||
powers = "流水日誌管理";
|
||||
break;
|
||||
case 5:
|
||||
powers = "GM管理";
|
||||
break;
|
||||
case 6:
|
||||
powers = "個人信息管理";
|
||||
break;
|
||||
case 7:
|
||||
powers = "宗門信息管理";
|
||||
break;
|
||||
case 8:
|
||||
powers = "排行榜管理";
|
||||
break;
|
||||
case 9:
|
||||
powers = "封號/解封/禁言/解封";
|
||||
break;
|
||||
case 10:
|
||||
powers = "用户管理";
|
||||
break;
|
||||
}
|
||||
if (power.length() == 0) {
|
||||
power = new StringBuilder(powers);
|
||||
} else {
|
||||
power.append(",").append(powers);
|
||||
}
|
||||
}
|
||||
return power.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,11 @@ public class MailController {
|
|||
if (cUser ==null){
|
||||
continue;
|
||||
}
|
||||
CMail mail = getMail(parameterMap, Integer.parseInt(userId));
|
||||
String reward = JsonUtil.getInstence().getReward(request);
|
||||
if (Integer.parseInt(parameterMap.get("isAttach"))==1 && reward.isEmpty()){
|
||||
return 2;
|
||||
}
|
||||
CMail mail = getMail(parameterMap, Integer.parseInt(userId),reward);
|
||||
try {
|
||||
mailDao.sendCMail(mail, serverId);
|
||||
} catch (Exception e) {
|
||||
|
|
@ -58,6 +62,7 @@ public class MailController {
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/sendSysMail", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public @ResponseBody int sendSysMail(HttpSession session, HttpServletRequest request) throws Exception {
|
||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||
|
|
@ -65,11 +70,19 @@ public class MailController {
|
|||
if (0 == serverId){
|
||||
List<ServerInfo> allServerInfo = serverInfoDao.getAllServerInfo();
|
||||
for (ServerInfo serverInfo:allServerInfo){
|
||||
String reward = JsonUtil.getInstence().getReward(request);
|
||||
if (Integer.parseInt(parameterMap.get("isAttach"))==1 && reward.isEmpty()){
|
||||
return 1;
|
||||
}
|
||||
serverId = serverInfo.getServer_id();
|
||||
SysMail sysMail = getSysMail(parameterMap);
|
||||
mailDao.sendSystem(serverId ,sysMail);
|
||||
}
|
||||
}else{
|
||||
String reward = JsonUtil.getInstence().getReward(request);
|
||||
if (Integer.parseInt(parameterMap.get("isAttach"))==1 && reward.isEmpty()){
|
||||
return 2;
|
||||
}
|
||||
SysMail sysMail = getSysMail(parameterMap);
|
||||
mailDao.sendSystem(serverId ,sysMail);
|
||||
}
|
||||
|
|
@ -96,7 +109,7 @@ public class MailController {
|
|||
return sysMail;
|
||||
}
|
||||
|
||||
private CMail getMail(HashMap<String, String> parameterMap ,int uid) {
|
||||
private CMail getMail(HashMap<String, String> parameterMap ,int uid,String reward) {
|
||||
CMail cMail = new CMail();
|
||||
String str = UUID.randomUUID().toString();
|
||||
cMail.setId(str.substring(0, 8));
|
||||
|
|
@ -104,7 +117,7 @@ public class MailController {
|
|||
cMail.setHead(parameterMap.get("mailTitle"));
|
||||
cMail.setContent(parameterMap.get("mailContent"));
|
||||
if (Integer.parseInt(parameterMap.get("isAttach"))==1){
|
||||
cMail.setMailItemList(parameterMap.get("attach"));
|
||||
cMail.setMailItemList(reward);
|
||||
}else{
|
||||
cMail.setMailItemList("");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,10 @@ public class RecoverItemController {
|
|||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||
int serverId = Integer.parseInt(parameterMap.get("serverId"));
|
||||
String[] userIds = parameterMap.get("userIds").split("#");
|
||||
String itemInfos = parameterMap.get("itemInfo");
|
||||
String itemInfos = JsonUtil.getInstence().getReward(request);
|
||||
if (itemInfos.isEmpty()){
|
||||
return 2;
|
||||
}
|
||||
boolean isSuccess = false;
|
||||
for (String userId : userIds){
|
||||
Result result = null;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,12 @@ package com.jmfy.dao;
|
|||
|
||||
import com.jmfy.model.CAdmin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CUserDao {
|
||||
CAdmin findAdmin(String userName) throws Exception;
|
||||
|
||||
void registerAdmin(CAdmin cAdmin) throws Exception;
|
||||
|
||||
List<CAdmin> findAdminList()throws Exception;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import org.springframework.data.mongodb.core.query.Query;
|
|||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
|
|
@ -32,4 +33,11 @@ public class CUserDaoImpl implements CUserDao {
|
|||
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
|
||||
mongoTemplate.insert(cAdmin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CAdmin> findAdminList() throws Exception {
|
||||
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
|
||||
Query query = new Query();
|
||||
return mongoTemplate.find(query, CAdmin.class);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,10 @@ package com.jmfy.model;
|
|||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.data.mongodb.core.mapping.Field;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Document(collection = "c_admin")
|
||||
public class CAdmin {
|
||||
@Id
|
||||
|
|
@ -14,6 +18,9 @@ public class CAdmin {
|
|||
@Field(value = "password")
|
||||
private String password;
|
||||
|
||||
@Field(value = "power")
|
||||
private List<Integer> powers = new ArrayList<>();
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
@ -33,4 +40,12 @@ public class CAdmin {
|
|||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public List<Integer> getPowers() {
|
||||
return powers;
|
||||
}
|
||||
|
||||
public void setPowers(List<Integer> powers) {
|
||||
this.powers = powers;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
package com.jmfy.model.vo;
|
||||
|
||||
public class CAdminVo {
|
||||
public String userName;
|
||||
|
||||
public String powers ;
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public void setPowers(String powers) {
|
||||
this.powers = powers;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.jmfy.model.vo;
|
||||
|
||||
public class PowersVo {
|
||||
//0: 显示 1不显示
|
||||
public int adminList = 1;
|
||||
public int serverInfo =1;
|
||||
public int noticeInfo =1;
|
||||
public int CDKinfo=1;
|
||||
public int flowInfo=1;
|
||||
public int GMinfo=1;
|
||||
public int TitleGame=1;
|
||||
public int userInfo=1;
|
||||
public int familyInfo=1;
|
||||
public int arenaInfo=1;
|
||||
|
||||
public void setAdminList(int adminList) {
|
||||
this.adminList = adminList;
|
||||
}
|
||||
|
||||
public void setServerInfo(int serverInfo) {
|
||||
this.serverInfo = serverInfo;
|
||||
}
|
||||
|
||||
public void setNoticeInfo(int noticeInfo) {
|
||||
this.noticeInfo = noticeInfo;
|
||||
}
|
||||
|
||||
public void setCDKinfo(int CDKinfo) {
|
||||
this.CDKinfo = CDKinfo;
|
||||
}
|
||||
|
||||
public void setFlowInfo(int flowInfo) {
|
||||
this.flowInfo = flowInfo;
|
||||
}
|
||||
|
||||
public void setGMinfo(int GMinfo) {
|
||||
this.GMinfo = GMinfo;
|
||||
}
|
||||
|
||||
public void setTitleGame(int titleGame) {
|
||||
TitleGame = titleGame;
|
||||
}
|
||||
|
||||
public void setUserInfo(int userInfo) {
|
||||
this.userInfo = userInfo;
|
||||
}
|
||||
|
||||
public void setFamilyInfo(int familyInfo) {
|
||||
this.familyInfo = familyInfo;
|
||||
}
|
||||
|
||||
public void setArenaInfo(int arenaInfo) {
|
||||
this.arenaInfo = arenaInfo;
|
||||
}
|
||||
}
|
||||
|
|
@ -47,6 +47,27 @@ public class JsonUtil {
|
|||
return map;
|
||||
}
|
||||
|
||||
public String getReward( HttpServletRequest request) {
|
||||
StringBuilder reward = new StringBuilder();
|
||||
String[] itemIds = request.getParameterValues("itemIds[]");
|
||||
String[] itemNums = request.getParameterValues("itemNums[]");
|
||||
String[] itemTypes = request.getParameterValues("itemTypes[]");
|
||||
if (itemIds.length ==0 || itemNums.length ==0 || itemTypes.length ==0){
|
||||
return reward.toString();
|
||||
}
|
||||
for (int i = 0; i < itemIds.length; i++){
|
||||
if (itemIds[i].isEmpty() || itemNums[i].isEmpty() || itemTypes[i].isEmpty()){
|
||||
return reward.toString();
|
||||
}
|
||||
if (reward.length() == 0){
|
||||
reward = new StringBuilder(itemIds[i] + "#" + itemNums[i] + "#" + itemTypes[i]);
|
||||
}else{
|
||||
reward.append("|").append(itemIds[i]).append("#").append(itemNums[i]).append("#").append(itemTypes[i]);
|
||||
}
|
||||
}
|
||||
return reward.toString();
|
||||
}
|
||||
|
||||
public static String getServiceKey(String serviceName, String host, String port) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
return sb.append(serviceName).append("|")
|
||||
|
|
|
|||
|
|
@ -25,30 +25,22 @@
|
|||
<nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页 <span class="c-gray en">></span> 個人信息管理 <span class="c-gray en">></span> 查询账号角色 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont"></i></a></nav>
|
||||
<div class="page-container" style="text-align: center">
|
||||
<h1><span style="color: red">查询账号角色</span></h1>
|
||||
<form class="form form-horizontal" id="form-article-add" action="/getAllUserId" method="post" onsubmit="return getUserInfo()">
|
||||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
<span class="c-red">*</span>
|
||||
账 号 ID:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<input type="text" name="userId" placeholder="" value="" class="input-text"/>
|
||||
<span class="USERID"></span>
|
||||
<form class="form form-horizontal" id="form-article-add" action="/getAllUserId" method="post"
|
||||
onsubmit="return getUserInfo()">
|
||||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
<span class="c-red">*</span>
|
||||
账 号 ID:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<input type="text" name="userId" placeholder="" value="" class="input-text"/>
|
||||
<span class="USERID"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="row cl">-->
|
||||
<!--<label class="form-label col-xs-4 col-sm-2">-->
|
||||
<!--<span class="c-red">*</span>-->
|
||||
<!--平 台 :</label>-->
|
||||
<!--<div class="formControls col-xs-8 col-sm-9">-->
|
||||
<!--<select name="plat" class="input-text"><!–下拉列表–>-->
|
||||
<!--<option value="android" selected = "selected">Android</option>-->
|
||||
<!--<option value="ios" >IOS</option>-->
|
||||
<!--</select>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<div class="row cl" style="text-align: center" >
|
||||
<div class="row cl" style="text-align: center">
|
||||
<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
|
||||
<button class="btn btn-primary radius" type="submit" style="font-size: 15px"><i class="Hui-iconfont"></i> 查询账号角色</button>
|
||||
<button class="btn btn-primary radius" type="submit" style="font-size: 15px"><i class="Hui-iconfont"></i>
|
||||
查询账号角色
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,179 @@
|
|||
<!--_meta 作为公共模版分离出去-->
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp" />
|
||||
<link rel="Bookmark" href="..//favicon.ico" />
|
||||
<link rel="Shortcut Icon" href="..//favicon.ico" />
|
||||
<!--[if lt IE 9]>
|
||||
<script type="text/javascript" src="../lib/html5shiv.js"></script>
|
||||
<script type="text/javascript" src="../lib/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<link rel="stylesheet" type="text/css" href="../h-ui/css/H-ui.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../h-ui.admin/css/H-ui.admin.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../lib/Hui-iconfont/1.0.8/iconfont.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../h-ui.admin/skin/default/skin.css" id="skin" />
|
||||
<link rel="stylesheet" type="text/css" href="../h-ui.admin/css/style.css" />
|
||||
<!--[if IE 6]>
|
||||
<script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
|
||||
<script>DD_belatedPNG.fix('*');</script>
|
||||
<![endif]-->
|
||||
|
||||
<title>基本设置</title>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="breadcrumb">
|
||||
<a href="javascript:;" onclick="history.go(-1)"><i class="Hui-iconfont"></i> 首页</a>
|
||||
<span class="c-gray en">></span>
|
||||
会员管理
|
||||
<span class="c-gray en">></span>
|
||||
添加会员信息
|
||||
<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont"></i></a>
|
||||
</nav>
|
||||
<div class="page-container">
|
||||
<form class="form form-horizontal" id="form-article-add" action="/register" method="post"target="sendNotice">
|
||||
<div id="tab-system" class="HuiTab">
|
||||
<div class="tabBar cl">
|
||||
<span>添加会员信息</span>
|
||||
</div>
|
||||
<div class="tabCon">
|
||||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
<span class="c-red">*</span>
|
||||
用户名:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<input type="text" name="userName" placeholder="" value="" class="input-text"/>
|
||||
<span class="SERVERID"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
<span class="c-red">*</span>
|
||||
密码:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<input type="password" name="password" placeholder="" value="" class="input-text"/>
|
||||
<span class="PASSWORD"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
账号权限:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<dl class="permission-list">
|
||||
<dd>
|
||||
<dl class="cl permission-list2">
|
||||
<dd>
|
||||
<label class="">
|
||||
<input type="checkbox" value="1" name="power" id="user-Character-1-0-0"/>
|
||||
服务器管理</label>
|
||||
<label class="">
|
||||
<input type="checkbox" value="2" name="power" id="user-Character-1-0-1"/>
|
||||
公告管理</label>
|
||||
<label class="">
|
||||
<input type="checkbox" value="3" name="power" id="user-Character-1-0-2"/>
|
||||
序列號管理</label>
|
||||
<label class="">
|
||||
<input type="checkbox" value="4" name="power" id="user-Character-1-0-3"/>
|
||||
流水日誌管理</label>
|
||||
<label class="">
|
||||
<input type="checkbox" value="5" name="power" id="user-Character-1-0-4"/>
|
||||
GM管理</label>
|
||||
<label class="">
|
||||
<input type="checkbox" value="6" name="power" id="user-Character-1-0-5"/>
|
||||
個人信息管理</label>
|
||||
<label class="">
|
||||
<input type="checkbox" value="7" name="power" id="user-Character-1-0-6"/>
|
||||
宗門信息管理</label>
|
||||
<label class="">
|
||||
<input type="checkbox" value="8" name="power" id="user-Character-1-0-7"/>
|
||||
排行榜管理</label>
|
||||
<label class="">
|
||||
<input type="checkbox" value="9" name="power" id="user-Character-1-0-8"/>
|
||||
封號/解封/禁言/解封</label>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabCon">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row cl" style="text-align: center" >
|
||||
<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
|
||||
<button class="btn btn-primary radius" type="button" onclick="registerUser()" ><i class="Hui-iconfont"></i> 注册</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<iframe name='sendNotice' id="hidden_frame" style='display: none'></iframe>
|
||||
</div>
|
||||
|
||||
|
||||
<!--_footer 作为公共模版分离出去-->
|
||||
<script type="text/javascript" src="../lib/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../lib/layer/2.4/layer.js"></script>
|
||||
<script type="text/javascript" src="../h-ui/js/H-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
||||
|
||||
<!--请在下方写此页面业务相关的脚本-->
|
||||
<script type="text/javascript" src="../lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="../lib/jquery.validation/1.14.0/jquery.validate.js"></script>
|
||||
<script type="text/javascript" src="../lib/jquery.validation/1.14.0/validate-methods.js"></script>
|
||||
<script type="text/javascript" src="../lib/jquery.validation/1.14.0/messages_zh.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('.skin-minimal input').iCheck({
|
||||
checkboxClass: 'icheckbox-blue',
|
||||
radioClass: 'iradio-blue',
|
||||
increaseArea: '20%'
|
||||
});
|
||||
$("#tab-system").Huitab({
|
||||
index:0
|
||||
});
|
||||
});
|
||||
function registerUser() {
|
||||
var userName = $("input[name='userName']").val();
|
||||
var password = $("input[name='password']").val();
|
||||
var strSel=[];
|
||||
$("[name='power']:checked").each(function(index, element) {
|
||||
strSel.push($(this).val());
|
||||
});
|
||||
var erroCode = $('.USERNAME');
|
||||
if (userName === '' || userName == null) {
|
||||
|
||||
erroCode.html('<span style="color: red; ">用户名不能为空!</span>');
|
||||
return false;
|
||||
}
|
||||
if (password === '' || password == null) {
|
||||
erroCode = $('.PASSWORD');
|
||||
erroCode.html('<span style="color: red; ">密码不能为空!</span>');
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
"userName": userName,
|
||||
"password": password,
|
||||
"power[]": strSel
|
||||
},
|
||||
url: "/register",
|
||||
success: function (data) {
|
||||
if (data === 0) {
|
||||
layer.msg('注册成功!', {icon: 6, time: 1000});
|
||||
}
|
||||
if (data === 1) {
|
||||
layer.msg('用户名已注册!', {icon: 6, time: 1000});
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
</script>
|
||||
<!--/请在上方写此页面业务相关的脚本-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -62,11 +62,18 @@
|
|||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
<span class="c-red">*</span>
|
||||
回收道具(可多个):</label>
|
||||
附件:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<textarea class="textarea" name="itemInfo"
|
||||
placeholder="单个道具:物品id#物品数量#物品类型 多个道具:物品id#物品数量#物品类型|物品id#物品数量#物品类型 .."></textarea>
|
||||
<span class="ITEMINFO"></span>
|
||||
<div id="InputsWrapper">
|
||||
<div>
|
||||
物品id:<input type="text" name="itemId" id="itemId_1" style="width: 150px" />
|
||||
物品数量:<input type="text" name="itemNum" id="itemNum_1" style="width: 150px" />
|
||||
物品类型:<input type="text" name="itemType" id="itemType_1" style="width: 150px"/>
|
||||
<a href="#" class="removeclass"></a>
|
||||
<a href="#" id="AddMoreFileBox" class="btn btn-info">+</a>
|
||||
<span class="REWARD"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -103,11 +110,50 @@
|
|||
index: 0
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
var MaxInputs = 20;
|
||||
var InputsWrapper = $("#InputsWrapper");
|
||||
var AddButton = $("#AddMoreFileBox");
|
||||
|
||||
var x = InputsWrapper.length;
|
||||
var FieldCount=1;
|
||||
|
||||
$(AddButton).click(function (e)
|
||||
{
|
||||
if(x <= MaxInputs)
|
||||
{
|
||||
FieldCount++;
|
||||
$(InputsWrapper).append('<div>物品id:<input type="text" name="itemId" id="itemId_'+ FieldCount +'" style="width: 150px" /> 物品数量:<input type="text" name="itemNum" id="itemNum_'+FieldCount+'" style="width: 150px" /> 物品类型:<input type="text" name="itemType" id="itemType_'+FieldCount+'" style="width: 150px" /><a href="#" class="removeclass">×</a></div>');
|
||||
x++;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$("body").on("click",".removeclass", function(e){ //user click on remove text
|
||||
if( x > 1 ) {
|
||||
$(this).parent('div').remove(); //remove text box
|
||||
x--; //decrement textbox
|
||||
}
|
||||
return false;
|
||||
})
|
||||
|
||||
});
|
||||
function sendMail() {
|
||||
var erroCode = $('.SERVERID');
|
||||
var serverId = $("input[name='serverId']").val();
|
||||
var userIds = $("textarea[name='userIds']").val();
|
||||
var itemInfo = $("textarea[name='itemInfo']").val();
|
||||
var itemIds = [];
|
||||
$("input[name='itemId']").each(function () {
|
||||
itemIds.push($(this).val());
|
||||
});
|
||||
var itemNums =[];
|
||||
$("input[name='itemNum']").each(function(){
|
||||
itemNums.push($(this).val());
|
||||
});
|
||||
var itemTypes =[];
|
||||
$("input[name='itemType']").each(function(){
|
||||
itemTypes.push($(this).val());
|
||||
});
|
||||
if (serverId === '' || serverId == null) {
|
||||
erroCode.html('<span style="color: red; ">服务器id不能为空!</span>');
|
||||
return false;
|
||||
|
|
@ -117,26 +163,26 @@ function sendMail() {
|
|||
erroCode.html('<span style="color: red; ">用户id不能为空!</span>');
|
||||
return false;
|
||||
}
|
||||
if (itemInfo === '' || itemInfo == null) {
|
||||
erroCode = $('.ITEMINFO');
|
||||
erroCode.html('<span style="color: red; ">回收道具不能为空!</span>');
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
"serverId": serverId,
|
||||
"userIds": userIds,
|
||||
"itemInfo": itemInfo
|
||||
"itemIds[]": itemIds,
|
||||
"itemNums[]": itemNums,
|
||||
"itemTypes[]": itemTypes
|
||||
},
|
||||
url: "/recoverItem",
|
||||
success: function (data) {
|
||||
if (data == 0) {
|
||||
if (data === 0) {
|
||||
layer.msg('回收成功,请到游戏中查出!', {icon: 6, time: 1000});
|
||||
}
|
||||
if (data == 1) {
|
||||
if (data === 1) {
|
||||
layer.msg('回收道具失败,请检查该区是否有该角色信息!', {icon: 6, time: 1000});
|
||||
}
|
||||
if (data === 2) {
|
||||
layer.msg('发送邮件失败 道具不能为空!', {icon: 6, time: 1000});
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -89,10 +89,20 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">附件:</label>
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
<span class="c-red">*</span>
|
||||
附件:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<input type="text" name="attach" placeholder="itemId#num#type|itemId#num#type" value="" class="input-text"/>
|
||||
<span class="ATTACH"></span>
|
||||
<div id="InputsWrapper">
|
||||
<div>
|
||||
物品id:<input type="text" name="itemId" id="itemId_1" style="width: 150px" />
|
||||
物品数量:<input type="text" name="itemNum" id="itemNum_1" style="width: 150px" />
|
||||
物品类型:<input type="text" name="itemType" id="itemType_1" style="width: 150px"/>
|
||||
<a href="#" class="removeclass"></a>
|
||||
<a href="#" id="AddMoreFileBox" class="btn btn-info">+</a>
|
||||
<span class="REWARD"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div id="org"></div>-->
|
||||
|
|
@ -142,6 +152,34 @@
|
|||
index: 0
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
var MaxInputs = 20;
|
||||
var InputsWrapper = $("#InputsWrapper");
|
||||
var AddButton = $("#AddMoreFileBox");
|
||||
|
||||
var x = InputsWrapper.length;
|
||||
var FieldCount=1;
|
||||
|
||||
$(AddButton).click(function (e)
|
||||
{
|
||||
if(x <= MaxInputs)
|
||||
{
|
||||
FieldCount++;
|
||||
$(InputsWrapper).append('<div>物品id:<input type="text" name="itemId" id="itemId_'+ FieldCount +'" style="width: 150px" /> 物品数量:<input type="text" name="itemNum" id="itemNum_'+FieldCount+'" style="width: 150px" /> 物品类型:<input type="text" name="itemType" id="itemType_'+FieldCount+'" style="width: 150px" /><a href="#" class="removeclass">×</a></div>');
|
||||
x++;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$("body").on("click",".removeclass", function(e){ //user click on remove text
|
||||
if( x > 1 ) {
|
||||
$(this).parent('div').remove(); //remove text box
|
||||
x--; //decrement textbox
|
||||
}
|
||||
return false;
|
||||
})
|
||||
|
||||
});
|
||||
function sendMail() {
|
||||
var erroCode = $('.SERVERID');
|
||||
var serverId = $("input[name='serverId']").val();
|
||||
|
|
@ -149,7 +187,18 @@ function sendMail() {
|
|||
var mailTitle = $("input[name='mailTitle']").val();
|
||||
var mailContent = $("textarea[name='mailContent']").val();
|
||||
var isAttach = document.getElementById("isAttach").value;
|
||||
var attach = $("input[name='attach']").val();
|
||||
var itemIds = [];
|
||||
$("input[name='itemId']").each(function () {
|
||||
itemIds.push($(this).val());
|
||||
});
|
||||
var itemNums =[];
|
||||
$("input[name='itemNum']").each(function(){
|
||||
itemNums.push($(this).val());
|
||||
});
|
||||
var itemTypes =[];
|
||||
$("input[name='itemType']").each(function(){
|
||||
itemTypes.push($(this).val());
|
||||
});
|
||||
if (serverId === '' || serverId == null) {
|
||||
erroCode.html('<span style="color: red; ">服务器id不能为空!</span>');
|
||||
return false;
|
||||
|
|
@ -169,13 +218,6 @@ function sendMail() {
|
|||
erroCode.html('<span style="color: red; ">邮件内容不能为空!</span>');
|
||||
return false;
|
||||
}
|
||||
if(isAttach ===1){
|
||||
if (attach === '' || attach == null) {
|
||||
erroCode = $('.ATTACH');
|
||||
erroCode.html('<span style="color: red; ">附件不能为空!</span>');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
|
|
@ -184,19 +226,25 @@ function sendMail() {
|
|||
"mailTitle": mailTitle,
|
||||
"mailContent": mailContent,
|
||||
"isAttach": isAttach,
|
||||
"attach": attach,
|
||||
"itemIds[]": itemIds,
|
||||
"itemNums[]": itemNums,
|
||||
"itemTypes[]": itemTypes
|
||||
},
|
||||
url: "/sendMail",
|
||||
success: function (data) {
|
||||
if (data == 0) {
|
||||
if (data === 0) {
|
||||
layer.msg('发送邮件成功!', {icon: 6, time: 1000});
|
||||
}
|
||||
if (data == 1) {
|
||||
if (data === 1) {
|
||||
layer.msg('发送邮件失败!', {icon: 6, time: 1000});
|
||||
}
|
||||
if (data === 2) {
|
||||
layer.msg('发送邮件失败 道具不能为空!', {icon: 6, time: 1000});
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
</script>
|
||||
<!--/请在上方写此页面业务相关的脚本-->
|
||||
|
|
|
|||
|
|
@ -79,11 +79,28 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="row cl">-->
|
||||
<!--<label class="form-label col-xs-4 col-sm-2">附件:</label>-->
|
||||
<!--<div class="formControls col-xs-8 col-sm-9">-->
|
||||
<!--<input type="text" name="attach" placeholder="itemId#num#type|itemId#num#type" value="" class="input-text"/>-->
|
||||
<!--<span class="ATTACH"></span>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">附件:</label>
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
<span class="c-red">*</span>
|
||||
附件:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<input type="text" name="attach" placeholder="itemId#num#type|itemId#num#type" value="" class="input-text"/>
|
||||
<span class="ATTACH"></span>
|
||||
<div id="InputsWrapper">
|
||||
<div>
|
||||
物品id:<input type="text" name="itemId" id="itemId_1" style="width: 150px" />
|
||||
物品数量:<input type="text" name="itemNum" id="itemNum_1" style="width: 150px" />
|
||||
物品类型:<input type="text" name="itemType" id="itemType_1" style="width: 150px"/>
|
||||
<a href="#" class="removeclass"></a>
|
||||
<a href="#" id="AddMoreFileBox" class="btn btn-info">+</a>
|
||||
<span class="REWARD"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row cl">
|
||||
|
|
@ -151,6 +168,33 @@ $(function(){
|
|||
index:0
|
||||
});
|
||||
});
|
||||
$(document).ready(function() {
|
||||
var MaxInputs = 20;
|
||||
var InputsWrapper = $("#InputsWrapper");
|
||||
var AddButton = $("#AddMoreFileBox");
|
||||
|
||||
var x = InputsWrapper.length;
|
||||
var FieldCount=1;
|
||||
|
||||
$(AddButton).click(function (e)
|
||||
{
|
||||
if(x <= MaxInputs)
|
||||
{
|
||||
FieldCount++;
|
||||
$(InputsWrapper).append('<div>物品id:<input type="text" name="itemId" id="itemId_'+ FieldCount +'" style="width: 150px" /> 物品数量:<input type="text" name="itemNum" id="itemNum_'+FieldCount+'" style="width: 150px" /> 物品类型:<input type="text" name="itemType" id="itemType_'+FieldCount+'" style="width: 150px" /><a href="#" class="removeclass">×</a></div>');
|
||||
x++;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$("body").on("click",".removeclass", function(e){ //user click on remove text
|
||||
if( x > 1 ) {
|
||||
$(this).parent('div').remove(); //remove text box
|
||||
x--; //decrement textbox
|
||||
}
|
||||
return false;
|
||||
})
|
||||
|
||||
});
|
||||
function sendSysMail() {
|
||||
var erroCode = $('.SERVERID');
|
||||
var serverId = $("input[name='serverId']").val();
|
||||
|
|
@ -162,6 +206,18 @@ function sendSysMail() {
|
|||
var playerRTime = $("input[name='playerRTime']").val();
|
||||
var effectTime = $("input[name='effectTime']").val();
|
||||
var version = $("input[name='version']").val();
|
||||
var itemIds = [];
|
||||
$("input[name='itemId']").each(function () {
|
||||
itemIds.push($(this).val());
|
||||
});
|
||||
var itemNums =[];
|
||||
$("input[name='itemNum']").each(function(){
|
||||
itemNums.push($(this).val());
|
||||
});
|
||||
var itemTypes =[];
|
||||
$("input[name='itemType']").each(function(){
|
||||
itemTypes.push($(this).val());
|
||||
});
|
||||
if (serverId === '' || serverId == null) {
|
||||
erroCode.html('<span style="color: red; ">服务器id不能为空!</span>');
|
||||
return false;
|
||||
|
|
@ -195,7 +251,9 @@ function sendSysMail() {
|
|||
"mailTitle": mailTitle,
|
||||
"mailContent": mailContent,
|
||||
"isAttach": isAttach,
|
||||
"attach" :attach ,
|
||||
"itemIds[]": itemIds,
|
||||
"itemNums[]": itemNums,
|
||||
"itemTypes[]": itemTypes,
|
||||
"sendTime": sendTime,
|
||||
"playerRTime": playerRTime,
|
||||
"effectTime": effectTime,
|
||||
|
|
@ -209,6 +267,9 @@ function sendSysMail() {
|
|||
if (data == 1) {
|
||||
layer.msg('发送全服邮件失败!', {icon: 6, time: 1000});
|
||||
}
|
||||
if (data === 2) {
|
||||
layer.msg('发送邮件失败 道具不能为空!', {icon: 6, time: 1000});
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -100,8 +100,16 @@
|
|||
<span class="c-red">*</span>
|
||||
礼包奖励:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<input type="text" name="reward" placeholder="物品id#物品数量#物品类型|物品id#物品数量#物品类型"class="input-text"/>
|
||||
<span class="REWARD"></span>
|
||||
<div id="InputsWrapper">
|
||||
<div>
|
||||
物品id:<input type="text" name="itemIds[]" id="itemId_1" style="width: 150px" />
|
||||
物品数量:<input type="text" name="itemNums[]" id="itemNum_1" style="width: 150px" />
|
||||
物品类型:<input type="text" name="itemTypes[]" id="itemType_1" style="width: 150px"/>
|
||||
<a href="#" class="removeclass"></a>
|
||||
<a href="#" id="AddMoreFileBox" class="btn btn-info">+</a>
|
||||
<span class="REWARD"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -150,6 +158,34 @@ $('#sendNotice').load(function () {
|
|||
//location.href='BookResourceList.jsp'
|
||||
}
|
||||
})
|
||||
$(document).ready(function() {
|
||||
var MaxInputs = 20; //maximum input boxes allowed
|
||||
var InputsWrapper = $("#InputsWrapper"); //Input boxes wrapper ID
|
||||
var AddButton = $("#AddMoreFileBox"); //Add button ID
|
||||
|
||||
var x = InputsWrapper.length; //initlal text box count
|
||||
var FieldCount=1; //to keep track of text box added
|
||||
|
||||
$(AddButton).click(function (e) //on add input button click
|
||||
{
|
||||
if(x <= MaxInputs) //max input box allowed
|
||||
{
|
||||
FieldCount++; //text box added increment
|
||||
//add input box
|
||||
$(InputsWrapper).append('<div>物品id:<input type="text" name="itemIds[]" id="itemId_'+ FieldCount +'" style="width: 150px" /> 物品数量:<input type="text" name="itemNums[]" id="itemNum_'+FieldCount+'" style="width: 150px" /> 物品类型:<input type="text" name="itemTypes[]" id="itemType_'+FieldCount+'" style="width: 150px" /><a href="#" class="removeclass">×</a></div>');
|
||||
x++; //text box increment
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$("body").on("click",".removeclass", function(e){ //user click on remove text
|
||||
if( x > 1 ) {
|
||||
$(this).parent('div').remove(); //remove text box
|
||||
x--; //decrement textbox
|
||||
}
|
||||
return false;
|
||||
})
|
||||
|
||||
});
|
||||
function toaddCDKInfo() {
|
||||
var erroCode = $('.GOODSNAME');
|
||||
var goodsName = $("input[name='goodsName']").val();
|
||||
|
|
@ -157,8 +193,6 @@ function toaddCDKInfo() {
|
|||
var startTime = $("input[name='startTime']").val();
|
||||
var endTime = $("input[name='endTime']").val();
|
||||
var goodsInfo = $("input[name='goodsInfo']").val();
|
||||
var reward = $("input[name='reward']").val();
|
||||
alert(goodsName)
|
||||
if (goodsName === '' || goodsName == null) {
|
||||
erroCode.html('<span style="color: red; ">商品名称不能为空!</span>');
|
||||
return false;
|
||||
|
|
@ -181,11 +215,6 @@ function toaddCDKInfo() {
|
|||
erroCode = $('.GOODSINFO');
|
||||
erroCode.html('<span style="color: red; ">商品信息不能为空!</span>');
|
||||
return false;
|
||||
}
|
||||
if (reward === '' || reward == null) {
|
||||
erroCode = $('.REWARD');
|
||||
erroCode.html('<span style="color: red; ">商品奖励不能为空!</span>');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
|
@ -50,77 +51,134 @@
|
|||
</header>
|
||||
<aside class="Hui-aside">
|
||||
<div class="menu_dropdown bk_2">
|
||||
<dl id="menu-server">
|
||||
<dt><i class="Hui-iconfont"></i> 服务器管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<!--<li><a data-href="getSendMail" data-title="发送邮件" href="javascript:void(0)">发送邮件</a></li>-->
|
||||
<li><a data-href="findServerInfo" data-title="服务器列表" href="javascript:void(0)">服务器信息</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl id="menu-notice">
|
||||
<dt><i class="Hui-iconfont"></i> 公告管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/sendNotice.html" data-title="发送公告" href="javascript:void(0)">发送公告</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl id="menu-CDK">
|
||||
<dt><i class="Hui-iconfont"></i>序列號管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/toAddCDKGoods.html" data-title="序列号礼包生成" href="javascript:void(0)">序列号礼包生成</a></li>
|
||||
<li><a data-href="toCDKBuild" data-title="序列號生成" href="javascript:void(0)">序列號生成</a></li>
|
||||
<li><a data-href="/html/findCDKInfo.html" data-title="序列號使用者查询" href="javascript:void(0)">序列號查询</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl id="menu-log">
|
||||
<dt><i class="Hui-iconfont"></i> 流水日誌管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/findFlow.html" data-title="流水日誌查询" href="javascript:;">流水日誌查询</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl id="menu-GM">
|
||||
<dt><i class="Hui-iconfont"></i> GM管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/gameTitle.html" data-title="封號/解封/禁言" href="javascript:;">封号/解封/禁言</a></li>
|
||||
<li><a data-href="/html/sendMail.html" data-title="发送邮件" href="javascript:;">发送邮件</a></li>
|
||||
<li><a data-href="/html/sendSysMail.html" data-title="全服邮件" href="javascript:;">全服邮件</a></li>
|
||||
<li><a data-href="/html/recoverItem.html" data-title="回收道具" href="javascript:;">回收道具</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl id="menu-user">
|
||||
<dt><i class="Hui-iconfont"></i> 個人信息管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/getuserInfo.html" data-title="個人信息查询" href="javascript:;">個人信息查询</a></li>
|
||||
<li><a data-href="/html/getRole.html" data-title="账号角色查询" href="javascript:;">账号角色查询</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl id="menu-family">
|
||||
<dt><i class="Hui-iconfont"></i> 宗門信息管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/getFamilyInfo.html" data-title="宗門信息" href="javascript:;">宗門信息查询</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl id="menu-rank">
|
||||
<dt><i class="Hui-iconfont"></i> 排行榜管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/geArenaInfo.html" data-title="排行榜信息" href="javascript:;">排行榜信息</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<tr th:object="${powersVo}">
|
||||
<div th: th:switch="${powersVo.adminList}">
|
||||
<div th:case="0">
|
||||
<dl id="menu-member">
|
||||
<dt><i class="Hui-iconfont"></i> 会员管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="findmemberlist" data-title="会员列表" href="javascript:;">会员列表</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div th: th:switch="${powersVo.serverInfo}">
|
||||
<div th:case="0">
|
||||
<dl id="menu-server" >
|
||||
<dt><i class="Hui-iconfont"></i> 服务器管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="findServerInfo" data-title="服务器列表" href="javascript:void(0)">服务器信息</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div th: th:switch="${powersVo.noticeInfo}">
|
||||
<div th:case="0">
|
||||
<dl id="menu-notice">
|
||||
<dt><i class="Hui-iconfont"></i> 公告管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/sendNotice.html" data-title="发送公告" href="javascript:void(0)">发送公告</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div th: th:switch="${powersVo.CDKinfo}">
|
||||
<div th:case="0">
|
||||
<dl id="menu-CDK">
|
||||
<dt><i class="Hui-iconfont"></i>序列號管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/toAddCDKGoods.html" data-title="序列号礼包生成" href="javascript:void(0)">序列号礼包生成</a></li>
|
||||
<li><a data-href="toCDKBuild" data-title="序列號生成" href="javascript:void(0)">序列號生成</a></li>
|
||||
<li><a data-href="/html/findCDKInfo.html" data-title="序列號使用者查询" href="javascript:void(0)">序列號查询</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div th: th:switch="${powersVo.flowInfo}">
|
||||
<div th:case="0">
|
||||
<dl id="menu-log">
|
||||
<dt><i class="Hui-iconfont"></i> 流水日誌管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/findFlow.html" data-title="流水日誌查询" href="javascript:;">流水日誌查询</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div th: th:switch="${powersVo.GMinfo}">
|
||||
<div th:case="0">
|
||||
<dl id="menu-GM">
|
||||
<dt><i class="Hui-iconfont"></i> GM管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/gameTitle.html" data-title="封號/解封/禁言" href="javascript:;">封号/解封/禁言</a></li>
|
||||
<li><a data-href="/html/sendMail.html" data-title="发送邮件" href="javascript:;">发送邮件</a></li>
|
||||
<li><a data-href="/html/sendSysMail.html" data-title="全服邮件" href="javascript:;">全服邮件</a></li>
|
||||
<li><a data-href="/html/recoverItem.html" data-title="回收道具" href="javascript:;">回收道具</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div th: th:switch="${powersVo.TitleGame}">
|
||||
<div th:case="0">
|
||||
<dl id="menu-Title">
|
||||
<dt><i class="Hui-iconfont"></i> 封號/解封/禁言/解封<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/gameTitle.html" data-title="封號/解封/禁言/解封" href="javascript:;">封号/解封/禁言</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div th: th:switch="${powersVo.userInfo}">
|
||||
<div th:case="0">
|
||||
<dl id="menu-user">
|
||||
<dt><i class="Hui-iconfont"></i> 個人信息管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/getuserInfo.html" data-title="個人信息查询" href="javascript:;">個人信息查询</a></li>
|
||||
<li><a data-href="/html/getRole.html" data-title="账号角色查询" href="javascript:;">账号角色查询</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div th: th:switch="${powersVo.familyInfo}">
|
||||
<div th:case="0">
|
||||
<dl id="menu-family">
|
||||
<dt><i class="Hui-iconfont"></i> 宗門信息管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/getFamilyInfo.html" data-title="宗門信息" href="javascript:;">宗門信息查询</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div th: th:switch="${powersVo.arenaInfo}">
|
||||
<div th:case="0">
|
||||
<dl id="menu-rank">
|
||||
<dt><i class="Hui-iconfont"></i> 排行榜管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a data-href="/html/geArenaInfo.html" data-title="排行榜信息" href="javascript:;">排行榜信息</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</tr>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a></div>
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@
|
|||
<script type="text/javascript">
|
||||
$('.table-sort').dataTable({
|
||||
"aaSorting": [[ 1, "desc" ]],//默认第几个排序
|
||||
"bStateSave": true,//状态保存
|
||||
"bStateSave": true,//状态保存x异步 request请求
|
||||
"pading":false,
|
||||
"aoColumnDefs": [
|
||||
//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
|
||||
|
|
@ -98,14 +98,15 @@ $('.table-sort').dataTable({
|
|||
]
|
||||
});
|
||||
function tableToExcel() {
|
||||
var itemName = $("input[name='itemName']").val();
|
||||
var type = document.getElementById("type").value;
|
||||
var titles = $("#aa").find("tr:first th"); //获得表头td数组
|
||||
var json = $("#aa").find("tr:not(:first)").map(function (i, e) {
|
||||
return "{" + $(e).children("td").map(function (j, el) {
|
||||
var name = $(titles[j]).html();
|
||||
return name + ":'" + $(el).html() +"'";
|
||||
}).get().join(",") + "}";
|
||||
var getDisplay = e.style.display;
|
||||
if (getDisplay !== "none"){
|
||||
return "{" + $(e).children("td").map(function (j, el) {
|
||||
var name = $(titles[j]).html();
|
||||
return name + ":'" + $(el).html() +"'";
|
||||
}).get().join(",") + "}";
|
||||
}
|
||||
}).get().join(",");
|
||||
// var aa =JSON.stringify(json); //将JSON对象转化为JSON字符
|
||||
// alert(aa);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp" />
|
||||
<!--[if lt IE 9]>
|
||||
<script type="text/javascript" src="lib/html5shiv.js"></script>
|
||||
<script type="text/javascript" src="lib/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
|
||||
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
|
||||
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
|
||||
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
|
||||
<!--[if IE 6]>
|
||||
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
|
||||
<script>DD_belatedPNG.fix('*');</script>
|
||||
<![endif]-->
|
||||
<title>用户管理</title>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页 <span class="c-gray en">></span> 用户中心 <span class="c-gray en">></span> 用户管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont"></i></a></nav>
|
||||
<div class="page-container">
|
||||
<div class="cl pd-5 bg-1 bk-gray mt-20">
|
||||
<a class="btn btn-primary radius" href="/html/member-add.html">
|
||||
<i
|
||||
class="Hui-iconfont"></i> 添加用户</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="mt-20">
|
||||
<table class="table table-border table-bordered table-hover table-bg table-sort">
|
||||
<thead>
|
||||
<tr class="text-c">
|
||||
<th width="100">用户名</th>
|
||||
<th width="300">权限功能</th>
|
||||
<!--<th width="50">操作</th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="obj:${adminList}">
|
||||
<td th:text="${obj.userName}" style="text-align: center;"></td>
|
||||
<td th:text="${obj.powers}" style="text-align: center;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!--_footer 作为公共模版分离出去-->
|
||||
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
|
||||
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>
|
||||
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
||||
|
||||
<!--请在下方写此页面业务相关的脚本-->
|
||||
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
|
||||
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue