yuanfeiyang02

feat:启动广告页增加数据空判断

@@ -60,7 +60,7 @@ struct LaunchAdvertisingPage { @@ -60,7 +60,7 @@ struct LaunchAdvertisingPage {
60 60
61 Stack({alignContent:Alignment.Bottom}){ 61 Stack({alignContent:Alignment.Bottom}){
62 Column(){ 62 Column(){
63 - if(!(this.model.launchAdInfo[0].matInfo.matType == '1')){ 63 + if(this.model.launchAdInfo.length && !(this.model.launchAdInfo[0].matInfo.matType == '1')){
64 //显示图片 64 //显示图片
65 Image(this.model.launchAdInfo[0].matInfo.matImageUrl[0]) 65 Image(this.model.launchAdInfo[0].matInfo.matImageUrl[0])
66 .width('100%') 66 .width('100%')
@@ -100,7 +100,7 @@ struct LaunchAdvertisingPage { @@ -100,7 +100,7 @@ struct LaunchAdvertisingPage {
100 } 100 }
101 .width('100%') 101 .width('100%')
102 .height('100%') 102 .height('100%')
103 - if(!(this.model.launchAdInfo[0].matInfo.startStyle == 1)){ 103 + if(this.model.launchAdInfo.length && !(this.model.launchAdInfo[0].matInfo.startStyle == 1)){
104 //底部logo样式 按钮加载在背景展示图上 104 //底部logo样式 按钮加载在背景展示图上
105 Button(){ 105 Button(){
106 Row(){ 106 Row(){
@@ -133,7 +133,7 @@ struct LaunchAdvertisingPage { @@ -133,7 +133,7 @@ struct LaunchAdvertisingPage {
133 .height('84%') 133 .height('84%')
134 .margin({top:'0'}) 134 .margin({top:'0'})
135 135
136 - if(this.model.launchAdInfo[0].matInfo.startStyle == 1){ 136 + if(this.model.launchAdInfo.length && this.model.launchAdInfo[0].matInfo.startStyle == 1){
137 //全屏样式,底部无logo 按钮放在原底部logo位置 137 //全屏样式,底部无logo 按钮放在原底部logo位置
138 Button(){ 138 Button(){
139 Row(){ 139 Row(){
@@ -176,6 +176,7 @@ struct LaunchAdvertisingPage { @@ -176,6 +176,7 @@ struct LaunchAdvertisingPage {
176 action(){ 176 action(){
177 //跳转 url linkUrl https://news.bjd.com.cn/2024/03/19/10724331.shtml 177 //跳转 url linkUrl https://news.bjd.com.cn/2024/03/19/10724331.shtml
178 // openType 端外 端内 打开 178 // openType 端外 端内 打开
  179 + if(this.model.launchAdInfo.length){
179 if (this.model.launchAdInfo[0].matInfo.openType == '2') { 180 if (this.model.launchAdInfo[0].matInfo.openType == '2') {
180 //端外打开 181 //端外打开
181 182
@@ -189,6 +190,7 @@ struct LaunchAdvertisingPage { @@ -189,6 +190,7 @@ struct LaunchAdvertisingPage {
189 190
190 } 191 }
191 } 192 }
  193 + }
192 194
193 195
194 196