flat:暂存

This commit is contained in:
Apcallover
2024-03-20 14:28:28 +08:00
parent 7c9ff78e7e
commit 7829cf6b19
2 changed files with 9 additions and 10 deletions

View File

@@ -91,16 +91,6 @@
</div>
</div>
</div>
<script>
if(location.href.indexOf('?') !== -1) {
const obj = {}
const query = location.href.split('?')[1].replace(/\?/, '').split('&')
query.forEach((item) => { const a = item.split('='); obj[a[0]] = a[1]})
window.sessionStorage.setItem('query_session', JSON.stringify(obj))
} else {
window.sessionStorage.removeItem('query_session')
}
</script>
<script src="<%= BASE_URL %>cdn/tinymce5.6.2/tinymce.min.js"></script>
<!-- built files will be auto injected -->
<script src="<%= BASE_URL %>util/aes.js" charset="utf-8"></script>

View File

@@ -55,6 +55,14 @@ import topLang from "@/page/index/top/top-lang";
// import { info } from "@/api/system/tenant";
import { getCaptcha } from "@/api/user";
if(location.href.indexOf('?') !== -1) {
const obj = {}
const query = location.href.split('?')[1].replace(/\?/, '').split('&')
query.forEach((item) => { const a = item.split('='); obj[a[0]] = a[1]})
window.sessionStorage.setItem('query_session', JSON.stringify(obj))
} else {
window.sessionStorage.removeItem('query_session')
}
export default {
name: "login",
@@ -101,6 +109,7 @@ export default {
created () {
// this.getTenant();
const {username, password } = JSON.parse(window.sessionStorage.getItem('query_session'))
window.sessionStorage.removeItem('query_session')
if(username && password) {
this.proLoading = true
this.loginForm.username = username