liyubing

feat:广告

@@ -124,7 +124,7 @@ export struct CardAdvGanMiComponent { @@ -124,7 +124,7 @@ export struct CardAdvGanMiComponent {
124 }) 124 })
125 125
126 // 更多按钮 126 // 更多按钮
127 - commonButton(this.advExtraData) 127 + this.commonButton()
128 128
129 } 129 }
130 .width(CommonConstants.FULL_WIDTH) 130 .width(CommonConstants.FULL_WIDTH)
@@ -134,19 +134,19 @@ export struct CardAdvGanMiComponent { @@ -134,19 +134,19 @@ export struct CardAdvGanMiComponent {
134 }) 134 })
135 135
136 } 136 }
137 -}  
138 137
139 -/* 138 + /*
140 标题样式 139 标题样式
141 */ 140 */
142 -@Builder  
143 -function commonButton(advExtraData: AdvExtraData) { 141 + @Builder
  142 + commonButton() {
144 143
145 144
146 Row() { 145 Row() {
147 Row() { 146 Row() {
148 Blank() 147 Blank()
149 - Text(advExtraData.itemMore.title == null ? $r('app.string.look_more') : advExtraData.itemMore.title) 148 + Text(this.advExtraData.itemMore == undefined ? $r('app.string.look_more') :
  149 + this.advExtraData.itemMore.title == undefined ? $r('app.string.look_more') : this.advExtraData.itemMore.title)
150 .fontColor('#222222') 150 .fontColor('#222222')
151 .fontSize('14fp') 151 .fontSize('14fp')
152 Image($r('app.media.icon_comp_more_right_red')).width(16).height(16) 152 Image($r('app.media.icon_comp_more_right_red')).width(16).height(16)
@@ -158,11 +158,14 @@ function commonButton(advExtraData: AdvExtraData) { @@ -158,11 +158,14 @@ function commonButton(advExtraData: AdvExtraData) {
158 .borderRadius(3) 158 .borderRadius(3)
159 .padding({ top: 10, bottom: 10, }) 159 .padding({ top: 10, bottom: 10, })
160 .onClick(() => { 160 .onClick(() => {
  161 + if (this.advExtraData.itemMore != undefined) {
161 let matInfo: CompAdvMatInfoBean = { 162 let matInfo: CompAdvMatInfoBean = {
162 - linkUrl: advExtraData.itemMore.linkUrl,  
163 - linkType: advExtraData.itemMore.linkType 163 + linkUrl: this.advExtraData.itemMore.linkUrl,
  164 + linkType: this.advExtraData.itemMore.linkType
164 } as CompAdvMatInfoBean; 165 } as CompAdvMatInfoBean;
165 ProcessUtils.openAdvDetail(matInfo) 166 ProcessUtils.openAdvDetail(matInfo)
  167 + }
  168 +
166 }) 169 })
167 }.width('100%').padding({ 170 }.width('100%').padding({
168 left: $r('app.float.card_comp_pagePadding_lf'), 171 left: $r('app.float.card_comp_pagePadding_lf'),
@@ -170,4 +173,6 @@ function commonButton(advExtraData: AdvExtraData) { @@ -170,4 +173,6 @@ function commonButton(advExtraData: AdvExtraData) {
170 173
171 }) 174 })
172 175
  176 + }
173 } 177 }
  178 +