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 {ElMessage} from "element-plus";
import {formatDate} from "@/utils/dateUtils.ts";
import {API} from "@/assets/config/API.ts";
const decryptedText = ref<any>({})
const ciphertext = ref<any>('')
const save = () => {
if (ciphertext.value) {
post("common/auth/set", {ciphertext: ciphertext.value}).then(() => {
post(API.Common.Auth.Set, {ciphertext: ciphertext.value}).then(() => {
ElMessage.success("保存成功")
init()
})
}
}
const init = async () => {
ciphertext.value=await post("common/auth/get");
decryptedText.value=await post("common/auth/check");
ciphertext.value=await post(API.Common.Auth.Get);
decryptedText.value=await post(API.Common.Auth.Check);
}
onMounted(async () => {
await init()