Showing
1 changed file
with
3 additions
and
104 deletions
| @@ -41,6 +41,7 @@ export struct ZhSingleRow06 { | @@ -41,6 +41,7 @@ export struct ZhSingleRow06 { | ||
| 41 | 41 | ||
| 42 | Column(){ | 42 | Column(){ |
| 43 | Text(this.compDTO.operDataList[0]?.commentInfo?.commentTitle) | 43 | Text(this.compDTO.operDataList[0]?.commentInfo?.commentTitle) |
| 44 | + .fontWeight(500) | ||
| 44 | .maxLines(4) | 45 | .maxLines(4) |
| 45 | .textOverflow({overflow: TextOverflow.Ellipsis}) | 46 | .textOverflow({overflow: TextOverflow.Ellipsis}) |
| 46 | .lineHeight(23) | 47 | .lineHeight(23) |
| @@ -88,7 +89,7 @@ export struct ZhSingleRow06 { | @@ -88,7 +89,7 @@ export struct ZhSingleRow06 { | ||
| 88 | .margin({right: 3}) | 89 | .margin({right: 3}) |
| 89 | 90 | ||
| 90 | Text('点赞') | 91 | Text('点赞') |
| 91 | - .fontSize(14) | 92 | + .fontSize(15) |
| 92 | .fontColor(0x999999) | 93 | .fontColor(0x999999) |
| 93 | } | 94 | } |
| 94 | .onClick(() => { | 95 | .onClick(() => { |
| @@ -125,6 +126,7 @@ export struct ZhSingleRow06 { | @@ -125,6 +126,7 @@ export struct ZhSingleRow06 { | ||
| 125 | .fontSize(14) | 126 | .fontSize(14) |
| 126 | .fontColor(0x222222) | 127 | .fontColor(0x222222) |
| 127 | .maxLines(1) | 128 | .maxLines(1) |
| 129 | + .fontWeight(500) | ||
| 128 | .textOverflow({overflow: TextOverflow.Ellipsis}) | 130 | .textOverflow({overflow: TextOverflow.Ellipsis}) |
| 129 | } | 131 | } |
| 130 | .onClick(() => { | 132 | .onClick(() => { |
| @@ -155,106 +157,3 @@ function textOverflowStyle(maxLine: number) { | @@ -155,106 +157,3 @@ function textOverflowStyle(maxLine: number) { | ||
| 155 | .maxLines(maxLine) | 157 | .maxLines(maxLine) |
| 156 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 158 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 157 | } | 159 | } |
| 158 | - | ||
| 159 | -@Component | ||
| 160 | -struct CreatorItem { | ||
| 161 | - @Prop item: ContentDTO | ||
| 162 | - @State rmhIsAttention: number = 0 | ||
| 163 | - build() { | ||
| 164 | - ListItem() { | ||
| 165 | - Column() { | ||
| 166 | - Flex({direction: FlexDirection.Row, justifyContent: FlexAlign.SpaceBetween}) { | ||
| 167 | - Column() { | ||
| 168 | - Row() { | ||
| 169 | - Image('') | ||
| 170 | - .width(20) | ||
| 171 | - .height(20) | ||
| 172 | - .margin({right: 4}) | ||
| 173 | - .border({width: 1, color: 0xcccccc, radius: 10}) | ||
| 174 | - Text('立志之间') | ||
| 175 | - .fontColor(0x212228) | ||
| 176 | - .fontSize(12) | ||
| 177 | - } | ||
| 178 | - } | ||
| 179 | - | ||
| 180 | - Column() { | ||
| 181 | - Row() { | ||
| 182 | - Image($r('app.media.icon_like_no')) | ||
| 183 | - .width(16) | ||
| 184 | - .height(16) | ||
| 185 | - .margin({right: 4}) | ||
| 186 | - Text('3835') | ||
| 187 | - .fontSize(14) | ||
| 188 | - .fontColor(0x999999) | ||
| 189 | - } | ||
| 190 | - } | ||
| 191 | - } | ||
| 192 | - .margin({top: 10, left: 10, right: 10, bottom: 8}) | ||
| 193 | - | ||
| 194 | - Text('就业不仅是民生问题,也是发展问题,就业不仅是民生问题,也是发展问题,就业不仅是民生问题,也是发展问题,') | ||
| 195 | - .maxLines(2) | ||
| 196 | - .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 197 | - .margin({left: 10, right: 10, bottom: 8}) | ||
| 198 | - .fontSize(17) | ||
| 199 | - .fontColor(0x212228) | ||
| 200 | - .lineHeight(25) | ||
| 201 | - | ||
| 202 | - Row() { | ||
| 203 | - Image('') | ||
| 204 | - .width(66) | ||
| 205 | - .height(44) | ||
| 206 | - .borderRadius({topLeft: 3, topRight: 0, bottomLeft: 3, bottomRight: 0}) | ||
| 207 | - Text('原文|强化就业优先政策 健全就业促进机制原文|强化就业优先政策 健全就业促进机制原文|强化就业优先政策 健全就业促进机制') | ||
| 208 | - .margin({left: 8}) | ||
| 209 | - .width(172) | ||
| 210 | - .maxLines(2) | ||
| 211 | - .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 212 | - } | ||
| 213 | - .linearGradient({ | ||
| 214 | - direction: GradientDirection.Right, | ||
| 215 | - colors: [[0xffffff, 0.0],[0xffffff, 0.8], [0xf9f9f9, 1.0]] | ||
| 216 | - }) | ||
| 217 | - } | ||
| 218 | - .width(276) | ||
| 219 | - .height(150) | ||
| 220 | - .margin({ right: 10 }) | ||
| 221 | - .borderWidth(1) | ||
| 222 | - .borderColor($r('app.color.color_EDEDED')) | ||
| 223 | - .borderRadius($r('app.float.image_border_radius')) | ||
| 224 | - .backgroundColor(0xf9f9f9) | ||
| 225 | - } | ||
| 226 | - .onClick(() => { | ||
| 227 | - console.log('跳转到rmh'); | ||
| 228 | - }) | ||
| 229 | - } | ||
| 230 | - | ||
| 231 | - /** | ||
| 232 | - * 关注号主 TODO 这里后面需要抽离 | ||
| 233 | - */ | ||
| 234 | - handleAccention(item: ContentDTO, status: number) { | ||
| 235 | - this.rmhIsAttention = this.rmhIsAttention ? 0 : 1 | ||
| 236 | - return | ||
| 237 | - // 未登录,跳转登录 | ||
| 238 | - if (!HttpUtils.getUserId()) { | ||
| 239 | - WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | ||
| 240 | - return | ||
| 241 | - } | ||
| 242 | - | ||
| 243 | - const params: postInteractAccentionOperateParams = { | ||
| 244 | - attentionUserType: item.rmhInfo?.userType || '', //被关注用户类型(1 普通用户 2 视频号 3 矩阵号) | ||
| 245 | - attentionUserId: item.rmhInfo?.userId || '', // 被关注用户号主id | ||
| 246 | - attentionCreatorId: item.rmhInfo?.rmhId || '', // 被关注用户号主id | ||
| 247 | - // userType: 1, | ||
| 248 | - // userId: '1', // TODO 用户id需要从本地获取 | ||
| 249 | - status: status, | ||
| 250 | - } | ||
| 251 | - PageRepository.postInteractAccentionOperate(params).then(res => { | ||
| 252 | - console.log(TAG, '关注号主==', JSON.stringify(res.data)) | ||
| 253 | - if (status === 1) { | ||
| 254 | - this.rmhIsAttention = 0 | ||
| 255 | - } else { | ||
| 256 | - this.rmhIsAttention = 1 | ||
| 257 | - } | ||
| 258 | - }) | ||
| 259 | - } | ||
| 260 | -} |
-
Please register or login to post a comment