yjryu / KERIS star
류윤주 류윤주 2023-11-27
231127 이세현 메인 팝업
@852d9870cd48bd008ee0bd0376408db3ab6d4ceb
client/views/pages/user/main/Main.vue
--- client/views/pages/user/main/Main.vue
+++ client/views/pages/user/main/Main.vue
@@ -384,7 +384,8 @@
             noticeList: [],
             noticeListForBanner: [],
             swiper: null,
-            store: useStore()
+            store: useStore(),
+            popupList: []
             // showPopup: true,
             // doNotShow: false,
             // doNotShow: this.checkPopup()
@@ -550,7 +551,24 @@
                 },
                 data: {'user' : vm.store.state.loginUser}
             })
-        }
+        },
+
+        popupSelectList: function () {
+            const vm = this;
+
+            axios({
+                url: '/popup/userPopupList.json',
+                method: 'post',
+                hearder: {
+                    'Content-Type': "application/json; charset=UTF-8",
+                },
+            }).then(function (response) {
+                vm.popupList = response.data;
+                console.log("vm.popupList",vm.popupList)
+            }).catch(function (error) {
+                alert('팝업 목록 조회 오류, 관리자에게 문의하세요.');
+            })
+        },
 
     },
     watch: {
@@ -575,6 +593,7 @@
     },
     mounted() {
         console.log('Main mounted');
+        this.popupSelectList();
         this.postSelectList();
         this.noticeListForMain();
         this.noticeBannerListForMain();
Add a comment
List