feat: base login页添加获取系统信息

This commit is contained in:
caoqianming 2025-11-03 13:47:49 +08:00
parent 5ef2098852
commit 27d6fb9e2f
1 changed files with 6 additions and 1 deletions

View File

@ -28,7 +28,7 @@
</div>
</template>
<script setup>
import { ref } from 'vue';
import { ref, onMounted } from 'vue';
import router from '@/router';
import { authToken, systemInfo, userInfo } from '@/store/index.js'
import { MessagePlugin } from "tdesign-vue-next"
@ -39,6 +39,11 @@ const formData = ref({
password: "",
});
const submitLoading = ref(false);
onMounted(() => {
http.get("/system_info/").then(res=>{
Object.assign(systemInfo, res)
})
})
const handleLogin = () => {
submitLoading.value = true;
http.post("/login/", formData.value).then(res=>{