Showing
1 changed file
with
13 additions
and
11 deletions
| @@ -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,17 +176,19 @@ struct LaunchAdvertisingPage { | @@ -176,17 +176,19 @@ 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[0].matInfo.openType == '2') { | ||
| 180 | - //端外打开 | 179 | + if(this.model.launchAdInfo.length){ |
| 180 | + if (this.model.launchAdInfo[0].matInfo.openType == '2') { | ||
| 181 | + //端外打开 | ||
| 181 | 182 | ||
| 182 | - ProcessUtils.jumpExternalWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) | ||
| 183 | - clearInterval(this.timer) | 183 | + ProcessUtils.jumpExternalWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) |
| 184 | + clearInterval(this.timer) | ||
| 184 | 185 | ||
| 185 | - }else { | ||
| 186 | - //端内打开 | ||
| 187 | - ProcessUtils.gotoDefaultWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) | ||
| 188 | - clearInterval(this.timer) | 186 | + }else { |
| 187 | + //端内打开 | ||
| 188 | + ProcessUtils.gotoDefaultWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) | ||
| 189 | + clearInterval(this.timer) | ||
| 189 | 190 | ||
| 191 | + } | ||
| 190 | } | 192 | } |
| 191 | } | 193 | } |
| 192 | 194 |
-
Please register or login to post a comment