diff --git a/src/components/manger/Auth.vue b/src/components/manger/Auth.vue index 479d51c..fe100c1 100644 --- a/src/components/manger/Auth.vue +++ b/src/components/manger/Auth.vue @@ -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({}) const ciphertext = ref('') 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()