From 46bf231a3fd4bb60efe68285cae2b97bd489618c Mon Sep 17 00:00:00 2001 From: liaoxinyu Date: Mon, 27 Nov 2023 16:43:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=A0=E8=BD=BD=E5=9B=BE?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 2 +- pages/home/home.vue | 49 ++++++++++++++++++++++++++++++++++----- static/home/loaddata.gif | Bin 36010 -> 0 bytes 3 files changed, 44 insertions(+), 7 deletions(-) delete mode 100644 static/home/loaddata.gif 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 @@