|
@@ -12,6 +12,7 @@ const otherLogo = getUrlArgObject("adLg");
|
|
|
let type
|
|
|
$(function () {
|
|
|
getHospitalMark()
|
|
|
+ getSecurityCode();
|
|
|
if (hideLogo || otherLogo) {
|
|
|
$(".copy-right").text("");
|
|
|
}
|
|
@@ -25,13 +26,46 @@ $(function () {
|
|
|
|
|
|
});
|
|
|
|
|
|
+//获取验证码
|
|
|
+function getSecurityCode() {
|
|
|
+ $.ajax({
|
|
|
+ url:api.getCaptcha,
|
|
|
+ method:'get',
|
|
|
+ contentType:'image/png',
|
|
|
+ dataType:'blob',
|
|
|
+ success:function(res){
|
|
|
+ const data = res.data;console.log(221)
|
|
|
+ const qrUrl = window.URL.createObjectURL(new Blob(data));
|
|
|
+ const img = document.createElement("img");
|
|
|
+ img.src = qrUrl;
|
|
|
+ img.onload=function(){
|
|
|
+ window.URL.revokeObjectURL(qrUrl)
|
|
|
+ }
|
|
|
+ const imgDiv = document.getElementById("codeImg");
|
|
|
+ imgDiv.appendChild(img);
|
|
|
+ },
|
|
|
+ error:function(res){
|
|
|
+ //console.log(error)
|
|
|
+ const data = res.data;
|
|
|
+ const qrUrl = window.URL.createObjectURL(new Blob(data));
|
|
|
+ const img = document.createElement("img");
|
|
|
+ img.src = qrUrl;
|
|
|
+ img.onload=function(){
|
|
|
+ window.URL.revokeObjectURL(qrUrl)
|
|
|
+ }
|
|
|
+ const imgDiv = document.getElementById("codeImg");
|
|
|
+ imgDiv.appendChild(img);
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
function getHospitalMark() {
|
|
|
localStorage.removeItem('accessToken')
|
|
|
post(api.getHospitalMark).then((res) => {
|
|
|
const data = res.data;
|
|
|
if (data.code == 0) {
|
|
|
type = parseInt(data.data)
|
|
|
- if (parseInt(data.data) == 1) {
|
|
|
+ if (parseInt(data.data) == 1) { //湘雅三院登录样式
|
|
|
str = '<div class="bg2">'
|
|
|
str += '<div class="login-info">'
|
|
|
str += '<div class="info-perPub">'
|
|
@@ -46,7 +80,7 @@ function getHospitalMark() {
|
|
|
str += '</div></div>'
|
|
|
str += '<p class="waring"></p><div class="sureLogin">登录</div></div>'
|
|
|
$('.login').html(str)
|
|
|
- } else {
|
|
|
+ } else { //通用版样式
|
|
|
str = '<div class="bg fl"><p class="title">AI病案质控平台</p></div>'
|
|
|
str += '<div class="message fr"><div class="inner"><p class="welcome">欢迎使用!</p>'
|
|
|
str += '<div class="perPub">'
|
|
@@ -58,6 +92,13 @@ function getHospitalMark() {
|
|
|
str += ' <p> 密码:</p>'
|
|
|
str += '<div class="iptWrap">'
|
|
|
str += '<input type="text" placeholder="请输入密码" id="password" value="" autocomplete="off">'
|
|
|
+ str += '</div></div><br>'
|
|
|
+ str += '<div class="perPub">'
|
|
|
+ str += ' <p> 验证码:</p>'
|
|
|
+ str += '<div class="iptWrap security-code">'
|
|
|
+ str += '<input type="text" placeholder="请输入验证码" id="code" value="" autocomplete="off">'
|
|
|
+ str += '<div id="codeImg" class="code-img"></div>'
|
|
|
+ str += '<a href="changeCode">换一张</a>'
|
|
|
str += '</div></div>'
|
|
|
str += '<p class="waring"></p><div class="sureLogin">登录</div></div><div class="copy-right">由杭州朗通信息技术有限公司提供技术支持</div></div>',
|
|
|
$('.login').html(str)
|