Commit bce817ef authored by 李良停's avatar 李良停

llt

parents
.class
.classpath
.project
.settings
/.idea/
*.jar
*.war
*.ear
*.iml
.idea_modules/
out/
build/
logs/
classes/
target/
.DS_Store
MANIFEST.MF
overlays/
sh-authcenter-agent/src/test/
sh-authcenter-log/src/test/
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>sh-ds</artifactId>
<groupId>com.chineseall.eden</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>eden-authcenter-agent</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.22</version>
</dependency>
<dependency>
<groupId>com.chineseall.eden</groupId>
<artifactId>eden-authcenter-log</artifactId>
<version>${project.version}</version>
</dependency>
<!--因配置外部TOMCAT 而配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package com.chineseall.eden.authcenter.agent;
import cn.sh.chineseall.framework.starter.annotation.AlphaFrameworkApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
@AlphaFrameworkApplication
@ComponentScan(basePackages = {"com.chineseall.eden.authcenter.agent","com.chineseall.eden.authcenter.log"})
public class EdenAuthcenterAgentApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(EdenAuthcenterAgentApplication.class);
}
public static void main(String[] args) {
cn.sh.chineseall.framework.springboot.bootstrap.application.AlphaFrameworkSpringApplication.run(EdenAuthcenterAgentApplication.class, args);
}
}
package com.chineseall.eden.authcenter.agent.client;
import com.chineseall.eden.authcenter.agent.oauth.OauthType;
import com.chineseall.eden.service.user.entities.AuthUserInfo;
import lombok.Data;
@Data
public class ClientDataInfo {
private AuthUserInfo authUserInfo;
private String returnUrl;
private OauthType oauthType;
}
package com.chineseall.eden.authcenter.agent.client;
import lombok.Data;
import java.io.Serializable;
/**
* Created by yuchunlin on 2019/5/28.
*/
@Data
public class ClientItem implements Serializable{
private String clientName;
private String clientId;
private String clientSecret;
private String loginSuccessUrl;
private String logoutSuccessUrl;
}
package com.chineseall.eden.authcenter.agent.client;
import lombok.Getter;
/**
* @author liuyp
*/
public enum ClientUserType {
Student("1001","学生"),
Teacher("2001","老师"),
Mentor("2002","老师");
@Getter
private final String code;
@Getter
private final String description;
ClientUserType(String code, String description) {
this.code = code;
this.description = description;
}
public static ClientUserType getValue(String name) {
try {
return ClientUserType.valueOf(name);
} catch (Exception ex) {
return null;
}
}
}
package com.chineseall.eden.authcenter.agent.client;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* Created by yuchunlin on 2019/5/28.
*/
@Data
@Component
@ConfigurationProperties(prefix = "oauthclient")
public class OauthClient {
private List<ClientItem> clients;
}
package com.chineseall.eden.authcenter.agent.controller;
import cn.sh.chineseall.framework.api.MapMessage;
import com.chineseall.eden.authcenter.agent.vo.StatItem;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("logstatistics")
public class LogStatisticsController {
/**
* APP使用情况统计
* @param year
* @param month
* @return
*/
@RequestMapping("app")
@ResponseBody
public MapMessage applications(@RequestParam(value = "clientId",required = false) String clientId, @RequestParam(value = "year",required = false) Integer year, @RequestParam(value = "month",required = false) Integer month){
List<StatItem> result = new ArrayList<>();
StatItem item1 = new StatItem();
item1.setName("应用A");
item1.setCount(1000);
StatItem item2 = new StatItem();
item2.setName("应用B");
item2.setCount(1000);
result.add(item1);
result.add(item2);
return MapMessage.successMessage().add("data",result);
}
/**
* 来源环境情况统计
* @param year
* @param month
* @return
*/
@RequestMapping("environment")
@ResponseBody
public MapMessage environments(@RequestParam(value = "clientId",required = false) String clientId, @RequestParam(value = "year",required = false) Integer year, @RequestParam(value = "month",required = false) Integer month){
Map<String,List<StatItem>> result = new HashMap<>();
List<StatItem> browserResult = new ArrayList<>();
StatItem item1 = new StatItem();
item1.setName("浏览器1");
item1.setCount(1000);
StatItem item2 = new StatItem();
item2.setName("浏览器2");
item2.setCount(1000);
browserResult.add(item1);
browserResult.add(item2);
result.put("browser",browserResult);
List<StatItem> osResult = new ArrayList<>();
StatItem os1 = new StatItem();
os1.setName("操作系统1");
os1.setCount(1000);
StatItem os2 = new StatItem();
os2.setName("操作系统2");
os2.setCount(1000);
osResult.add(os1);
osResult.add(os2);
result.put("os",osResult);
return MapMessage.successMessage().add("data",result);
}
/**
* 认证数据统计
* @param year
* @param month
* @return
*/
@RequestMapping("auth")
@ResponseBody
public MapMessage auths(@RequestParam(value = "clientId",required = false) String clientId, @RequestParam(value = "year",required = false) Integer year, @RequestParam(value = "month",required = false) Integer month){
Map<String,Object> result = new HashMap<>();
result.put("all_auth",1500000);
result.put("cas_edu_auth",100000);
List<StatItem> browserResult = new ArrayList<>();
StatItem item1 = new StatItem();
item1.setName("黄浦区");
item1.setCount(1000);
StatItem item2 = new StatItem();
item2.setName("青浦区");
item2.setCount(1000);
browserResult.add(item1);
browserResult.add(item2);
result.put("area_auth",browserResult);
return MapMessage.successMessage().add("data",result);
}
/**
* 认证高峰时间数据统计
* @param year
* @param month
* @return
*/
@RequestMapping("auth_pick_times")
@ResponseBody
public MapMessage authPickTimes(@RequestParam(value = "clientId",required = false) String clientId, @RequestParam(value = "year",required = false) Integer year, @RequestParam(value = "month",required = false) Integer month){
List<StatItem> result = new ArrayList<>();
StatItem item1 = new StatItem();
item1.setName("2020-01");
item1.setCount(1000);
StatItem item2 = new StatItem();
item2.setName("2020-02");
item2.setCount(1000);
result.add(item1);
result.add(item2);
return MapMessage.successMessage().add("data",result);
}
/**
* 认证身份统计
* @param year
* @param month
* @return
*/
@RequestMapping("auth_user_type")
@ResponseBody
public MapMessage authUserTypes(@RequestParam(value = "clientId",required = false) String clientId, @RequestParam(value = "year",required = false) Integer year, @RequestParam(value = "month",required = false) Integer month){
List<StatItem> result = new ArrayList<>();
StatItem item1 = new StatItem();
item1.setName("老师");
item1.setCount(1000);
StatItem item2 = new StatItem();
item2.setName("学生");
item2.setCount(1000);
result.add(item1);
result.add(item2);
return MapMessage.successMessage().add("data",result);
}
/**
* 认证热点单位统计
* @param year
* @param month
* @return
*/
@RequestMapping("auth_hot_org")
@ResponseBody
public MapMessage authHotOrgs(@RequestParam(value = "clientId",required = false) String clientId, @RequestParam(value = "year",required = false) Integer year, @RequestParam(value = "month",required = false) Integer month){
List<StatItem> result = new ArrayList<>();
StatItem item1 = new StatItem();
item1.setName("A学校");
item1.setCount(1000);
StatItem item2 = new StatItem();
item2.setName("B学校");
item2.setCount(1000);
result.add(item1);
result.add(item2);
return MapMessage.successMessage().add("data",result);
}
/**
* 认证接入的APP
* @return
*/
@RequestMapping("auth_apps")
@ResponseBody
public MapMessage authApps(){
List<StatItem> result = new ArrayList<>();
StatItem item1 = new StatItem();
item1.setName("数字教材");
item1.setCode("asfsafdsf");
StatItem item2 = new StatItem();
item2.setName("阅览室");
item2.setCode("safsadfasd");
result.add(item1);
result.add(item2);
return MapMessage.successMessage().add("data",result);
}
}
\ No newline at end of file
package com.chineseall.eden.authcenter.agent.controller;
import cn.sh.chineseall.framework.core.util.StringUtils;
import com.alibaba.fastjson.JSON;
import com.chineseall.eden.authcenter.agent.client.ClientDataInfo;
import com.chineseall.eden.common.util.EncodeUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
@Controller
@RequestMapping("sample")
public class SampleController {
// 认证系统提供client_id
private static final String CLIENT_ID = "xhzyClientId";
// 认证系统提供client_secret
private static final String CLIENT_SECRET = "xhzyClientSecret";
// 登录地址
private static final String LOGIN_URL = "https://ds.etextbook.cn/authcenter/auth/index";
// 登出地址
private static final String LOGOUT_URL = "https://ds.etextbook.cn/authcenter/auth/logout";
// 登录回调地址
private static final String LOGIN_SUCCESS_URL = "https://ds.etextbook.cn/authcenter/sample/loginsuccess";
// 登出回调地址
private static final String LOGOUT_SUCCESS_URL = "https://ds.etextbook.cn/authcenter/sample/logoutsuccess";
@RequestMapping("login")
public ModelAndView login(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
try {
String sign = EncodeUtil.md5(CLIENT_ID + "$$" + CLIENT_SECRET);
String loginUrl = LOGIN_URL + "?client_id=" + CLIENT_ID + "&sign=" + sign + "&redirect_uri=" + URLEncoder.encode(LOGIN_SUCCESS_URL);
response.sendRedirect(loginUrl);
return null;
} catch (IOException e) {
e.printStackTrace();
}
return modelAndView;
}
@RequestMapping("logout")
public ModelAndView logout(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
try {
String oauthType = request.getParameter("oauth_type");
if(StringUtils.isEmpty(oauthType)){
modelAndView.setViewName("error");
modelAndView.addObject("message", "oauth_type参数为空");
return modelAndView;
}
String sign = EncodeUtil.md5(CLIENT_ID + "$$" + CLIENT_SECRET);
String loginUrl = LOGOUT_URL + "?client_id=" + CLIENT_ID + "&sign=" + sign + "&service="
+ URLEncoder.encode(LOGOUT_SUCCESS_URL) + "&oauth_type=" + oauthType;
response.sendRedirect(loginUrl);
return null;
} catch (IOException e) {
e.printStackTrace();
}
return modelAndView;
}
@RequestMapping("loginsuccess")
@ResponseBody
public String loginsuccess(ClientDataInfo clientDataInfo) {
return JSON.toJSONString(clientDataInfo);
}
@RequestMapping("logoutsuccess")
@ResponseBody
public String logoutsuccess(ClientDataInfo clientDataInfo) {
return "登出成功!";
}
}
package com.chineseall.eden.authcenter.agent.enums;
import lombok.Getter;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
public enum DianjiaoguanGradeType {
FIRST_GRADE("11", "一年级",1),
SECOND_GRADE("12", "二年级",2),
THIRD_GRADE("13", "三年级",3),
FOURTH_GRADE("14", "四年级",4),
FIFTH_GRADE("15", "五年级",5),
SIXTH_GRADE("16", "六年级",6),
SEVENTH_GRADE("17", "七年级",7),
EIGHTH_GRADE("18", "八年级",8),
NINTH_GRADE("19", "九年级",9),
TENTH_GRADE("31", "高一",10),
ELEVENTH_GRADE("32", "高二",11),
TWELFTH_GRADE("33", "高三",12);
@Getter
private final String code;
@Getter
private final String description;
@Getter
private final int level;
private final static Map<String, DianjiaoguanGradeType> gradeLevelMap;
private final static Map<String, DianjiaoguanGradeType> descriptionMap;
static {
gradeLevelMap = new LinkedHashMap<>();
descriptionMap = new HashMap<>();
for (DianjiaoguanGradeType type : DianjiaoguanGradeType.values()) {
gradeLevelMap.put(type.getCode(), type);
descriptionMap.put(type.getDescription(), type);
}
}
DianjiaoguanGradeType(String code, String description, int level) {
this.code = code;
this.description = description;
this.level = level;
}
public static DianjiaoguanGradeType getByName(String name) {
try {
return DianjiaoguanGradeType.valueOf(name);
} catch (Exception ex) {
return null;
}
}
public static DianjiaoguanGradeType getByCode(String code) {
try {
return gradeLevelMap.get(code);
} catch (Exception ex) {
return null;
}
}
}
package com.chineseall.eden.authcenter.agent.enums;
import lombok.Getter;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
public enum DianjiaoguanStudentStageType {
P5("1", "小学"),
J4("2", "初中"),
S3("3", "高中");
@Getter
private final String code;
@Getter
private final String description;
private final static Map<String, DianjiaoguanStudentStageType> stageMap;
private final static Map<String, DianjiaoguanStudentStageType> descriptionMap;
static {
stageMap = new LinkedHashMap<>();
descriptionMap = new HashMap<>();
for (DianjiaoguanStudentStageType type : DianjiaoguanStudentStageType.values()) {
stageMap.put(type.getCode(), type);
descriptionMap.put(type.getDescription(), type);
}
}
DianjiaoguanStudentStageType(String code, String description) {
this.code = code;
this.description = description;
}
public static DianjiaoguanStudentStageType getByName(String name) {
try {
return DianjiaoguanStudentStageType.valueOf(name);
} catch (Exception ex) {
return null;
}
}
public static DianjiaoguanStudentStageType getByCode(String code) {
try {
return stageMap.get(code);
} catch (Exception ex) {
return null;
}
}
public static DianjiaoguanStudentStageType getByDescription(String description) {
try {
return descriptionMap.get(description);
} catch (Exception ex) {
return null;
}
}
}
package com.chineseall.eden.authcenter.agent.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum DianjiaoguanSubjectType {
subject_1(640001 , "学前教育" , "QT"),
subject_2(641001 , "语文" , "YW"),
subject_3(641002 , "数学" , "SX"),
subject_4(641003 , "外语" , "YY"),
subject_5(641004 , "自然" , "ZR"),
subject_6(641005 , "音乐" , "YU"),
subject_7(641006 , "体育" , "TY"),
subject_8(641007 , "美术" , "MS"),
subject_9(641008 , "道德与法治" , "DF"),
subject_10(641009 , "社会" , "SH"),
subject_11(641010 , "生活与劳动" , "LD"),
subject_12(641011 , "信息科技" , "XX"),
subject_13(641012 , "教育辅助" , "QT"),
subject_14(641013 , "团队辅导" , "QT"),
subject_15(641014 , "心理学" , "QT"),
subject_16(641016 , "其他" , "QT"),
subject_17(642001 , "道德与法治" , "DF"),
subject_18(642002 , "语文" , "YW"),
subject_19(642003 , "数学" , "SX"),
subject_20(642004 , "外语" , "YY"),
subject_21(642005 , "物理" , "WL"),
subject_22(642006 , "化学" , "HX"),
subject_23(642007 , "生物" , "SW"),
subject_24(642008 , "历史" , "LS"),
subject_25(642009 , "地理" , "DL"),
subject_26(642010 , "音乐" , "YU"),
subject_27(642011 , "体育" , "TY"),
subject_28(642012 , "美术" , "MS"),
subject_29(642013 , "计算机" , "XX"),
subject_30(642014 , "艺术" , "YS"),
subject_31(642015 , "科学" , "KX"),
subject_32(642016 , "信息科技" , "XX"),
subject_33(642017 , "心理学" , "QT"),
subject_34(642018 , "教育辅助" , "QT"),
subject_35(642019 , "团队辅导" , "QT"),
subject_36(642020 , "劳技劳动" , "LD"),
subject_37(642021 , "其他" , "QT"),
subject_38(643001 , "思想政治" , "ZZ"),
subject_39(643002 , "语文" , "YW"),
subject_40(643003 , "数学" , "SX"),
subject_41(643004 , "外语" , "YY"),
subject_42(643005 , "物理" , "WL"),
subject_43(643006 , "化学" , "HX"),
subject_44(643007 , "生物" , "SW"),
subject_45(643008 , "历史" , "LS"),
subject_46(643009 , "地理" , "DL"),
subject_47(643010 , "音乐" , "YU"),
subject_48(643011 , "体育" , "TY"),
subject_49(643012 , "美术" , "MS"),
subject_50(643013 , "计算机" , "XX"),
subject_51(643014 , "艺术" , "YS"),
subject_52(643015 , "科学" , "KX"),
subject_53(643016 , "信息科技" , "XX"),
subject_54(643017 , "心理学" , "QT"),
subject_55(643018 , "其他" , "QT"),
subject_56(643019 , "劳技劳动" , "LD"),
subject_57(643020 , "综合理科" , "QT"),
subject_58(643021 , "教育辅助" , "QT"),
subject_59(643022 , "团队辅导" , "QT"),
subject_60(644001 , "校外教育" , "QT"),
subject_61(644003 , "特殊教育" , "QT"),
subject_62(644004 , "安全教育" , "QT"),
subject_63(644005 , "教育管理" , "QT"),
subject_64(644006 , "教师专业发展" , "QT"),
subject_65(644007 , "校本研修" , "QT"),
subject_66(644008 , "其他" , "QT"),
subject_67(641015 , "科学" , "KX"),
subject_68(113102 , "农林牧渔类" , "QT"),
subject_69(113103 , "资源环境类" , "QT"),
subject_70(113104 , "能源与新能源类" , "QT"),
subject_71(113105 , "土木水利类" , "QT"),
subject_72(113106 , "加工制造类" , "QT"),
subject_73(113107 , "石油化工类" , "QT"),
subject_74(113108 , "轻纺食品类" , "QT"),
subject_75(113109 , "交通运输类" , "QT"),
subject_76(113110 , "信息技术类" , "XX"),
subject_77(113111 , "医药卫生类" , "QT"),
subject_78(113112 , "休闲保健类" , "QT"),
subject_79(113113 , "财经商贸类" , "QT"),
subject_80(113114 , "旅游服务类" , "QT"),
subject_81(113115 , "文化艺术类" , "QT"),
subject_82(113116 , "体育与健身" , "TJ"),
subject_83(113117 , "教育类" , "QT"),
subject_84(113118 , "司法服务类" , "QT"),
subject_85(113119 , "公共管理与服务类" , "QT"),
subject_86(113120 , "其他" , "QT"),
subject_87(113121 , "中高职(中本)贯通类", "QT");
private int code;
private String name;
private String operationCode;
public static DianjiaoguanSubjectType getByCode(Integer code){
if(null==code)
return null;
else{
for (DianjiaoguanSubjectType type : DianjiaoguanSubjectType.values()){
if(code.intValue()==type.getCode())
return type;
}
return null;
}
}
}
package com.chineseall.eden.authcenter.agent.enums;
import lombok.Getter;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
public enum DianjiaoguanTeacherStageType {
P5("103", "小学"),
J4("101", "初中"),
S3("102", "高中");
@Getter
private final String code;
@Getter
private final String description;
private final static Map<String, DianjiaoguanTeacherStageType> stageMap;
private final static Map<String, DianjiaoguanTeacherStageType> descriptionMap;
static {
stageMap = new LinkedHashMap<>();
descriptionMap = new HashMap<>();
for (DianjiaoguanTeacherStageType type : DianjiaoguanTeacherStageType.values()) {
stageMap.put(type.getCode(), type);
descriptionMap.put(type.getDescription(), type);
}
}
DianjiaoguanTeacherStageType(String code, String description) {
this.code = code;
this.description = description;
}
public static DianjiaoguanTeacherStageType getByName(String name) {
try {
return DianjiaoguanTeacherStageType.valueOf(name);
} catch (Exception ex) {
return null;
}
}
public static DianjiaoguanTeacherStageType getByCode(String code) {
try {
return stageMap.get(code);
} catch (Exception ex) {
return null;
}
}
public static DianjiaoguanTeacherStageType getByDescription(String description) {
try {
return descriptionMap.get(description);
} catch (Exception ex) {
return null;
}
}
}
package com.chineseall.eden.authcenter.agent.oauth;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.io.Serializable;
import java.util.Map;
@Data
@Component
@ConfigurationProperties(prefix = "oauth")
public class OauthConfig implements Serializable {
Map<String,OauthConfigItem> items;
}
package com.chineseall.eden.authcenter.agent.oauth;
import lombok.Data;
import java.io.Serializable;
/**
* Created by yuchunlin on 2019/1/3.
*/
@Data
public class OauthConfigItem implements Serializable {
//http://castest.edu.sh.cn/CAS/oauth2.0
private String oauthUrl;
private String clientId;
private String clientSecret;
private String loginSuccessUrl;
private String logoutSuccessUrl;
}
package com.chineseall.eden.authcenter.agent.oauth;
import lombok.Getter;
public enum OauthType {
dianjiaoguan("dianjiaoguan","电教馆账号认证"),
idp("idp","idp认证"),
jsyd("jsyd","金山教育"),
qpjy("qpjy","青浦教育"),
hpjy("hpjy","黄浦教育"),
fxjy("fxjy","奉贤教育"),
pdjy("pdjy","浦东教育"),
ypjy("ypjy","杨浦教育"),
edenoperation("edenoperation","数字教材账号认证");
@Getter
private final String code;
@Getter
private final String description;
OauthType(String code, String description) {
this.code = code;
this.description = description;
}
public static OauthType getValue(String name) {
try {
return OauthType.valueOf(name);
} catch (Exception ex) {
return null;
}
}
}
package com.chineseall.eden.authcenter.agent.utils;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class CookiesUtil {
public static String getSessionId(HttpServletRequest request) {
String sessionId = request.getParameter("JSESSIONID");
if (sessionId == null) {
return getCookie(request, "JSESSIONID");
}
return sessionId;
}
public static String getCookie(HttpServletRequest request, String cookieName) {
Cookie[] cookies = request.getCookies();
String str = null;
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
Cookie c = cookies[i];
if (c.getName().equalsIgnoreCase(cookieName)) {
str = c.getValue();
}
}
}
return str;
}
public static void setCookie(HttpServletResponse response, String domain,
String cookieName, String cookieValue, Integer days) {
Cookie cookies = null;
cookies = new Cookie(cookieName, cookieValue);
if (days != null) {
cookies.setMaxAge(60 * 60 * 24 * days);
}
cookies.setPath("/");
if (domain != null) {
cookies.setDomain(domain);
}
response.addCookie(cookies);
}
public static void delCookie(HttpServletResponse response, String domain,
String path, String cookieName, String cookieValue) {
Cookie cookies = new Cookie(cookieName, cookieValue);
if (domain != null) {
cookies.setDomain(domain);
}
cookies.setPath(path);
cookies.setMaxAge(0);
response.addCookie(cookies);
}
public static void delAllCookie(HttpServletRequest request,
HttpServletResponse response) {
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
Cookie c = cookies[i];
c.setValue("");
c.setMaxAge(0);
response.addCookie(c);
}
}
}
}
package com.chineseall.eden.authcenter.agent.vo;
import lombok.Data;
@Data
public class StatItem {
private String code;
private String name;
private Integer count;
}
server:
port: 9600
context-path: /authcenter
spring:
application:
name: eden-authcenter-agent
mvc:
static-path-pattern: /static/**
thymeleaf:
cache: false
prefix: classpath:/templates/
suffix: .html
mode: LEGACYHTML5
encoding: UTF-8
enabled: true
content-type: text/html
jackson:
property-naming-strategy: CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES
default-property-inclusion: non_null
serialization: true
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
http:
multipart:
max-file-size: 200MB
max-request-size: 300MB
oauth:
items:
dianjiaoguan: #电教馆
#oauthUrl: https://castest.edu.sh.cn/CAS
oauthUrl: https://cas2.edu.sh.cn/CAS
clientId: clientid
clientSecret: clientSecret
loginSuccessUrl: https://ds.etextbook.cn/authcenter/auth/loginsuccess
logoutSuccessUrl: https://ds.etextbook.cn/authcenter/auth/logoutsuccess
edenoperation: #运营中心
#oauthUrl: https://operator-api-test.etextbook.cn/cas
oauthUrl: https://operator-api.sh-genius.cn/cas/
clientId: testClentId
clientSecret: testClientSecret
loginSuccessUrl: https://ds.etextbook.cn/authcenter/auth/loginsuccess
logoutSuccessUrl: https://ds.etextbook.cn/authcenter/auth/logoutsuccess
qpjy: #idp
#oauthUrl: https://operator-api-test.etextbook.cn/cas
oauthUrl: https://sp.etextbook.cn/authcenter/auth/login
clientId: dsClentId
clientSecret: VjyqUkkM5Znu
loginSuccessUrl: https://ds.etextbook.cn/authcenter/authcenter/auth/idp/loginsuccess
logoutSuccessUrl: https://ds.etextbook.cn/authcenter/auth/logoutsuccess
oauthclient:
clients:
- clientName: 上海运营中心
clientId: testClentId
clientSecret: testClientSecret
- clientName: 接入样例
clientId: testClentId2
clientSecret: testClientSecret2
- clientName: 第三方接入
clientId: xhzyClientId
clientSecret: xhzyClientSecret
- clientName: 阅览室
clientId: readingroomClientId
clientSecret: readingroomClientSecret
{
"mongo": [
{
"connectionName": "mongo",
"host": "dds-uf6124f9044c34741.mongodb.rds.aliyuncs.com",
"port": 3717,
"replicaSet": "dds-uf6124f9044c34742.mongodb.rds.aliyuncs.com:3717",
"maxConnectionsPerHost": 3000,
"threadsAllowedToBlockForConnectionMultiplier": 10,
"authentication": true,
"connectTimeout": 10000,
"password": "ChineseAll&0219",
"userName": "dsuser",
"dbName": "dslog"
}
]
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
.ds {
max-width: 1900px;
margin: 0 auto;
}
.ds-header-img {
margin-left: 120px;
}
.ds-content {
width: 100%;
height: 603px;
background: url("../img/bg.png") no-repeat center center;
overflow: hidden;
}
.ds-content-mask {
margin: 30px 30px;
height: 543px;
background: rgba(255, 255, 255, 0.1);
}
.ds-content-title {
padding: 50px 0 20px 0;
text-align: center;
color: white;
font-weight: 500;
font-size: 28px;
letter-spacing: 6px;
}
.ds-footer {
width: 100%;
height: 139px;
background: white url("../img/Login-b.jpg") no-repeat center center;
}
.ds-footer > p {
color: #aab9c5;
font-size: 12px;
line-height: 75px;
text-align: center;
}
.ds-content-city {
width: 80%;
margin: 0 auto;
display: flex;
}
.ds-content-city > p {
width: 100px;
color: white;
font-size: 20px;
line-height: 42px;
flex-shrink: 0;
margin: 0;
margin-top: 10px;
}
.ds-content-district {
width: 80%;
margin: 0 auto;
display: flex;
}
.ds-content-district > p {
width: 100px;
color: white;
font-size: 20px;
line-height: 52px;
flex-shrink: 0;
margin: 0;
margin-top: 10px;
height: 52px;
}
.logo-btn {
border: 0;
border-radius: 5px;
background-repeat: no-repeat !important;
background-position: center center !important;
position: relative;
outline: 0;
}
.logo-btn:focus {
outline: 0;
}
.djg-btn {
width: 320px;
height: 42px;
margin: 10px 10px;
}
.idp-btn {
width: 143px;
height: 52px;
background-size: 100% 100% !important;
margin: 10px 10px;
}
.logo-btn:after{
position: absolute;
content: "\00a0";
}
.logo-btn-mask:after {
position: absolute;
border-radius: 5px;
top: 0;
left: 0;
content: "\00a0";
background-color: black;
opacity: 0.2;
width: 100%;
height: 100%;
}
.ds-content-text {
color: white;
text-align: center;
font-size: 18px;
letter-spacing: 2px;
margin-top: 40px;
margin-bottom: 8px;
}
.ds-divide-line {
width: 80%;
margin: 20px auto;
height: 2px;
background: -webkit-linear-gradient(left, rgba(251, 251, 251, 0.09), rgba(251, 251, 251, 0.59), rgba(251, 251, 251, 0.09)); /* Safari 5.1 - 6.0 */
background: -o-linear-gradient(right, rgba(251, 251, 251, 0.09), rgba(251, 251, 251, 0.59), rgba(251, 251, 251, 0.09)); /* Opera 11.1 - 12.0 */
background: -moz-linear-gradient(right, rgba(251, 251, 251, 0.09), rgba(251, 251, 251, 0.59), rgba(251, 251, 251, 0.09)); /* Firefox 3.6 - 15 */
background: linear-gradient(to right, rgba(251, 251, 251, 0.09), rgba(251, 251, 251, 0.59), rgba(251, 251, 251, 0.09));
}
.szjc-login {
width: 80%;
margin: 0px auto;
text-align: center;
}
.szjc-login > p {
color: white;
font-size: 18px;
margin: 0;
margin-bottom: 6px;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big,
cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl,
dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, thead, tr, th, td, header {
margin: 0;
padding: 0;
border: 0;
}
ul li{ list-style:none;}
a{ text-decoration:none; outline:none;}
h1, h2, h3, h4 {
font-weight:normal;
}
html{
font-size:14px;
font-family:"Microsoft Yahei","微软雅黑"; color:#323232;
}
ul li{ list-style:none; margin: 0; padding: 0; border: 0;}
a{ text-decoration:none; -webkit-tap-highlight-color: transparent; }
.fl{ float:left; display:inline;}
.fr{ float:right; display:inline;}
.none{ display:none;}
.clearfix{overflow:hidden;_zoom:1;}
.clear{ clear:both;}
::-webkit-input-placeholder { /* WebKit browsers */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
.top{ width:100%; height:115px; border-top:solid 5px #87abe0;}
.main{ width:80%; max-width: 1070px; height:auto; margin-left:auto; margin-right:auto;}
.bottom{ width:100%; height:239px; background:#fff url(../img/Login-b.jpg) no-repeat top center; }
.pbottom{ position:absolute; bottom:0px;}
.bottom > p{ color:#aab9c5; font-size:12px; line-height:75px; text-align:center; }
.login-c{ width:100%; height:603px; background:url(../img/login-bg.jpg) no-repeat center center;}
.login-list{ width: 100%; }
ul.login-list-ul{ width:442px; height:285px; padding-left:30px; padding-top:25px; background:url(../img/login-list-bg.png) no-repeat top left;}
ul.login-list-ul > li > a{ padding-left:26px; width:416px; display:block; height:35px; line-height:35px; background:url(../img/li-icon.png) no-repeat left center; color:#313131; font-size:14px; }
ul.login-list-ul > li > a:hover{ text-decoration:underline;}
.login-form{ background-color:#fbfbfb; border-radius:3px; box-shadow:0px 0px 3px rgba(0,0,0,.15); width:270px; margin-top:90px;}
.login-form-h2{ border-bottom:solid 1px #f2f2f2; text-align:center; color:#565656; font-size:16px; line-height:55px; }
.login-form-tip{ background:url(../img/tip-tline.jpg) repeat-x top left; padding-top:16px; padding-bottom:20px; width:260px; margin-left:auto; margin-right:auto; }
.login-form-tip > p{ color:#9b9b9b; font-size:12px; -webkit-transform:scale(0.95,0.95) ; *font-size:11px; line-height:1.8em;}
.login-form-tip > p > a{ color:#5c5c5b; text-decoration:underline;}
.login-jump{height:110px; padding-top:50px; padding-bottom:50px;}
dl.jump-select-dl{ width:213px; height:38px; border:solid 1px #c1c1c1; margin-left:auto; margin-right:auto;}
dl.jump-select-dl dt{ width:37px; height:28px; padding-top:5px; padding-bottom:5px; float:left; display:inline; background:url(../img/user.png) no-repeat center center;}
dl.jump-select-dl > dt >span{ display:block; width:36px; height:28px; border-right:solid 1px #c1c1c1;}
dl.jump-select-dl dd{ width:176px; height:38px; float:right; display:inline;}
select.jump-select {
width: 176px;
padding-left:15px;
padding-right:30px;
font-family:"Microsoft Yahei","微软雅黑";
font-size:14px;
color: #c1c1c1;
height:38px;
-moz-appearance:none;
appearance: none;
-webkit-appearance: none;
outline:none;
border:none;
background:url(../img/select-arrow.png) no-repeat center right;
/*Chrome和Firefox里面的边框是不一样的,所以复写了一下*/
order: solid 1px #000;
}
.login-jump-btn{ width:215px; height:37px; margin-top:30px; margin-left:auto; margin-right:auto; }
select::-ms-expand { display: none; }
a.jump-btn{ width:135px; height:37px; display:block; background:url(../img/login-jump-btn1.jpg) no-repeat left center;}
a.help-btn{ width:65px; height:37px; display:block; background:url(../img/help-btn.jpg) no-repeat left center;}
.login-eduroam{ padding-top:65px; height:465px;}
.login-eduroam-form{ width:462px; height:465px; margin-left:auto; margin-right:auto; background-color:#fdfcfc; border-radius:3px; box-shadow:0px 0px 3px rgba(0,0,0,.15); }
.login-eduroam-form > h2{ color:#565656; font-size:18px; padding-top:12px; line-height:2em; text-align:center;}
.login-eduroam-form > h3{ width:100%; background:url(../img/line2.jpg) repeat-x left center; height:20px; text-align:center; }
.login-eduroam-form > h3 > span{color:#85b4ed; font-family:Arial; font-size:12px; -webkit-transform:scale(0.95,0.95) ; *font-size:11px; line-height:1.8em; text-transform:uppercase; background-color:#fcfcfc; display:inline-block; padding-left:10px; padding-right:10px;}
.login-eduroam-tip{background: url(../img/tip-tline.jpg) repeat-x top left; padding-top:15px; padding-bottom:15px; text-align:center;}
ul.eduroam-ul{ margin-left:60px; width:315px;}
ul.eduroam-ul > li > a{ width:300px; padding-left:15px; display:block; text-align:left; background:url(../img/eduroam-li.png) no-repeat left center; color:#959595; font-size:12px; line-height:20px;}
ul.eduroam-ul > li > a > span{ color:#729dd1; font-family:Arial; font-size:12px; -webkit-transform:scale(0.95,0.95) ; *font-size:11px; text-transform:uppercase; display:inline-block; padding-left:5px;}
.login-eduroam-line{ width:346px; height:auto; margin-left:auto; margin-right:auto; margin-top:10px;}
a.login-btn{ width:346px; height:44px; margin-bottom:25px; margin-top:35px; display:block; background:url(../img/login-btn.png) no-repeat top center; }
dl.login-eduroam-txt{ border:solid 1px #c1c1c1; height:38px; width:344px; margin-top:25px;}
dl.login-eduroam-txt dt{ width:37px; height:38px; float:left; display:inline;}
dl.login-eduroam-txt dd{ width:305px; height:28px; padding-top:5px; padding-bottom:5px; float:right; display:inline;}
dl.login-eduroam-txt-user dt{ background:url(../img/user.png) no-repeat center center;}
dl.login-eduroam-txt-password dt{ background:url(../img/password.png) no-repeat center center;}
.login-eduroam-input{ border-left:solid 1px #c1c1c1; width:284px; height:28px; padding:0px 10px; margin:0px; border-bottom:0px; border-right:0px; border-top:0px; outline:none; font-size:14px; line-height:28px; color:#565656;}
.content{padding-top: 200px;font: 20px bold;text-align: center;}
\ No newline at end of file
body {
overflow: auto;
}
.static{
width: 800px;
margin: 0 auto;
background-color: white;
}
.static-title{
font-size: 20px;
text-align: center;
padding-top: 50px;
padding-bottom: 30px;
margin-top: 0;
}
.p-class{
margin-left: 120px;
display: flex;
}
.p-label{
flex-basis: 200px;
text-align: right;
margin-right: 10px;
}
.p-num{
margin-right: 10px;
}
var Browser = function(userAgent){
var u = userAgent||navigator.userAgent;
var _this = this;
var match = {
//内核
Trident: u.indexOf('Trident')>0||u.indexOf('NET CLR')>0,
Presto: u.indexOf('Presto')>0,
WebKit: u.indexOf('AppleWebKit')>0,
Gecko: u.indexOf('Gecko/')>0,
//浏览器
UC: u.indexOf('UC')>0||u.indexOf(' UBrowser')>0,
QQBrowser: u.indexOf('QQBrowser')>0,
QQ: u.indexOf('QQ/')>0,
Baidu: u.indexOf('Baidu')>0||u.indexOf('BIDUBrowser')>0,
Maxthon: u.indexOf('Maxthon')>0,
LBBROWSER: u.indexOf('LBBROWSER')>0,
Sogou: u.indexOf('MetaSr')>0||u.indexOf('Sogou')>0,
IE: u.indexOf('MSIE')>0||u.indexOf('Trident')>0,
Firefox: u.indexOf('Firefox')>0,
Opera: u.indexOf('Opera')>0||u.indexOf('OPR')>0,
Safari: u.indexOf('Safari')>0,
Chrome:u.indexOf('Chrome')>0||u.indexOf('CriOS')>0,
Wechat:u.indexOf('MicroMessenger')>0,
Taobao:u.indexOf('AliApp(TB')>0,
Alipay:u.indexOf('AliApp(AP')>0,
Weibo:u.indexOf('Weibo')>0,
Suning:u.indexOf('SNEBUY-APP')>0,
iQiYi:u.indexOf('IqiyiApp')>0,
//系统或平台
Windows:u.indexOf('Windows')>0,
Linux:u.indexOf('Linux')>0,
Mac:u.indexOf('Macintosh')>0,
Android:u.indexOf('Android')>0||u.indexOf('Adr')>0,
WP:u.indexOf('IEMobile')>0,
BlackBerry:u.indexOf('BlackBerry')>0||u.indexOf('RIM')>0||u.indexOf('BB')>0,
MeeGo:u.indexOf('MeeGo')>0,
Symbian:u.indexOf('Symbian')>0,
iOS:u.indexOf('like Mac OS X')>0,
iPhone: u.indexOf('iPh')>0,
iPad:u.indexOf('iPad')>0,
//设备
Mobile:u.indexOf('Mobi')>0||u.indexOf('iPh')>0||u.indexOf('480')>0,
Tablet:u.indexOf('Tablet')>0||u.indexOf('iPad')>0||u.indexOf('Nexus 7')>0
};
//修正
if(match.Mobile){
match.Mobile = !match.iPad;
}
//基本信息
var hash = {
engine:['WebKit','Trident','Gecko','Presto'],
browser:['Safari','Chrome','IE','Firefox','Opera','UC','QQBrowser','Baidu'],
os:['Windows','Linux','Mac','Android','iOS','iPhone','iPad'],
device:['Mobile','Tablet']
};
_this.device = 'PC';
_this.language = (function(){
var g = (navigator.browserLanguage || navigator.language).toLowerCase();
return g=="c"?"zh-cn":g;
})();
for(var s in hash){
for(var i=0;i< hash[s].length;i++){
var value = hash[s][i];
if(match[value]){
_this[s] = value;
}
}
if (!_this[s]) {
_this[s] = 'others'
}
}
//版本信息
var version = {
'Chrome':function(){
return u.replace(/^.*Chrome\/([\d.]+).*$/,'$1');
},
'IE':function(){
var v = u.replace(/^.*MSIE ([\d.]+).*$/,'$1');
if(v==u){
v = u.replace(/^.*rv:([\d.]+).*$/,'$1');
}
return v!=u?v:'';
},
'Firefox':function(){
return u.replace(/^.*Firefox\/([\d.]+).*$/,'$1');
},
'Safari':function(){
return u.replace(/^.*Version\/([\d.]+).*$/,'$1');
},
'Maxthon':function(){
return u.replace(/^.*Maxthon\/([\d.]+).*$/,'$1');
},
'QQBrowser':function(){
return u.replace(/^.*QQBrowser\/([\d.]+).*$/,'$1');
},
'QQ':function(){
return u.replace(/^.*QQ\/([\d.]+).*$/,'$1');
},
'Baidu':function(){
return u.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,'$1');
},
'UC':function(){
return u.replace(/^.*UC?Browser\/([\d.]+).*$/,'$1');
},
'Wechat':function(){
return u.replace(/^.*MicroMessenger\/([\d.]+).*$/,'$1');
},
'Taobao':function(){
return u.replace(/^.*AliApp\(TB\/([\d.]+).*$/,'$1');
},
'Alipay':function(){
return u.replace(/^.*AliApp\(AP\/([\d.]+).*$/,'$1');
},
'Weibo':function(){
return u.replace(/^.*weibo__([\d.]+).*$/,'$1');
},
'Suning':function(){
return u.replace(/^.*SNEBUY-APP([\d.]+).*$/,'$1');
},
'iQiYi':function(){
return u.replace(/^.*IqiyiVersion\/([\d.]+).*$/,'$1');
}
};
_this.version = '';
if(version[_this.browser]){
_this.version = version[_this.browser]();
}
};
var Browser = function(userAgent){
var u = userAgent||navigator.userAgent;
var _this = this;
var match = {
//内核
Trident: u.indexOf('Trident')>0||u.indexOf('NET CLR')>0,
Presto: u.indexOf('Presto')>0,
WebKit: u.indexOf('AppleWebKit')>0,
Gecko: u.indexOf('Gecko/')>0,
//浏览器
UC: u.indexOf('UC')>0||u.indexOf(' UBrowser')>0,
QQBrowser: u.indexOf('QQBrowser')>0,
QQ: u.indexOf('QQ/')>0,
Baidu: u.indexOf('Baidu')>0||u.indexOf('BIDUBrowser')>0,
Maxthon: u.indexOf('Maxthon')>0,
LBBROWSER: u.indexOf('LBBROWSER')>0,
Sogou: u.indexOf('MetaSr')>0||u.indexOf('Sogou')>0,
IE: u.indexOf('MSIE')>0||u.indexOf('Trident')>0,
Firefox: u.indexOf('Firefox')>0,
Opera: u.indexOf('Opera')>0||u.indexOf('OPR')>0,
Safari: u.indexOf('Safari')>0,
Chrome:u.indexOf('Chrome')>0||u.indexOf('CriOS')>0,
Wechat:u.indexOf('MicroMessenger')>0,
Taobao:u.indexOf('AliApp(TB')>0,
Alipay:u.indexOf('AliApp(AP')>0,
Weibo:u.indexOf('Weibo')>0,
Suning:u.indexOf('SNEBUY-APP')>0,
iQiYi:u.indexOf('IqiyiApp')>0,
//系统或平台
Windows:u.indexOf('Windows')>0,
Linux:u.indexOf('Linux')>0,
Mac:u.indexOf('Macintosh')>0,
Android:u.indexOf('Android')>0||u.indexOf('Adr')>0,
WP:u.indexOf('IEMobile')>0,
BlackBerry:u.indexOf('BlackBerry')>0||u.indexOf('RIM')>0||u.indexOf('BB')>0,
MeeGo:u.indexOf('MeeGo')>0,
Symbian:u.indexOf('Symbian')>0,
iOS:u.indexOf('like Mac OS X')>0,
iPhone: u.indexOf('iPh')>0,
iPad:u.indexOf('iPad')>0,
//设备
Mobile:u.indexOf('Mobi')>0||u.indexOf('iPh')>0||u.indexOf('480')>0,
Tablet:u.indexOf('Tablet')>0||u.indexOf('iPad')>0||u.indexOf('Nexus 7')>0
};
//修正
if(match.Mobile){
match.Mobile = !match.iPad;
}
//基本信息
var hash = {
engine:['WebKit','Trident','Gecko','Presto'],
browser:['Safari','Chrome','IE','Firefox','Opera','UC','QQBrowser','Baidu'],
os:['Windows','Linux','Mac','Android','iOS','iPhone','iPad'],
device:['Mobile','Tablet']
};
_this.device = 'PC';
_this.language = (function(){
var g = (navigator.browserLanguage || navigator.language).toLowerCase();
return g=="c"?"zh-cn":g;
})();
for(var s in hash){
for(var i=0;i< hash[s].length;i++){
var value = hash[s][i];
if(match[value]){
_this[s] = value;
}
}
if (!_this[s]) {
_this[s] = 'others'
}
}
//版本信息
var version = {
'Chrome':function(){
return u.replace(/^.*Chrome\/([\d.]+).*$/,'$1');
},
'IE':function(){
var v = u.replace(/^.*MSIE ([\d.]+).*$/,'$1');
if(v==u){
v = u.replace(/^.*rv:([\d.]+).*$/,'$1');
}
return v!=u?v:'';
},
'Firefox':function(){
return u.replace(/^.*Firefox\/([\d.]+).*$/,'$1');
},
'Safari':function(){
return u.replace(/^.*Version\/([\d.]+).*$/,'$1');
},
'Maxthon':function(){
return u.replace(/^.*Maxthon\/([\d.]+).*$/,'$1');
},
'QQBrowser':function(){
return u.replace(/^.*QQBrowser\/([\d.]+).*$/,'$1');
},
'QQ':function(){
return u.replace(/^.*QQ\/([\d.]+).*$/,'$1');
},
'Baidu':function(){
return u.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,'$1');
},
'UC':function(){
return u.replace(/^.*UC?Browser\/([\d.]+).*$/,'$1');
},
'Wechat':function(){
return u.replace(/^.*MicroMessenger\/([\d.]+).*$/,'$1');
},
'Taobao':function(){
return u.replace(/^.*AliApp\(TB\/([\d.]+).*$/,'$1');
},
'Alipay':function(){
return u.replace(/^.*AliApp\(AP\/([\d.]+).*$/,'$1');
},
'Weibo':function(){
return u.replace(/^.*weibo__([\d.]+).*$/,'$1');
},
'Suning':function(){
return u.replace(/^.*SNEBUY-APP([\d.]+).*$/,'$1');
},
'iQiYi':function(){
return u.replace(/^.*IqiyiVersion\/([\d.]+).*$/,'$1');
}
};
_this.version = '';
if(version[_this.browser]){
_this.version = version[_this.browser]();
}
};
This diff is collapsed.
<!DOCTYPE html>
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>
<html class="no-js lt-ie9"> <![endif]-->
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta content="" name="description" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>上海市中小学数字教材登录统计</title>
<link rel="stylesheet" th:href="@{/static/css/main_0216.css}"/>
<link rel="stylesheet" th:href="@{/static/css/bootstrap.min.css}"/>
<link rel="stylesheet" th:href="@{/static/css/normalize.css}"/>
<script type="text/javascript" th:src="@{/static/js/jquery-1.10.2.min.js}"></script>
<!--<script src="../js/vendor/modernizr-2.6.2.min.js"></script>-->
</head>
<body style="background-color: #4e97f7 !important;">
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a
href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- Add your site or application content here -->
<div class="bg">
<div class="bg-form">
<div class="loginContainer">
<div class="login-box text-center">
<form class="form" method="post">
<h2 class="text-center" style="margin-top: 30px;">数字教材统一认证登录统计</h2>
<div class="bg-form" style="width: 80%;margin: 50px auto">
<div class="form-group text-left" style="float: left">
<div class="input-group">
<span class="input-group-addon" id="basic-addon1"><span aria-hidden="true" class="glyphicon glyphicon-user"></span></span>
<input aria-describedby="basic-addon1" autocomplete="off" class="form-control" id="username" placeholder="请输入管理员账号" size="25" tabindex="1" type="text" name="userName" value="" />
</div>
</div>
<div class="form-group text-left" style="float: left">
<div class="input-group">
<span class="input-group-addon " id="basic-addon2"> <span aria-hidden="true" class="glyphicon glyphicon-lock"></span></span>
<input aria-describedby="basic-addon1" autocomplete="off" class="form-control" id="password" placeholder="请输入管理员密码" size="25" tabindex="2" type="password" name="pwd" />
</div>
</div>
<button accesskey="l" class="btn btn-primary btn-block" id="login-button" style="outline: 0" tabindex="6" type="button" onclick="toLogin()">登录
</button>
</div>
</form>
</div>
<!-- <div class="login-box">
<button onclick="toLogin(1)" accesskey="l" class="login-btn" id="login-button" name="button" style="outline: 0" type="button">登录
</button>
</div> -->
</div>
</div>
</div>
<script th:inline="javascript">
/*<![CDATA[*/
var ctxPath = /*[[@{/}]]*/ '';
/*]]>*/
</script>
<script type="text/javascript">
function toLogin () {
var action = ctxPath + "log/doLogin";
$("form").attr("action", action);
$("form").submit();
}
</script>
</body></html>
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta content="" name="description" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title></title>
<!--<script src="../js/vendor/modernizr-2.6.2.min.js"></script>-->
</head>
<body>
<span th:text="${message}"></span>
</body></html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
package com.chineseall.eden.authcenter.log.service;
import com.chineseall.eden.authcenter.log.model.AuthLog;
import java.util.Map;
public interface AuthLogService {
AuthLog getById(String id);
void save(AuthLog authLog);
Long countLoginByParams(Map<String, Object> params);
Long countLogoutByParams(Map<String, Object> params);
}
This diff is collapsed.
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