yanlu

fix:17433 无网络时-进入电子报,不该展示分享按钮

@@ -148,18 +148,19 @@ export struct ENewspaperPageComponent { @@ -148,18 +148,19 @@ export struct ENewspaperPageComponent {
148 this.calendarDialogController.close() 148 this.calendarDialogController.close()
149 } 149 }
150 }) 150 })
151 -  
152 - Image($r('app.media.icon_share'))  
153 - .height($r('app.float.top_arrow_size'))  
154 - .width($r('app.float.top_arrow_size'))  
155 - .alignRules({  
156 - right: { anchor: "__container__", align: HorizontalAlign.End },  
157 - center: { anchor: "__container__", align: VerticalAlign.Center }  
158 - })  
159 - .id('e_newspaper_share')  
160 - .onClick(() => {  
161 - ToastUtils.showToast('分享为公共方法,待开发', 1000);  
162 - }) 151 + if (this.newspaperListBean && this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
  152 + Image($r('app.media.icon_share'))
  153 + .height($r('app.float.top_arrow_size'))
  154 + .width($r('app.float.top_arrow_size'))
  155 + .alignRules({
  156 + right: { anchor: "__container__", align: HorizontalAlign.End },
  157 + center: { anchor: "__container__", align: VerticalAlign.Center }
  158 + })
  159 + .id('e_newspaper_share')
  160 + .onClick(() => {
  161 + ToastUtils.showToast('分享为公共方法,待开发', 1000);
  162 + })
  163 + }
163 } 164 }
164 .margin({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') }) 165 .margin({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') })
165 .height($r('app.float.top_bar_height')) 166 .height($r('app.float.top_bar_height'))