2 Commits c63b22ff39 ... deeffde919

Tác giả SHA1 Thông báo Ngày
  linwei deeffde919 修改轮播图被禁用无法加载数据 1 năm trước cách đây
  linwei 8129e7077e 修改轮播图被禁用 无法加载数据bug 1 năm trước cách đây

+ 28 - 0
.gitignore

@@ -0,0 +1,28 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+.DS_Store
+dist
+dist-ssr
+coverage
+*.local
+
+/cypress/videos/
+/cypress/screenshots/
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?

+ 1 - 1
src/components/ProductServices/ProductServicesMain.vue

@@ -85,7 +85,7 @@ onMounted(async() => {
     if (res2?.data?.rows) {
         let List = []
         res2.data.rows.forEach(item =>{
-            if (item?.carouselUrlList[0]) {
+            if (item?.carouselUrlList && item?.carouselUrlList[0]) {
                 List.push(item?.carouselUrlList[0])
             }
         })

+ 5 - 4
src/views/components/indexComponent.vue

@@ -11,7 +11,7 @@
 import {onMounted,ref,reactive,watch} from 'vue'
 import indexMain from '@/components/index/indexMain.vue'
 import CustomCarousel from '@/components/index/custom-carousel.vue'
-
+import {isElView} from '@/views/util/util.js'
 import {getCarouselList} from '@/http/api/common.js'
 // const props = defineProps({
 //     RouterViewTop: {
@@ -39,13 +39,14 @@ onMounted(async() => {
     if (res?.data?.rows) {
         let List = []
         res.data.rows.forEach(item =>{
-            if (item?.carouselUrlList[0]) {
+            if (item?.carouselUrlList && item?.carouselUrlList[0]) {
                 List.push(item?.carouselUrlList[0])
             }
         })
-
         carouselList.value = List
-        console.log(List);
+        
+        //获取轮播图后 自动刷新一次组件dom
+        isElView()
     }
 });
 const carouselList = ref([])