From 0b86f0390c17ca06758cc436596774e56687a875 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期二, 09 七月 2024 09:03:54 +0800
Subject: [PATCH] #
---
zy-asrs-admin/src/views/login/LoginView.vue | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/zy-asrs-admin/src/views/login/LoginView.vue b/zy-asrs-admin/src/views/login/LoginView.vue
index f981e72..38556fe 100644
--- a/zy-asrs-admin/src/views/login/LoginView.vue
+++ b/zy-asrs-admin/src/views/login/LoginView.vue
@@ -8,6 +8,8 @@
let copyrightLargeShow = ref(false);
let username = ref("");
let password = ref("");
+let hostId = ref(null);
+let hostList = ref([]);
function loginConfirm() {
if (username.value == "" || password.value == "") {
@@ -17,7 +19,8 @@
post('/api/login', {
username: username.value,
- password: password.value
+ password: password.value,
+ hostId: hostId.value,
}).then((result) => {
if (result.data.code == 200) {
let data = result.data.data;
@@ -26,11 +29,31 @@
localStorage.setItem('token', data.accessToken)
localStorage.setItem('user', JSON.stringify(data.user))
message.success('鐧诲綍鎴愬姛')
+ window.location.reload();
} else {
message.error(result.data.msg)
}
})
+}
+
+getHostList()
+function getHostList() {
+ get('/api/auth/host', {}).then((result) => {
+ if (result.data.code == 200) {
+ let data = result.data.data;
+ let tmp = []
+ data.forEach((item) => {
+ tmp.push({
+ label: item.name,
+ value: item.id
+ })
+ })
+ hostList.value = tmp;
+ } else {
+ message.error(result.data.msg)
+ }
+ })
}
</script>
@@ -59,6 +82,11 @@
</p>
<p style="margin-top: -10px;"><span class="login100-form-title p-t-20 p-b-45"
style="color: #868686;font-size: 24px">WMS</span></p>
+
+ <div class="inputContainer">
+ <a-select v-model:value="hostId" style="width: 100%;" :options="hostList"></a-select>
+ </div>
+
<div class="inputContainer">
<svg viewBox="0 0 16 16" fill="#2e2e2e" height="16" width="16"
xmlns="http://www.w3.org/2000/svg" class="inputIcon">
--
Gitblit v1.9.1