yuanfeiyang02

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

... ... @@ -60,7 +60,7 @@ struct LaunchAdvertisingPage {
Stack({alignContent:Alignment.Bottom}){
Column(){
if(!(this.model.launchAdInfo[0].matInfo.matType == '1')){
if(this.model.launchAdInfo.length && !(this.model.launchAdInfo[0].matInfo.matType == '1')){
//显示图片
Image(this.model.launchAdInfo[0].matInfo.matImageUrl[0])
.width('100%')
... ... @@ -100,7 +100,7 @@ struct LaunchAdvertisingPage {
}
.width('100%')
.height('100%')
if(!(this.model.launchAdInfo[0].matInfo.startStyle == 1)){
if(this.model.launchAdInfo.length && !(this.model.launchAdInfo[0].matInfo.startStyle == 1)){
//底部logo样式 按钮加载在背景展示图上
Button(){
Row(){
... ... @@ -133,7 +133,7 @@ struct LaunchAdvertisingPage {
.height('84%')
.margin({top:'0'})
if(this.model.launchAdInfo[0].matInfo.startStyle == 1){
if(this.model.launchAdInfo.length && this.model.launchAdInfo[0].matInfo.startStyle == 1){
//全屏样式,底部无logo 按钮放在原底部logo位置
Button(){
Row(){
... ... @@ -176,17 +176,19 @@ struct LaunchAdvertisingPage {
action(){
//跳转 url linkUrl https://news.bjd.com.cn/2024/03/19/10724331.shtml
// openType 端外 端内 打开
if (this.model.launchAdInfo[0].matInfo.openType == '2') {
//端外打开
if(this.model.launchAdInfo.length){
if (this.model.launchAdInfo[0].matInfo.openType == '2') {
//端外打开
ProcessUtils.jumpExternalWebPage(this.model.launchAdInfo[0].matInfo.linkUrl)
clearInterval(this.timer)
ProcessUtils.jumpExternalWebPage(this.model.launchAdInfo[0].matInfo.linkUrl)
clearInterval(this.timer)
}else {
//端内打开
ProcessUtils.gotoDefaultWebPage(this.model.launchAdInfo[0].matInfo.linkUrl)
clearInterval(this.timer)
}else {
//端内打开
ProcessUtils.gotoDefaultWebPage(this.model.launchAdInfo[0].matInfo.linkUrl)
clearInterval(this.timer)
}
}
}
... ...