Commit 9dbeb922 authored by 喻春霖's avatar 喻春霖

应用推进改造

parents 0e4b0b03 764747d7
......@@ -3,10 +3,8 @@ package com.chineseall.eden.authcenter.agent.controller;
import cn.sh.chineseall.framework.core.util.ArrayUtils;
import cn.sh.chineseall.framework.core.util.StringUtils;
import cn.sh.chineseall.framework.lang.calendar.DateUtils;
import com.chineseall.eden.authcenter.agent.client.AuthUserInfo;
import com.chineseall.eden.authcenter.agent.client.ClientDataInfo;
import com.chineseall.eden.authcenter.agent.client.ClientItem;
import com.chineseall.eden.authcenter.agent.client.OauthClient;
import com.alibaba.fastjson.JSON;
import com.chineseall.eden.authcenter.agent.client.*;
import com.chineseall.eden.authcenter.agent.oauth.OauthConfig;
import com.chineseall.eden.authcenter.agent.oauth.OauthConfigItem;
import com.chineseall.eden.authcenter.agent.oauth.OauthType;
......@@ -38,7 +36,7 @@ import java.util.function.Function;
import java.util.stream.Collectors;
@Controller
@RequestMapping("auth")
@RequestMapping("/")
public class AuthController {
Logger logger = Logger.getLogger(AuthController.class);
......@@ -53,108 +51,55 @@ public class AuthController {
private AuthLogService authLogService;
// @RequestMapping("index")
// public ModelAndView index(HttpServletRequest request, HttpServletResponse response) {
// ModelAndView modelAndView = new ModelAndView();
// modelAndView.setViewName("index2");
// Map<String, ClientItem> clientItemMap = oauthClient.getClients().stream().collect(Collectors.toMap(ClientItem::getClientId, Function.identity()));
// try {
// String clientId = request.getParameter("client_id");
// String returnUrl = request.getParameter("redirect_uri");
// ClientItem clientItem = clientItemMap.get(clientId);
// AuthLog authLog = new AuthLog();
// authLog.setLogType(LogType.login);
// if (null == clientItem) {
// modelAndView.setViewName("error");
// modelAndView.addObject("message", "client_id为空或者不正确");
// return modelAndView;
// }
// authLog.setClientId(clientId);
// authLog.setAuthSource(clientItem.getClientName());
// String sign = request.getParameter("sign");
// String signOrigin = clientItem.getClientId() + "$$" + clientItem.getClientSecret();
//
// String md5Hex = EncodeUtil.md5(signOrigin);
// if (!Objects.equals(sign, md5Hex)) {
// modelAndView.setViewName("error");
// modelAndView.addObject("message", "请求不合法");
// return modelAndView;
// }
// if (StringUtils.isEmpty(returnUrl)) {
// modelAndView.setViewName("error");
// modelAndView.addObject("message", "登录成功回调地址为空");
// return modelAndView;
// }
// String loginType = request.getParameter("login_type");
// if(StringUtils.isNotEmpty(loginType) && OauthType.getValue(loginType)!=null) {
// OauthConfigItem oauthConfigItem = oauthConfig.getItems().get(OauthType.getValue(loginType).getCode());
// authLog.setFowardUrl(oauthConfigItem.getOauthUrl());
// authLog.setOauthType(OauthType.getValue(loginType).getCode());
// // 阅览室日志分离
// ClientItem item = clientItemMap.get("readingroomClientId");
// authLog.setAuthSource(item.getClientName());
// authLogService.save(authLog);
// response.sendRedirect(generateLoginUrl(returnUrl, OauthType.getValue(loginType).getCode(), authLog.getId()));
// return null;
// } else {
// authLogService.save(authLog);
// String url1 = generateLoginUrl(returnUrl, OauthType.dianjiaoguan.getCode(), authLog.getId());
// modelAndView.addObject("loginUrl1", url1);
// String url2 = generateLoginUrl(returnUrl, OauthType.edenoperation.getCode(), authLog.getId());
// modelAndView.addObject("loginUrl2", url2);
// modelAndView.addObject("logId", authLog.getId());
// }
// } catch (Exception e) {
// e.printStackTrace();
// modelAndView.setViewName("error");
// modelAndView.addObject("message", "未知错误");
// }
// return modelAndView;
// }
@RequestMapping("index")
@RequestMapping(value = {"","auth","auth/index"})
public ModelAndView index(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("ds");
Map<String, ClientItem> clientItemMap = oauthClient.getClients().stream().collect(Collectors.toMap(ClientItem::getClientId, Function.identity()));
try {
String clientId = request.getParameter("client_id");
String returnUrl = request.getParameter("redirect_uri");
ClientItem clientItem = clientItemMap.get(clientId);
AuthLog authLog = new AuthLog();
authLog.setLogType(LogType.login);
if (null == clientItem) {
modelAndView.setViewName("error");
modelAndView.addObject("message", "client_id为空或者不正确");
return modelAndView;
}
authLog.setClientId(clientId);
authLog.setAuthSource(clientItem.getClientName());
String sign = request.getParameter("sign");
String signOrigin = clientItem.getClientId() + "$$" + clientItem.getClientSecret();
if (StringUtils.isNotEmpty(clientId)){
String md5Hex = EncodeUtil.md5(signOrigin);
if (!Objects.equals(sign, md5Hex)) {
modelAndView.setViewName("error");
modelAndView.addObject("message", "请求不合法");
return modelAndView;
}
if (StringUtils.isEmpty(returnUrl)) {
modelAndView.setViewName("error");
modelAndView.addObject("message", "登录成功回调地址为空");
return modelAndView;
}
String loginType = request.getParameter("login_type");
OauthType oauthType = OauthType.getValue(loginType);
if(StringUtils.isNotEmpty(loginType) && oauthType !=null) {
if (StringUtils.isNotEmpty(returnUrl) && returnUrl.contains("readinglab")){
// 阅览室日志分离
ClientItem item = clientItemMap.get("readingroomClientId");
authLog.setAuthSource(item.getClientName());
ClientItem clientItem = clientItemMap.get(clientId);
if (null == clientItem) {
modelAndView.setViewName("error");
modelAndView.addObject("message", "client_id为空或者不正确");
return modelAndView;
}
authLog.setClientId(clientId);
authLog.setAuthSource(clientItem.getClientName());
String sign = request.getParameter("sign");
String signOrigin = clientItem.getClientId() + "$$" + clientItem.getClientSecret();
String md5Hex = EncodeUtil.md5(signOrigin);
if (!Objects.equals(sign, md5Hex)) {
modelAndView.setViewName("error");
modelAndView.addObject("message", "请求不合法");
return modelAndView;
}
if (StringUtils.isEmpty(returnUrl)) {
modelAndView.setViewName("error");
modelAndView.addObject("message", "登录成功回调地址为空");
return modelAndView;
}
String loginType = request.getParameter("login_type");
OauthType oauthType = OauthType.getValue(loginType);
if(StringUtils.isNotEmpty(loginType) && oauthType !=null) {
if (StringUtils.isNotEmpty(returnUrl) && returnUrl.contains("readinglab")){
// 阅览室日志分离
ClientItem item = clientItemMap.get("readingroomClientId");
authLog.setAuthSource(item.getClientName());
}
modelAndView.addObject("loginType",loginType);
}else {
modelAndView.addObject("loginType","");
}
modelAndView.addObject("loginType",loginType);
}else {
modelAndView.addObject("loginType","");
}
authLogService.save(authLog);
......@@ -175,7 +120,7 @@ public class AuthController {
return modelAndView;
}
@RequestMapping("tologin")
@RequestMapping("auth/tologin")
public ModelAndView toLogin(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
String loginUrl = request.getParameter("loginUrl");
......@@ -212,7 +157,7 @@ public class AuthController {
return modelAndView;
}
@RequestMapping("logout")
@RequestMapping("auth/logout")
public ModelAndView logout(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("logout");
......@@ -261,10 +206,14 @@ public class AuthController {
authLogService.save(authLog);
if(StringUtils.isNotEmpty(service)) {
if (!OauthType.dianjiaoguan.equals(type) && !OauthType.edenoperation.equals(type)){
response.sendRedirect(service);
if (OauthType.qpjy.equals(type)){
response.sendRedirect(generateSpLogoutUrl(service,type.name()));
}
}else{
response.sendRedirect(generateLogoutUrl(service, type.name()));
}
response.sendRedirect(generateLogoutUrl(service, type.name()));
//response.sendRedirect(service);
}
return null;
} catch (Exception e) {
......@@ -275,7 +224,7 @@ public class AuthController {
return modelAndView;
}
@RequestMapping(value = "loginsuccess", method = RequestMethod.GET)
@RequestMapping(value = "auth/loginsuccess", method = RequestMethod.GET)
public ModelAndView loginsuccess(HttpServletRequest request, HttpServletResponse response, ModelAndView modelAndView) {
modelAndView.setViewName("loginsuccess");
String code = request.getParameter("code");
......@@ -283,6 +232,10 @@ public class AuthController {
String logId = request.getParameter("log_id");
String returnUrl = request.getParameter("return_url");
System.out.println("code=" +code);
System.out.println("oauthType=" +oauthType);
System.out.println("returnUrl=" +returnUrl);
AuthLog authLog = authLogService.getById(logId);
if(authLog == null){
authLog = new AuthLog();
......@@ -347,6 +300,7 @@ public class AuthController {
}
clientDataInfo.setAuthUserInfo(userInfo);
clientDataInfo.setOauthType(OauthType.valueOf(oauthType));
modelAndView.addObject("clientDataInfo", clientDataInfo);
modelAndView.addObject("successPostUrl", returnUrl);
}
......@@ -360,7 +314,7 @@ public class AuthController {
return modelAndView;
}
@RequestMapping(value = "idp/loginsuccess")
@RequestMapping(value = "auth/idp/loginsuccess")
public ModelAndView idploginsuccess(HttpServletRequest request, HttpServletResponse response, ModelAndView modelAndView) {
modelAndView.setViewName("loginsuccess");
String code = request.getParameter("code");
......@@ -382,6 +336,11 @@ public class AuthController {
String userType = request.getParameter("user_type");
userInfo.setRealName(request.getParameter("real_name"));
userInfo.setId(request.getParameter("login_name"));
if ("student".equals(userType)){
userInfo.setUserType(UserType.STUDENT);
}else if ("tearcher".equals(userType)){
userInfo.setUserType(UserType.TEACHER);
}
// 封装下游数据
ClientDataInfo clientDataInfo = new ClientDataInfo();
if(userInfo != null) {
......@@ -413,6 +372,7 @@ public class AuthController {
}
clientDataInfo.setAuthUserInfo(userInfo);
clientDataInfo.setOauthType(OauthType.valueOf(oauthType));
modelAndView.addObject("clientDataInfo", clientDataInfo);
modelAndView.addObject("successPostUrl", returnUrl);
......@@ -427,7 +387,7 @@ public class AuthController {
}
@RequestMapping(value = "logoutsuccess", method = RequestMethod.GET)
@RequestMapping(value = "auth/logoutsuccess", method = RequestMethod.GET)
public ModelAndView loginoutsuccess(HttpServletRequest request, HttpServletResponse response, ModelAndView modelAndView) throws IOException {
String returnUrl = request.getParameter("return_url");
if(StringUtils.isNotEmpty(returnUrl)){
......@@ -470,7 +430,7 @@ public class AuthController {
if (!oauthConfigItem.getOauthUrl().endsWith("/")) {
loginUrlBuilder.append("/");
}
loginUrlBuilder.append("?client_id=").append(oauthConfigItem.getClientId());
loginUrlBuilder.append("login?client_id=").append(oauthConfigItem.getClientId());
String loginSuccessUrl = oauthConfigItem.getLoginSuccessUrl();
loginSuccessUrl = loginSuccessUrl + "?log_id=" + logId+"&oauth_type=" + oauthType ;
if (StringUtils.isNotEmpty(returnUrl)) {
......@@ -503,6 +463,39 @@ public class AuthController {
return loginUrlBuilder.toString();
}
private String generateSpLogoutUrl(String returnUrl, String oauthType) {
if (oauthType.equals("qpjy")){
returnUrl = "https://idp.qpedu.cn/logout/logout.html?redirect_url=" + returnUrl;
returnUrl = "https://sp.etextbook.cn/Shibboleth.sso/Logout?return=" + URLEncoder.encode(returnUrl);
return returnUrl;
}
StringBuilder loginUrlBuilder = new StringBuilder();
OauthConfigItem oauthConfigItem = oauthConfig.getItems().get(oauthType);
loginUrlBuilder.append(oauthConfigItem.getOauthUrl());
if (!oauthConfigItem.getOauthUrl().endsWith("/")) {
loginUrlBuilder.append("/");
}
String service = oauthConfigItem.getLogoutSuccessUrl();
if (StringUtils.isNotEmpty(returnUrl)) {
Map<String, String> param = new HashMap<>();
param.put("return_url", URLEncoder.encode(returnUrl));
service = appendUrl(service, param);
}
String clientId = oauthConfigItem.getClientId();
String signOrigin = oauthConfigItem.getClientId() + "$$" + oauthConfigItem.getClientSecret();
String md5Hex = EncodeUtil.md5(signOrigin);
loginUrlBuilder.append("logout?service=").append(URLEncoder.encode(service));
loginUrlBuilder.append("&client_id="+clientId);
loginUrlBuilder.append("&sign="+md5Hex);
return loginUrlBuilder.toString();
}
private String generateUserInfoUrl(String accessToken, String oauthType) {
//String url = "http://castest.edu.sh.cn/CAS/oauth2.0/accessToken?client_id=testClentId&client_secret=testClientSecret&redirect_uri=http%3a%2f%2f192.168.17.129%3a7774%2fauth%2floginsuccess2.do&code=" + code;
StringBuilder builder = new StringBuilder();
......@@ -554,7 +547,7 @@ public class AuthController {
return newUrl;
}
@RequestMapping("shauth")
@RequestMapping("auth/shauth")
public ModelAndView chineseallLogin(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("toward");
......@@ -600,7 +593,7 @@ public class AuthController {
return modelAndView;
}
@RequestMapping("shlogout")
@RequestMapping("auth/shlogout")
public ModelAndView shLogout(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("logout");
......
......@@ -111,19 +111,29 @@ public class LogStatisticsController {
if (null != month){
param.put("yearMonth", month);
}
long all_auth = authLogService.count(param);
List<StatItem> browserResult = new ArrayList<>();
List<String> browserList = authLogService.distinct("browser", param);
long unknownBrowser = all_auth;
if (CollectionUtils.isNotEmpty(browserList)){
browserList.forEach(item -> {
for (String item : browserList) {
param.put("browser",item);
long count = authLogService.count(param);
StatItem statItem = new StatItem();
statItem.setName(item);
statItem.setCount(count);
unknownBrowser = unknownBrowser - count;
browserResult.add(statItem);
});
}
}
if (unknownBrowser > 0){
StatItem statItem = new StatItem();
statItem.setName("unknown");
statItem.setCount(unknownBrowser);
browserResult.add(statItem);
}
result.put("browser", browserResult);
......@@ -132,15 +142,25 @@ public class LogStatisticsController {
param.remove("browser");
List<String> osList = authLogService.distinct("os", param);
long unknownOs = all_auth;
if (CollectionUtils.isNotEmpty(osList)){
osList.forEach(item -> {
for (String item : osList) {
param.put("os",item);
long count = authLogService.count(param);
StatItem statItem = new StatItem();
statItem.setName(item);
statItem.setCount(count);
osResult.add(statItem);
});
unknownOs = unknownOs - count;
}
}
if (unknownOs > 0){
StatItem statItem = new StatItem();
statItem.setName("unknown");
statItem.setCount(unknownOs);
osResult.add(statItem);
}
result.put("os", osResult);
return MapMessage.successMessage().add("data", result);
......
......@@ -15,8 +15,8 @@ import java.io.IOException;
import java.net.URLEncoder;
@Controller
@RequestMapping("sample")
//@Controller
//@RequestMapping("sample")
public class SampleController {
// 认证系统提供client_id
......
......@@ -44,7 +44,7 @@ oauth:
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
oauthUrl: https://sp.etextbook.cn/authcenter/auth
clientId: dsClentId
clientSecret: VjyqUkkM5Znu
loginSuccessUrl: https://ds.etextbook.cn/authcenter/auth/idp/loginsuccess
......
......@@ -44,7 +44,7 @@ oauth:
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
oauthUrl: https://sp.etextbook.cn/authcenter/auth
clientId: dsClentId
clientSecret: VjyqUkkM5Znu
loginSuccessUrl: https://ds.etextbook.cn/authcenter/auth/idp/loginsuccess
......
html, body {
/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */
/*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*/
/* ==========================================================================
Base styles: opinionated defaults
========================================================================== */
html,
button,
input,
select,
textarea {
color: #222;
}
html {
width: 100%;
height: 100%;
overflow: hidden;
font-size: 1em;
line-height: 1.4;
}
.ds {
max-width: 1900px;
margin: 0 auto;
height: 100vh;
overflow: hidden;
}
.ds-header-img {
margin: 20px 0;
margin-left: 5%;
width: 252.5px;
height: 40px;
/*
* Remove text-shadow in selection highlight: h5bp.com/i
* These selection rule sets have to be separate.
* Customize the background color to match your design.
*/
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
.ds-content {
width: 100%;
height: calc(100% - 185px);
background: url("../img/bg.png") no-repeat center center;
background-size: 100% 100%;
overflow: hidden;
::selection {
background: #b3d4fc;
text-shadow: none;
}
.ds-content-mask {
margin: 3% 3%;
height: 100%;
/* height: 543px; */
/* background: rgba(255, 255, 255, 0.1); */
/*
* A better looking default horizontal rule
*/
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
.ds-content-title {
padding: 2% 0 1% 0;
margin: 1% 0;
text-align: center;
color: white;
font-weight: 500;
font-size: 28px;
letter-spacing: 6px;
/*
* Remove the gap between images, videos, audio and canvas and the bottom of
* their containers: h5bp.com/i/440
*/
audio,
canvas,
img,
video {
vertical-align: middle;
}
.ds-footer {
width: 100%;
height: 105px;
overflow: hidden;
background: white url("../img/Login-b.jpg") no-repeat center center;
/*
* Remove default fieldset styles.
*/
fieldset {
border: 0;
margin: 0;
padding: 0;
}
.ds-footer > p {
color: #aab9c5;
font-size: 12px;
/* line-height: 75px; */
text-align: center;
margin-top: 3%;
/*
* Allow only vertical resizing of textareas.
*/
textarea {
resize: vertical;
}
.ds-content-source {
/* display: flex; */
max-width: 1000px;
margin: 0 auto;
height: calc(100% - 100px);
/* ==========================================================================
Browse Happy prompt
========================================================================== */
.browsehappy {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
.ds-content-city {
/* flex-basis: 400px; */
float: left;
width: 35%;
padding-right: 10px;
height: 100%;
/* flex-grow: 1;
display: flex;
justify-content: flex-end; */
/* ==========================================================================
Author's custom styles
========================================================================== */
/* ==========================================================================
Helper classes
========================================================================== */
/*
* Image replacement
*/
.ir {
background-color: transparent;
border: 0;
overflow: hidden;
/* IE 6/7 fallback */
*text-indent: -9999px;
}
.ds-content-city-float {
width: 300px;
margin-left: auto;
.ir:before {
content: "";
display: block;
width: 0;
height: 150%;
}
.ds-content-city-float > p {
width: 90px;
color: white;
font-size: 20px;
line-height: 42px;
flex-shrink: 0;
margin: 0;
margin-top: 10px;
margin-left: 10px;
}
.ds-content-district {
float: left;
width: 58%;
/* flex-basis: 600px;
flex-grow: 2; */
height: 100%;
margin-left: 10px;
/*
* Hide from both screenreaders and browsers: h5bp.com/u
*/
.hidden {
display: none !important;
visibility: hidden;
}
.ds-content-district > p {
width: 90px;
color: white;
font-size: 20px;
line-height: 42px;
flex-shrink: 0;
margin: 0;
margin-top: 10px;
margin-left: 10px;
a,
button,
input {
outline: none;
}
.logo-btn {
/*
* Hide only visually, but have it available for screenreaders: h5bp.com/v
*/
.visuallyhidden {
border: 0;
border-radius: 5px;
background-repeat: no-repeat !important;
background-position: center center !important;
position: relative;
outline: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.logo-btn:focus {
outline: 0;
/*
* Extends the .visuallyhidden class to allow the element to be focusable
* when navigated to via the keyboard: h5bp.com/p
*/
.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto;
}
.city-btn {
width: 280px;
height: 52px;
margin: 10px 10px;
margin-bottom: 82px;
background-size:100% 100% !important;
/*
* Hide visually and from screenreaders, but maintain layout
*/
.invisible {
visibility: hidden;
}
.idp-btn {
width: 143px;
height: 52px;
background-size: 100% 100% !important;
margin: 10px 10px;
/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* `contenteditable` attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
*/
.clearfix:before,
.clearfix:after {
content: " "; /* 1 */
display: table; /* 2 */
}
.logo-btn:after{
position: absolute;
content: "\00a0";
.clearfix:after {
clear: both;
}
.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%;
/*
* For IE 6/7 only
* Include this rule to trigger hasLayout and contain floats.
*/
.clearfix {
*zoom: 1;
}
.ds-content-text {
color: white;
text-align: center;
font-size: 18px;
letter-spacing: 2px;
margin-top: 40px;
margin-bottom: 8px;
}
.ds-divide-line {
float: left;
width: 2px;
border: 1px rgba(255, 255, 255, 0.795);
margin: 10px 20px;
height: 40vh;
background-color: rgba(255, 255, 255, 0.795);
}
.szjc-login {
width: 80%;
margin: 0px auto;
text-align: center;
/* ==========================================================================
EXAMPLE Media Queries for Responsive Design.
These examples override the primary ('mobile first') styles.
Modify as content requires.
========================================================================== */
@media only screen and (min-width: 35em) {
/* Style adjustments for viewports that meet the condition */
}
.szjc-login > p {
color: white;
font-size: 18px;
margin: 0;
margin-bottom: 6px;
@media print,
(-o-min-device-pixel-ratio: 5/4),
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi) {
/* Style adjustments for high resolution devices */
}
/* ==========================================================================
Print styles.
Inlined to avoid required HTTP connection: h5bp.com/r
========================================================================== */
@media screen and (max-width: 1000px) {
.ds-header-img {
width: 126px;
height: 20px;
margin: 10px 0;
margin-left: 20px;
@media print {
* {
background: transparent !important;
color: #000 !important; /* Black prints faster: h5bp.com/s */
box-shadow: none !important;
text-shadow: none !important;
}
.ds-content {
height: calc(100% - 70px);
a,
a:visited {
text-decoration: underline;
}
.ds-footer {
height: 30px;
a[href]:after {
content: " (" attr(href) ")";
}
.ds-footer .ds-content-text {
margin: 6px 0;
abbr[title]:after {
content: " (" attr(title) ")";
}
.ds-content-source {
display: flex;
height: calc(100% - 60px);
max-width: 700px;
/*
* Don't show links for images, or javascript/internal links
*/
.ir a:after,
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: "";
}
.ds-content-title {
padding: 10px 0 0 0;
margin: 5px 0;
font-size: 20px;
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
.ds-content-city {
padding-right: 0;
height: 100%;
min-width: 210px;
thead {
display: table-header-group; /* h5bp.com/t */
}
.ds-content-city-float {
width: 210px;
tr,
img {
page-break-inside: avoid;
}
.ds-content-city-float > p {
font-size: 16px;
line-height: 16px;
margin: 6px 5px;
img {
max-width: 100% !important;
}
.ds-content-district {
margin: 0 auto;
@page {
margin: 0.5cm;
}
.ds-content-district > p {
font-size: 16px;
line-height: 16px;
margin: 6px 5px;
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
.city-btn {
width: 200px;
height: 40px;
margin: 6px 5px;
margin-bottom: 58px;
h2,
h3 {
page-break-after: avoid;
}
.idp-btn {
width: 110px;
height: 40px;
margin: 6px 1px;
}
body {
width: 100%;
height: 100%;
overflow: hidden;
background-color: #4e97f7 !important;
background-image: -webkit-linear-gradient(30deg, rgb(35,129,255), rgb(96,203,255));
background-image: -moz-linear-gradient(30deg, rgb(35,129,255), rgb(96,203,255));
background-image: linear-gradient(30deg, rgb(35,129,255), rgb(96,203,255));
align-items: center;
justify-content: center;
}
button {
border: none;
background-color: transparent;
margin: 0;
padding: 0 6px;
}
.bg {
width: 887px;
height: 476px;
position: relative;
top: 50%;
left: 50%;
margin-top: -238px;
margin-left: -444px;
background: url("../img/bg-xp.png") no-repeat center;
}
.loginContainer {
width: 600px;
position: absolute;
top: 30px;
left: 30px;
}
.loginContainer h1 {
color: #fff;
}
.login-box {
width: 450px;
box-sizing: border-box;
border-radius: 15px;
}
.logo-top-left {
height: 40px;
margin-left: -150px;
}
.title {
margin: 14px 0 0 0;
font-size: 18px;
letter-spacing: 5px;
}
.title-line-city {
background: url("../img/line1.png") no-repeat center;
background-size: 200% 2px;
background-position: -152px 50%;
-ms-background-position: -152px 50%;
width: 360px;
margin: 0 auto;
margin-top: 6px;
color: rgb(165, 165, 165);
}
#login-btn-szjc {
background: url("../img/btn-szjc.png") no-repeat center;
background-size: 100% 100%;
width: 249px;
height: 74px;
margin: 10px 0;
}
#login-btn-tyrz {
background: url("../img/btn-tyrz.png") no-repeat center;
background-size: 100% 100%;
width: 249px;
height: 74px;
margin: 10px 0;
}
.title-line-district {
background: url("../img/line2.png") no-repeat center;
background-size: 200% 2px;
background-position: -165px 50%;
-ms-background-position: -165px 50%;
width: 360px;
margin: 0 auto;
color: rgb(165, 165, 165);
}
.login-btn-district {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-direction: normal;
margin: 5px 0;
margin-left: 20px;
}
.login-btn-idp {
font-size: 12px;
font-weight: 700;
transform: scale(0.9);
-ms-transform: scale(0.9); /* IE 9 */
-moz-transform: scale(0.9); /* Firefox */
-webkit-transform: scale(0.9); /* Safari 和 Chrome */
-o-transform: scale(0.9); /* Opera */
}
.login-btn-idp-enable {
color: rgb(29,154,253);
}
.footer {
position: absolute;
bottom: 20px;
color: white;
text-align: center;
width: 100%;
}
.footer-text {
margin: 5px 0;
font-size: 12px;
transform: scale(0.9);
-ms-transform: scale(0.9); /* IE 9 */
-moz-transform: scale(0.9); /* Firefox */
-webkit-transform: scale(0.9); /* Safari 和 Chrome */
-o-transform: scale(0.9); /* Opera */
letter-spacing: 1.5px;
}
.vertical-line {
margin: 0 10px;
color: rgb(122, 186, 255);
}
@media screen and (min-width: 1025px) and (max-width: 1280px) {
.bg {
background-size: initial;
}
.ds-divide-line {
width: 2px;
margin: 6px 8px;
height: 50vh;
}
@media screen and (min-width: 768px) and (max-width: 1024px) {
.bg {
background-size: contain;
}
.ds-footer > p {
font-size: 6px;
}
@media screen and (max-width: 767px) {
.footer {
display: none;
}
}
@media screen and (min-width: 1000px) and (max-width: 1023px) {
.ds-content-title {
padding: 30px 0 0 0;
margin: 10px 0 10px 0;
font-size: 25px;
@media screen and (min-width: 1921px) and (max-width: 3000px) {
.bg {
width: 1800px;
height: 980px;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
margin: auto;
background-size: 100%;
background: url("../img/bg-dp.png") no-repeat center;
}
.bg_box {
position: relative;
top: 0;
left: 0;
}
.loginContainer {
position: absolute;
top: 120px;
left: 5%;
margin-bottom: 22px;
width: 800px;
height: 600px;
}
.ds-content-city {
padding-right: 0;
height: 100%;
.bg-form {
width: 100% !important;
}
.ds-content-city-float {
.login-box {
width: 100%;
}
.ds-content-city-float > p {
font-size: 18px;
.logo-top-left {
height: 60px;
margin-left: -180px;
}
.ds-content-district {
/* flex-grow: 1; */
margin: 0 auto;
.title {
margin: 14px 0 0 0;
font-size: 26px;
letter-spacing: 8px;
margin: 35px 0;
}
.ds-content-district > p {
font-size: 18px;
.title-line-city {
background: url("../img/line1.png") no-repeat center;
background-size: 100% 2px;
background-position: 30px 50%;
width: 800px;
margin-top: 30px;
color: rgb(165, 165, 165);
}
.city-btn {
width: 215px;
height: 40px;
#login-btn-szjc {
width: 460px;
height: 138px;
margin: 20px 0;
}
}
@media screen and (min-width: 1024px) and (max-width: 1279px) {
.ds-content-title {
padding: 30px 0 0 0;
margin: 10px 0 10px 0;
font-size: 25px;
#login-btn-tyrz {
width: 460px;
height: 138px;
margin: 20px 0;
}
.ds-content-city {
padding-right: 10px;
height: 100%;
.title-line-district {
background: url("../img/line2.png") no-repeat center;
background-size: 100% 2px;
background-position: 30px 50%;
width: 800px;
}
.ds-content-city-float {
width: 300px;
.login-btn-district {
margin: 15px 0;
margin-left: 12%;
}
.ds-content-city-float > p {
font-size: 18px;
.login-btn-idp {
font-size: 16px;
margin: 0 10px;
}
.ds-content-district {
/* flex-grow: 1; */
margin: 0 auto;
.login-btn-idp-enable {
color: rgb(29,154,253);
}
.ds-content-district > p {
font-size: 18px;
.footer {
position: absolute;
bottom: 20px;
color: white;
text-align: center;
width: 100%;
}
.city-btn {
width: 280px;
height: 52px;
margin-bottom: 82px;
.footer-text {
margin: 5px 0;
font-size: 16px;
}
}
\ No newline at end of file
}
#showMessage {
height: 100%;
background: url('../img/msg-bg-xp.jpg') center no-repeat;
background-size: cover;
}
.login-success {
padding: 12% 8%;
font-size: 26px;
color: white;
letter-spacing: 8px;
font-weight: 900;
height: calc(100% -50px);
}
.login-success-hello {
font-size: 32px;
margin-bottom: 45px;
}
.login-success-footer {
position: absolute;
bottom: 0px;
text-align: center;
width: 100%;
background-color: white;
}
.login-success-footer-text {
margin: 6px 0;
font-size: 14px;
}
@media screen and (min-width: 1025px) and (max-width: 1280px) {
.login-success {
font-size: 22px;
}
.login-success-hello {
font-size: 28px;
margin-bottom: 40px;
}
}
@media screen and (min-width: 768px) and (max-width: 1024px) {
.login-success {
font-size: 18px;
}
.login-success-hello {
font-size: 24px;
margin-bottom: 30px;
}
}
@media screen and (max-width: 767px) {
.login-success {
font-size: 14px;
}
.login-success-hello {
font-size: 20px;
margin-bottom: 30px;
}
}
@media screen and (min-width: 1921px) and (max-width: 3000px) {
.login-success {
font-size: 32px;
}
.login-success-hello {
font-size: 42px;
margin-bottom: 60px;
}
}
/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */
/*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*/
/* ==========================================================================
Base styles: opinionated defaults
========================================================================== */
html,
button,
input,
select,
textarea {
color: #222;
}
html {
width: 100%;
height: 100%;
font-size: 1em;
line-height: 1.4;
}
/*
* Remove text-shadow in selection highlight: h5bp.com/i
* These selection rule sets have to be separate.
* Customize the background color to match your design.
*/
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
::selection {
background: #b3d4fc;
text-shadow: none;
}
/*
* A better looking default horizontal rule
*/
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
/*
* Remove the gap between images, videos, audio and canvas and the bottom of
* their containers: h5bp.com/i/440
*/
audio,
canvas,
img,
video {
vertical-align: middle;
}
/*
* Remove default fieldset styles.
*/
fieldset {
border: 0;
margin: 0;
padding: 0;
}
/*
* Allow only vertical resizing of textareas.
*/
textarea {
resize: vertical;
}
/* ==========================================================================
Browse Happy prompt
========================================================================== */
.browsehappy {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
/* ==========================================================================
Author's custom styles
========================================================================== */
/* ==========================================================================
Helper classes
========================================================================== */
/*
* Image replacement
*/
.ir {
background-color: transparent;
border: 0;
overflow: hidden;
/* IE 6/7 fallback */
*text-indent: -9999px;
}
.ir:before {
content: "";
display: block;
width: 0;
height: 150%;
}
/*
* Hide from both screenreaders and browsers: h5bp.com/u
*/
.hidden {
display: none !important;
visibility: hidden;
}
a,
button,
input {
outline: none;
}
/*
* Hide only visually, but have it available for screenreaders: h5bp.com/v
*/
.visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
/*
* Extends the .visuallyhidden class to allow the element to be focusable
* when navigated to via the keyboard: h5bp.com/p
*/
.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto;
}
/*
* Hide visually and from screenreaders, but maintain layout
*/
.invisible {
visibility: hidden;
}
/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* `contenteditable` attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
*/
.clearfix:before,
.clearfix:after {
content: " "; /* 1 */
display: table; /* 2 */
}
.clearfix:after {
clear: both;
}
/*
* For IE 6/7 only
* Include this rule to trigger hasLayout and contain floats.
*/
.clearfix {
*zoom: 1;
}
/* ==========================================================================
EXAMPLE Media Queries for Responsive Design.
These examples override the primary ('mobile first') styles.
Modify as content requires.
========================================================================== */
@media only screen and (min-width: 35em) {
/* Style adjustments for viewports that meet the condition */
}
@media print,
(-o-min-device-pixel-ratio: 5/4),
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi) {
/* Style adjustments for high resolution devices */
}
/* ==========================================================================
Print styles.
Inlined to avoid required HTTP connection: h5bp.com/r
========================================================================== */
@media print {
* {
background: transparent !important;
color: #000 !important; /* Black prints faster: h5bp.com/s */
box-shadow: none !important;
text-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
/*
* Don't show links for images, or javascript/internal links
*/
.ir a:after,
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: "";
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
thead {
display: table-header-group; /* h5bp.com/t */
}
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
@page {
margin: 0.5cm;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
}
body {
width: 100%;
height: 100%;
overflow: hidden;
background-color: #4e97f7 !important;
background-image: -webkit-linear-gradient(30deg, rgb(35,129,255), rgb(96,203,255));
background-image: -moz-linear-gradient(30deg, rgb(35,129,255), rgb(96,203,255));
background-image: linear-gradient(30deg, rgb(35,129,255), rgb(96,203,255));
align-items: center;
justify-content: center;
}
button {
border: none;
background-color: transparent;
margin: 0;
padding: 0 6px;
}
.bg {
width: 887px;
height: 476px;
position: relative;
top: 50%;
left: 50%;
margin-top: -238px;
margin-left: -444px;
background: url("../img/bg-xp.png") no-repeat center;
}
.loginContainer {
width: 600px;
position: absolute;
top: 80px;
left: 30px;
}
.loginContainer h1 {
color: #fff;
}
.login-box {
width: 450px;
box-sizing: border-box;
border-radius: 15px;
}
.title-line-city {
background: url("../img/line1.png") no-repeat center;
background-size: 200% 2px;
background-position: -152px 50%;
-ms-background-position: -152px 50%;
width: 360px;
margin: 0 auto;
margin-top: 30px;
color: rgb(165, 165, 165);
}
#login-btn-szjc {
background: url("../img/btn-szjc.png") no-repeat center;
background-size: 100% 100%;
width: 249px;
height: 74px;
margin: 10px 0;
}
#login-btn-tyrz {
background: url("../img/btn-tyrz.png") no-repeat center;
background-size: 100% 100%;
width: 249px;
height: 74px;
margin: 10px 0;
}
.title-line-district {
background: url("../img/line2.png") no-repeat center;
background-size: 200% 2px;
background-position: -165px 50%;
-ms-background-position: -165px 50%;
width: 360px;
margin: 0 auto;
color: rgb(165, 165, 165);
}
.login-btn-district {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-direction: normal;
margin: 5px 0;
margin-left: 20px;
}
.login-btn-idp {
font-size: 12px;
font-weight: 700;
transform: scale(0.9);
-ms-transform: scale(0.9); /* IE 9 */
-moz-transform: scale(0.9); /* Firefox */
-webkit-transform: scale(0.9); /* Safari 和 Chrome */
-o-transform: scale(0.9); /* Opera */
}
.login-btn-idp-enable {
color: rgb(29,154,253);
}
.footer {
position: absolute;
bottom: 20px;
color: white;
text-align: center;
width: 100%;
}
.footer-text {
margin: 5px 0;
font-size: 12px;
transform: scale(0.9);
-ms-transform: scale(0.9); /* IE 9 */
-moz-transform: scale(0.9); /* Firefox */
-webkit-transform: scale(0.9); /* Safari 和 Chrome */
-o-transform: scale(0.9); /* Opera */
letter-spacing: 1.5px;
}
.vertical-line {
margin: 0 10px;
color: rgb(122, 186, 255);
}
@media screen and (min-width: 1025px) and (max-width: 1280px) {
.bg {
background-size: initial;
}
}
@media screen and (min-width: 768px) and (max-width: 1024px) {
.bg {
background-size: contain;
}
}
@media screen and (max-width: 767px) {
.footer {
display: none;
}
}
@media screen and (min-width: 1921px) and (max-width: 3000px) {
.bg {
width: 1800px;
height: 980px;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
margin: auto;
background-size: 100%;
background: url("../img/bg-dp.png") no-repeat center;
}
.bg_box {
position: relative;
top: 0;
left: 0;
}
.loginContainer {
position: absolute;
top: 250px;
left: 5%;
margin-bottom: 22px;
width: 800px;
height: 600px;
}
.bg-form {
width: 100% !important;
}
.login-box {
width: 100%;
}
.title-line-city {
background: url("../img/line1.png") no-repeat center;
background-size: 100% 2px;
background-position: 30px 50%;
width: 800px;
margin-top: 30px;
color: rgb(165, 165, 165);
}
#login-btn-szjc {
width: 460px;
height: 138px;
margin: 20px 0;
}
#login-btn-tyrz {
width: 460px;
height: 138px;
margin: 20px 0;
}
.title-line-district {
background: url("../img/line2.png") no-repeat center;
background-size: 100% 2px;
background-position: 30px 50%;
width: 800px;
}
.login-btn-district {
margin: 15px 0;
margin-left: 12%;
}
.login-btn-idp {
font-size: 16px;
margin: 0 10px;
}
.login-btn-idp-enable {
color: rgb(29,154,253);
}
.footer {
position: absolute;
bottom: 20px;
color: white;
text-align: center;
width: 100%;
}
.footer-text {
margin: 5px 0;
font-size: 16px;
}
}
......@@ -212,7 +212,7 @@
p,
pre {
margin: 1em 0;
margin: 0.8em 0;
}
/**
......
......@@ -6,7 +6,7 @@
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<script type="text/javascript" src="../static/js/browser.js"></script>
<script type="text/javascript" th:src="@{/static/js/browser.js}"></script>
<script th:inline="javascript">
/*<![CDATA[*/
var loginUrl1 = [[${loginUrl1}]];
......@@ -26,7 +26,7 @@
window.location.href = baseUrl+idp+"&loginUrl=" + encodeURIComponent(loginUrl3+"&auth_source="+idp)+"&browser="+info.browser+"&device="+info.device+"&os="+info.os+"&version="+info.version;
}
}
if (loginType.length > 0){
if (loginType && loginType.length > 0){
toLogin(loginType);
}
</script>
......@@ -34,81 +34,99 @@
<!--<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>
<title>发现服务·速享之旅</title>
<link rel="stylesheet" th:href="@{/static/css/ds.css}" />
<link rel="stylesheet" th:href="@{/static/css/bootstrap.min.css}" />
<link rel="stylesheet" th:href="@{/static/css/normalize.css}" />
<link rel="shortcut icon" th:href="@{/static/img/favicon.ico}" >
<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>-->
<script type="text/javascript" th:src="@{/static/js/browser.js}"></script>
<style>
.form-group {
width: 100%;
}
.bg-form {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-direction: normal;
-webkit-box-orient: vertical;
-moz-flex-direction: column;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-moz-align-items: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-moz-justify-content: center;
-webkit-justify-content: center;
justify-content: center;
}
</style>
</head>
<body id="body" style="display: none">
<!--[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]-->
<body>
<!--[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 -->
<!-- Add your site or application content here -->
<div class="ds">
<div class="ds-header">
<img class="ds-header-img" th:src="@{/static/img/Rlogo.png}" alt="" />
</div>
<div class="ds-content">
<div class="ds-content-mask">
<p class="ds-content-title">发现服务 · 速享之旅</p>
<div class="ds-content-source">
<div class="ds-content-city">
<div class="ds-content-city-float">
<p>市认证源</p>
<button onclick="toLogin('edenoperation')" class="logo-btn city-btn"
style="background: white url('../static/img/logo-shszjc.png')" type="button"></button>
<button onclick="toLogin('dianjiaoguan')" class="logo-btn city-btn"
style="background: white url('../static/img/logo-tyrz.png')" type="button"></button>
</div>
<div class="bg">
<div class="bg-form">
<div class="loginContainer">
<!--<h1>上海数字教材运营管理中心</h1>-->
<div class="login-box text-center">
<img class="logo-top-left" th:src='@{/static/img/Rlogo.png}' />
<p class="title">发现服务·速享之旅</p>
<div class="title-line-city">
<p>请选择登录方式</p>
</div>
<div class="ds-divide-line"></div>
<div class="ds-content-district">
<p>区认证源</p>
<div>
<button onclick="toLogin('qpjy')" class="logo-btn idp-btn" style="background: url('../static/img/logo-qp.png')"
type="button"></button>
<button onclick="toLogin('jsjy')" class="logo-btn idp-btn logo-btn-mask" disabled="disabled"
style="background: url('../static/img/logo-js.png')" type="button"></button>
<button onclick="toLogin('hpjy')" class="logo-btn idp-btn logo-btn-mask" disabled="disabled"
style="background: url('../static/img/logo-hp.png')" type="button"></button>
<button onclick="toLogin('fxjy')" class="logo-btn idp-btn logo-btn-mask" disabled="disabled"
style="background: url('../static/img/logo-fx.png')" type="button"></button>
<button onclick="toLogin('pdjy')" class="logo-btn idp-btn logo-btn-mask" disabled="disabled"
style="background: url('../static/img/logo-pd.png')" type="button"></button>
<button onclick="toLogin('ypjy')" class="logo-btn idp-btn logo-btn-mask" disabled="disabled"
style="background: url('../static/img/logo-yp.png')" type="button"></button>
<button onclick="toLogin('cnjy')" class="logo-btn idp-btn logo-btn-mask" disabled="disabled"
style="background: url('../static/img/logo-cn.png')" type="button"></button>
</div>
<button id="login-btn-szjc" onclick="toLogin('edenoperation')" type="button"></button>
<button id="login-btn-tyrz" onclick="toLogin('dianjiaoguan')" type="button"></button>
<div class="title-line-district">
<p>区域认证</p>
</div>
<div class="login-btn-district">
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('hpjy')" type="button">黄浦区</button>
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('xhjy')" type="button">徐汇区</button>
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('cnjy')" type="button">长宁区</button>
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('jajy')" type="button">静安区</button>
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('ptjy')" type="button">普陀区</button>
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('hkjy')" type="button">虹口区</button>
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('ypjy')" type="button">杨浦区</button>
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('pdjy')" type="button">浦东新区</button>
</div>
<div class="login-btn-district">
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('mhjy')" type="button">闵行区</button>
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('bsjy')" type="button">宝山区</button>
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('jdjy')" type="button">嘉定区</button>
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('jsjy')" type="button">金山区</button>
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('sjjy')" type="button">松江区</button>
<button class="login-btn-idp login-btn-idp-enable" onclick="toLogin('qpjy')" type="button">青浦区</button>
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('fxjy')" type="button">奉贤区</button>
<button class="login-btn-idp" disabled="disabled" onclick="toLogin('cmjy')" type="button">崇明区</button>
</div>
</div>
<!-- <p class="ds-content-text">点击图标前往所属认证源 · · ·</p>
<div class="szjc-login">
<p>如果您曾经参与上海市中小学数字教材试验项目,</p>
<p><a style="color: red;" onclick="toLogin('szjc')">请点击此处使用数字教材账号登录>></a></p>
</div> -->
</div>
</div>
<div class="ds-footer">
<p class="ds-content-text">版权所有&copy;上海教育认证中心</p>
</div>
</div>
<div class="footer">
<p class="footer-text">版权所有&copy;上海教育认证中心</p>
</div>
<script th:inline="javascript">
/*<![CDATA[*/
var loginUrl1 = [[${loginUrl1}]];
var loginUrl2 = [[${loginUrl2}]];
var loginUrl3 = [[${loginUrl3}]];
var logId = [[${logId}]];
var ctxPath = /*[[@{/}]]*/ '';
/*]]>*/
</script>
</body>
<script type="text/javascript">
$(document).ready(function(){
$("#body").show();
});
</script>
</html>
......@@ -3,55 +3,100 @@
<!--[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]-->
<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>
<title>发现服务·速享之旅</title>
<script type="text/javascript" th:src="@{/static/js/jquery-1.10.2.min.js}"></script>
<link rel="stylesheet" th:href="@{/static/css/loginSuccess.css}" />
<link rel="shortcut icon" th:href="@{/static/img/favicon.ico}" >
<!-- <link rel="stylesheet" href="../static/css/loginSuccess.css" /> -->
<!--<script src="../js/vendor/modernizr-2.6.2.min.js"></script>-->
</head>
<body>
<form th:action="${successPostUrl}" method="post" th:object="${clientDataInfo}">
<input type="hidden" th:value="${clientDataInfo.authUserInfo.id}" name="authUserInfo.id"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.realName}" name="authUserInfo.realName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.userType}" name="authUserInfo.userType"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.source}" name="authUserInfo.source"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentId}" name="authUserInfo.studentId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentCode}" name="authUserInfo.studentCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentStage}" name="authUserInfo.studentStage"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentGrade}" name="authUserInfo.studentGrade"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentClass}" name="authUserInfo.studentClass"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentStageName}" name="authUserInfo.studentStageName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentGradeName}" name="authUserInfo.studentGradeName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentClassName}" name="authUserInfo.studentClassName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolId}" name="authUserInfo.studentSchoolId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentCodeStatus}" name="authUserInfo.studentCodeStatus"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolCode}" name="authUserInfo.studentSchoolCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolName}" name="authUserInfo.studentSchoolName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentRegionCode}" name="authUserInfo.studentRegionCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentRegionName}" name="authUserInfo.studentRegionName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingNo}" name="authUserInfo.teacherTrainingNo"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingUserName}" name="authUserInfo.teacherTrainingUserName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherRegionCode}" name="authUserInfo.teacherRegionCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherCampusCode}" name="authUserInfo.teacherCampusCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingSchoolType}" name="authUserInfo.teacherTrainingSchoolType"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherStage}" name="authUserInfo.teacherStage"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherGrade}" name="authUserInfo.teacherGrade"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSubject}" name="authUserInfo.teacherSubject"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSchoolId}" name="authUserInfo.teacherSchoolId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSchoolName}" name="authUserInfo.teacherSchoolName"/>
<input type="hidden" th:value="${clientDataInfo.returnUrl}" name="returnUrl"/>
<input type="hidden" th:value="${clientDataInfo.oauthType}" name="oauthType"/>
</form>
<script type="text/javascript">
$(function(){
$("form").submit();
})
</script>
</body></html>
\ No newline at end of file
<body style="height: 100vh; margin: 0;">
<div style="height: 100%;">
<form th:action="${successPostUrl}" method="post" th:object="${clientDataInfo}">
<input type="hidden" th:value="${clientDataInfo.authUserInfo.id}" name="authUserInfo.id"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.realName}" name="authUserInfo.realName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.userType}" name="authUserInfo.userType"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.source}" name="authUserInfo.source"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentId}" name="authUserInfo.studentId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentCode}" name="authUserInfo.studentCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentStage}" name="authUserInfo.studentStage"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentGrade}" name="authUserInfo.studentGrade"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentClass}" name="authUserInfo.studentClass"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentStageName}" name="authUserInfo.studentStageName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentGradeName}" name="authUserInfo.studentGradeName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentClassName}" name="authUserInfo.studentClassName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolId}" name="authUserInfo.studentSchoolId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentCodeStatus}" name="authUserInfo.studentCodeStatus"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolCode}" name="authUserInfo.studentSchoolCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolName}" name="authUserInfo.studentSchoolName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentRegionCode}" name="authUserInfo.studentRegionCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentRegionName}" name="authUserInfo.studentRegionName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingNo}" name="authUserInfo.teacherTrainingNo"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingUserName}" name="authUserInfo.teacherTrainingUserName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherRegionCode}" name="authUserInfo.teacherRegionCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherCampusCode}" name="authUserInfo.teacherCampusCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingSchoolType}" name="authUserInfo.teacherTrainingSchoolType"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherStage}" name="authUserInfo.teacherStage"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherGrade}" name="authUserInfo.teacherGrade"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSubject}" name="authUserInfo.teacherSubject"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSchoolId}" name="authUserInfo.teacherSchoolId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSchoolName}" name="authUserInfo.teacherSchoolName"/>
<input type="hidden" th:value="${clientDataInfo.returnUrl}" name="returnUrl"/>
<input type="hidden" th:value="${clientDataInfo.oauthType}" name="oauthType"/>
</form>
<div id="showMessage" style="display: none">
<div class="login-success">
<p class="login-success-hello">
您好,来自
<span th:if="${clientDataInfo.authUserInfo.source} == 'edenoperation'">上海数字教材</span>
<span th:if="${clientDataInfo.authUserInfo.source} == 'dianjiaoguan'">上海基础教育</span>
<span th:if="${clientDataInfo.authUserInfo.source} == 'qpjy'">青浦教育</span>
<span th:text="${clientDataInfo.authUserInfo.realName}"></span><span
th:if=" ${clientDataInfo.authUserInfo.userType != null } and ${clientDataInfo.authUserInfo.userType.name() == 'TEACHER'}">(教师)</span><span
th:if=" ${clientDataInfo.authUserInfo.userType != null } and ${clientDataInfo.authUserInfo.userType.name() == 'STUDENT'}">(学生)</span>
</p>
<p>欢迎使用“发现服务·速享之旅”</p>
<p>统一身份认证服务。</p>
</div>
<div class="login-success-footer">
<p class="login-success-footer-text">版权所有&copy;上海教育认证中心</p>
</div>
</div>
<!-- <p id="showMessage" style="font-size: 26px; text-align:center; display: none">尊敬的
<span th:text="${clientDataInfo.authUserInfo.realName}"></span>(id:
<span th:text="${clientDataInfo.authUserInfo.id}"></span>),恭喜您通过
<span th:if="${clientDataInfo.authUserInfo.source} == 'edenoperation'">上海数字教材</span>
<span th:if="${clientDataInfo.authUserInfo.source} == 'dianjiaoguan'">上海基础教育</span>
<span th:if="${clientDataInfo.authUserInfo.source} == 'qpjy'">青浦教育</span>
登录成功!
</p> -->
</div>
<script th:inline="javascript">
var formSubmitUrl = [[${successPostUrl}]];
if (formSubmitUrl && formSubmitUrl.length > 0){
$(function(){
$("form").submit();
});
}else {
$("#showMessage").show();
}
</script>
</body>
</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