dev
This commit is contained in:
parent
e51828fc98
commit
dcbb44bd80
|
|
@ -47,20 +47,21 @@ import {post} from "@/utils/request.ts";
|
||||||
import {onMounted, ref} from "vue";
|
import {onMounted, ref} from "vue";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import {formatDate} from "@/utils/dateUtils.ts";
|
import {formatDate} from "@/utils/dateUtils.ts";
|
||||||
|
import {API} from "@/assets/config/API.ts";
|
||||||
|
|
||||||
const decryptedText = ref<any>({})
|
const decryptedText = ref<any>({})
|
||||||
const ciphertext = ref<any>('')
|
const ciphertext = ref<any>('')
|
||||||
const save = () => {
|
const save = () => {
|
||||||
if (ciphertext.value) {
|
if (ciphertext.value) {
|
||||||
post("common/auth/set", {ciphertext: ciphertext.value}).then(() => {
|
post(API.Common.Auth.Set, {ciphertext: ciphertext.value}).then(() => {
|
||||||
ElMessage.success("保存成功")
|
ElMessage.success("保存成功")
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
ciphertext.value=await post("common/auth/get");
|
ciphertext.value=await post(API.Common.Auth.Get);
|
||||||
decryptedText.value=await post("common/auth/check");
|
decryptedText.value=await post(API.Common.Auth.Check);
|
||||||
}
|
}
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await init()
|
await init()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue