diff --git a/main.js b/main.js index 6022a4f..57b28a4 100644 --- a/main.js +++ b/main.js @@ -4,7 +4,7 @@ import VueLazyload from 'vue-lazyload' // 添加插件配置 Vue.use(VueLazyload, { - loading: './static/home/loaddata.gif', // 图片加载过程中显示的占位图 + loading: '', // 图片加载过程中显示的占位图 error: '/static/home/shibai.png', // 图片加载失败时显示的占位图 attempt: 3 // 尝试加载次数 }) diff --git a/pages/home/home.vue b/pages/home/home.vue index 501e0bd..323a968 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -11,12 +11,15 @@ 公告: @@ -38,7 +41,10 @@ - + + + + @@ -255,7 +261,8 @@ ] }, // 1#endif - showSkeleton: true + showSkeleton: true, + showimg:true } }, components: { @@ -328,9 +335,15 @@ if(this.valueType=="面值"){ data = {}; } + if(this.typeGoodsList.length==0){ + this.showimg = true + } API.getGoodsList(data, res=>{ // console.log(res); - this.typeGoodsList = res.data; + this.typeGoodsList = res.data; + setTimeout(()=>{ + this.showimg = false + },300) }) }, /* */ @@ -455,7 +468,7 @@ API.getRotationChart({ page:1, limit: 10 }, res=>{ - this.bannerList = res.data.list; + this.bannerList = res.data.list; // console.log(res.data,11111); }) }, @@ -610,6 +623,29 @@