Commit fe933bd5 authored by daniel's avatar daniel

feat(auth): 后台新增权限控制

parent bfe16c51
...@@ -49,47 +49,56 @@ public class SecurityInterceptor extends JService implements HandlerInterceptor ...@@ -49,47 +49,56 @@ public class SecurityInterceptor extends JService implements HandlerInterceptor
// 检查请求头中是否有Upgrade: websocket // 检查请求头中是否有Upgrade: websocket
String upgradeHeader = request.getHeader("Upgrade"); String upgradeHeader = request.getHeader("Upgrade");
if ("websocket".equalsIgnoreCase(upgradeHeader)) { if ("websocket".equalsIgnoreCase(upgradeHeader)) {
// 如果是WebSocket升级请求,可以选择不处理或特殊处理 return true;
// 然后返回true,继续执行 }
String uri = request.getRequestURI();
// 放行的路径:登录相关、UEditor、静态资源、微信回调
if (isWhitelisted(uri)) {
return true; return true;
} }
Map<String, Object> queryParams = getQueryParams(request); Map<String, Object> queryParams = getQueryParams(request);
// logger.info("请求URL:"+request.getRequestURI()+queryParams);
if (handler instanceof HandlerMethod) { if (handler instanceof HandlerMethod) {
HandlerMethod handlerMethod = (HandlerMethod) handler; HandlerMethod handlerMethod = (HandlerMethod) handler;
Method method = handlerMethod.getMethod(); Method method = handlerMethod.getMethod();
PageView annotation = method.getAnnotation(PageView.class); PageView annotation = method.getAnnotation(PageView.class);
// String userAgent = request.getHeader("user-agent").toLowerCase(); // foward入口不拦截(在Controller中颁发session)
// if(userAgent.indexOf("miniprogram")>-1) {//小程序 if (uri.contains("cmpt/foward")) {
// String partnerId = request.getParameter("partnerId"); return true;
// if(partnerId == null){ }
// throw new NoAuthException("未查询到partnerdId,没权限!,uri: " + request.getRequestURI());
// } // 小程序请求放行(小程序没有session)
// } String userAgent = request.getHeader("user-agent");
if (userAgent != null) {
String ua = userAgent.toLowerCase();
if (ua.contains("miniprogram") || ua.contains("micromessenger")) {
return true;
}
}
if(request.getRequestURI().indexOf("easy") > -1 && request.getSession().getAttribute("user") == null){ // /gk/ 和 /easy/ 路径要求session登录
response.sendRedirect(domain+"login"); if ((uri.startsWith("/gk/") || uri.contains("easy")) && request.getSession().getAttribute("user") == null) {
response.sendRedirect(domain + "auth_no");
return false; return false;
} }
if (annotation != null) { if (annotation != null) {
String[] split = request.getRequestURI().split("/"); // 已登录的用户跳过sign校验
String cmptId = split[split.length - 1]; if (request.getSession().getAttribute("user") != null) {
return true;
}
String timestamp = request.getParameter("timestamp"); String timestamp = request.getParameter("timestamp");
String sign = request.getParameter("sign"); String sign = request.getParameter("sign");
String cId = request.getParameter("cId"); String cId = request.getParameter("cId");
String uId = request.getParameter("uId"); String uId = request.getParameter("uId");
// log.info("请求路径:" + str + ",sign:" + DigestUtils.md5DigestAsHex(str.getBytes()) + ",psign:" + sign); if (cId == null || timestamp == null || sign == null || uId == null) {
if (NumberUtils.toInt(uId, -1) == -1 || NumberUtils.toInt(uId, -1) == 0) { log.info("缺少签名参数, uri:{}", uri);
log.info("无用户信息登录"); response.sendRedirect(domain + "auth_no");
response.sendRedirect("http://timer.geexek.com");
return false; return false;
} }
if (cId == null || timestamp == null) {
log.info("无权限!");
throw new RuntimeException("无权限");
}
String str = "cId=" + cId + "&timestamp=" + timestamp + "&uId=" + uId; String str = "cId=" + cId + "&timestamp=" + timestamp + "&uId=" + uId;
if (!DigestUtils.md5DigestAsHex(str.getBytes()).equals(sign)) { if (!DigestUtils.md5DigestAsHex(str.getBytes()).equals(sign)) {
log.info("签名不一致!"); log.info("签名不一致!");
...@@ -103,6 +112,19 @@ public class SecurityInterceptor extends JService implements HandlerInterceptor ...@@ -103,6 +112,19 @@ public class SecurityInterceptor extends JService implements HandlerInterceptor
return true; return true;
} }
private boolean isWhitelisted(String uri) {
return uri.equals("/login") || uri.startsWith("/login/")
|| uri.equals("/loginout")
|| uri.startsWith("/getQrCodePic") || uri.startsWith("/getSign")
|| uri.startsWith("/getAuthorizeCode")
|| uri.startsWith("/sendMsgCode") || uri.startsWith("/sendRegisterMsgCode")
|| uri.startsWith("/startCaptcha")
|| uri.startsWith("/ueditor/")
|| uri.startsWith("/static/")
|| uri.startsWith("/api-common/")
|| uri.equals("/auth") || uri.equals("/auth_no");
}
public static Map<String, Object> getQueryParams(HttpServletRequest request) { public static Map<String, Object> getQueryParams(HttpServletRequest request) {
Map map; Map map;
if (request.getMethod().equalsIgnoreCase("POST")) { if (request.getMethod().equalsIgnoreCase("POST")) {
...@@ -205,7 +227,7 @@ public class SecurityInterceptor extends JService implements HandlerInterceptor ...@@ -205,7 +227,7 @@ public class SecurityInterceptor extends JService implements HandlerInterceptor
modelAndView.addObject("uId", uId); modelAndView.addObject("uId", uId);
modelAndView.addObject("sign", new String(DigestUtils.md5DigestAsHex(("cId=" + cmptId + "&timestamp=" + timestamp + "&uId=" + uId).getBytes()))); modelAndView.addObject("sign", new String(DigestUtils.md5DigestAsHex(("cId=" + cmptId + "&timestamp=" + timestamp + "&uId=" + uId).getBytes())));
modelAndView.addObject("baseURL",domain); modelAndView.addObject("baseURL",domain);
modelAndView.addObject("yfb",request.getSession().getAttribute("yfb")); // modelAndView.addObject("yfb",request.getSession().getAttribute("yfb"));
} }
} }
......
...@@ -164,6 +164,7 @@ public class CmptController { ...@@ -164,6 +164,7 @@ public class CmptController {
@PathVariable("userId") Integer userId, @PathVariable("userId") Integer userId,
@PathVariable("gUserId") Integer gUserId, @PathVariable("gUserId") Integer gUserId,
@RequestParam(value = "partnerId",required = false) String partnerId, @RequestParam(value = "partnerId",required = false) String partnerId,
HttpServletRequest request,
ModelAndView mv) { ModelAndView mv) {
log.info("=====跳转赛客助手管理后台 cmptId:"+cmptId+",userId:"+userId+",gUserId:"+gUserId); log.info("=====跳转赛客助手管理后台 cmptId:"+cmptId+",userId:"+userId+",gUserId:"+gUserId);
// 修改从赛客官网后台跳转到赛客助手后台 by Linc 2022/05/18 // 修改从赛客官网后台跳转到赛客助手后台 by Linc 2022/05/18
...@@ -204,6 +205,16 @@ public class CmptController { ...@@ -204,6 +205,16 @@ public class CmptController {
}else{ }else{
user2 = new NeuUser().setId(uId); user2 = new NeuUser().setId(uId);
} }
// 颁发session鉴权 - uId或guserid即为registerinfo.userid
Integer geexekUserId = user2.getGuserid() > 0 ? user2.getGuserid() : uId;
if (geexekUserId != null && geexekUserId > 0) {
GeexekUser geexekUser = cmptService.getGeexekUser(geexekUserId);
if (geexekUser != null) {
request.getSession().setAttribute("user", geexekUser);
}
}
String param = "uId=" + user2.getId(); String param = "uId=" + user2.getId();
// 跳转到赛客助手后台赛事列表 // 跳转到赛客助手后台赛事列表
if(partnerId != null&& !partnerId.isEmpty()&&!partnerId.equals("null")){ if(partnerId != null&& !partnerId.isEmpty()&&!partnerId.equals("null")){
......
...@@ -454,6 +454,12 @@ public class MicroApiController { ...@@ -454,6 +454,12 @@ public class MicroApiController {
String partnerId = request.getParameter("partnerId"); String partnerId = request.getParameter("partnerId");
String creator = request.getParameter("userId"); String creator = request.getParameter("userId");
Partner partner = cmptService.getPartnerById(partnerId); Partner partner = cmptService.getPartnerById(partnerId);
if (partner == null) {
Page<List<Cmpt>> result = new Page<>();
result.setCode(-1);
result.setMsg("合作方不存在");
return(result);
}
// log.info("partner:"+partner); // log.info("partner:"+partner);
Map<String, String> param = new HashMap<>(); Map<String, String> param = new HashMap<>();
param.put("userId", partner.getUserId() + ""); param.put("userId", partner.getUserId() + "");
......
package com.dlbridge.jadp.plugins.common;
import com.dlbridge.jadp.plugins.cmpt.utils.AliOssUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.*;
@RestController
@RequestMapping("/ueditor")
@RequiredArgsConstructor
@Slf4j
public class UEditorController {
private static final long IMAGE_MAX_SIZE = 10 * 1024 * 1024;
private static final long FILE_MAX_SIZE = 50 * 1024 * 1024;
private static final List<String> IMAGE_ALLOWED = Arrays.asList(".png", ".jpg", ".jpeg", ".gif", ".bmp");
private static final List<String> FILE_ALLOWED = Arrays.asList(
".png", ".jpg", ".jpeg", ".gif", ".bmp",
".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt",
".zip", ".rar", ".7z", ".mp3", ".mp4");
private static final Map<String, byte[]> MAGIC_NUMBERS = new HashMap<>();
static {
MAGIC_NUMBERS.put(".jpg", new byte[]{(byte) 0xFF, (byte) 0xD8, (byte) 0xFF});
MAGIC_NUMBERS.put(".jpeg", new byte[]{(byte) 0xFF, (byte) 0xD8, (byte) 0xFF});
MAGIC_NUMBERS.put(".png", new byte[]{(byte) 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A});
MAGIC_NUMBERS.put(".gif", new byte[]{0x47, 0x49, 0x46, 0x38});
MAGIC_NUMBERS.put(".bmp", new byte[]{0x42, 0x4D});
MAGIC_NUMBERS.put(".pdf", new byte[]{0x25, 0x50, 0x44, 0x46});
MAGIC_NUMBERS.put(".doc", new byte[]{(byte) 0xD0, (byte) 0xCF, 0x11, (byte) 0xE0, (byte) 0xA1, (byte) 0xB1, 0x1A, (byte) 0xE1});
MAGIC_NUMBERS.put(".docx", new byte[]{0x50, 0x4B, 0x03, 0x04});
MAGIC_NUMBERS.put(".xls", new byte[]{(byte) 0xD0, (byte) 0xCF, 0x11, (byte) 0xE0, (byte) 0xA1, (byte) 0xB1, 0x1A, (byte) 0xE1});
MAGIC_NUMBERS.put(".xlsx", new byte[]{0x50, 0x4B, 0x03, 0x04});
MAGIC_NUMBERS.put(".ppt", new byte[]{(byte) 0xD0, (byte) 0xCF, 0x11, (byte) 0xE0, (byte) 0xA1, (byte) 0xB1, 0x1A, (byte) 0xE1});
MAGIC_NUMBERS.put(".pptx", new byte[]{0x50, 0x4B, 0x03, 0x04});
MAGIC_NUMBERS.put(".zip", new byte[]{0x50, 0x4B, 0x03, 0x04});
MAGIC_NUMBERS.put(".rar", new byte[]{0x52, 0x61, 0x72, 0x21, 0x1A, 0x07, 0x00});
MAGIC_NUMBERS.put(".7z", new byte[]{0x37, 0x7A, (byte) 0xBC, (byte) 0xAF, 0x27, 0x1C});
MAGIC_NUMBERS.put(".mp3", new byte[]{0x49, 0x44, 0x33});
MAGIC_NUMBERS.put(".mp4", new byte[]{0x00, 0x00, 0x00});
}
private final AliOssUtil aliOssUtil;
@RequestMapping("/controller")
public Object exec(@RequestParam("action") String action,
@RequestParam(value = "file", required = false) MultipartFile file,
HttpServletRequest request) {
switch (action) {
case "config":
return getConfig();
case "uploadimage":
case "uploadscrawl":
return uploadImage(file, request);
case "uploadfile":
return uploadFile(file, request);
default:
Map<String, Object> result = new HashMap<>();
result.put("state", "action not found");
return result;
}
}
private Map<String, Object> getConfig() {
Map<String, Object> config = new HashMap<>();
config.put("imageActionName", "uploadimage");
config.put("imageFieldName", "file");
config.put("imageMaxSize", IMAGE_MAX_SIZE);
config.put("imageAllowFiles", IMAGE_ALLOWED);
config.put("imageCompressEnable", true);
config.put("imageCompressBorder", 1600);
config.put("imageInsertAlign", "none");
config.put("imageUrlPrefix", "");
config.put("imagePathFormat", "");
config.put("scrawlActionName", "uploadscrawl");
config.put("scrawlFieldName", "file");
config.put("scrawlMaxSize", 2097152);
config.put("scrawlUrlPrefix", "");
config.put("scrawlInsertAlign", "none");
config.put("fileActionName", "uploadfile");
config.put("fileFieldName", "file");
config.put("fileMaxSize", FILE_MAX_SIZE);
config.put("fileAllowFiles", FILE_ALLOWED);
config.put("fileUrlPrefix", "");
config.put("filePathFormat", "");
return config;
}
private Map<String, Object> uploadImage(MultipartFile file, HttpServletRequest request) {
Map<String, Object> result = new HashMap<>();
if (file == null || file.isEmpty()) {
result.put("state", "文件为空");
return result;
}
if (file.getSize() > IMAGE_MAX_SIZE) {
result.put("state", "文件大小超过限制(10MB)");
return result;
}
try {
String originalFilename = file.getOriginalFilename();
if (originalFilename == null || !originalFilename.contains(".")) {
result.put("state", "文件名无效");
return result;
}
String extension = originalFilename.substring(originalFilename.lastIndexOf(".")).toLowerCase();
if (!IMAGE_ALLOWED.contains(extension)) {
result.put("state", "不允许的文件类型");
return result;
}
byte[] fileBytes = file.getBytes();
if (!checkMagicNumber(fileBytes, extension)) {
result.put("state", "文件内容与扩展名不符");
return result;
}
String objectName = "gk/ueditor/" + UUID.randomUUID() + extension;
String filePath = aliOssUtil.upload(fileBytes, objectName);
result.put("state", "SUCCESS");
result.put("url", filePath);
result.put("title", originalFilename);
result.put("original", originalFilename);
} catch (IOException e) {
log.error("UEditor图片上传失败", e);
result.put("state", "上传失败");
}
return result;
}
private Map<String, Object> uploadFile(MultipartFile file, HttpServletRequest request) {
Map<String, Object> result = new HashMap<>();
if (file == null || file.isEmpty()) {
result.put("state", "文件为空");
return result;
}
if (file.getSize() > FILE_MAX_SIZE) {
result.put("state", "文件大小超过限制(50MB)");
return result;
}
try {
String originalFilename = file.getOriginalFilename();
if (originalFilename == null || !originalFilename.contains(".")) {
result.put("state", "文件名无效");
return result;
}
String extension = originalFilename.substring(originalFilename.lastIndexOf(".")).toLowerCase();
if (!FILE_ALLOWED.contains(extension)) {
result.put("state", "不允许的文件类型");
return result;
}
byte[] fileBytes = file.getBytes();
if (MAGIC_NUMBERS.containsKey(extension) && !checkMagicNumber(fileBytes, extension)) {
result.put("state", "文件内容与扩展名不符");
return result;
}
String objectName = "gk/ueditor/" + UUID.randomUUID() + extension;
String filePath = aliOssUtil.upload(fileBytes, objectName);
result.put("state", "SUCCESS");
result.put("url", filePath);
result.put("title", originalFilename);
result.put("original", originalFilename);
} catch (IOException e) {
log.error("UEditor文件上传失败", e);
result.put("state", "上传失败");
}
return result;
}
private boolean checkMagicNumber(byte[] fileBytes, String extension) {
byte[] expected = MAGIC_NUMBERS.get(extension);
if (expected == null) {
return true;
}
if (fileBytes.length < expected.length) {
return false;
}
for (int i = 0; i < expected.length; i++) {
if (fileBytes[i] != expected[i]) {
return false;
}
}
return true;
}
}
...@@ -60,7 +60,7 @@ geexek.cmpt.url=https://timerbackend.geexek.com/ ...@@ -60,7 +60,7 @@ geexek.cmpt.url=https://timerbackend.geexek.com/
geexek.shamus.url=http://shamus.geexek.com/ geexek.shamus.url=http://shamus.geexek.com/
timer.url=http://timer.geexek.com/ timer.url=http://timer.geexek.com/
server.url=http://zs.geexek.com/ server.url=http://localhost:9090/
server.url.https=http://localhost:9090/ server.url.https=http://localhost:9090/
###redis ###redis
spring.redis.port=6379 spring.redis.port=6379
...@@ -104,17 +104,25 @@ spring.cloud.sentinel.skip-keys=cmptId ...@@ -104,17 +104,25 @@ spring.cloud.sentinel.skip-keys=cmptId
spring.cloud.sentinel.exclude-urls=/static/**,**.css,**.js spring.cloud.sentinel.exclude-urls=/static/**,**.css,**.js
## nacos ��ַ ## nacos ��ַ
spring.cloud.sentinel.datasource.ds.nacos.server-addr=192.168.214.231:9848,192.168.214.232:9848,192.168.214.230:9848 #spring.cloud.sentinel.datasource.ds.nacos.server-addr=192.168.214.231:9848,192.168.214.232:9848,192.168.214.230:9848
spring.cloud.sentinel.datasource.ds.nacos.dataId=micro-gksite-sentinel spring.cloud.sentinel.datasource.ds.nacos.dataId=micro-gksite-sentinel
spring.cloud.sentinel.datasource.ds.nacos.data-type=json spring.cloud.sentinel.datasource.ds.nacos.data-type=json
spring.cloud.sentinel.datasource.ds.nacos.groupId=production spring.cloud.sentinel.datasource.ds.nacos.groupId=production
spring.cloud.sentinel.enabled=false
# 禁用 Nacos 服务注册与发现
spring.cloud.nacos.discovery.enabled=false
# 禁用 Nacos 配置管理
spring.cloud.nacos.config.enabled=false
# 如果使用了 Sentinel 数据源从 Nacos 读取,禁用该数据源
spring.cloud.sentinel.datasource.ds.nacos.server-addr=
#spring.cloud.sentinel.datasource.ds1.nacos.namespace=fad8a39-a3e7-49a1-ae96-0f7aaf39136b #spring.cloud.sentinel.datasource.ds1.nacos.namespace=fad8a39-a3e7-49a1-ae96-0f7aaf39136b
# #
## �������� ##
spring.cloud.sentinel.datasource.ds.nacos.rule-type=flow spring.cloud.sentinel.datasource.ds.nacos.rule-type=flow
base.url=http://localhost:8080 base.url=http://localhost:9090/
lock.url=https://openapi.qiyuesuo.cn lock.url=https://openapi.qiyuesuo.cn
lock.accessKey=trRQR9ewQX lock.accessKey=trRQR9ewQX
......
...@@ -7,21 +7,49 @@ ...@@ -7,21 +7,49 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> <title>无权限访问</title>
<meta name="keywords" content="">
<style> <style>
.auth{ body {
width: 100%; margin: 0;
position: absolute; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
bottom: 0px; background: #f5f5f5;
left: 0px; }
.container {
max-width: 500px;
margin: 120px auto;
text-align: center;
background: #fff;
border-radius: 8px;
padding: 60px 40px;
box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.icon {
font-size: 60px;
margin-bottom: 20px;
}
.title {
font-size: 22px;
color: #333;
margin-bottom: 16px;
}
.desc {
font-size: 15px;
color: #666;
line-height: 1.8;
}
.link {
color: #ce3939;
text-decoration: none;
} }
</style> </style>
</head> </head>
<body style="position: relative;margin: 0px"> <body>
<div style="height: 500px;width: 100%;text-align: center"> <div class="container">
<span style="display: inline;height: 200px;margin-top: 150px;line-height: 200px; <div class="icon">&#128274;</div>
text-align: center;font-size: #333;font-size: 30px">未注册为组委会用户</span> <div class="title">暂无访问权限</div>
<div class="desc">
请从<a class="link" href="http://timer.geexek.com" target="_blank">计时后台</a>或<a class="link" href="http://www.geexek.com" target="_blank">报名后台</a>跳转进入本系统。
</div>
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -50,10 +50,12 @@ ...@@ -50,10 +50,12 @@
<script src="${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"></script> <script src="${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"></script>
<!-- 引入富文本 --> <!-- 引入富文本 -->
<script>window.UEDITOR_HOME_URL = "https://enroll.geexek.com/js/ueditor/";</script>
<script <script
src="https://enroll.geexek.com/js/ueditor/ueditor.config-zs.js?v=<%=System.currentTimeMillis()%>"></script> src="https://enroll.geexek.com/js/ueditor/ueditor.config-zs.js?v=<%=System.currentTimeMillis()%>"></script>
<script <script
src="https://enroll.geexek.com/js/ueditor/ueditor.all.js?v=<%=System.currentTimeMillis()%>"></script> src="https://enroll.geexek.com/js/ueditor/ueditor.all.js?v=<%=System.currentTimeMillis()%>"></script>
<script>window.UEDITOR_CONFIG.serverUrl = "/ueditor/controller";</script>
<style> <style>
#app { #app {
padding: 0 20px 20px 20px; padding: 0 20px 20px 20px;
......
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %> <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fns" uri="/WEB-INF/tlds/fns.tld" %> <%@ taglib prefix="fns" uri="/WEB-INF/tlds/fns.tld" %>
<%@ taglib prefix="fnc" uri="/WEB-INF/tlds/fnc.tld" %> <%@ taglib prefix="fnc" uri="/WEB-INF/tlds/fnc.tld" %>
<c:set var="ctx" value="${pageContext.request.contextPath}${fns:getAdminPath()}"/> <c:set var="ctx" value="${pageContext.request.contextPath}${fns:getAdminPath()}" />
<c:set var="path" value="${pageContext.request.contextPath}${fns:getPath()}"/> <c:set var="path" value="${pageContext.request.contextPath}${fns:getPath()}" />
<c:set var="jaaproot" value="${pageContext.request.contextPath}"/> <c:set var="jaaproot" value="${pageContext.request.contextPath}" />
<c:set var="ctxStatic" value="${pageContext.request.contextPath}/static"/> <c:set var="ctxStatic" value="${pageContext.request.contextPath}/static" />
<!-- JavaScript files--> <!-- JavaScript files-->
<script src="${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"></script> <script src="${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"></script>
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui"/> <meta name="viewport"
<meta name="description" content=""> content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui" />
<meta name="robots" content="all,follow"> <meta name="description" content="">
<!-- Bootstrap CSS--> <meta name="robots" content="all,follow">
<link rel="stylesheet" href="${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css"> <!-- Bootstrap CSS-->
<!-- Font Awesome CSS--> <link rel="stylesheet"
<link rel="stylesheet" href="${ctxStatic}/newdermon/vendor/font-awesome/css/font-awesome.min.css"> href="${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css">
<!-- Fontastic Custom icon font--> <!-- Font Awesome CSS-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/fontastic.css"> <link rel="stylesheet"
<!-- Google fonts - Poppins --> href="${ctxStatic}/newdermon/vendor/font-awesome/css/font-awesome.min.css">
<!-- Fontastic Custom icon font-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/fontastic.css">
<!-- Google fonts - Poppins -->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/font-css.css"> <link rel="stylesheet" href="${ctxStatic}/newdermon/css/font-css.css">
<!-- theme stylesheet--> <!-- theme stylesheet-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/style.default.css?v=<%=System.currentTimeMillis()%>" id="theme-stylesheet"> <link rel="stylesheet"
<!-- Custom stylesheet - for your changes--> href="${ctxStatic}/newdermon/css/style.default.css?v=<%=System.currentTimeMillis()%>"
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/custom.css?v=<%=System.currentTimeMillis()%>"> id="theme-stylesheet">
<!-- Favicon--> <!-- Custom stylesheet - for your changes-->
<link rel="shortcut icon" href="https://img.geexek.com/files/home/favicon.ico"> <link rel="stylesheet"
<script type="text/javascript" charset="utf-8" src="${ctxStatic}/layer/layer.js"></script> href="${ctxStatic}/newdermon/css/custom.css?v=<%=System.currentTimeMillis()%>">
<link rel="stylesheet" href="${ctxStatic}/layer/skin/layer.css"> <!-- Favicon-->
<link rel="stylesheet" href="${ctxStatic}/cmpt/index.css?v=<%=System.currentTimeMillis()%>"> <link rel="shortcut icon" href="https://img.geexek.com/files/home/favicon.ico">
<link rel="stylesheet" href="${ctxStatic}/cmpt/setting.css?v=<%=System.currentTimeMillis()%>"> <script type="text/javascript" charset="utf-8"
<title>我的赛事</title> src="${ctxStatic}/layer/layer.js"></script>
<style> <link rel="stylesheet" href="${ctxStatic}/layer/skin/layer.css">
<link rel="stylesheet"
href="${ctxStatic}/cmpt/index.css?v=<%=System.currentTimeMillis()%>">
<link rel="stylesheet"
href="${ctxStatic}/cmpt/setting.css?v=<%=System.currentTimeMillis()%>">
<title>我的赛事</title>
<style>
input:-moz-placeholder,
textarea:-moz-placeholder {
color: #999999;
font-size: 14px;
}
input:-moz-placeholder, input:-ms-input-placeholder,
textarea:-moz-placeholder { textarea:-ms-input-placeholder {
color: #999999; color: #999999;
font-size: 14px; font-size: 14px;
} }
input:-ms-input-placeholder, input::-webkit-input-placeholder,
textarea:-ms-input-placeholder { textarea::-webkit-input-placeholder {
color: #999999; color: #999999;
font-size: 14px; font-size: 14px;
} }
input::-webkit-input-placeholder, .cmpt-item {
textarea::-webkit-input-placeholder { width: 344px;
color: #999999; height: 360px;
font-size: 14px; background: white;
} float: left;
.cmpt-item{ margin-bottom: 25px;
width: 344px; border-radius: 5px 5px 0px 0px;
height: 360px; margin-right: 80px;
background: white; position: relative;
float: left; }
margin-bottom: 25px;
border-radius: 5px 5px 0px 0px;
margin-right: 80px;
position: relative;
}
.cmpt-item:hover .entry{
display: block;
}
.cmpt-item:nth-child(3n+1){
margin-right: 0px;
}
.start-time-icon{
width: 14px;
height: 16px;
background: url("/static/images/start.png") no-repeat center;
background-size: contain;
}
.end-time-icon{ .cmpt-item:hover .entry {
width: 14px; display: block;
height: 16px; }
background: url("/static/images/end.png") no-repeat center;
background-size: contain;
}
.entry{
display: none;
width: 344px;
height: 360px;
margin: auto;
background: rgba(0,0,0,0.4);
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
border-radius: 4px;
position: absolute;
top: 0px;
left: 0px;
}
.entry-btn{
width: 234px;
height: 44px;
background: #ffffff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
border-radius: 4px;
position: absolute;
bottom: 20px;
left: 50px;
color: #333;
font-size: 20px;
line-height: 44px;
text-align: center;
cursor: pointer;
}
.func-title{
font-size: 24px;
font-weight: 500;
color: #333333;
display: inline-block;
height: 70px;
line-height: 70px;
}
.cmpt-name{
font-size: 22px;
color: #000;
overflow: hidden;
text-overflow: ellipsis;
word-break: keep-all;
display: inline-block;
width: 100%;
height: 36px;
}
.header-first-titile{
margin-top: 0px;
}
.note-header {
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<style type="text/css">
</style> .cmpt-item:nth-child(3n+1) {
<header class="header imageManagementHeader"> margin-right: 0px;
<nav class="navbar"> }
<!-- Search Box-->
<div class="search-box">
<button class="dismiss"><i class="icon-close"></i></button>
<form id="searchForm" action="#" role="search">
<input type="search" placeholder="What are you looking for..." class="form-control">
</form>
</div>
<div class="container-fluid">
<div class="navbar-holder d-flex align-items-center justify-content-between">
<!-- Navbar Header-->
<div class="navbar-header" style="margin-left: 7.5%;">
<!-- Navbar Brand --><a href="index.html" class="navbar-brand d-none d-sm-inline-block">
<div class="brand-text d-none d-lg-inline-block"><span class="logosaike"></span><strong
class="logonote">赛事管理平台</strong></div>
<div class="brand-text d-none d-sm-inline-block d-lg-none"><strong>BD</strong></div>
</a>
<!-- Toggle Button--><a id="toggle-btn" href="#"
class="menu-btn active"><span></span><span></span><span></span></a>
</div>
<div class="note-header">
<div class="header-first-titile"><span></span><span>赛客现场助手—易发布</span></div>
<div class="header-second-titile"><span></span></div>
</div>
<!-- Navbar Menu -->
<ul class="nav-menu list-unstyled d-flex flex-md-row align-items-md-center">
<!-- Logout --> .start-time-icon {
<li class="nav-item logout-header"><a width: 14px;
href="JavaScript:void(0);" class="nav-link logout"> <span class="d-none d-sm-inline">退出登录</span></a> height: 16px;
</li> background: url("/static/images/start.png") no-repeat center;
</ul> background-size: contain;
</div> }
</div>
</nav>
</header>
<div id="cmpt" style="margin: auto;width: 1200px;"> .end-time-icon {
<div> width: 14px;
<span class="func-title">我的赛事</span> height: 16px;
</div> background: url("/static/images/end.png") no-repeat center;
<div class="cmpt-item" v-for="item in list"> background-size: contain;
<div class="entry"> }
<span class="entry-btn" :cmpt-id="item.cmptId">进入</span>
</div>
<div>
<img width="344px" height="185px" :src="item.logo" alt="">
</div>
<div style="padding: 10px 20px">
<span class="cmpt-name">{{item.cmptName}}</span>
</div>
<div style="padding: 0px 20px">
<div>
<span class="start-time-icon"></span>
<span>{{item.startTime}}</span>
</div>
<div style="margin-top: 10px">
<span class="end-time-icon"></span>
<span>{{item.endTime}}</span>
</div>
</div>
</div>
</div> .entry {
<script src="${ctxStatic}/newdermon/vendor/popper.js/umd/popper.min.js"></script> display: none;
<script src="${ctxStatic}/newdermon/vendor/bootstrap/js/bootstrap.min.js"></script> width: 344px;
<script src="${ctxStatic}/newdermon/vendor/jquery.cookie/jquery.cookie.js"></script> height: 360px;
<script type="text/javascript">var ctx = '${ctx}', ctxStatic = '${ctxStatic}';</script> margin: auto;
<script src="${ctxStatic}/vue/vue.js"></script> background: rgba(0, 0, 0, 0.4);
<script> box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
var cmpt = new Vue({ border-radius: 4px;
el : '#cmpt', position: absolute;
data : { top: 0px;
list:[] left: 0px;
}, }
methods:{
queryAll : function () {
$.ajax({
url : "/gk/cmpt/queryMyCmpt",
success:function(data){
if(data.code == 200){
cmpt.$data.list = data.content;
}else if(data.code ==403){
layer.alert("重新登录");
window.location.href = '/login';
}
} .entry-btn {
}) width: 234px;
} height: 44px;
} background: #ffffff;
}); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
cmpt.queryAll(); border-radius: 4px;
$('body').on('click','.entry-btn',function () { position: absolute;
var cmptid = $(this).attr('cmpt-id'); bottom: 20px;
window.location.href = '/easy/data/'+cmptid+"?cId="+cmptid; left: 50px;
}) color: #333;
$('.logout').click(function(){ font-size: 20px;
$.ajax({ line-height: 44px;
url : '/loginout', text-align: center;
success:function(data){ cursor: pointer;
if(data.code == 200){ }
window.location.href = '/login';
}
}
})
})
</script>
</body>
</html> .func-title {
\ No newline at end of file font-size: 24px;
font-weight: 500;
color: #333333;
display: inline-block;
height: 70px;
line-height: 70px;
}
.cmpt-name {
font-size: 22px;
color: #000;
overflow: hidden;
text-overflow: ellipsis;
word-break: keep-all;
display: inline-block;
width: 100%;
height: 36px;
}
.header-first-titile {
margin-top: 0px;
}
.note-header {
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<style type="text/css">
</style>
<header class="header imageManagementHeader">
<nav class="navbar">
<!-- Search Box-->
<div class="search-box">
<button class="dismiss"><i class="icon-close"></i></button>
<form id="searchForm" action="#" role="search">
<input type="search" placeholder="What are you looking for..."
class="form-control">
</form>
</div>
<div class="container-fluid">
<div
class="navbar-holder d-flex align-items-center justify-content-between">
<!-- Navbar Header-->
<div class="navbar-header" style="margin-left: 7.5%;">
<!-- Navbar Brand --><a href="index.html"
class="navbar-brand d-none d-sm-inline-block">
<div class="brand-text d-none d-lg-inline-block"><span
class="logosaike"></span><strong
class="logonote">赛事管理平台</strong></div>
<div class="brand-text d-none d-sm-inline-block d-lg-none">
<strong>赛客现场助手</strong>
</div>
</a>
<!-- Toggle Button--><a id="toggle-btn" href="#"
class="menu-btn active"><span></span><span></span><span></span></a>
</div>
<div class="note-header">
<div class="header-first-titile">
<span></span><span>赛客现场助手—易发布</span>
</div>
<div class="header-second-titile"><span></span></div>
</div>
<!-- Navbar Menu -->
<ul
class="nav-menu list-unstyled d-flex flex-md-row align-items-md-center">
<!-- Logout -->
<li class="nav-item logout-header"><a href="JavaScript:void(0);"
class="nav-link logout"> <span
class="d-none d-sm-inline">退出登录</span></a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<div id="cmpt" style="margin: auto;width: 1200px;">
<div>
<span class="func-title">我的赛事</span>
</div>
<div class="cmpt-item" v-for="item in list">
<div class="entry">
<span class="entry-btn" :cmpt-id="item.cmptId">进入</span>
</div>
<div>
<img width="344px" height="185px" :src="item.logo" alt="">
</div>
<div style="padding: 10px 20px">
<span class="cmpt-name">{{item.cmptName}}</span>
</div>
<div style="padding: 0px 20px">
<div>
<span class="start-time-icon"></span>
<span>{{item.startTime}}</span>
</div>
<div style="margin-top: 10px">
<span class="end-time-icon"></span>
<span>{{item.endTime}}</span>
</div>
</div>
</div>
</div>
<script src="${ctxStatic}/newdermon/vendor/popper.js/umd/popper.min.js"></script>
<script src="${ctxStatic}/newdermon/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="${ctxStatic}/newdermon/vendor/jquery.cookie/jquery.cookie.js"></script>
<script type="text/javascript">var ctx = '${ctx}', ctxStatic = '${ctxStatic}';</script>
<script src="${ctxStatic}/vue/vue.js"></script>
<script>
var cmpt = new Vue({
el: '#cmpt',
data: {
list: []
},
methods: {
queryAll: function () {
$.ajax({
url: "/gk/cmpt/queryMyCmpt",
success: function (data) {
if (data.code == 200) {
cmpt.$data.list = data.content;
} else if (data.code == 403) {
layer.alert("重新登录");
window.location.href = '/login';
}
}
})
}
}
});
cmpt.queryAll();
$('body').on('click', '.entry-btn', function () {
var cmptid = $(this).attr('cmpt-id');
window.location.href = '/easy/data/' + cmptid + "?cId=" + cmptid;
})
$('.logout').click(function () {
$.ajax({
url: '/loginout',
success: function (data) {
if (data.code == 200) {
window.location.href = '/login';
}
}
})
})
</script>
</body>
</html>
\ No newline at end of file
...@@ -38,10 +38,12 @@ ...@@ -38,10 +38,12 @@
<script type="text/javascript" src="${ctxStatic}/leaflet/label.js"></script> <script type="text/javascript" src="${ctxStatic}/leaflet/label.js"></script>
<script type="text/javascript" charset="utf-8" src="${ctxStatic}/layer/layer.js"></script> <script type="text/javascript" charset="utf-8" src="${ctxStatic}/layer/layer.js"></script>
<link rel="stylesheet" href="${ctxStatic}/layer/skin/layer.css"> <link rel="stylesheet" href="${ctxStatic}/layer/skin/layer.css">
<script>window.UEDITOR_HOME_URL = "https://enroll.geexek.com/js/ueditor/";</script>
<script <script
src="https://enroll.geexek.com/js/ueditor/ueditor.config-zs.js?v=<%=System.currentTimeMillis()%>"></script> src="https://enroll.geexek.com/js/ueditor/ueditor.config-zs.js?v=<%=System.currentTimeMillis()%>"></script>
<script <script
src="https://enroll.geexek.com/js/ueditor/ueditor.all.js?v=<%=System.currentTimeMillis()%>"></script> src="https://enroll.geexek.com/js/ueditor/ueditor.all.js?v=<%=System.currentTimeMillis()%>"></script>
<script>window.UEDITOR_CONFIG.serverUrl = "/ueditor/controller";</script>
<script src="${ctxStatic}/newdermon/vendor/popper.js/umd/popper.min.js"></script> <script src="${ctxStatic}/newdermon/vendor/popper.js/umd/popper.min.js"></script>
<script src="${ctxStatic}/js/qikoo.js"></script> <script src="${ctxStatic}/js/qikoo.js"></script>
<style> <style>
......
...@@ -31,10 +31,12 @@ ...@@ -31,10 +31,12 @@
<link rel="stylesheet" href="${ctxStatic}/cmpt/setting.css?v=<%=System.currentTimeMillis()%>"> <link rel="stylesheet" href="${ctxStatic}/cmpt/setting.css?v=<%=System.currentTimeMillis()%>">
<link rel="stylesheet" href="${ctxStatic}/cmpt/road.css?v=<%=System.currentTimeMillis()%>" /> <link rel="stylesheet" href="${ctxStatic}/cmpt/road.css?v=<%=System.currentTimeMillis()%>" />
<link rel="stylesheet" href="${ctxStatic}/cmpt/road-new.css?v=<%=System.currentTimeMillis()%>" /> <link rel="stylesheet" href="${ctxStatic}/cmpt/road-new.css?v=<%=System.currentTimeMillis()%>" />
<script>window.UEDITOR_HOME_URL = "https://enroll.geexek.com/js/ueditor/";</script>
<script <script
src="https://enroll.geexek.com/js/ueditor/ueditor.config-zs.js?v=<%=System.currentTimeMillis()%>"></script> src="https://enroll.geexek.com/js/ueditor/ueditor.config-zs.js?v=<%=System.currentTimeMillis()%>"></script>
<script <script
src="https://enroll.geexek.com/js/ueditor/ueditor.all.js?v=<%=System.currentTimeMillis()%>"></script> src="https://enroll.geexek.com/js/ueditor/ueditor.all.js?v=<%=System.currentTimeMillis()%>"></script>
<script>window.UEDITOR_CONFIG.serverUrl = "/ueditor/controller";</script>
<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script> <script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"></script> <script src="${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" src="${ctxStatic}/layer/layer.js"></script> <script type="text/javascript" charset="utf-8" src="${ctxStatic}/layer/layer.js"></script>
......
...@@ -38,10 +38,12 @@ ...@@ -38,10 +38,12 @@
<script type="text/javascript" charset="utf-8" src="${ctxStatic}/layer/layer.js"></script> <script type="text/javascript" charset="utf-8" src="${ctxStatic}/layer/layer.js"></script>
<link rel="stylesheet" href="${ctxStatic}/layer/skin/layer.css"> <link rel="stylesheet" href="${ctxStatic}/layer/skin/layer.css">
<script>window.UEDITOR_HOME_URL = "https://enroll.geexek.com/js/ueditor/";</script>
<script <script
src="https://enroll.geexek.com/js/ueditor/ueditor.config-zs.js?v=<%=System.currentTimeMillis()%>"></script> src="https://enroll.geexek.com/js/ueditor/ueditor.config-zs.js?v=<%=System.currentTimeMillis()%>"></script>
<script <script
src="https://enroll.geexek.com/js/ueditor/ueditor.all.js?v=<%=System.currentTimeMillis()%>"></script> src="https://enroll.geexek.com/js/ueditor/ueditor.all.js?v=<%=System.currentTimeMillis()%>"></script>
<script>window.UEDITOR_CONFIG.serverUrl = "/ueditor/controller";</script>
<link rel="stylesheet" href="/static/cmpt/score.css?<%=System.currentTimeMillis()%>"> <link rel="stylesheet" href="/static/cmpt/score.css?<%=System.currentTimeMillis()%>">
<style> <style>
......
...@@ -41,10 +41,12 @@ ...@@ -41,10 +41,12 @@
<script type="text/javascript" charset="utf-8" src="${ctxStatic}/layer/layer.js"></script> <script type="text/javascript" charset="utf-8" src="${ctxStatic}/layer/layer.js"></script>
<link rel="stylesheet" href="${ctxStatic}/layer/skin/layer.css"> <link rel="stylesheet" href="${ctxStatic}/layer/skin/layer.css">
<script>window.UEDITOR_HOME_URL = "https://enroll.geexek.com/js/ueditor/";</script>
<script <script
src="https://enroll.geexek.com/js/ueditor/ueditor.config-zs.js?v=<%=System.currentTimeMillis()%>"></script> src="https://enroll.geexek.com/js/ueditor/ueditor.config-zs.js?v=<%=System.currentTimeMillis()%>"></script>
<script <script
src="https://enroll.geexek.com/js/ueditor/ueditor.all.js?v=<%=System.currentTimeMillis()%>"></script> src="https://enroll.geexek.com/js/ueditor/ueditor.all.js?v=<%=System.currentTimeMillis()%>"></script>
<script>window.UEDITOR_CONFIG.serverUrl = "/ueditor/controller";</script>
<link rel="stylesheet" href="/static/cmpt/score.css?<%=System.currentTimeMillis()%>"> <link rel="stylesheet" href="/static/cmpt/score.css?<%=System.currentTimeMillis()%>">
<style> <style>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<!-- Navbar Brand --><a class="navbar-brand d-none d-sm-inline-block"> <!-- Navbar Brand --><a class="navbar-brand d-none d-sm-inline-block">
<div class="brand-text d-none d-lg-inline-block"><span class="logosaike"></span><strong <div class="brand-text d-none d-lg-inline-block"><span class="logosaike"></span><strong
class="logonote">赛事管理平台</strong></div> class="logonote">赛事管理平台</strong></div>
<div class="brand-text d-none d-sm-inline-block d-lg-none"><strong>BD</strong></div> <div class="brand-text d-none d-sm-inline-block d-lg-none"><strong>赛客现场助手</strong></div>
</a> </a>
<!-- Toggle Button--><a id="toggle-btn" href="#" <!-- Toggle Button--><a id="toggle-btn" href="#"
class="menu-btn active"><span></span><span></span><span></span></a> class="menu-btn active"><span></span><span></span><span></span></a>
......
...@@ -181,37 +181,7 @@ ...@@ -181,37 +181,7 @@
<input type="hidden" value="${timestamp}" id="timestamp"> <input type="hidden" value="${timestamp}" id="timestamp">
<input type="hidden" value="${sign}" id="sign"> <input type="hidden" value="${sign}" id="sign">
<nav class="side-navbar"> <nav class="side-navbar">
<c:choose> <c:if test="${not empty sessionScope.user}">
<c:when test="${yfb}">
<li id="base" style="display: none;"></li>
<ul class="yfb" style="padding: 20px 0px;height: 460px;">
<li class="data menu-sub-item">
<a
href="/easy/data/${cmpt.cmptId}?uId=${uId}&cId=${cId}&timestamp=${timestamp}&sign=${sign}">
<span class="left-arrow"></span>
<span class="menu-txt">数据统计</span>
</a>
</li>
<li class="review menu-sub-item">
<a
href="/easy/review/${cmpt.cmptId}?uId=${uId}&cId=${cId}&timestamp=${timestamp}&sign=${sign}">
<span class="left-arrow"></span>
<span class="menu-txt">成绩管理</span>
</a>
</li>
<li class="road menu-sub-item">
<a
href="/easy/road/${cmpt.cmptId}?uId=${uId}&cId=${cId}&timestamp=${timestamp}&sign=${sign}">
<span class="left-arrow"></span>
<span class="menu-txt">路线导入</span>
</a>
</li>
<li class="menu-sub-item">
<a href="/easy/me"></span><span class="menu-txt">返回赛事</span></a>
</li>
</ul>
</c:when>
<c:otherwise>
<ul class="list-unstyled" style="margin: 0px;height: 100%;"> <ul class="list-unstyled" style="margin: 0px;height: 100%;">
<li class="main menu-item"> <li class="main menu-item">
<a href="/gk/cmpt/${cmpt.cmptId}?uId=${uId}&cId=${cId}&timestamp=${timestamp}&sign=${sign}"> <a href="/gk/cmpt/${cmpt.cmptId}?uId=${uId}&cId=${cId}&timestamp=${timestamp}&sign=${sign}">
...@@ -486,8 +456,7 @@ ...@@ -486,8 +456,7 @@
</li> </li>
</ul> </ul>
</ul> </ul>
</c:otherwise> </c:if>
</c:choose>
</nav> </nav>
<script> <script>
......
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %> <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fns" uri="/WEB-INF/tlds/fns.tld" %> <%@ taglib prefix="fns" uri="/WEB-INF/tlds/fns.tld" %>
<%@ taglib prefix="fnc" uri="/WEB-INF/tlds/fnc.tld" %> <%@ taglib prefix="fnc" uri="/WEB-INF/tlds/fnc.tld" %>
<c:set var="ctx" value="${pageContext.request.contextPath}${fns:getAdminPath()}"/> <c:set var="ctx" value="${pageContext.request.contextPath}${fns:getAdminPath()}" />
<c:set var="path" value="${pageContext.request.contextPath}${fns:getPath()}"/> <c:set var="path" value="${pageContext.request.contextPath}${fns:getPath()}" />
<c:set var="jaaproot" value="${pageContext.request.contextPath}"/> <c:set var="jaaproot" value="${pageContext.request.contextPath}" />
<c:set var="ctxStatic" value="${pageContext.request.contextPath}/static"/> <c:set var="ctxStatic" value="${pageContext.request.contextPath}/static" />
<!-- JavaScript files--> <!-- JavaScript files-->
<script src="${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"></script> <script src="${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"></script>
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui"/> <meta name="viewport"
<meta name="description" content=""> content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui" />
<meta name="robots" content="all,follow"> <meta name="description" content="">
<!-- Bootstrap CSS--> <meta name="robots" content="all,follow">
<link rel="stylesheet" href="${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css"> <!-- Bootstrap CSS-->
<!-- Font Awesome CSS--> <link rel="stylesheet"
<link rel="stylesheet" href="${ctxStatic}/newdermon/vendor/font-awesome/css/font-awesome.min.css"> href="${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css">
<!-- Fontastic Custom icon font--> <!-- Font Awesome CSS-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/fontastic.css"> <link rel="stylesheet"
<!-- Google fonts - Poppins --> href="${ctxStatic}/newdermon/vendor/font-awesome/css/font-awesome.min.css">
<!-- Fontastic Custom icon font-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/fontastic.css">
<!-- Google fonts - Poppins -->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/font-css.css"> <link rel="stylesheet" href="${ctxStatic}/newdermon/css/font-css.css">
<!-- theme stylesheet--> <!-- theme stylesheet-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/style.default.css?v=<%=System.currentTimeMillis()%>" id="theme-stylesheet"> <link rel="stylesheet"
<!-- Custom stylesheet - for your changes--> href="${ctxStatic}/newdermon/css/style.default.css?v=<%=System.currentTimeMillis()%>"
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/custom.css?v=<%=System.currentTimeMillis()%>"> id="theme-stylesheet">
<!-- Favicon--> <!-- Custom stylesheet - for your changes-->
<link rel="shortcut icon" href="https://img.geexek.com/files/home/favicon.ico"> <link rel="stylesheet"
<script type="text/javascript" charset="utf-8" src="${ctxStatic}/layer/layer.js"></script> href="${ctxStatic}/newdermon/css/custom.css?v=<%=System.currentTimeMillis()%>">
<link rel="stylesheet" href="${ctxStatic}/layer/skin/layer.css"> <!-- Favicon-->
<link rel="stylesheet" href="${ctxStatic}/cmpt/index.css?v=<%=System.currentTimeMillis()%>"> <link rel="shortcut icon" href="https://img.geexek.com/files/home/favicon.ico">
<link rel="stylesheet" href="${ctxStatic}/cmpt/setting.css?v=<%=System.currentTimeMillis()%>"> <script type="text/javascript" charset="utf-8"
<title>易发布登录</title> src="${ctxStatic}/layer/layer.js"></script>
<style> <link rel="stylesheet" href="${ctxStatic}/layer/skin/layer.css">
<link rel="stylesheet"
href="${ctxStatic}/cmpt/index.css?v=<%=System.currentTimeMillis()%>">
<link rel="stylesheet"
href="${ctxStatic}/cmpt/setting.css?v=<%=System.currentTimeMillis()%>">
<title>易发布登录</title>
<style>
input:-moz-placeholder,
textarea:-moz-placeholder {
color: #999999;
font-size: 14px;
}
input:-moz-placeholder, input:-ms-input-placeholder,
textarea:-moz-placeholder { textarea:-ms-input-placeholder {
color: #999999; color: #999999;
font-size: 14px; font-size: 14px;
} }
input:-ms-input-placeholder, input::-webkit-input-placeholder,
textarea:-ms-input-placeholder { textarea::-webkit-input-placeholder {
color: #999999; color: #999999;
font-size: 14px; font-size: 14px;
} }
input::-webkit-input-placeholder, .login-main {
textarea::-webkit-input-placeholder { width: 500px;
color: #999999; position: relative;
font-size: 14px; margin: auto;
} }
.login-main{
width: 1000px;
position: relative;
margin: auto;
}
.qr-code{
width: 545px;
height: 544px;
padding: 120px 0px 120px;
background: #FFFFFF;
box-shadow: 4px 4px 10px 0px rgba(0, 0, 0, 0.1);
position: absolute;
left: 0px;
top: 0px;
z-index: 10;
text-align: center;
box-shadow: 4px 4px 10px 0px rgba(0, 0, 0, 0.1);
}
.login-input{
width: 350px;
height: 45px;
background: #FFFFFF;
border-radius: 4px;
border: 2px solid #E1E3E6;
padding: 0px 10px 0px 59px;
}
.phone-section{
width: 545px;
height: 514px;
background: #FFFFFF;
padding: 140px 50px 120px 120px;
position: absolute;
right: 0px;
top: 0px;
z-index: 1;
border-top: 4px solid #ce3939;
}
.qr-code::before {
content: "";
position: absolute;
height: 15px;
width: 100%;
left: 0px;
top: -15px;
z-index: 99;
background: white;
border-top: 4px solid #80D742;
}
.qr-img{
width: 260px;
height: 260px;
border: 1px solid #80D742;
}
.sms-code{
width: 90px;
height: 36px;
background: #CE3939;
border-radius: 2px;
position: absolute;
right: 27px;
top: 4.5px;
border-radius: 4px;
line-height: 36px;
text-align: center;
color: white;
cursor: pointer;
}
.login-section{
width: 50px;
height: 45px;
position: absolute;
border-right: 2px solid #e4dede;
}
.login-phone-icon{
width: 21px;
height: 32px;
border-radius: 1px;
background-image: url(/static/images/login-phone-icon.png);
background-size: contain;
background-position: center;
position: absolute;
top: 6px;
left: 15px;
}
.login-sms-icon{
width:28px;
height: 20px;
background-image: url("/static/images/login-sms-icon.png");
background-size: contain;
background-position: center;
position: absolute;
top: 13px;
left: 11px;
}
.header-first-titile{
margin-top: 0px;
}
.note-header {
display: flex;
justify-content: center;
align-items: center;
}
.data-section{
margin: 30px 0px;
}
.login-btn{
width: 120px;
height: 44px;
background: #CE3939;
border-radius: 4px;
position: absolute;
right: 74px;
text-align: center;
line-height: 44px;
font-size: 17px;
color: white;
cursor: pointer;
}
</style>
</head>
<body>
<style type="text/css">
</style> .login-input {
<header class="header imageManagementHeader"> width: 350px;
<nav class="navbar"> height: 45px;
<!-- Search Box--> background: #FFFFFF;
<div class="search-box"> border-radius: 4px;
<button class="dismiss"><i class="icon-close"></i></button> border: 2px solid #E1E3E6;
<form id="searchForm" action="#" role="search"> padding: 0px 10px 0px 59px;
<input type="search" placeholder="What are you looking for..." class="form-control"> }
</form>
</div>
<div class="container-fluid">
<div class="navbar-holder d-flex align-items-center justify-content-between">
<!-- Navbar Header-->
<div class="navbar-header" style="margin-left: 7.5%;">
<!-- Navbar Brand --><a href="index.html" class="navbar-brand d-none d-sm-inline-block">
<div class="brand-text d-none d-lg-inline-block"><span class="logosaike"></span><strong
class="logonote">赛事管理平台</strong></div>
<div class="brand-text d-none d-sm-inline-block d-lg-none"><strong>BD</strong></div>
</a>
<!-- Toggle Button--><a id="toggle-btn" href="#"
class="menu-btn active"><span></span><span></span><span></span></a>
</div>
<div class="note-header">
<div class="header-first-titile"><span></span><span>赛客现场助手—易发布</span></div>
<div class="header-second-titile"><span></span></div>
</div>
<!-- Navbar Menu -->
<ul class="nav-menu list-unstyled d-flex flex-md-row align-items-md-center">
<!-- Logout --> .phone-section {
<li class="nav-item logout-header" style="display:none"><a href="login.html" class="nav-link logout"> <span class="d-none d-sm-inline">退出登录</span></a> width: 100%;
</li> background: #FFFFFF;
</ul> padding: 60px 50px 60px 80px;
</div> border-top: 4px solid #ce3939;
</div> box-shadow: 4px 4px 10px 0px rgba(0, 0, 0, 0.1);
</nav> }
</header>
<img src="/static/images/login_header.png" alt="" width="100%">
<div class="login-main">
<div class="qr-code">
<span style="font-size: 20px;color: #000000;margin: 15px">微信扫描登录</span>
<div style="text-align: center;">
<img class="qr-img" src="/getQrCodePic?sign=${sign}" alt="">
</div>
</div>
<div class="phone-section">
<span style="font-size: 20px;color: #000000;">手机登录</span>
<div style="position: relative" class="data-section">
<div class="login-section">
<span class="login-phone-icon"></span>
</div>
<input class="login-input" id='callPhone' type="text" maxlength="11" placeholder="请输入手机号">
</div>
<div id="embed-captcha" style="width: 100%;display:none;"></div>
<div style="position: relative" class="data-section captcha hidden">
<div class="login-section">
<span class="login-sms-icon"></span>
</div>
<input id='code' class="login-input" type="text" placeholder="请输入验证码">
<span id="getCode" class="sms-code">获取验证码</span>
</div>
<span class="login-btn">登 录</span>
</div>
<input type="hidden" id="sign" value="${sign}">
</div>
<script src="${ctxStatic}/newdermon/vendor/popper.js/umd/popper.min.js"></script>
<script src="${ctxStatic}/newdermon/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="${ctxStatic}/newdermon/vendor/jquery.cookie/jquery.cookie.js"></script>
<script src="${ctxStatic}/newdermon/vendor/jquery-validation/jquery.validate.min.js"></script>
<script src="https://static.geetest.com/static/tools/gt.js"></script>
<!-- Main File--> .sms-code {
<script src="${ctxStatic}/newdermon/js/front.js"></script> width: 90px;
<script type="text/javascript">var ctx = '${ctx}', ctxStatic = '${ctxStatic}';</script> height: 36px;
</body> background: #CE3939;
<script> border-radius: 2px;
var _gt = { position: absolute;
init: function () { right: 27px;
this.getCaptcha(); top: 4.5px;
}, border-radius: 4px;
getCaptcha: function () { line-height: 36px;
$.get("/startCaptcha.do", null, function (data) { text-align: center;
initGeetest({ color: white;
gt: data.gt, cursor: pointer;
challenge: data.challenge, }
product: "float", // 产品形式,包括:float,embed,popup。注意只对PC版验证码有效
offline: !data.success // 表示用户后台检测极验服务器是否宕机,一般不需要关注
}, _gt.handlerEmbed);
});
},
handlerEmbed: function (captchaObj) {
// 将验证码加到id为captcha的元素里
captchaObj.appendTo("#embed-captcha");
captchaObj.onReady(function () {
//按住左边滑块,拖动完成上方拼图
$("#embed-captcha .gt_guide_tip").text("拖动滑块获取短信验证码");
});
captchaObj.onSuccess(function () {
var validate = captchaObj.getValidate();
var callPhone = $.trim($('#callPhone').val());
var index= layer.load(1);
$.ajax({
url:"/sendRegisterMsgCode.do", // 进行二次验证
type: "post",
dataType: "json",
data: {
// 二次验证所需的三个值
geetest_challenge: validate.geetest_challenge,
geetest_validate: validate.geetest_validate,
geetest_seccode: validate.geetest_seccode,
callPhone: callPhone
},
success: function (data) {
if(data.code == 200){
layer.close(index);
layer.msg("短信验证码已发送,请耐心等待");
}else{
layer.close(index);
layer.msg(data.msg);
}
}
});
});
}
};
$(function () {
_gt.init();
var index = 0;
var mobile = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
var a = 30;
$("#getCode").on('click',function(e){
if(a == 30){
var callPhone = $('#callPhone').val();
if ("" != callPhone.trim()) {
if (mobile.test(callPhone)) {
$("#embed-captcha").show();
$('#getCode').css('background','gray');
index = setInterval(function(){ .login-section {
$('#getCode').text(a-- + 's后重新获取'); width: 50px;
if(a == 0){ height: 45px;
$('#getCode').css('background','#CE3939'); position: absolute;
clearInterval(index); border-right: 2px solid #e4dede;
a = 30; }
$('#getCode').text('获取验证码');
}
},1000);
}
}
}
});
$('.login-btn').click(function () { .login-phone-icon {
$.ajax({ width: 21px;
url:"/login", // 进行二次验证 height: 32px;
type: "post", border-radius: 1px;
dataType: "json", background-image: url(/static/images/login-phone-icon.png);
data: { background-size: contain;
'phone':$('#callPhone').val(), background-position: center;
'code':$('#code').val() position: absolute;
}, top: 6px;
success: function (data) { left: 15px;
if(data.code == 200){ }
window.location.href='/easy/me';
}else{
layer.msg(data.msg);
}
}
});
})
});
idx = setInterval(token,2000);
function token(){ .login-sms-icon {
$.ajax({ width: 28px;
url : "/getSign?sign="+$('#sign').val(), height: 20px;
success:function (data) { background-image: url("/static/images/login-sms-icon.png");
if(data.code == 200){ background-size: contain;
window.location.href='/easy/me'; background-position: center;
}else if(data.code == -2){ position: absolute;
var uuid = createUUID(); top: 13px;
$('.qr-img').attr('src',"/getQrCodePic?sign="+uuid); left: 11px;
} }
}
});
}
var createUUID = (function (uuidRegEx, uuidReplacer) {
return function () {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uuidRegEx, uuidReplacer).toUpperCase();
};
})(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0,
v = c == "x" ? r : (r & 3 | 8);
return v.toString(16);
});
</script> .header-first-titile {
</html> margin-top: 0px;
\ No newline at end of file }
.note-header {
display: flex;
justify-content: center;
align-items: center;
}
.data-section {
margin: 30px 0px;
}
.login-btn {
width: 120px;
height: 44px;
background: #CE3939;
border-radius: 4px;
display: inline-block;
margin-top: 20px;
text-align: center;
line-height: 44px;
font-size: 17px;
color: white;
cursor: pointer;
}
</style>
</head>
<body>
<style type="text/css">
</style>
<header class="header imageManagementHeader">
<nav class="navbar">
<!-- Search Box-->
<div class="search-box">
<button class="dismiss"><i class="icon-close"></i></button>
<form id="searchForm" action="#" role="search">
<input type="search" placeholder="What are you looking for..."
class="form-control">
</form>
</div>
<div class="container-fluid">
<div
class="navbar-holder d-flex align-items-center justify-content-between">
<!-- Navbar Header-->
<div class="navbar-header" style="margin-left: 7.5%;">
<!-- Navbar Brand --><a href="index.html"
class="navbar-brand d-none d-sm-inline-block">
<div class="brand-text d-none d-lg-inline-block"><span
class="logosaike"></span><strong
class="logonote">赛事管理平台</strong></div>
<div class="brand-text d-none d-sm-inline-block d-lg-none">
<strong>赛客现场助手</strong></div>
</a>
<!-- Toggle Button--><a id="toggle-btn" href="#"
class="menu-btn active"><span></span><span></span><span></span></a>
</div>
<div class="note-header">
<div class="header-first-titile">
<span></span><span>赛客现场助手—易发布</span></div>
<div class="header-second-titile"><span></span></div>
</div>
<!-- Navbar Menu -->
<ul
class="nav-menu list-unstyled d-flex flex-md-row align-items-md-center">
<!-- Logout -->
<li class="nav-item logout-header" style="display:none"><a
href="login.html" class="nav-link logout"> <span
class="d-none d-sm-inline">退出登录</span></a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<img src="/static/images/login_header.png" alt="" width="100%">
<div class="login-main">
<div class="phone-section">
<span style="font-size: 20px;color: #000000;">手机登录</span>
<div style="position: relative" class="data-section">
<div class="login-section">
<span class="login-phone-icon"></span>
</div>
<input class="login-input" id='callPhone' type="text" maxlength="11"
placeholder="请输入手机号">
</div>
<div id="embed-captcha" style="width: 100%;display:none;"></div>
<div style="position: relative" class="data-section captcha hidden">
<div class="login-section">
<span class="login-sms-icon"></span>
</div>
<input id='code' class="login-input" type="text" placeholder="请输入验证码">
<span id="getCode" class="sms-code">获取验证码</span>
</div>
<span class="login-btn">登 录</span>
</div>
</div>
<script src="${ctxStatic}/newdermon/vendor/popper.js/umd/popper.min.js"></script>
<script src="${ctxStatic}/newdermon/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="${ctxStatic}/newdermon/vendor/jquery.cookie/jquery.cookie.js"></script>
<script
src="${ctxStatic}/newdermon/vendor/jquery-validation/jquery.validate.min.js"></script>
<script src="https://static.geetest.com/static/tools/gt.js"></script>
<!-- Main File-->
<script src="${ctxStatic}/newdermon/js/front.js"></script>
<script type="text/javascript">var ctx = '${ctx}', ctxStatic = '${ctxStatic}';</script>
</body>
<script>
var _gt = {
init: function () {
this.getCaptcha();
},
getCaptcha: function () {
$.get("/startCaptcha.do", null, function (data) {
initGeetest({
gt: data.gt,
challenge: data.challenge,
product: "float", // 产品形式,包括:float,embed,popup。注意只对PC版验证码有效
offline: !data.success // 表示用户后台检测极验服务器是否宕机,一般不需要关注
}, _gt.handlerEmbed);
});
},
handlerEmbed: function (captchaObj) {
// 将验证码加到id为captcha的元素里
captchaObj.appendTo("#embed-captcha");
captchaObj.onReady(function () {
//按住左边滑块,拖动完成上方拼图
$("#embed-captcha .gt_guide_tip").text("拖动滑块获取短信验证码");
});
captchaObj.onSuccess(function () {
var validate = captchaObj.getValidate();
var callPhone = $.trim($('#callPhone').val());
var index = layer.load(1);
$.ajax({
url: "/sendRegisterMsgCode.do", // 进行二次验证
type: "post",
dataType: "json",
data: {
// 二次验证所需的三个值
geetest_challenge: validate.geetest_challenge,
geetest_validate: validate.geetest_validate,
geetest_seccode: validate.geetest_seccode,
callPhone: callPhone
},
success: function (data) {
if (data.code == 200) {
layer.close(index);
layer.msg("短信验证码已发送,请耐心等待");
} else {
layer.close(index);
layer.msg(data.msg);
}
}
});
});
}
};
$(function () {
_gt.init();
var index = 0;
var mobile = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
var a = 30;
$("#getCode").on('click', function (e) {
if (a == 30) {
var callPhone = $('#callPhone').val();
if ("" != callPhone.trim()) {
if (mobile.test(callPhone)) {
$("#embed-captcha").show();
$('#getCode').css('background', 'gray');
index = setInterval(function () {
$('#getCode').text(a-- + 's后重新获取');
if (a == 0) {
$('#getCode').css('background', '#CE3939');
clearInterval(index);
a = 30;
$('#getCode').text('获取验证码');
}
}, 1000);
}
}
}
});
$('.login-btn').click(function () {
$.ajax({
url: "/login", // 进行二次验证
type: "post",
dataType: "json",
data: {
'phone': $('#callPhone').val(),
'code': $('#code').val()
},
success: function (data) {
if (data.code == 200) {
window.location.href = '/gk/cmpt/me';
} else {
layer.msg(data.msg);
}
}
});
})
});
</script>
</html>
\ No newline at end of file
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