feat: base login页添加获取系统信息
This commit is contained in:
parent
5ef2098852
commit
27d6fb9e2f
|
|
@ -28,7 +28,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import router from '@/router';
|
import router from '@/router';
|
||||||
import { authToken, systemInfo, userInfo } from '@/store/index.js'
|
import { authToken, systemInfo, userInfo } from '@/store/index.js'
|
||||||
import { MessagePlugin } from "tdesign-vue-next"
|
import { MessagePlugin } from "tdesign-vue-next"
|
||||||
|
|
@ -39,6 +39,11 @@ const formData = ref({
|
||||||
password: "",
|
password: "",
|
||||||
});
|
});
|
||||||
const submitLoading = ref(false);
|
const submitLoading = ref(false);
|
||||||
|
onMounted(() => {
|
||||||
|
http.get("/system_info/").then(res=>{
|
||||||
|
Object.assign(systemInfo, res)
|
||||||
|
})
|
||||||
|
})
|
||||||
const handleLogin = () => {
|
const handleLogin = () => {
|
||||||
submitLoading.value = true;
|
submitLoading.value = true;
|
||||||
http.post("/login/", formData.value).then(res=>{
|
http.post("/login/", formData.value).then(res=>{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue