Vue 로그인 경로 admin 추가
This commit is contained in:
parent
aef25bc3dc
commit
aed1321d88
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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: '',
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue