Vue 로그인 경로 admin 추가

This commit is contained in:
이진기 2024-11-19 15:51:49 +09:00
parent aef25bc3dc
commit aed1321d88
6 changed files with 5 additions and 42 deletions

View File

@ -1,37 +0,0 @@
<!-- DateSearch.vue -->
<template>
<div>
<label for="start-date">시작 날짜:</label>
<input type="date" v-model="startDate" id="start-date" />
<label for="end-date">종료 날짜:</label>
<input type="date" v-model="endDate" id="end-date" />
<button @click="searchData">검색</button>
</div>
</template>
<script setup>
import { ref, onMounted, defineEmits } from 'vue';
const startDate = ref('');
const endDate = ref('');
const emit = defineEmits(['search']);
const searchData = () => {
emit('search', { startDate: startDate.value, endDate: endDate.value });
};
const today = new Date();
const tomorrow = new Date();
tomorrow.setDate(today.getDate() + 1);
startDate.value = formatDate(today);
endDate.value = formatDate(tomorrow);
function formatDate(date) {
return date.toISOString().split('T')[0];
}
</script>
<style scoped>
/* 필요한 스타일 */
</style>

View File

@ -10,7 +10,7 @@ import { LogoutOutlined } from '@ant-design/icons-vue';
</a-button>
</a-col>
<router-link to="/login" style="color: #1890ff">
<router-link to="/admin/login" style="color: #1890ff">
로그아웃
</router-link>

View File

@ -1,12 +1,12 @@
import type { LoginReqType, LoginResType } from '~/types/login';
import type { LoginRequestType, LoginResponseType } from '~/types/login';
export const DEFAULT_AUTHENTICATION_VALUE: LoginReqType = {
export const DEFAULT_AUTHENTICATION_VALUE: LoginRequestType = {
memberId: '',
password: '',
remember: false
};
export const DEFAULT_AUTHORIZATION_VALUE: LoginResType = {
export const DEFAULT_AUTHORIZATION_VALUE: LoginResponseType = {
memberName: '',
deptNm: '',
instNm: '',

View File

@ -16,7 +16,7 @@ export const useAuthStore = defineStore('authStore', () => {
);
const LoginAPI = async () => {
return await useAxios().post(`/api/login`, loginRequest.value);
return await useAxios().post(`/api/admin/login`, loginRequest.value);
};
return {