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

应用推进改造

parents 0e4b0b03 764747d7
......@@ -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
......
#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;
}
}
......@@ -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>
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