liyubing

feat:一行双图卡 保护数据

@@ -45,7 +45,7 @@ export struct ZhGridLayout02NewsContent { @@ -45,7 +45,7 @@ export struct ZhGridLayout02NewsContent {
45 buildItemCard(item: ContentDTO, index: number) { 45 buildItemCard(item: ContentDTO, index: number) {
46 Column() { 46 Column() {
47 Stack({ alignContent: Alignment.BottomEnd }) { 47 Stack({ alignContent: Alignment.BottomEnd }) {
48 - Image(this.loadImg ? item.fullColumnImgUrls[0].url : '') 48 + Image(this.loadImg ? item == undefined ? '' : item.fullColumnImgUrls[0].url : '')
49 .backgroundColor(0xf5f5f5) 49 .backgroundColor(0xf5f5f5)
50 .width('100%') 50 .width('100%')
51 .height(95) 51 .height(95)
@@ -58,7 +58,12 @@ export struct ZhGridLayout02NewsContent { @@ -58,7 +58,12 @@ export struct ZhGridLayout02NewsContent {
58 .fontSize(12) 58 .fontSize(12)
59 .fontWeight(400) 59 .fontWeight(400)
60 .fontColor(Color.White) 60 .fontColor(Color.White)
61 - .textShadow({ radius: 2, color: 'rgba(0,0,0,0.3)', offsetX: 0, offsetY: 2 }) 61 + .textShadow({
  62 + radius: 2,
  63 + color: 'rgba(0,0,0,0.3)',
  64 + offsetX: 0,
  65 + offsetY: 2
  66 + })
62 .margin({ 67 .margin({
63 right: '5vp', 68 right: '5vp',
64 bottom: '5vp' 69 bottom: '5vp'