parent
6f5b2baa4f
commit
579d635d1e
@ -1,10 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<body>
|
||||
|
||||
<iframe
|
||||
src="http://10.10.14.206:8080/ui/chat/d84e9ed663af1d37"
|
||||
style="width: 100%; height: 500px;"
|
||||
frameborder="0"
|
||||
allow="microphone">
|
||||
</iframe>
|
||||
|
||||
</body>
|
||||
|
||||
<script
|
||||
async
|
||||
defer
|
||||
src="http://10.10.14.206:8080/api/application/embed?protocol=http&host=10.10.14.206:8080&token=d84e9ed663af1d37">
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="./component/layui/css/layui.css" />
|
||||
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="./component/layui/layui.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
layui.use(function () {
|
||||
var layer = layui.layer;
|
||||
var $ = layui.jquery;
|
||||
|
||||
|
||||
// $.ajax({
|
||||
// type: "GET",
|
||||
// dataType: "json",
|
||||
// async: false,
|
||||
// url: "/QingLong/global/getGlobalByCodes",
|
||||
// success: function (res) {
|
||||
// if (res.success) {
|
||||
|
||||
// var iframe = '<iframe src="http://10.10.14.207:8080/ui/chat/' + appId + '" style="width: 100%; height: 100%;" frameborder="0" allow="microphone"></iframe>';
|
||||
|
||||
// } else {
|
||||
// var loadIndex = layer.msg('AI助手初始化中...', {
|
||||
// icon: 16,
|
||||
// shade: 0.01
|
||||
// });
|
||||
|
||||
|
||||
// var iframe = '<iframe src="http://10.10.14.207:8080/ui/chat/' + appId + '" style="width: 100%; height: 100%;" frameborder="0" allow="microphone"></iframe>';
|
||||
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
var loadIndex = layer.msg('AI助手初始化中...', {
|
||||
icon: 16,
|
||||
shade: 0.05
|
||||
});
|
||||
|
||||
|
||||
// 模拟关闭
|
||||
setTimeout(function () {
|
||||
layer.close(loadIndex);
|
||||
var appId = "5b45c7e216579a41";
|
||||
var iframe = '<iframe src="http://10.10.14.207:8080/ui/chat/' + appId + '" style="width: 100%; height: 99.5%;" frameborder="0" allow="microphone"></iframe>';
|
||||
$('body').append(iframe);
|
||||
|
||||
}, 1000);
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -0,0 +1,183 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<!-- <title>长春市教育装备与信息化项目智慧管理系统</title> -->
|
||||
<title>知识库问答系统</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
|
||||
<!-- 手机端禁止缩放 -->
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
|
||||
<!-- <meta name="keywords" content="长春市教育装备与信息化项目智慧管理系统"> -->
|
||||
<!--关键词,5个左右,单个8汉字以内-->
|
||||
<!-- <meta name="description" content="长春市教育装备与信息化项目智慧管理系统"> -->
|
||||
<!--网站描述-->
|
||||
<!--自己的样式-->
|
||||
<link href="./tbcss/public.css" rel="stylesheet" type="text/css" />
|
||||
<link href="./tbcss/SignIn.css" rel="stylesheet" type="text/css">
|
||||
<script src="./component/pear/jsencrypt.min.js"></script>
|
||||
<script src="./admin/js/jquery-3.6.0.min.js"></script>
|
||||
<script src="./component/pear/base64.js"></script>
|
||||
<!--添加对公用函数库的引用-->
|
||||
<!-- <script src="lib/common.js"></script>-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="all-content">
|
||||
<div class="content clearfix">
|
||||
<div class="left-img">
|
||||
<img src="./img/left-img_tk.png">
|
||||
</div>
|
||||
<div class="right-content clearfix">
|
||||
<div class="content-name">
|
||||
<p style="font-size: 20px;font-weight: bolder;margin-left: 70px;color: #6998F4;" id="system_name">知识库问答系统</p>
|
||||
<!-- <p style="font-size: 20px;font-weight: bolder;margin-left: -5px;"><img src="./img/title_tk.png"></p> -->
|
||||
|
||||
</div>
|
||||
<form action="" method="post">
|
||||
<div class="user-name">
|
||||
<div class="user-name-li">
|
||||
<img src="./img/user_tb.png">
|
||||
<input type="text" placeholder="用户名" name="loginName" id="usernameTxt">
|
||||
</div>
|
||||
</div>
|
||||
<div class="password">
|
||||
<div class="password-li">
|
||||
<img src="./img/pass_tb.png">
|
||||
<input type="password" autocomplete="off" placeholder="密码" name="password" id="passwordTxt">
|
||||
</div>
|
||||
</div>
|
||||
<div class="vcode">
|
||||
<div class="vcode-li">
|
||||
<img src="./img/v_code_tb.png">
|
||||
<input type="text" placeholder="验证码" autocomplete="off" name="captcha" id="captchaTxt"
|
||||
value="dsideal">
|
||||
<img class="vcode-img" id="userCaptchaImage" src="/QingLong/loginPerson/getCaptcha"
|
||||
alt="点击图片刷新校验码" style="cursor:pointer" onclick="javascript:refreshCaptcha()" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input id="loginBtn" class="input-button" type="button" value="登 录"
|
||||
style="background-color: #6998F4;">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer" id="footer">
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$("#loginBtn").click(function () {
|
||||
doLogin();
|
||||
});
|
||||
});
|
||||
|
||||
//刷新验证码
|
||||
function refreshCaptcha() {
|
||||
$("#userCaptchaImage").attr("src", "/QingLong/loginPerson/getCaptcha?rnd=" + Math.random().toString().slice(-6));
|
||||
}
|
||||
|
||||
$(document).keydown(function (event) {
|
||||
if (event.keyCode === 13) {//回车键对应code值为13
|
||||
doLogin();
|
||||
}
|
||||
});
|
||||
|
||||
function doLogin() {
|
||||
var username = $("#usernameTxt").val();
|
||||
var password = $("#passwordTxt").val();
|
||||
var captcha = $("#captchaTxt").val();
|
||||
if (username.length === 0 || password.length === 0) {
|
||||
alert("用户名或密码不允许为空!")
|
||||
return;
|
||||
}
|
||||
userLogin(username, password, captcha);
|
||||
}
|
||||
|
||||
//用户名登录
|
||||
function userLogin(username, password, captcha) {
|
||||
var publicKey = "-----BEGIN PUBLIC KEY-----\MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCcd+0zTY9Gn94iqkQJTlxYnEnCeFsLkk0a7hoAvi2B74VzDVV3xH0ZO9RkXvo1SgCB+uzbEWdrgQkzTqyjfTtgOguu3OnkVxIMJF34ibchTY0LWHGxq1m2gLGuVVqrlu1LtdV0X7xo/5zc8Mr+46veWb86kSpqe6rOAm69WWo5GwIDAQAB\-----END PUBLIC KEY-----";
|
||||
var encrypt = new JSEncrypt();
|
||||
encrypt.setPublicKey(publicKey);
|
||||
|
||||
if (userLoginCheck(username, password, captcha)) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
url: "/QingLong/loginPerson/doLogin",
|
||||
data: {
|
||||
"username": username,
|
||||
"password": encrypt.encrypt(password),
|
||||
"captcha": captcha
|
||||
},
|
||||
async: false,
|
||||
success: function (result) {
|
||||
if (result.success) {
|
||||
window.location.href = '/QingLong/index_ai.html';
|
||||
} else {
|
||||
alert(result.msg);
|
||||
if (result.redirect) {
|
||||
window.location.href = '/QingLong/plogin.html';
|
||||
}
|
||||
refreshCaptcha();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//用户登录检查
|
||||
function userLoginCheck(username, password, captcha) {
|
||||
if (username == null || username == "") {
|
||||
alert("用户名不允许为空!");
|
||||
return false;
|
||||
}
|
||||
if (password == null || password == "") {
|
||||
alert("密码不允许为空!");
|
||||
return false;
|
||||
}
|
||||
if (captcha == null || captcha == "") {
|
||||
alert("验证码不允许为空!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//开启错误提示
|
||||
function showError(error) {
|
||||
$(".form-error").find("label").html(error);
|
||||
$(".form-error").show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//getPageInfo();
|
||||
//获取页面信息
|
||||
function getPageInfo() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "/QingLong/global/getGlobalByCodes",
|
||||
data: {
|
||||
"global_codes": Base64.encode("system_name,copy_right")
|
||||
},
|
||||
async: false,
|
||||
success: function (result) {
|
||||
|
||||
|
||||
|
||||
$('title').html(result.data[0].global_value);
|
||||
$("#system_name").html(result.data[0].global_value);
|
||||
$("#footer").html(result.data[1].global_value);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue