This commit is contained in:
LiJianZhao 2025-05-27 17:05:31 +08:00
parent e51828fc98
commit dcbb44bd80
1 changed files with 4 additions and 3 deletions

View File

@ -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()