yjryu / KERIS star
Stormen123 2023-11-20
231120 메인 공지사항 슬라이드 변경
@dbc9b8e2df5ca406307787d353d009f30a1c28b2
client/views/pages/user/main/Main.vue
--- client/views/pages/user/main/Main.vue
+++ client/views/pages/user/main/Main.vue
@@ -409,19 +409,17 @@
             })
         },
 
-        //배너 부분 공지사항 최신순 2개 출력
+        //배너 부분 공지사항 상단고정 목록
         noticeBannerListForMain: function () {
             const vm = this;
-            let limitCnt = 2;
+
             axios({
-                url: '/post/noticeSelectListForMain.json',
+                url: '/post/noticeBannerListForMain.json',
                 method: 'post',
                 hearder: {
                     'Content-Type': "application/json; charset=UTF-8",
                 },
-                data: {
-                    'limit_cnt': limitCnt,
-                },
+                
             }).then(function (response) {
                 vm.noticeListForBanner = response.data;
             }).catch(function (error) {
@@ -451,7 +449,21 @@
 
         //공지사항 상세조회 페이지로 이동
         noticeSelectOnePage: function (item) {
-            this.$router.push({ path: '/NoticeOne.page', query: { 'post_id': item.post_id, 'file_id': item.file_id } });
+            const vm = this;
+
+            axios({
+                url: '/post/postViewCount.json',
+                method: 'post',
+                hearder: {
+                    'Content-Type': "application/json; charset=UTF-8",
+                },
+                data: { 'post_id': item.post_id, 'bbs_id': item.bbs_id }
+            }).then(function (response) {
+                vm.$router.push({ path: '/NoticeOne.page', query: { 'post_id': item.post_id, 'file_id': item.file_id, 'bbs_id': item.bbs_id } });
+            }).catch(function (error) {
+                console.log(error)
+                alert("공지사항 상세보기 오류, 관리자에게 문의바랍니다.");
+            })
         },
 
     },
Add a comment
List