generated from root/miduo_server
跑马灯 公告
parent
756b73774a
commit
6d0f061a58
|
|
@ -72,13 +72,13 @@ public class GameTitleController {
|
|||
@RequestMapping(value = "/backC", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public @ResponseBody int backC(HttpSession session, ModelMap map , HttpServletRequest request) {
|
||||
try {
|
||||
JSONObject jsonObject;
|
||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||
String jsonString = JSON.toJSONString(parameterMap);
|
||||
jsonObject = JSON.parseObject(jsonString);
|
||||
BaseHandler handler = ManagerManager.getInstance().getBaseHandler("gm");
|
||||
int result = handler.execute(jsonObject);
|
||||
return result;
|
||||
// JSONObject jsonObject;
|
||||
// HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||
// String jsonString = JSON.toJSONString(parameterMap);
|
||||
// jsonObject = JSON.parseObject(jsonString);
|
||||
// BaseHandler handler = ManagerManager.getInstance().getBaseHandler("gm");
|
||||
// int result = handler.execute(jsonObject);
|
||||
return 1;
|
||||
} catch (Exception e) {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -252,30 +252,6 @@ public class GameTitleController {
|
|||
userInfoDao.updateStatus(update, cuserinfo);
|
||||
}
|
||||
|
||||
private void updateBlackInfo(int banTime, String banReason, BlackList blackList, int banEndTime) throws Exception {
|
||||
Map<Integer, String> blackMap = blackList.getBlackListMap();
|
||||
blackMap.put(0, banEndTime + "|" + banReason);
|
||||
blackList.setBlackListMap(blackMap);
|
||||
Map<Integer, Integer> sealTimeLengthMap = blackList.getSealTimeLength();
|
||||
sealTimeLengthMap.put(0, banTime);
|
||||
blackList.setSealTimeLength(sealTimeLengthMap);
|
||||
Update update = new Update();
|
||||
update.set("black_list_map", blackMap);
|
||||
update.set("sealTime_length", sealTimeLengthMap);
|
||||
userInfoDao.updateBlack(update, blackList);
|
||||
}
|
||||
|
||||
private void addBlackList(int banTime, String banReason,int banEndTime,String userId) throws Exception {
|
||||
BlackList blackList = new BlackList();
|
||||
Map<Integer, String> blackMap = new HashMap<>();
|
||||
blackMap.put(0, banEndTime + "|" + banReason);
|
||||
Map<Integer, Integer> sealTimeLengthMap = new HashMap<>();
|
||||
sealTimeLengthMap.put(0, banTime);
|
||||
blackList.setBlack_openid(userId);
|
||||
blackList.setServerid(0);
|
||||
blackList.setBlackListMap(blackMap);
|
||||
blackList.setSealTimeLength(sealTimeLengthMap);
|
||||
userInfoDao.addBlackList(blackList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,74 @@
|
|||
package com.jmfy.controller;
|
||||
|
||||
import com.jmfy.dao.ServerInfoDao;
|
||||
import com.jmfy.dao.impl.NoticeInfoDaoImpl;
|
||||
import com.jmfy.model.CServerOpenTime;
|
||||
import com.jmfy.model.ServerInfo;
|
||||
import com.jmfy.thrift.idl.Result;
|
||||
import com.jmfy.utils.RPCClient;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Controller
|
||||
public class MsgController {
|
||||
@Resource
|
||||
private ServerInfoDao serverInfoDao;
|
||||
|
||||
@RequestMapping(value = "/publishMSG", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public @ResponseBody
|
||||
int publishNotice(HttpServletRequest request) throws Exception {
|
||||
|
||||
List<ServerInfo> allServerInfo = serverInfoDao.getAllServerInfo();
|
||||
List<String> serverList = new ArrayList<>();
|
||||
|
||||
for (ServerInfo serverInfo : allServerInfo) {
|
||||
serverList.add(serverInfo.getServer_id());
|
||||
}
|
||||
|
||||
String content = request.getParameter("content1");
|
||||
String serverId = request.getParameter("serverId");
|
||||
String cmd = "sendmsg " + content;
|
||||
|
||||
String[] split = serverId.split(",");
|
||||
|
||||
if (split.length==1&&split[0].equals("0")) {//全服
|
||||
serverList.toArray(split);
|
||||
}
|
||||
for (String str : split) {
|
||||
|
||||
if (!serverList.contains(str)) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
ServerInfo serverInfo = serverInfoDao.getServerinfo(Integer.valueOf(serverId));
|
||||
//TODO 分服
|
||||
String thriftIp = serverInfo.getIP();
|
||||
String thriftPort = String.valueOf(7901);
|
||||
if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) {
|
||||
return -1;
|
||||
} else {
|
||||
Result result = RPCClient.gmSend(cmd, thriftIp, thriftPort);
|
||||
//异常或者错误
|
||||
if (result.getResultCode() != 0) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.jmfy.controller;
|
||||
|
||||
import com.jmfy.dao.impl.NoticeInfoDaoImpl;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
|
||||
@Controller
|
||||
public class NoticeController {
|
||||
@Resource
|
||||
private NoticeInfoDaoImpl noticeInfoDao;
|
||||
|
||||
@RequestMapping(value = "/publishNotice", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public @ResponseBody
|
||||
int publishNotice(HttpServletRequest request) throws Exception {
|
||||
String content = request.getParameter("content1");
|
||||
String title = request.getParameter("title1");
|
||||
noticeInfoDao.updateNoticeInfo(title,content);
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -197,11 +197,11 @@ public class QuestionController {
|
|||
|
||||
@RequestMapping(value = "/sendquestion", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public String sendquestion(HttpSession session, ModelMap map, HttpServletRequest request) throws Exception {
|
||||
Set<CQuestSendVo> cQuestSendVo;
|
||||
|
||||
|
||||
Set<CQuestSendVo> cQuestSendVo;
|
||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||
String serveIds = request.getParameter("serverId");
|
||||
|
||||
String backtype = parameterMap.get("backtype");
|
||||
switch (backtype) {
|
||||
case "0":
|
||||
|
|
@ -234,19 +234,19 @@ public class QuestionController {
|
|||
List<String> filter = new ArrayList<>();
|
||||
if (!serveIds.equals("0")) {
|
||||
String[] split = serveIds.split(",");
|
||||
filter = Arrays.asList(split);
|
||||
if (split.length != 1 || !split[0].equals("")) {
|
||||
filter = Arrays.asList(split);
|
||||
}
|
||||
}
|
||||
|
||||
final List<String> filterfinal = filter;
|
||||
|
||||
Map<String, String> valueMap = RedisUtil.getInstence().getRedisMapString(RedisUserKey.QUESTION_FROMBACK_ALL + RedisUserKey.Delimiter_colon);
|
||||
|
||||
if (filter.size() != 0) {
|
||||
filter.forEach(valueMap::remove);
|
||||
}
|
||||
Map<String, String> treeMap = new TreeMap<>(valueMap);
|
||||
treeMap.forEach((key, value) -> {
|
||||
CQuestionCoreBean cQuestionCoreBean = gson.fromJson(value, CQuestionCoreBean.class);
|
||||
CQuestSendVo cQuestSendVo1 = new CQuestSendVo();
|
||||
String[] split2 = cQuestionCoreBean.getServerId().split(",");
|
||||
cQuestSendVo1.setServerid(cQuestionCoreBean.getServerId());
|
||||
cQuestSendVo1.setId(Integer.valueOf(key));
|
||||
Date data = new Date(Long.valueOf(cQuestionCoreBean.getcQuestionBean().getStart()) * 1000L);
|
||||
|
|
@ -254,7 +254,14 @@ public class QuestionController {
|
|||
Date data2 = new Date(Long.valueOf(cQuestionCoreBean.getcQuestionBean().getEnd()) * 1000L);
|
||||
cQuestSendVo1.setEnd(ymdhmsFormat_new.format(data2));
|
||||
cQuestSendVo1.setValue(value);
|
||||
cQuestSendVo.add(cQuestSendVo1);
|
||||
|
||||
if (filterfinal.size() == 0) {
|
||||
cQuestSendVo.add(cQuestSendVo1);
|
||||
} else {
|
||||
if (filterfinal.containsAll(Arrays.asList(split2))||cQuestionCoreBean.getServerId().equals("0"))
|
||||
cQuestSendVo.add(cQuestSendVo1);
|
||||
}
|
||||
|
||||
});
|
||||
map.addAttribute("cQuestSendVo", cQuestSendVo);
|
||||
return "questsendInfo";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
package com.jmfy.dao;
|
||||
|
||||
public interface NoticeInfoDao {
|
||||
|
||||
void updateNoticeInfo(String title,String content) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.jmfy.dao.impl;
|
||||
|
||||
import com.jmfy.dao.NoticeInfoDao;
|
||||
import com.jmfy.model.Constant;
|
||||
import com.jmfy.model.NoticeInfo;
|
||||
import com.jmfy.utils.Connect;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
import org.springframework.data.mongodb.core.query.Update;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Component
|
||||
public class NoticeInfoDaoImpl implements NoticeInfoDao {
|
||||
|
||||
@Resource
|
||||
private Connect connect;
|
||||
public static final String dbName = Constant.dbName;
|
||||
@Override
|
||||
public void updateNoticeInfo(String title, String content) throws Exception {
|
||||
Update update = new Update();
|
||||
update.set("title",title);
|
||||
update.set("content",content);
|
||||
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
|
||||
Query query = new Query(Criteria.where("_id").is("1"));
|
||||
mongoTemplate.updateMulti(query, update, NoticeInfo.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -2,6 +2,8 @@ package com.jmfy.handler;
|
|||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public abstract class BaseHandler {
|
||||
private int pid;
|
||||
private int gid;
|
||||
|
|
@ -10,7 +12,7 @@ public abstract class BaseHandler {
|
|||
return "";
|
||||
}
|
||||
|
||||
public abstract int execute(JSONObject json) throws Exception ;
|
||||
public abstract int execute(HttpServletRequest request) throws Exception ;
|
||||
|
||||
public int getPid() {
|
||||
return pid;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import org.slf4j.LoggerFactory;
|
|||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
|
|
@ -22,129 +23,9 @@ public class GMHandler extends BaseHandler {
|
|||
@Resource
|
||||
private UserInfoDao gsUserDao;
|
||||
|
||||
public int execute(JSONObject jsonObject) throws Exception {
|
||||
public int execute(HttpServletRequest request) throws Exception {
|
||||
|
||||
String uid;
|
||||
int dsid;
|
||||
int treat_type;
|
||||
uid = jsonObject.getString("uid");
|
||||
dsid = jsonObject.getIntValue("dsid");
|
||||
treat_type = jsonObject.getIntValue("treat_type");
|
||||
|
||||
boolean allServer = false;
|
||||
|
||||
String cmd = "";
|
||||
switch (treat_type){
|
||||
case 1:
|
||||
if(!jsonObject.containsKey("actor_id")){
|
||||
throw new Exception("缺少参数");
|
||||
}
|
||||
String actor_id_ban = jsonObject.getString("actor_id");
|
||||
cmd="silence "+actor_id_ban+" 1";
|
||||
break;
|
||||
case 2:
|
||||
if(!jsonObject.containsKey("actor_id")){
|
||||
throw new Exception("缺少参数");
|
||||
}
|
||||
String actor_id_no_ban = jsonObject.getString("actor_id");
|
||||
cmd="silence "+actor_id_no_ban+" 0";
|
||||
break;
|
||||
case 4:
|
||||
if(dsid==0){
|
||||
allServer=true;
|
||||
cmd="addblack ";
|
||||
}else {
|
||||
if(!jsonObject.containsKey("actor_id")){
|
||||
throw new Exception("缺少参数");
|
||||
}
|
||||
String id = jsonObject.getString("actor_id");
|
||||
cmd="addblack "+id;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if(dsid==0){
|
||||
allServer=true;
|
||||
cmd="reblack ";
|
||||
}else {
|
||||
if(!jsonObject.containsKey("actor_id")){
|
||||
throw new Exception("缺少参数");
|
||||
}
|
||||
String id2 = jsonObject.getString("actor_id");
|
||||
cmd="reblack "+id2;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if(!jsonObject.containsKey("actor_id")){
|
||||
throw new Exception("缺少参数");
|
||||
}
|
||||
String actor_id = jsonObject.getString("actor_id");
|
||||
cmd="kick "+actor_id;
|
||||
break;
|
||||
case 6:
|
||||
if(!jsonObject.containsKey("actor_id")){
|
||||
throw new Exception("缺少参数");
|
||||
}
|
||||
String actor_id2 = jsonObject.getString("actor_id");
|
||||
if(!jsonObject.containsKey("actor_name")){
|
||||
cmd="changename "+actor_id2;
|
||||
}else {
|
||||
String actor_name = jsonObject.getString("actor_name");
|
||||
cmd="changename "+actor_id2+" "+actor_name;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if(allServer){
|
||||
List<CUserInfo> coreUserInfoList = gsUserDao.findUserInfo(uid);
|
||||
if (coreUserInfoList == null) {
|
||||
throw new Exception("帐号不存在");
|
||||
} else {
|
||||
if (coreUserInfoList.size() == 0)
|
||||
throw new Exception("帐号不存在");
|
||||
for (CUserInfo coreUserInfo : coreUserInfoList) {
|
||||
ServerInfo coreServerList = serverListDao.getServerinfo(coreUserInfo.getServerid());
|
||||
if (null == coreServerList) {
|
||||
continue;
|
||||
} else {
|
||||
String thriftIp = coreServerList.getIP();
|
||||
String thriftPort = String.valueOf(7901);
|
||||
if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) {
|
||||
continue;
|
||||
} else {
|
||||
cmd = cmd+coreUserInfo.getUserId();
|
||||
Result result = RPCClient.gmSend(cmd, thriftIp, thriftPort);
|
||||
//异常或者错误
|
||||
// if (result.getResultCode() != 0) {
|
||||
// continue;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}else {
|
||||
|
||||
ServerInfo coreServerList = serverListDao.getServerinfo(dsid);
|
||||
if (null == coreServerList) {
|
||||
throw new Exception("应用不存在");
|
||||
} else {
|
||||
String thriftIp = coreServerList.getIP();
|
||||
String thriftPort = String.valueOf(7900 + 1);
|
||||
if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) {
|
||||
throw new Exception("serverAddress not exist");
|
||||
} else {
|
||||
|
||||
Result result = RPCClient.gmSend(cmd, thriftIp, thriftPort);
|
||||
if (result.getResultCode() != 0) {
|
||||
throw new Exception(result.getResultMsg());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
* @date 2015/8/13
|
||||
*/
|
||||
|
||||
@Document(collection = "notice_info")
|
||||
public class NoticeInfo {
|
||||
@Id
|
||||
private String _id;
|
||||
|
||||
@Field(value = "content")
|
||||
private String content;
|
||||
|
||||
@Field(value = "title")
|
||||
private String title;
|
||||
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
}
|
||||
|
|
@ -82,6 +82,9 @@
|
|||
<label class=""><br>
|
||||
<input type="checkbox" value="12" name="power" id="user-Character-1-0-9"/>
|
||||
问卷</label>
|
||||
<label class=""><br>
|
||||
<input type="checkbox" value="13" name="power" id="user-Character-1-0-9"/>
|
||||
公告</label>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,124 @@
|
|||
<!--_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]-->
|
||||
<!--/meta 作为公共模版分离出去-->
|
||||
|
||||
<title>基本设置</title>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页
|
||||
<span class="c-gray en">></span>
|
||||
GM管理
|
||||
<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="/publishMSG" method="post" target="updataQuest"
|
||||
onsubmit="return sendCheck()">
|
||||
<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="serverId"
|
||||
placeholder="服务器id, id为0 全服 指定服务器:服务器id,服务器id....." 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="text" name="content1" placeholder="" value="" class="input-text"/>
|
||||
<span class="ROLEID"></span>
|
||||
</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="submit" style="font-size: 15px"><i class="Hui-iconfont"></i>
|
||||
提交
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<iframe name='updataQuest' id="updataQuest" 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
|
||||
});
|
||||
});
|
||||
|
||||
$('#updataQuest').load(function () {
|
||||
// 根据后台返回值处理结果
|
||||
var text=$(this).contents().find("body").text();
|
||||
if (text != 0) {
|
||||
alert('失败');
|
||||
} else {
|
||||
alert('成功');
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
function sendCheck() {
|
||||
var erroCode = $('.SERVERID');
|
||||
var content1 = $("input[name='content1']").val();
|
||||
|
||||
if (content1 === '' || content1 == null) {
|
||||
erroCode.html('<span style="color: red; ">内容不能为空!</span>');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<!--/请在上方写此页面业务相关的脚本-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
<!--_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]-->
|
||||
<!--/meta 作为公共模版分离出去-->
|
||||
|
||||
<title>基本设置</title>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页
|
||||
<span class="c-gray en">></span>
|
||||
GM管理
|
||||
<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="/publishNotice" method="post" target="updataQuest"
|
||||
onsubmit="return sendCheck()">
|
||||
<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="title1"
|
||||
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="text" name="content1" placeholder="" value="" class="input-text"/>
|
||||
<span class="ROLEID"></span>
|
||||
</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="submit" style="font-size: 15px"><i class="Hui-iconfont"></i>
|
||||
提交
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<iframe name='updataQuest' id="updataQuest" 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
|
||||
});
|
||||
});
|
||||
|
||||
$('#updataQuest').load(function () {
|
||||
// 根据后台返回值处理结果
|
||||
var text=$(this).contents().find("body").text();
|
||||
if (text != 0) {
|
||||
alert('失败');
|
||||
} else {
|
||||
alert('成功');
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
function sendCheck() {
|
||||
var erroCode = $('.SERVERID');
|
||||
var title1 = $("input[name='title1']").val();
|
||||
var content1 = $("input[name='content1']").val();
|
||||
|
||||
if (title1 === '' || title1 == null) {
|
||||
erroCode.html('<span style="color: red; ">游戏公告标题不能为空!</span>');
|
||||
return false;
|
||||
}
|
||||
if (content1 === '' || content1 == null) {
|
||||
erroCode.html('<span style="color: red; ">游戏公告内容不能为空!</span>');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<!--/请在上方写此页面业务相关的脚本-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -86,6 +86,8 @@
|
|||
<ul>
|
||||
<li><a data-href="/html/sendPersonalMail.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/sendSysMsg.html" data-title="发送跑马灯" href="javascript:;">发送跑马灯</a></li>
|
||||
<li><a data-href="/html/sendSysNotice.html" data-title="发送公告" href="javascript:;">发送公告</a></li>
|
||||
<!--<li><a data-href="/html/recoverItem.html" data-title="回收道具" href="javascript:;">回收道具</a></li>-->
|
||||
</ul>
|
||||
</dd>
|
||||
|
|
@ -131,6 +133,8 @@
|
|||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</tr>
|
||||
</div>
|
||||
</aside>
|
||||
|
|
|
|||
Loading…
Reference in New Issue