陈剑华

feat: 17052 UI还原问题--【生产环境】直播预告-横滑卡左右边距问题,看图

@@ -409,85 +409,4 @@ export struct ZhSingleRow03 { @@ -409,85 +409,4 @@ export struct ZhSingleRow03 {
409 409
410 } 410 }
411 411
412 -@Extend(Text)  
413 -function textOverflowStyle(maxLine: number) {  
414 - .maxLines(maxLine)  
415 - .textOverflow({ overflow: TextOverflow.Ellipsis })  
416 -}  
417 -  
418 -@Component  
419 -struct CreatorItem {  
420 - @Prop item: ContentDTO  
421 - @State rmhIsAttention: number = 0  
422 - @State loadImg: boolean = false;  
423 -  
424 - async aboutToAppear(): Promise<void> {  
425 - this.loadImg = await onlyWifiLoadImg();  
426 - }  
427 - build() {  
428 - ListItem() {  
429 - Column() {  
430 - Stack({ alignContent: Alignment.Bottom }) {  
431 - Image(this.loadImg ? this.item.coverUrl : '')  
432 - .backgroundColor(0xf5f5f5)  
433 - .width(156)  
434 - .height(208)  
435 - .border({width: 1})  
436 - .borderRadius(3)  
437 - Row()  
438 - .width(156)  
439 - .height(80)  
440 - .linearGradient({  
441 - direction: GradientDirection.Bottom,  
442 - colors: [['rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.3)', 1.0]]  
443 - })  
444 - Text(this.item.newsTitle)  
445 - .fontColor(0xffffff)  
446 - .fontSize(14)  
447 - .maxLines(2)  
448 - .textOverflow({overflow: TextOverflow.Ellipsis})  
449 - .width(140)  
450 - .margin({bottom: 8})  
451 - }  
452 - }  
453 - .width(156)  
454 - .height(208)  
455 - .margin({ right: 11 })  
456 - .borderColor($r('app.color.color_EDEDED'))  
457 - .borderRadius($r('app.float.image_border_radius'))  
458 - }  
459 - .onClick((event: ClickEvent) => {  
460 - ProcessUtils.processPage(this.item)  
461 - })  
462 - }  
463 -  
464 - /**  
465 - * 关注号主 TODO 这里后面需要抽离  
466 - */  
467 - handleAccention(item: ContentDTO, status: number) {  
468 - this.rmhIsAttention = this.rmhIsAttention ? 0 : 1  
469 - return  
470 - // 未登录,跳转登录  
471 - if (!HttpUtils.getUserId()) {  
472 - WDRouterRule.jumpWithPage(WDRouterPage.loginPage)  
473 - return  
474 - }  
475 412
476 - const params: postInteractAccentionOperateParams = {  
477 - attentionUserType: item.rmhInfo?.userType || '', //被关注用户类型(1 普通用户 2 视频号 3 矩阵号)  
478 - attentionUserId: item.rmhInfo?.userId || '', // 被关注用户号主id  
479 - attentionCreatorId: item.rmhInfo?.rmhId || '', // 被关注用户号主id  
480 - // userType: 1,  
481 - // userId: '1', // TODO 用户id需要从本地获取  
482 - status: status,  
483 - }  
484 - PageRepository.postInteractAccentionOperate(params).then(res => {  
485 - console.log(TAG, '关注号主==', JSON.stringify(res.data))  
486 - if (status === 1) {  
487 - this.rmhIsAttention = 0  
488 - } else {  
489 - this.rmhIsAttention = 1  
490 - }  
491 - })  
492 - }  
493 -}