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,40 +134,45 @@ export struct CardAdvGanMiComponent { @@ -134,40 +134,45 @@ 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() {  
147 Row() { 145 Row() {
148 - Blank()  
149 - Text(advExtraData.itemMore.title == null ? $r('app.string.look_more') : advExtraData.itemMore.title)  
150 - .fontColor('#222222')  
151 - .fontSize('14fp')  
152 - Image($r('app.media.icon_comp_more_right_red')).width(16).height(16)  
153 - Blank() 146 + Row() {
  147 + Blank()
  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')
  151 + .fontSize('14fp')
  152 + Image($r('app.media.icon_comp_more_right_red')).width(16).height(16)
  153 + Blank()
  154 +
  155 + }
  156 + .width('100%')
  157 + .backgroundColor('#F5F5F5')
  158 + .borderRadius(3)
  159 + .padding({ top: 10, bottom: 10, })
  160 + .onClick(() => {
  161 + if (this.advExtraData.itemMore != undefined) {
  162 + let matInfo: CompAdvMatInfoBean = {
  163 + linkUrl: this.advExtraData.itemMore.linkUrl,
  164 + linkType: this.advExtraData.itemMore.linkType
  165 + } as CompAdvMatInfoBean;
  166 + ProcessUtils.openAdvDetail(matInfo)
  167 + }
  168 +
  169 + })
  170 + }.width('100%').padding({
  171 + left: $r('app.float.card_comp_pagePadding_lf'),
  172 + right: $r('app.float.card_comp_pagePadding_lf'),
154 173
155 - }  
156 - .width('100%')  
157 - .backgroundColor('#F5F5F5')  
158 - .borderRadius(3)  
159 - .padding({ top: 10, bottom: 10, })  
160 - .onClick(() => {  
161 - let matInfo: CompAdvMatInfoBean = {  
162 - linkUrl: advExtraData.itemMore.linkUrl,  
163 - linkType: advExtraData.itemMore.linkType  
164 - } as CompAdvMatInfoBean;  
165 - ProcessUtils.openAdvDetail(matInfo)  
166 }) 174 })
167 - }.width('100%').padding({  
168 - left: $r('app.float.card_comp_pagePadding_lf'),  
169 - right: $r('app.float.card_comp_pagePadding_lf'),  
170 175
171 - }) 176 + }
  177 +}
172 178
173 -}