From 0c80e5ee4b4ef1059dee3e741e510a9f094bfe15 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Fri, 13 Aug 2021 14:35:23 +0800 Subject: [PATCH] 要等到结果才显示 --- pages/index/index/index.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pages/index/index/index.js b/pages/index/index/index.js index a71d476..9bf77e9 100644 --- a/pages/index/index/index.js +++ b/pages/index/index/index.js @@ -1010,12 +1010,14 @@ Page({ check_holiday_pop:function(){ var th=this; getApp().waitfor2(th,'w_holiday_pop','holiday_image',function(){ - console.log(th.data.holiday_image); - th.setData({ - new_image: th.data.holiday_image, - new_nav: th.data.holiday_url, - is_disgraceful: 1 - }) + //等到结果才显示 + if(th.data.holiday_image){ + th.setData({ + new_image: th.data.holiday_image, + new_nav: th.data.holiday_url, + is_disgraceful: 1 + }) + } }) }, -- libgit2 0.21.4