Bug修复

This commit is contained in:
2021-01-27 21:42:49 +08:00
parent 7d05b32375
commit 43f91d8359
40 changed files with 972 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,174 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<head>
<title>X·in管理端 - 修改密码</title>
<script type="text/javascript" src="themes/js/vue.min.js"></script>
<script type="text/javascript" src="themes/js/index.js"></script>
<script type="text/javascript" src="themes/js/axios.min.js"></script>
<script type="text/javascript" src="themes/js/jquery.js"></script>
<script type="text/javascript" src="themes/js/moment.js"></script>
<link rel="stylesheet" href="themes/css/index.css" type="text/css">
</head>
<style>
.header{
height: 60px;
width: 100%;
}
.header .logo{
height: 60px;
width: 260px;
}
.header .logo-image{
height: 100%;
width: 100%;
background-repeat: no-repeat;
background-position: center;
background-size: 90%;
background-image: url('themes/img/xin.png');
}
.el-form{
width: 480px;
margin: auto;
margin-top: 40px;
}
.admin {
display: flex;
align-items: center;
border: 1px solid #DCDFE6;
background-color: #fff;
border-radius: 4px;
height: 40px;
margin-bottom: 20px;
}
.iconinfo {
display: block;
width: 40px;
text-align: center;
font-size: 14px;
font-weight: 600;
color: #999;
height: 40px;
line-height: 40px;
}
#app {
position: absolute;
right: 0;
top: 0;
bottom: 0;
left: 0;
justify-content: center;
align-items: center;
background-color: #f0f2f5;
background-image: url("themes/img/login_bg.svg");
}
.container {
justify-content: center;
align-items: center;
background-color: #f0f2f5;
width: 80%;
margin: 40px auto;
}
.title{
height: 60px;
width: 100%;
text-align: center;
margin-top: 40px;
display: flex;
align-items: center;
justify-content: center;
}
.system {
font-size: 20px;
font-weight: 600;
}
</style>
<body>
<body>
<div id="app">
<div class="header">
<div class="logo">
<div class="logo-image"></div>
</div>
</div>
<div class="container">
<div class="title">
<span class="system">修改密码</span>
</div>
<el-form :model="from" id="passLogin" :rules="rules" ref="user" label-width="80px" @keyup.enter.native="login">
<el-form-item label="原密码" class="demo-dynamic" prop="pass">
<el-input v-model="from.pass" size="small" placeholder="请输入原密码" type="password" show-password ></el-input>
</el-form-item>
<el-form-item label="新密码" class="demo-dynamic" prop="editpass">
<el-input size="small" v-model="from.editpass" placeholder="请输入要修改的密码" type="password" show-password></el-input>
</el-form-item>
<el-form-item label="确认密码" class="demo-dynamic" prop="checkpass">
<el-input size="small" v-model="from.checkpass" placeholder="请确认改改的密码" type="password" show-password></el-input>
</el-form-item>
<el-form-item>
<div style="text-align: center;">
<el-button type="primary" style="width: 100%;" @click="edit('user')">确认修改</el-button>
</div>
</el-form-item>
</el-form>
</div>
</div>
</body>
<script>
new Vue({
el: '#app',
data() {
return {
from: {
pass: '',
editpass:'',
checkpass:''
},
rules: {
pass: [
{required: true, message: '请输入原密码', trigger: 'blur'},
],
editpass: [
{required: true, message: '请输入要修改的密码', trigger: 'blur'},
],
checkpass: [
{required: true, message: '请确认改改的密码', trigger: 'blur'},
],
}
}
},
methods: {
edit(user) {
this.$refs[user].validate((valid) => {
if(valid){
if(this.from.editpass == this.from.checkpass){
const that = this;
axios.post('/xinadmin/edit', this.from,{
headers: {
'token': sessionStorage.getItem("token")
}
}).then(function (res) {
console.log(res)
if (res.data.state == "success") {
that.$message.success('修改成功');
setTimeout(()=>{ //设置延迟执行
location.href = "login.jsp";
},2000);
}else{
that.$message.error("密码错误");
}
}).catch(function (error) {
console.log(error)
})
}else{
this.$message.error("两次密码不一致")
}
}
});
}
}
})
</script>

View File

@ -0,0 +1,196 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>授权中心</title>
<script type="text/javascript" src="themes/js/vue.min.js"></script>
<script type="text/javascript" src="themes/js/index.js"></script>
<script type="text/javascript" src="themes/js/axios.min.js"></script>
<script type="text/javascript" src="themes/js/jquery.js"></script>
<script type="text/javascript" src="themes/js/moment.js"></script>
<link rel="stylesheet" href="themes/css/index.css" type="text/css">
<link rel="stylesheet" href="themes/css/main.css" type="text/css">
</head>
<body>
<div id="app">
<div class="header">
<div class="logo">
<div class="logo-image"></div>
</div>
</div>
<div class="card-main">
<div class="main">
<div class="top">
<div class="labe">授权企业详情</div>
</div>
<div class="company">
<div class="company-det">
<div class="company-lint">
<div class="company-name">
<div class="company-logo">
<img src="http://www.crtech.cn/images/logo.png">
</div>
<div style="margin-left: 20px;">{{single.company.name}}</div>
</div>
<div style="margin: 10px;">
<div class="address">地址:{{single.company.address}}</div>
<div class="des">简介:{{single.company.introduce}}</div>
<div class="des">授权码:<span style="color: green">已生成</span> <span><el-link
type="primary" :underline="false"
style=" font-size: 12px;margin-left: 8px;" @click="dialogCodeVisible = true">查看</el-link></span></div>
<div class="des">授权文件:<span style="color: green">正常</span>
<span>
<el-link type="primary" :underline="false" style=" font-size: 12px;margin-left: 8px;" @click="dialogTableVisible = true">更换授权文件</el-link></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card-main">
<div class="main">
<div class="top">
<div class="labe">{{single.group}}</div>
</div>
<div class="pubg">
<div class="applist">
<div class="app" v-for="(item,i) in single.applist">
<div class="app-det">
<img :src="item.logo ? item.logo : 'themes/img/mk.png'">
</div>
<div class="app-name">{{item.name}}</div>
<div class="app-des">版本:{{item.version}}</div>
<div class="app-license">{{item.grade == 'custom' ? '定制授权' : item.gradeName}}</div>
<div class="app-time" style="color: green" v-if="new Date().getTime() < new Date(item.expiryTime).getTime()"> {{item.expiryTime | dateFilter('YYYY-MM-DD')}}到期</div>
<div v-else style="color: red">已过期</div>
</div>
</div>
</div>
</div>
</div>
<el-dialog title="授权码" :visible.sync="dialogCodeVisible">
<div slot="header" class="clearfix">
<span>本机授权码</span>
<el-button style="float: right; padding: 3px 0;" icon="el-icon-document-copy" @click="copy()" type="text">复制授权码</el-button>
</div>
<div class="demo-input-suffix">
<el-input type="textarea" ref="copy" autosize="true" v-model="single.code" resize="none" readonly="true"></el-input>
</div>
</el-dialog>
<el-dialog title="授权文件修改" :visible.sync="dialogTableVisible">
<div slot="header">
<span>上传授权文件</span>
</div>
<span class="tip"></span>
<div align="center">
<el-upload class="upload-demo" accept enctype="multipart/form-data" drag action="/xinadmin/upload" multiple="false" show-file-list="false"
drag="true" auto-upload="true" limit="1" :on-success="Success">
<i class="el-icon-upload" style="height: 10px;"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">请将您获得的授权文件(LICENSE)传入系统进行校验</div>
</el-upload>
</div>
</el-dialog>
</div>
<script>
Vue.filter("dateFilter", function (date, formatPattern) {
return moment(date).format(formatPattern || "YYYY-MM-DD HH:mm:ss");
});
new Vue({
el: '#app',
data() {
return {
single: {},
dialogCodeVisible: false,
dialogTableVisible: false
}
},
created: function () {
this.checkLogin();
this.singlecode();
},
//绑定方法
methods: {
copy() {
this.$refs.copy.select()
document.execCommand('Copy')
this.$message.success('已复制到剪贴板')
},
singlecode() {
const that = this;
axios.get('/xinadmin/single', {}).then(function (res) {
if (res.data) {
if(res.data.license){
that.single = res.data;
}else{
location.href = "index.jsp"
}
}
}).catch(function (error) {
console.log(error)
})
},
uploadfile() {
this.$refs.upload.submit()
},
checkLogin(){
const token = sessionStorage.getItem("token");
if(token == null){
location.href = "login.jsp"
}else{
const str = new Date().getTime()
if((+token + (2*60*60*1000) < str)){
location.href = "login.jsp"
}
}
},
Success(response, file, fileList) {
if(response.state == "success"){
this.dialogTableVisible = false;
this.$notify({
title: '成功',
duration:2000,
message: '校验通过',
type: 'success'
});
const that = this;
this.$confirm('授权文件已更新,是否立即重启相关应用?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
axios.get('/xinadmin/adminstarter', {}).then(function (res) {
that.$notify({
title: '重启中',
duration:2000,
message: '正在重启相关应用,请稍侯....',
type: 'info'
});
setTimeout(() => {
location.reload();
}, 2000);
}).catch(function (error) {
console.log(error)
})
}).catch(() => {
that.$notify({
title: '警告',
duration:2000,
message: '应用尚未重启,授权尚未生效,请稍后手动重启',
type: 'warning'
});
});
}else{
this.$notify.error({
title: '上传失败',
message: response.error
});
}
}
}
})
</script>
</body>
</html>

View File

@ -0,0 +1,118 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<head>
<meta charset="UTF-8">
<title>授权中心</title>
<script type="text/javascript" src="themes/js/vue.min.js"></script>
<script type="text/javascript" src="themes/js/index.js"></script>
<script type="text/javascript" src="themes/js/axios.min.js"></script>
<script type="text/javascript" src="themes/js/jquery.js"></script>
<script type="text/javascript" src="themes/js/moment.js"></script>
<link rel="stylesheet" href="themes/css/index.css" type="text/css">
<link rel="stylesheet" href="themes/css/main.css" type="text/css">
</head>
<body>
<div id="app">
<div class="header">
<div class="logo">
<div class="logo-image"></div>
</div>
</div>
<div class="no-license">
<el-card class="box-card" shadow="never" style="width:640px;margin: 10px auto 0px auto;">
<div slot="header" class="clearfix">
<span>本机授权码</span>
<el-button style="float: right; padding: 3px 0;" icon="el-icon-document-copy" @click="copy()" type="text">复制授权码</el-button>
</div>
<span class="tip">请联系您的商务经理或客服经理并将下方框体内的本机授权码发送给Ta以获取授权文件</span>
<div class="demo-input-suffix">
<el-input type="textarea" ref="copy" autosize="true" v-model="code" resize="none" readonly="true"></el-input>
</div>
</el-card>
<el-card class="box-card" shadow="never" style="width:640px;margin: 10px auto 0px auto;">
<div slot="header">
<span>上传授权文件</span>
</div>
<span class="tip"></span>
<div align="center">
<el-upload class="upload-demo" accept enctype="multipart/form-data" drag action="/xinadmin/upload" multiple="false" show-file-list="false"
drag="true" auto-upload="true" limit="1" :on-success="Success">
<i class="el-icon-upload" style="height: 10px;"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">请将您获得的授权文件(LICENSE)传入系统进行校验</div>
</el-upload>
</div>
</el-card>
</div>
</div>
<script>
Vue.filter("dateFilter", function (date, formatPattern) {
return moment(date).format(formatPattern || "YYYY-MM-DD HH:mm:ss");
});
new Vue({
el: '#app',
beforeCreate:function(){
const that = this;
axios.get('/xinadmin/code', {}).then(function (res) {
if (res.data) {
if(res.data.license){
location.href = "login.jsp"
}else{
that.code = res.data.code
}
}
}).catch(function (error) {
console.log(error)
})
},
data() {
return {
code: "",
}
},
//绑定方法
methods: {
copy() {
this.$refs.copy.select()
document.execCommand('Copy')
this.$message.success('已复制到剪贴板')
},
uploadfile(){
this.$refs.upload.submit()
},
Success(response, file, fileList) {
if(response.state == "success"){
this.dialogTableVisible = false;
this.$notify({
title: '成功',
duration:2000,
message: '上传成功',
type: 'success'
});
const that = this;
axios.get('/xinadmin/adminstarter', {}).then(function (res) {
that.$notify({
title: '重启中',
duration:2000,
message: '正在重启相关应用,请稍侯....',
type: 'info'
});
setTimeout(() => {
location.reload();
}, 2000);
}).catch(function (error) {
console.log(error)
})
}else{
this.$notify.error({
title: '上传失败',
message: response.error
});
}
}
}
})
</script>
</body>

View File

@ -0,0 +1,184 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<head>
<title>X·in管理端</title>
<script type="text/javascript" src="themes/js/vue.min.js"></script>
<script type="text/javascript" src="themes/js/index.js"></script>
<script type="text/javascript" src="themes/js/axios.min.js"></script>
<script type="text/javascript" src="themes/js/jquery.js"></script>
<script type="text/javascript" src="themes/js/moment.js"></script>
<link rel="stylesheet" href="themes/css/index.css" type="text/css">
</head>
<style>
.header{
height: 60px;
width: 100%;
}
.header .logo{
height: 60px;
width: 260px;
}
.header .logo-image{
height: 100%;
width: 100%;
background-repeat: no-repeat;
background-position: center;
background-size: 90%;
background-image: url('themes/img/xin.png');
}
.el-form{
width: 480px;
margin: auto;
margin-top: 40px;
}
.el-input__inner {
border: 0 !important;
padding: 0;
}
.admin {
display: flex;
align-items: center;
border: 1px solid #DCDFE6;
background-color: #fff;
border-radius: 4px;
height: 40px;
margin-bottom: 20px;
}
.iconinfo {
display: block;
width: 40px;
text-align: center;
font-size: 14px;
font-weight: 600;
color: #999;
height: 40px;
line-height: 40px;
}
#app {
position: absolute;
right: 0;
top: 0;
bottom: 0;
left: 0;
justify-content: center;
align-items: center;
background-color: #f0f2f5;
background-image: url("themes/img/login_bg.svg");
}
.container {
justify-content: center;
align-items: center;
background-color: #f0f2f5;
width: 80%;
margin: 40px auto;
}
.title{
height: 60px;
width: 100%;
text-align: center;
margin-top: 40px;
display: flex;
align-items: center;
justify-content: center;
}
.system {
font-size: 20px;
font-weight: 600;
}
</style>
<body>
<body>
<div id="app">
<div class="header">
<div class="logo">
<div class="logo-image"></div>
</div>
</div>
<div class="container">
<div class="title">
<span class="system">用户登录</span>
</div>
<el-form id="passLogin" ref="user" label-width="80px" @keyup.enter.native="login">
<div class="admin">
<i class="el-icon-user-solid iconinfo"></i>
<el-input v-model="user.name" ref="name" placeholder="请输入用户名" clearable></el-input>
</div>
<div class="admin">
<i class="el-icon-key iconinfo"></i>
<el-input placeholder="请输入密码" ref="pass" v-model="user.pass" type="password" show-password></el-input>
</div>
<div class="remenber">
<el-checkbox-group>
<el-checkbox label="记住密码" name="type"></el-checkbox>
</el-checkbox-group>
<div>
<el-button type="text">忘记密码?</el-button>
</div>
</div>
<div style="text-align: center;">
<el-button type="primary" style="width: 100%;" @click="login">登陆</el-button>
</div>
</el-form>
</div>
</div>
</body>
<script>
new Vue({
el: '#app',
data() {
return {
user: {
name: '',
pass:''
},
}
},
created: function () {
this.checkLogin();
},
methods: {
login() {
if(!this.user.name){
this.$message.error("用户名不能为空");
this.$refs.name.select()
return false;
}else if(this.user.pass == ""){
this.$refs.pass.select()
this.$message.error("密码不能为空");
return false;
}
const that = this;
const data = {
name:this.user.name,
pass:this.user.pass
}
axios.post('/xinadmin/login', data).then(function (res) {
console.log(res.data)
if (res.data.state == "success") {
sessionStorage.setItem("token",res.data.token);
if(res.data.edit == 0){
location.href = "editpass.jsp";
}else{
location.href = "home.jsp";
}
}else{
that.$message.error(res.data.mes);
}
})
},
checkLogin(){
const token = sessionStorage.getItem("token");
const str = new Date().getTime()
if(token){
if((+token + (2*60*60*1000) > str)){
location.href = "home.jsp"
}
}
}
}
})
</script>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,262 @@
body {
margin: 0;
padding: 0;
position: relative;
font-family: "SF Pro Display", Roboto, Noto, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
font-size: 14px;
line-height: 1.57142857;
background-color: #f5f6f7;
color: #333;
min-height: 100%;
}
.header {
height: 60px;
width: 100%;
background-color: #fff;
border-bottom: 1px solid #f2f2f2;
}
.header .logo {
height: 60px;
width: 260px;
}
.header .logo-image {
height: 100%;
width: 100%;
background-repeat: no-repeat;
background-position: center;
background-size: 90%;
background-image: url('../img/xin.png');
}
.pubg {
margin: 10px 20px;
background-color: #fff;
padding: 10px;
}
.pubg .title-box {
padding-bottom: 6px;
border-bottom: 1px solid #f2f2f2;
}
.pubg .title-box .title {
height: 20px;
line-height: 22px;
color: #333;
padding-left: 10px;
border-left: 2px solid #88B7E0;
font-size: 14px;
}
.tip {
height: 30px;
line-height: 30px;
text-align: center;
color: #666;
padding: 10px;
}
.error-tip {
height: 30px;
line-height: 30px;
text-align: center;
color: #d42222;
padding: 10px;
}
.licens-save {
line-height: 60px;
height: 60px;
text-align: center;
}
.list-cell {
border: 0;
background-color: #4d8afd;
color: #fff;
padding: 6px 10px;
border-radius: 4px;
margin-right: 10px;
outline: none;
cursor: pointer;
}
.company-det {
padding: 10px;
margin: 10px 20px 0px 20px;
}
.company-logo {
border-radius: 50%;
width: 40px;
height: 40px;
transform: scale(0.8);
}
.company-lint {
flex: 1;
}
.company-name {
font-size: 17px;
color: #333;
font-weight: 600;
display: flex;
align-items: center;
}
.address {
height: 30px;
line-height: 30px;
color: #666;
font-size: 14px;
}
.des {
color: #666;
font-size: 14px;
line-height: 1.5rem;
}
.applist {
padding: 20px;
display: flex;
flex-wrap: wrap;
}
.app:hover {
box-shadow: 2px 0 8px 0 rgba(29, 35, 41, .05);
}
.app {
flex-direction: column;
border: 1px solid #f2f2f2;
border-radius: 4px;
margin: 14px;
display: flex;
text-align: center;
justify-content: center;
align-items: center;
padding: 20px 40px;
}
.app-det {
width: 60px;
height: 60px;
padding: 2px;
}
.app-det img {
width: 100%;
}
.app-name {
font-family: "微软雅黑";
font-size: 12pt;
color: #666666;
text-decoration: none;
height: 36px;
line-height: 36px;
}
.app-des {
font-family: "微软雅黑";
font-size: 14px;
line-height: 22px;
color: #999999;
}
.app-license {
font-family: "微软雅黑";
font-size: 14px;
line-height: 28px;
color: #084aaf;
}
.app-time {
font-size: 14px;
height: 20px;
line-height: 20px;
color: #666;
text-align: right;
width: 100%;
}
.no-license {
}
.no-license > .block {
background: #fff;
border-radius: 4px;
width: 640px;
margin: 10px auto;
padding: 10px;
}
.el-upload__text {
position: absolute;
width: 100%;
bottom: 20px;
}
.el-upload-list__item-name {
height: 26px;
}
.card-main{
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
width: 96%;
margin: 0 auto;
background: #fff;
border-radius: 4px;
}
.main {
margin: 10px 0px auto;
padding: 10px;
}
.labe {
height: 20px;
line-height: 20px;
font-size: 14px;
font-weight: 600;
border-left: 2px solid #409eff;
padding-left: 10px;
}
.top {
height: 40px;
margin-left: 10px;
display: flex;
align-items: center;
border-bottom: 1px solid #f2f2f2;
}
.look {
color: #999;
font-size: 12px;
border-top: 1px solid #f2f2f2;
bottom: 0;
line-height: 1.5rem;
padding: 20px;
background-color: #fafafa;
word-break: break-all;
}
.code{
height: 40px;
line-height: 40px;
font-size: 14px;
text-align: center;
border-top: 1px solid #f2f2f2;
}
.codetext > .el-textarea textarea{
background-color: #fafafa;
color: #3182bd;
}
.hide{
display: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<Dev-Hosts>
<Context path="/" docBase=""/>
</Dev-Hosts>

View File

@ -0,0 +1,11 @@
#save success
#Thu Dec 17 16:49:58 CST 2020
login.user=admin
maxthreads=200
port=8080
charset=UTF-8
connectiontimeout=60000
login.edit=0
login.pass=96e79218965eb72c92a549dd5a330112
is_dev=1
maxconnections=10000

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.