commit
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -47,7 +47,7 @@ class PDFMenu extends BtnMenu {
|
||||
</a>`
|
||||
_this.editor.txt.html(html)
|
||||
} else {
|
||||
alert(response.data.msg + ',上传pdf失败,请联系管理员!')
|
||||
alert(response.data.msg + ',上传pdf失败,请联系管理员!')
|
||||
_this.clearInputFile()
|
||||
}
|
||||
}).catch(error => {
|
||||
@@ -60,7 +60,9 @@ class PDFMenu extends BtnMenu {
|
||||
|
||||
clearInputFile() {
|
||||
const obj = document.getElementById('fileInput');
|
||||
obj.outerHTML = obj.outerHTML
|
||||
if(obj) {
|
||||
obj.outerHTML = obj.outerHTML
|
||||
}
|
||||
}
|
||||
|
||||
tryChangeActive() {
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/common.css" />
|
||||
|
||||
<!-- import Jquery -->
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery-high.min.js"></script>
|
||||
<!-- pjax是异步加载html片段的工具,模拟前端路由机制 -->
|
||||
<script src="${base!}/assets/platform/plugins/pjax/jquery.pjax.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/pjax/jquery.pjax-high.min.js"></script>
|
||||
<!-- nprogress 配合pjax使用 -->
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/nprogress/nprogress.css" />
|
||||
<script src="${base!}/assets/platform/plugins/nprogress/nprogress.js"></script>
|
||||
@@ -71,7 +71,7 @@
|
||||
<script src="https://vxeui.com/umd/xe-utils@3.5.30/dist/xe-utils.umd.min.js"></script>
|
||||
<script src="https://vxeui.com/umd/vxe-pc-ui@3.1.25/lib/index.umd.min.js"></script>
|
||||
<script src="https://vxeui.com/umd/vxe-table@3.9.0/lib/index.umd.min.js"></script>
|
||||
|
||||
l
|
||||
<!-- 引入 form-create 和 designer -->
|
||||
<script src="${base!}/assets/platform/plugins/form-create/form-create.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/form-create/index.umd.js"></script>
|
||||
@@ -92,6 +92,28 @@
|
||||
<script src="${base!}/assets/platform/js/util/autoShowError.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/fullcalendar/fullcalendar.min.js"></script>
|
||||
|
||||
<script>
|
||||
// 安全地冻结 Object.prototype(跳过不可配置属性)
|
||||
(function () {
|
||||
const badKeys = ['__proto__', 'constructor', 'prototype'];
|
||||
for (const key of badKeys) {
|
||||
if (key in Object.prototype) {
|
||||
try {
|
||||
delete Object.prototype[key];
|
||||
} catch (e) {
|
||||
// 忽略无法删除的属性(如 __proto__ 在现代浏览器中不可删除)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 冻结 Object.prototype(如果可能)
|
||||
try {
|
||||
Object.freeze(Object.prototype);
|
||||
} catch (e) {
|
||||
// 忽略错误(某些环境可能不允许)
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
window._AMapSecurityConfig = {
|
||||
securityJsCode: "4fa1e1aeabba7eb9518129cf57ab17c1"
|
||||
@@ -647,7 +669,7 @@
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
<div style="height: 64px"></div>
|
||||
<div style="height: 45px"></div>
|
||||
|
||||
<main class="v4-content">
|
||||
<!-- 页面内容区域 -->
|
||||
|
||||
@@ -92,11 +92,35 @@
|
||||
<!-- import axios -->
|
||||
<script src="${base!}/assets/platform/plugins/axios/axios.js"></script>
|
||||
<!-- import Jquery -->
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery-high.min.js"></script>
|
||||
<!-- import SM2 -->
|
||||
<script src="${base!}/assets/platform/plugins/sm-crypto/sm2.js"></script>
|
||||
<!-- import commonUtil -->
|
||||
<script src="${base!}/assets/platform/js/util/commonUtil.js"></script>
|
||||
<!-- import jsencrypt-->
|
||||
<script src="${base!}/assets/platform/plugins/jsencrypt/jsencrypt.min.js"></script>
|
||||
<script>
|
||||
// 安全地冻结 Object.prototype(跳过不可配置属性)
|
||||
(function () {
|
||||
const badKeys = ['__proto__', 'constructor', 'prototype'];
|
||||
for (const key of badKeys) {
|
||||
if (key in Object.prototype) {
|
||||
try {
|
||||
delete Object.prototype[key];
|
||||
} catch (e) {
|
||||
// 忽略无法删除的属性(如 __proto__ 在现代浏览器中不可删除)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 冻结 Object.prototype(如果可能)
|
||||
try {
|
||||
Object.freeze(Object.prototype);
|
||||
} catch (e) {
|
||||
// 忽略错误(某些环境可能不允许)
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#app",
|
||||
@@ -114,7 +138,11 @@
|
||||
password: [{ required: true, trigger: ["blur", "change"], message: "密码不能为空" }],
|
||||
platformCaptcha: [{ required: true, trigger: ["blur", "change"], message: "验证码不能为空" }]
|
||||
},
|
||||
loading: false
|
||||
loading: false,
|
||||
rasParams: {
|
||||
publicKey: '',
|
||||
keyId: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -127,13 +155,20 @@
|
||||
})
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
this.$refs.loginForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
const { publicKey, keyId } = this.rasParams
|
||||
// 加密密码
|
||||
const encrypt = new JSEncrypt()
|
||||
encrypt.setPublicKey(publicKey)
|
||||
const encryptedPassword = encrypt.encrypt(this.loginForm.password)
|
||||
axios
|
||||
.post("/platform/login/doLogin", null, {
|
||||
params: {
|
||||
...this.loginForm,
|
||||
password: window.btoa(this.loginForm.password)
|
||||
//password: window.btoa(this.loginForm.password)
|
||||
password: encryptedPassword,
|
||||
keyId: keyId
|
||||
}
|
||||
})
|
||||
.then((resp) => {
|
||||
@@ -160,9 +195,16 @@
|
||||
console.log("cccccc")
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 获取公钥
|
||||
fetchPublicKey() {
|
||||
axios.get("/platform/login/publicKey").then(res => {
|
||||
this.rasParams = res.data.data
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.fetchPublicKey()
|
||||
this.getCode()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user