yjryu / KERIS star
김하영 김하영 2023-12-11
231211김하영 메인 히스토리 오픈및 검색영역 수정
@164db4c8e71c8f538a1c12d9a8c47413e620e35a
client/resources/css/Main.css
--- client/resources/css/Main.css
+++ client/resources/css/Main.css
@@ -395,7 +395,6 @@
 .main-history-wrap h1 {
   text-align: center;
   font-size: 3rem;
-  padding: 5rem;
   font-family: SBaggroM;
   color: #3f87f7;
 }
@@ -983,7 +982,7 @@
 }
 
 .data-btn-wrap {
-  padding: 4rem 0 0 !important;
+  /* padding: 4rem 0 0 !important; */
 }
 
 .data-b {
@@ -1562,9 +1561,14 @@
 
   color: #848484;
 }
-/* .tech-search-box{
-  padding: 3rem 0;
-} */
+.tech-search-box{
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: end;
+}
+.sort-wrap{
+  width: 100%;
+}
 .tech-box-category{
   width: 100%;
   display: grid;
@@ -2988,9 +2992,9 @@
 }
 
 .notice-search {
-  width: 30%;
+  width: 22%;
   display: flex;
-  gap: 1rem;
+  gap: 0.5rem;
 }
 
 .notice-search input:nth-child(2) {
client/views/pages/user/Data/Data.vue
--- client/views/pages/user/Data/Data.vue
+++ client/views/pages/user/Data/Data.vue
@@ -35,7 +35,7 @@
             <div class="data-table">
                 <div class="data-b">
 
-                    <div class="btn-wrap data-btn-wrap">
+                    <div class="btn-wrap  data-btn-wrap " >
                         <div class="data-bos">
 
 
@@ -43,7 +43,7 @@
 
                                 <p class="category">자료집> <span>{{ categoryName }}</span></p>
                             </div>
-                            <div class="data-wrap-search">
+                            <div class="tech-search-box">
                                 <select v-model="postListSearch.searchType" name="data-table-sild" id="data-table-sild"
                                     class="data-table-search">
                                     <option v-for="(item, idx) in option" :key="idx" :value=item.value>
client/views/pages/user/Data/Technology.vue
--- client/views/pages/user/Data/Technology.vue
+++ client/views/pages/user/Data/Technology.vue
@@ -41,9 +41,9 @@
                     </div>
 
 
-                    <div class="tech-search-box">
+                   
 
-                        <div class="data-wrap-search">
+                        <div class="btn-wrap  data-btn-wrap" style="padding: 0px;">
                             <select v-model="postListSearch.searchType" name="data-table-sild" id="data-table-sild"
                                 class="data-table-search">
                                 <option v-for="(item, idx) in option" :key="idx" :value=item.value>
@@ -57,7 +57,7 @@
                                     @click="postSelectList()">
                             </div>
                         </div>
-                    </div>
+                    
                 </div>
                 <!-- 최신순 조회순 -->
                 <div class="sort-wrap">
 
client/views/pages/user/login/Login copy.vue (added)
+++ client/views/pages/user/login/Login copy.vue
@@ -0,0 +1,183 @@
+<template>
+    <div class="w1400">
+        <div class=" login-sec">
+            <section class="login-logo">
+                <div class="login-logo-d">
+                    <h1>AI 디지털교과서 통합지원센터</h1>
+                </div>
+            </section>
+
+            <section class="login-input">
+                <div class="login-input-d">
+                    <div class="ID">
+                        <input type="text" class="id" ref="user_id" placeholder="아이디를 입력하세요." v-model="userLogin.user_id"
+                            @keyup.enter="login">
+                    </div>
+                    <div class="PW">
+                        <input type="password" class="password" ref="user_pw" placeholder="비밀번호를 입력하세요."
+                            v-model="userLogin.user_pw" @keyup.enter="login">
+                    </div>
+                </div>
+            </section>
+
+             <section class="login-checkbox">
+                <div class="login-checkbox-i">
+                    <input type="checkbox">
+                    <span>
+                        로그인상태 유지
+                    </span>
+                </div>
+                <div class="login-checkbox-b">
+
+                    <router-link :to="{ path: '/userIDsearch.page', query: { mode: 'id' } }">
+                        <button class="login-bu-after">아이디 찾기</button>
+                    </router-link>
+                    <router-link :to="{ path: '/userIDsearch.page', query: { mode: 'pw' } }">
+                        <button class="login-bu-after">비밀번호찾기</button>
+                    </router-link>
+            <router-link to="/Join.page">
+                <button>회원가입</button>
+            </router-link>
+        </div>
+        </section>
+
+            <div class="flex " style="margin: 1.5rem 0.5rem ;">
+                <div class="login-checkbox-i">
+                    <input type="checkbox">
+                    <span>
+                        로그인상태 유지
+                    </span>
+                </div>
+                <router-link to="/Join.page">
+                    <button style="background-color: rgba(255, 228, 196, 0);">회원가입</button>
+                </router-link>
+
+            </div>
+            <section class="login-button">
+                <button @click="login">로그인</button>
+            </section>
+        </div>
+    </div>
+
+
+    <!-- 로그인 모달  회원가입 승인중일때 노출-->
+
+    <div class="modal-wrapper" v-if="isVisible">
+        <div class="modal-container">
+            <div class="login-modal">
+                <p  class="modal-text">
+                    가입 승인 중인 회원입니다.<br />
+                    회원가입 승인 전까지 특정 서비스는 이용하실 수 없으며,<br />
+                    승인 이후 모든 서비스를 이용하실 수 있습니다.
+                </p>
+                <button class="blue-btn small-btn" @click="hideDiv">확인</button>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import axios from 'axios';
+import crypto from "crypto-js";
+import { useStore } from 'vuex';
+export default {
+    data() {
+        return {
+            isVisible: false,
+            userLogin: {
+                user_id: null,
+                user_pw: null
+            },
+            store: useStore(),
+            isVisible: false,
+        };
+    },
+    methods: {
+        hideDiv() {
+            this.isVisible = false;
+        },
+        closeOnEnter(e) {
+            if (e.key === 'Enter' && this.isVisible) {
+                this.hideDiv();
+            }
+        },
+        //아스크 변환
+        asc: function (data) {
+            let ascii = '';
+            for (let i = 0; i < data.length; i++) {
+                ascii += data.charCodeAt(i);
+            }
+            console.log('ascii', ascii)
+            return ascii
+        },
+        //로그인
+        login: function () {
+            let vm = this;
+            //Encrypt
+            // let iv = this.store.state.key.iv;
+            // var salt = this.store.state.key.salt;
+            // var passPhrase = this.store.state.key.ENC_KEY;
+            // console.log('this.asc(iv)   -   ', this.asc(iv));
+            // console.log('this.asc(salt)   -   ', this.asc(salt));
+            // console.log('this.asc(passPhrase)   -   ', this.asc(passPhrase));
+            // var keySize = 128;
+            // var iterationCount = 1000;
+            // var key128Bits100Iterations = crypto.PBKDF2(passPhrase, crypto.enc.Hex.parse(salt), { keySize: keySize / 32, iterations: iterationCount });
+
+            // var encrypted = CryptoJS.AES.encrypt(
+            // this.userLogin.user_id = crypto.AES.encrypt(this.userLogin.user_id, key128Bits100Iterations, { iv: crypto.enc.Hex.parse(iv) }).toString();
+            // this.userLogin.user_pw = crypto.AES.encrypt(this.userLogin.user_pw, key128Bits100Iterations, { iv: crypto.enc.Hex.parse(iv) }).toString();
+
+            // let encryptedUserId = crypto.AES.encrypt(this.userLogin.user_id, key128Bits100Iterations, { iv: crypto.enc.Hex.parse(iv) }).toString();
+            // let encryptedUserPw = crypto.AES.encrypt(this.userLogin.user_pw, key128Bits100Iterations, { iv: crypto.enc.Hex.parse(iv) }).toString();
+
+            // var loginData = {
+            //     user_id: encryptedUserId,
+            //     user_pw: encryptedUserPw
+            // };
+            axios({
+                url: '/user/login.json',
+                method: 'post',
+                headers: {
+                    'Content-Type': 'application/json; charset=UTF-8'
+                },
+                // data: vm.userLogin
+                data: vm.userLogin
+            }).then(function (response) {
+                // console.log("login - response : ", response);
+                if (response.data.isLoginSuccess == true) {
+                    if (response.data.create_account_approval === 'N') {
+                        vm.$refs['user_pw'].blur();
+                        vm.isVisible = true;
+                    } else {
+                        vm.$router.push({ path: '/', query: {} });
+                    }
+
+                } else {
+                    alert('로그인 정보를 다시 확인해주세요.');
+                    vm.$refs['user_id'].focus();
+                }
+            }).catch(function (error) {
+                console.log("login - error : ", error);
+            });
+        },
+
+        hideDiv: function () {
+            this.isVisible = false;
+            this.$router.push({ path: '/', query: {} });
+        },
+    },
+    watch: {},
+    computed: {},
+    mounted() {
+        console.log("login mounted");
+        window.addEventListener('keyup', this.closeOnEnter);
+    },
+    beforeDestroy() {
+        window.removeEventListener('keyup', this.closeOnEnter);
+    },
+};
+
+</script>
+
+
client/views/pages/user/login/Login.vue
--- client/views/pages/user/login/Login.vue
+++ client/views/pages/user/login/Login.vue
@@ -20,7 +20,7 @@
                 </div>
             </section>
 
-            <!-- <section class="login-checkbox">
+             <section class="login-checkbox">
                 <div class="login-checkbox-i">
                     <input type="checkbox">
                     <span>
@@ -39,7 +39,7 @@
                 <button>회원가입</button>
             </router-link>
         </div>
-        </section> -->
+        </section>
 
             <div class="flex " style="margin: 1.5rem 0.5rem ;">
                 <div class="login-checkbox-i">
client/views/pages/user/main/Main.vue
--- client/views/pages/user/main/Main.vue
+++ client/views/pages/user/main/Main.vue
@@ -163,12 +163,12 @@
             </div>
 
         </section>
-        <!-- <section class="main-sec sec1">
+        <section class="main-sec sec1">
 
-            <div class=" flex"> -->
+            <div class=" flex">
         <!-- 히스토리 -->
 
-        <!-- <div class="main-history">
+        <div class="main-history">
                     <div class="w1400">
                         <div class="main-history-wrap">
                             <h1>History</h1>
@@ -210,7 +210,7 @@
 
             </div>
 
-        </section> -->
+        </section>
 
 
         <section class="main-sec sec1">
Add a comment
List