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 {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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue