Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
77 changed files
with
1950 additions
and
497 deletions
| @@ -3,15 +3,15 @@ | @@ -3,15 +3,15 @@ | ||
| 3 | { | 3 | { |
| 4 | "name": "shared_desc", | 4 | "name": "shared_desc", |
| 5 | "value": "全局工具包" | 5 | "value": "全局工具包" |
| 6 | - } , | 6 | + }, |
| 7 | { | 7 | { |
| 8 | "name": "net_core_no_network", | 8 | "name": "net_core_no_network", |
| 9 | "value": "当前无网络,请重试" | 9 | "value": "当前无网络,请重试" |
| 10 | - } , | 10 | + }, |
| 11 | { | 11 | { |
| 12 | "name": "net_core_weak_network", | 12 | "name": "net_core_weak_network", |
| 13 | "value": "当前无网络,请重试" | 13 | "value": "当前无网络,请重试" |
| 14 | - } , | 14 | + }, |
| 15 | { | 15 | { |
| 16 | "name": "net_core_page_error_network", | 16 | "name": "net_core_page_error_network", |
| 17 | "value": "网络出小差了,请检查下网络" | 17 | "value": "网络出小差了,请检查下网络" |
| @@ -47,6 +47,10 @@ | @@ -47,6 +47,10 @@ | ||
| 47 | { | 47 | { |
| 48 | "name": "auditing_core_error", | 48 | "name": "auditing_core_error", |
| 49 | "value": "内容已下线" | 49 | "value": "内容已下线" |
| 50 | + }, | ||
| 51 | + { | ||
| 52 | + "name": "image_request_fail", | ||
| 53 | + "value": "图片加载失败,请检查网络" | ||
| 50 | } | 54 | } |
| 51 | ] | 55 | ] |
| 52 | } | 56 | } |
| @@ -397,7 +397,8 @@ export class HttpUrlUtils { | @@ -397,7 +397,8 @@ export class HttpUrlUtils { | ||
| 397 | if (StringUtils.isNotEmpty(HttpUrlUtils.token)) { | 397 | if (StringUtils.isNotEmpty(HttpUrlUtils.token)) { |
| 398 | return HttpUrlUtils.token | 398 | return HttpUrlUtils.token |
| 399 | } | 399 | } |
| 400 | - return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc'; | 400 | + // return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc'; |
| 401 | + return '' | ||
| 401 | } | 402 | } |
| 402 | 403 | ||
| 403 | static getRefreshToken() { | 404 | static getRefreshToken() { |
| @@ -556,6 +557,24 @@ export class HttpUrlUtils { | @@ -556,6 +557,24 @@ export class HttpUrlUtils { | ||
| 556 | return url | 557 | return url |
| 557 | } | 558 | } |
| 558 | 559 | ||
| 560 | + /*评论状态*/ | ||
| 561 | + static getBatchCommentStatusUrl() { | ||
| 562 | + let url = HttpUrlUtils._hostUrl + "/api/rmrb-comment/comment/zh/c/batchCommentStatus" | ||
| 563 | + return url | ||
| 564 | + } | ||
| 565 | + | ||
| 566 | + /*levleIcon*/ | ||
| 567 | + static getBatchUserUrl() { | ||
| 568 | + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-point/auth/level/zh/c/batchUser" | ||
| 569 | + return url | ||
| 570 | + } | ||
| 571 | + | ||
| 572 | + /*authIcon 20个一次上限*/ | ||
| 573 | + static getDetailListUrl() { | ||
| 574 | + let url = HttpUrlUtils._hostUrl + "/api/rmrb-contact/contact/zh/c/master/detailList" | ||
| 575 | + return url | ||
| 576 | + } | ||
| 577 | + | ||
| 559 | 578 | ||
| 560 | //账户注销 | 579 | //账户注销 |
| 561 | static accountLogoutUrl() { | 580 | static accountLogoutUrl() { |
| @@ -756,6 +775,12 @@ export class HttpUrlUtils { | @@ -756,6 +775,12 @@ export class HttpUrlUtils { | ||
| 756 | return url | 775 | return url |
| 757 | } | 776 | } |
| 758 | 777 | ||
| 778 | + //点赞 | ||
| 779 | + static executeLike() { | ||
| 780 | + let url = HttpUrlUtils._hostUrl + "/api/rmrb-interact/interact/zh/c/like/executeLike"; | ||
| 781 | + return url; | ||
| 782 | + } | ||
| 783 | + | ||
| 759 | // static getYcgCommonHeaders(): HashMap<string, string> { | 784 | // static getYcgCommonHeaders(): HashMap<string, string> { |
| 760 | // let headers: HashMap<string, string> = new HashMap<string, string>() | 785 | // let headers: HashMap<string, string> = new HashMap<string, string>() |
| 761 | // | 786 | // |
| @@ -83,6 +83,8 @@ export class WDRouterPage { | @@ -83,6 +83,8 @@ export class WDRouterPage { | ||
| 83 | static privacySettingPage = new WDRouterPage("wdComponent", "ets/components/page/PrivacySettingPage"); | 83 | static privacySettingPage = new WDRouterPage("wdComponent", "ets/components/page/PrivacySettingPage"); |
| 84 | // 关于页 | 84 | // 关于页 |
| 85 | static aboutPage = new WDRouterPage("wdComponent", "ets/components/page/SettingAboutPage"); | 85 | static aboutPage = new WDRouterPage("wdComponent", "ets/components/page/SettingAboutPage"); |
| 86 | + // 精选评论页 | ||
| 87 | + static QualityCommentsPage = new WDRouterPage("wdComponent", "ets/components/page/QualityCommentsPage"); | ||
| 86 | // 设置页 | 88 | // 设置页 |
| 87 | static settingPage = new WDRouterPage("wdComponent", "ets/components/page/SettingPage"); | 89 | static settingPage = new WDRouterPage("wdComponent", "ets/components/page/SettingPage"); |
| 88 | // 设置页 | 90 | // 设置页 |
| @@ -19,7 +19,7 @@ export interface CompDTO { | @@ -19,7 +19,7 @@ export interface CompDTO { | ||
| 19 | name: string; | 19 | name: string; |
| 20 | objectId: string; // 跳转页面id? | 20 | objectId: string; // 跳转页面id? |
| 21 | objectTitle: string; // comp标题 | 21 | objectTitle: string; // comp标题 |
| 22 | - // objectType?: any; // 跳转类型,枚举: | 22 | + objectType?: string; // 跳转类型,枚举: |
| 23 | operDataList: ContentDTO[]; // 运营数据列表【正常运营配置的强运营数据,部分推荐场景的配置(自动源兜底数据)】 | 23 | operDataList: ContentDTO[]; // 运营数据列表【正常运营配置的强运营数据,部分推荐场景的配置(自动源兜底数据)】 |
| 24 | // pageId?: any; | 24 | // pageId?: any; |
| 25 | posterSize: string; | 25 | posterSize: string; |
| @@ -69,3 +69,5 @@ export { newsSkeleton } from "./src/main/ets/components/skeleton/newsSkeleton" | @@ -69,3 +69,5 @@ export { newsSkeleton } from "./src/main/ets/components/skeleton/newsSkeleton" | ||
| 69 | 69 | ||
| 70 | export { LiveCommentComponent } from "./src/main/ets/components/comment/view/LiveCommentComponent" | 70 | export { LiveCommentComponent } from "./src/main/ets/components/comment/view/LiveCommentComponent" |
| 71 | 71 | ||
| 72 | +export { WDViewDefaultType } from "./src/main/ets/components/view/EmptyComponent" | ||
| 73 | + |
| @@ -18,6 +18,7 @@ import { CardParser } from './CardParser'; | @@ -18,6 +18,7 @@ import { CardParser } from './CardParser'; | ||
| 18 | import { LiveHorizontalReservationComponent } from './view/LiveHorizontalReservationComponent'; | 18 | import { LiveHorizontalReservationComponent } from './view/LiveHorizontalReservationComponent'; |
| 19 | import { ZhGridLayout02 } from './compview/ZhGridLayout02'; | 19 | import { ZhGridLayout02 } from './compview/ZhGridLayout02'; |
| 20 | import { Card5Component } from './cardview/Card5Component' | 20 | import { Card5Component } from './cardview/Card5Component' |
| 21 | +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | ||
| 21 | 22 | ||
| 22 | /** | 23 | /** |
| 23 | * comp适配器. | 24 | * comp适配器. |
| @@ -30,14 +31,14 @@ export struct CompParser { | @@ -30,14 +31,14 @@ export struct CompParser { | ||
| 30 | compIndex: number = 0; | 31 | compIndex: number = 0; |
| 31 | 32 | ||
| 32 | build() { | 33 | build() { |
| 33 | - Column(){ | 34 | + Column() { |
| 34 | this.componentBuilder(this.compDTO, this.compIndex); | 35 | this.componentBuilder(this.compDTO, this.compIndex); |
| 35 | - Divider().strokeWidth(1).color('#f5f5f5').padding({left:16,right:16}) | ||
| 36 | } | 36 | } |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | @Builder | 39 | @Builder |
| 40 | componentBuilder(compDTO: CompDTO, compIndex: number) { | 40 | componentBuilder(compDTO: CompDTO, compIndex: number) { |
| 41 | + if (compDTO.objectType !== '3' && compDTO.objectType !== '13') { //暂时屏蔽活动和音频详情入口 | ||
| 41 | if (compDTO.compStyle === CompStyle.Label_03) { | 42 | if (compDTO.compStyle === CompStyle.Label_03) { |
| 42 | LabelComponent({ compDTO: compDTO }) | 43 | LabelComponent({ compDTO: compDTO }) |
| 43 | } else if (compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { | 44 | } else if (compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { |
| @@ -72,10 +73,16 @@ export struct CompParser { | @@ -72,10 +73,16 @@ export struct CompParser { | ||
| 72 | } | 73 | } |
| 73 | else { | 74 | else { |
| 74 | // todo:组件未实现 / Component Not Implemented | 75 | // todo:组件未实现 / Component Not Implemented |
| 75 | - // Text(compDTO.compStyle) | ||
| 76 | - // .width(CommonConstants.FULL_PARENT) | ||
| 77 | - // .padding(10) | ||
| 78 | - // .backgroundColor(Color.Brown) // 展示本页未实现的compStyle | 76 | + Text(compDTO.compStyle) |
| 77 | + .width(CommonConstants.FULL_PARENT) | ||
| 78 | + .padding(10) | ||
| 79 | + .onClick(() => { | ||
| 80 | + if (compDTO.compStyle === CompStyle.Zh_Single_Row_06) { //精选评论 | ||
| 81 | + WDRouterRule.jumpWithPage(WDRouterPage.QualityCommentsPage) | ||
| 82 | + } | ||
| 83 | + }) | ||
| 84 | + } | ||
| 85 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 79 | } | 86 | } |
| 80 | } | 87 | } |
| 81 | } | 88 | } |
| 1 | import { PhotoListBean } from 'wdBean/Index'; | 1 | import { PhotoListBean } from 'wdBean/Index'; |
| 2 | import { Logger } from 'wdKit/Index'; | 2 | import { Logger } from 'wdKit/Index'; |
| 3 | -import { MultiPictureDetailItemComponent } from './MultiPictureDetailItemComponent'; | ||
| 4 | import { display, router } from '@kit.ArkUI'; | 3 | import { display, router } from '@kit.ArkUI'; |
| 5 | import { ImageDownloadComponent } from './ImageDownloadComponent'; | 4 | import { ImageDownloadComponent } from './ImageDownloadComponent'; |
| 5 | +import { ImageItemView } from './view/ImageItemView'; | ||
| 6 | 6 | ||
| 7 | const TAG = 'ImageSwiperComponent'; | 7 | const TAG = 'ImageSwiperComponent'; |
| 8 | 8 | ||
| @@ -17,6 +17,9 @@ export struct ImageSwiperComponent { | @@ -17,6 +17,9 @@ export struct ImageSwiperComponent { | ||
| 17 | private screenWidth: number = 0 | 17 | private screenWidth: number = 0 |
| 18 | private picWidth: number = 0 | 18 | private picWidth: number = 0 |
| 19 | @State picHeight: number = 0 | 19 | @State picHeight: number = 0 |
| 20 | + @State isEnableSwipe: boolean = true; | ||
| 21 | + | ||
| 22 | + // @Provide bgc: Color = Color.White; | ||
| 20 | 23 | ||
| 21 | //watch监听页码回调 | 24 | //watch监听页码回调 |
| 22 | onCurrentPageNumUpdated(): void { | 25 | onCurrentPageNumUpdated(): void { |
| @@ -53,7 +56,8 @@ export struct ImageSwiperComponent { | @@ -53,7 +56,8 @@ export struct ImageSwiperComponent { | ||
| 53 | if (this.photoList && this.photoList?.length > 0) { | 56 | if (this.photoList && this.photoList?.length > 0) { |
| 54 | Swiper(this.swiperController) { | 57 | Swiper(this.swiperController) { |
| 55 | ForEach(this.photoList, (item: PhotoListBean) => { | 58 | ForEach(this.photoList, (item: PhotoListBean) => { |
| 56 | - MultiPictureDetailItemComponent({ MultiPictureDetailItem: item }) | 59 | + // MultiPictureDetailItemComponent({ MultiPictureDetailItem: item }) |
| 60 | + ImageItemView({ MultiPictureDetailItem: item, isEnableSwipe: this.isEnableSwipe }) | ||
| 57 | }) | 61 | }) |
| 58 | } | 62 | } |
| 59 | .index(this.swiperIndex) | 63 | .index(this.swiperIndex) |
| 1 | -import { CommonConstants } from 'wdConstant'; | ||
| 2 | -import { Logger } from 'wdKit'; | ||
| 3 | - | ||
| 4 | -const TAG = 'EmptyComponent'; | ||
| 5 | - | ||
| 6 | -/** | ||
| 7 | - * WDViewDefaultType 缺省页 | ||
| 8 | - */ | ||
| 9 | -export const enum WDViewDefaultType { | ||
| 10 | - ///无网 | ||
| 11 | - WDViewDefaultType_NoNetwork, | ||
| 12 | - ///网络失败 请稍后重试-倒计时 | ||
| 13 | - WDViewDefaultType_NetworkFailed, | ||
| 14 | - ///内容获取失败 | ||
| 15 | - WDViewDefaultType_ContentFailed, | ||
| 16 | -} | ||
| 17 | - | ||
| 18 | -/** | ||
| 19 | - * 空数据/无数据 | ||
| 20 | - */ | ||
| 21 | -@Preview | ||
| 22 | -@Component | ||
| 23 | -export struct MultiPictureDetailEmptyComponent { | ||
| 24 | - // private emptySize: SizeOptions = {}; | ||
| 25 | - @State emptyWidth: string | number = CommonConstants.FULL_PARENT; | ||
| 26 | - @State emptyHeight: string | number = CommonConstants.FULL_PARENT; | ||
| 27 | - @State emptyType: number = WDViewDefaultType.WDViewDefaultType_ContentFailed | ||
| 28 | - /** | ||
| 29 | - * The empty image width percentage setting. | ||
| 30 | - */ | ||
| 31 | - readonly EMPTY_IMAGE_WIDTH: string = '15%'; | ||
| 32 | - /** | ||
| 33 | - * The empty image height percentage setting. | ||
| 34 | - */ | ||
| 35 | - readonly EMPTY_IMAGE_HEIGHT: string = '15%'; | ||
| 36 | - /** | ||
| 37 | - * The empty data text component margin top. | ||
| 38 | - */ | ||
| 39 | - readonly EMPTY_TIP_TEXT_MARGIN_TOP: string = '10'; | ||
| 40 | - /** | ||
| 41 | - * The empty data text opacity. | ||
| 42 | - */ | ||
| 43 | - readonly TEXT_OPACITY: number = 1; | ||
| 44 | - | ||
| 45 | - build() { | ||
| 46 | - this.noProgrammeData(); | ||
| 47 | - } | ||
| 48 | - | ||
| 49 | - /** | ||
| 50 | - * 无数据,空白view组件 | ||
| 51 | - */ | ||
| 52 | - @Builder | ||
| 53 | - noProgrammeData() { | ||
| 54 | - Column() { | ||
| 55 | - Image(this.buildNoDataTipImage()) | ||
| 56 | - .width('this.EMPTY_IMAGE_WIDTH') | ||
| 57 | - .height(this.EMPTY_IMAGE_HEIGHT) | ||
| 58 | - .objectFit(ImageFit.Contain) | ||
| 59 | - // .border({ width: 1, color: Color.Red, radius: 6 }) | ||
| 60 | - | ||
| 61 | - Text(this.buildNoDataTip()) | ||
| 62 | - .fontSize($r('app.float.font_size_14')) | ||
| 63 | - .fontColor('#999999') | ||
| 64 | - .fontWeight(FontWeight.Normal) | ||
| 65 | - .opacity(this.TEXT_OPACITY) | ||
| 66 | - .margin({ top: this.EMPTY_TIP_TEXT_MARGIN_TOP }) | ||
| 67 | - .onClick((event: ClickEvent) => { | ||
| 68 | - Logger.info(TAG, `noProgrammeData onClick event?.source: ${event.source}`); | ||
| 69 | - }) | ||
| 70 | - Button('点击重试', { type: ButtonType.Normal, stateEffect: true }) | ||
| 71 | - .borderRadius(4) | ||
| 72 | - .margin(16) | ||
| 73 | - .height(28) | ||
| 74 | - .fontSize(12) | ||
| 75 | - .fontColor('#CCCCCC') | ||
| 76 | - .fontFamily('PingFang SC-Medium') | ||
| 77 | - .border({ width: 1, color: '#545454' }) | ||
| 78 | - .backgroundColor(Color.Black) | ||
| 79 | - } | ||
| 80 | - .justifyContent(FlexAlign.Center) | ||
| 81 | - .width(this.emptyWidth) | ||
| 82 | - .height(this.emptyHeight) | ||
| 83 | - .backgroundColor(Color.Black) | ||
| 84 | - } | ||
| 85 | - | ||
| 86 | - buildNoDataTip(): string { | ||
| 87 | - Logger.info(TAG, "buildNoDataTip"); | ||
| 88 | - let contentString: string = '获取内容失败请重试' | ||
| 89 | - if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoNetwork) { | ||
| 90 | - contentString = '网络出小差了,请检查网络后重试' | ||
| 91 | - } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) { | ||
| 92 | - contentString = '获取内容失败请重试' | ||
| 93 | - } | ||
| 94 | - | ||
| 95 | - return contentString | ||
| 96 | - } | ||
| 97 | - | ||
| 98 | - buildNoDataTipImage(): Resource | string { | ||
| 99 | - Logger.info(TAG, "buildNoDataTip"); | ||
| 100 | - let imageString: Resource | string = $r('app.media.icon_no_content') | ||
| 101 | - if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoNetwork) { | ||
| 102 | - imageString = $r('app.media.icon_no_net') | ||
| 103 | - } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) { | ||
| 104 | - imageString = $r('app.media.icon_no_content') | ||
| 105 | - } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NetworkFailed) { | ||
| 106 | - imageString = $r('app.media.icon_no_net') | ||
| 107 | - } | ||
| 108 | - return imageString | ||
| 109 | - } | ||
| 110 | -} |
| 1 | import { PhotoListBean } from 'wdBean'; | 1 | import { PhotoListBean } from 'wdBean'; |
| 2 | import { Logger } from 'wdKit'; | 2 | import { Logger } from 'wdKit'; |
| 3 | +import router from '@ohos.router'; | ||
| 4 | +import display from '@ohos.display'; | ||
| 3 | 5 | ||
| 4 | const TAG = 'MultiPictureDetailPageComponent'; | 6 | const TAG = 'MultiPictureDetailPageComponent'; |
| 5 | 7 | ||
| 6 | @Component | 8 | @Component |
| 7 | export struct MultiPictureDetailItemComponent { | 9 | export struct MultiPictureDetailItemComponent { |
| 8 | private MultiPictureDetailItem: PhotoListBean = {} as PhotoListBean | 10 | private MultiPictureDetailItem: PhotoListBean = {} as PhotoListBean |
| 11 | + //alt app.media.picture_loading 设计稿尺寸 | ||
| 12 | + @State imageWidth:string | number = 167 | ||
| 13 | + @State ratio:number = 167/60 | ||
| 14 | + private scroller: Scroller = new Scroller() | ||
| 15 | + private displayTool = display.getDefaultDisplaySync() | ||
| 16 | + @State picHeight: number = 0 | ||
| 9 | 17 | ||
| 10 | 18 | ||
| 11 | async aboutToAppear() { | 19 | async aboutToAppear() { |
| 12 | Logger.info(TAG, 'pictures preview') | 20 | Logger.info(TAG, 'pictures preview') |
| 21 | + this.picHeight = this.displayTool.width * 578 / 375 | ||
| 13 | } | 22 | } |
| 14 | 23 | ||
| 15 | build() { | 24 | build() { |
| 16 | - Stack({ alignContent: Alignment.BottomStart }) { | ||
| 17 | Row() { | 25 | Row() { |
| 18 | Image(this.MultiPictureDetailItem.picPath) | 26 | Image(this.MultiPictureDetailItem.picPath) |
| 19 | .alt($r('app.media.picture_loading')) | 27 | .alt($r('app.media.picture_loading')) |
| 20 | - .width('100%') | ||
| 21 | - .aspectRatio(this.MultiPictureDetailItem.width / this.MultiPictureDetailItem.height) | 28 | + .width(this.imageWidth) |
| 29 | + .aspectRatio(this.ratio) | ||
| 22 | .objectFit(ImageFit.Fill) | 30 | .objectFit(ImageFit.Fill) |
| 23 | .interpolation(ImageInterpolation.High) | 31 | .interpolation(ImageInterpolation.High) |
| 32 | + .onComplete(event => { | ||
| 33 | + this.imageWidth = '100%' | ||
| 34 | + this.ratio = this.MultiPictureDetailItem.width / this.MultiPictureDetailItem.height | ||
| 35 | + }) | ||
| 36 | + /*.onDrop(event => { | ||
| 37 | + router.back(); | ||
| 38 | + }) | ||
| 39 | + .draggable(true)*/ | ||
| 40 | + /*Scroll(this.scroller) { | ||
| 41 | + | ||
| 42 | + } | ||
| 43 | + .scrollable(ScrollDirection.Vertical) | ||
| 44 | + .scrollBarWidth(0) | ||
| 45 | + .height(px2vp(this.picHeight))*/ | ||
| 24 | } | 46 | } |
| 25 | .height('100%') | 47 | .height('100%') |
| 26 | .width('100%') | 48 | .width('100%') |
| 27 | - | ||
| 28 | - } | ||
| 29 | .backgroundColor(Color.Black) | 49 | .backgroundColor(Color.Black) |
| 30 | - .width('100%') | 50 | + .justifyContent(FlexAlign.Center) |
| 31 | } | 51 | } |
| 32 | } | 52 | } |
| 1 | -import { Logger } from 'wdKit'; | 1 | +import { Logger, SPHelper } from 'wdKit'; |
| 2 | import { ResponseDTO } from 'wdNetwork'; | 2 | import { ResponseDTO } from 'wdNetwork'; |
| 3 | import { | 3 | import { |
| 4 | ContentDetailDTO, | 4 | ContentDetailDTO, |
| @@ -12,11 +12,12 @@ import display from '@ohos.display'; | @@ -12,11 +12,12 @@ import display from '@ohos.display'; | ||
| 12 | import font from '@ohos.font'; | 12 | import font from '@ohos.font'; |
| 13 | import { OperRowListView } from './view/OperRowListView'; | 13 | import { OperRowListView } from './view/OperRowListView'; |
| 14 | import { MultiPictureDetailItemComponent } from './MultiPictureDetailItemComponent'; | 14 | import { MultiPictureDetailItemComponent } from './MultiPictureDetailItemComponent'; |
| 15 | -import { MultiPictureDetailEmptyComponent } from './MultiPictureDetailEmptyComponent'; | 15 | +import { EmptyComponent } from './view/EmptyComponent'; |
| 16 | import { DateTimeUtils } from 'wdKit/Index'; | 16 | import { DateTimeUtils } from 'wdKit/Index'; |
| 17 | import { HttpUrlUtils } from 'wdNetwork/Index'; | 17 | import { HttpUrlUtils } from 'wdNetwork/Index'; |
| 18 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 18 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| 19 | import { PageRepository } from '../repository/PageRepository'; | 19 | import { PageRepository } from '../repository/PageRepository'; |
| 20 | +import { SpConstants } from 'wdConstant/Index'; | ||
| 20 | 21 | ||
| 21 | const TAG = 'MultiPictureDetailPageComponent'; | 22 | const TAG = 'MultiPictureDetailPageComponent'; |
| 22 | 23 | ||
| @@ -36,7 +37,7 @@ export struct MultiPictureDetailPageComponent { | @@ -36,7 +37,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 36 | @State swiperIndex: number = 0; | 37 | @State swiperIndex: number = 0; |
| 37 | @Provide followStatus: string = '0' // 关注状态 | 38 | @Provide followStatus: string = '0' // 关注状态 |
| 38 | private scroller: Scroller = new Scroller() | 39 | private scroller: Scroller = new Scroller() |
| 39 | - @State netStatus: number = 0 // 存储网络状态用来展示缺省图 | 40 | + @State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图 |
| 40 | 41 | ||
| 41 | //watch监听页码回调 | 42 | //watch监听页码回调 |
| 42 | onCurrentPageNumUpdated(): void { | 43 | onCurrentPageNumUpdated(): void { |
| @@ -238,8 +239,8 @@ export struct MultiPictureDetailPageComponent { | @@ -238,8 +239,8 @@ export struct MultiPictureDetailPageComponent { | ||
| 238 | .height(px2vp(this.titleHeight) + 64) | 239 | .height(px2vp(this.titleHeight) + 64) |
| 239 | 240 | ||
| 240 | } else { | 241 | } else { |
| 241 | - if (this.netStatus === 1) { | ||
| 242 | - MultiPictureDetailEmptyComponent({ emptyType: 2}) | 242 | + if(this.netStatus !== undefined) { |
| 243 | + EmptyComponent({ emptyType: this.netStatus}) | ||
| 243 | .id('e_empty_content') | 244 | .id('e_empty_content') |
| 244 | .alignRules({ | 245 | .alignRules({ |
| 245 | center: { anchor: "__container__", align: VerticalAlign.Center }, | 246 | center: { anchor: "__container__", align: VerticalAlign.Center }, |
| @@ -289,6 +290,9 @@ export struct MultiPictureDetailPageComponent { | @@ -289,6 +290,9 @@ export struct MultiPictureDetailPageComponent { | ||
| 289 | return | 290 | return |
| 290 | } | 291 | } |
| 291 | this.contentDetailData = resDTO.data?.[0]; | 292 | this.contentDetailData = resDTO.data?.[0]; |
| 293 | + if(this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length === 0) { | ||
| 294 | + this.netStatus = 0 | ||
| 295 | + } | ||
| 292 | Logger.info(TAG, `contentDetailData:${JSON.stringify(this.contentDetailData)}`) | 296 | Logger.info(TAG, `contentDetailData:${JSON.stringify(this.contentDetailData)}`) |
| 293 | if (HttpUrlUtils.getUserId()) { | 297 | if (HttpUrlUtils.getUserId()) { |
| 294 | this.getInteractBrowsOperate() | 298 | this.getInteractBrowsOperate() |
| @@ -350,9 +354,10 @@ export struct MultiPictureDetailPageComponent { | @@ -350,9 +354,10 @@ export struct MultiPictureDetailPageComponent { | ||
| 350 | /** | 354 | /** |
| 351 | * 关注号主 | 355 | * 关注号主 |
| 352 | */ | 356 | */ |
| 353 | - handleAccention() { | 357 | + async handleAccention() { |
| 354 | // 未登录,跳转登录 | 358 | // 未登录,跳转登录 |
| 355 | - if (!HttpUrlUtils.getUserId()) { | 359 | + const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') |
| 360 | + if (!user_id) { | ||
| 356 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | 361 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) |
| 357 | return | 362 | return |
| 358 | } | 363 | } |
| @@ -33,9 +33,17 @@ export class commentListModel extends PageModel{ | @@ -33,9 +33,17 @@ export class commentListModel extends PageModel{ | ||
| 33 | totalCount: number = 0 | 33 | totalCount: number = 0 |
| 34 | hasNext: number = 0 | 34 | hasNext: number = 0 |
| 35 | list: commentItemModel[] = [] | 35 | list: commentItemModel[] = [] |
| 36 | +} | ||
| 36 | 37 | ||
| 38 | +export class commentStatusListModel extends PageModel{ | ||
| 39 | + pageNum: number = 0 | ||
| 40 | + pageSize: number = 0 | ||
| 41 | + totalCount: number = 0 | ||
| 42 | + hasNext: number = 0 | ||
| 43 | + list: commentStatusModel[] = [] | ||
| 37 | } | 44 | } |
| 38 | 45 | ||
| 46 | + | ||
| 39 | @Observed | 47 | @Observed |
| 40 | export class commentItemModel { | 48 | export class commentItemModel { |
| 41 | authorLike: string = '' | 49 | authorLike: string = '' |
| @@ -94,9 +102,17 @@ export class commentItemModel { | @@ -94,9 +102,17 @@ export class commentItemModel { | ||
| 94 | targetType:string = ''; | 102 | targetType:string = ''; |
| 95 | visitorComment:string = ''; | 103 | visitorComment:string = ''; |
| 96 | shareInfo:commentItemShareInfoModel = new commentItemShareInfoModel; | 104 | shareInfo:commentItemShareInfoModel = new commentItemShareInfoModel; |
| 97 | - // targetId:string = ''; | ||
| 98 | - // targetId:string = ''; | ||
| 99 | - // targetId:string = ''; | 105 | + |
| 106 | + api_commentId:string = ''; | ||
| 107 | + api_status:string = ''; | ||
| 108 | + | ||
| 109 | + api_level:string = ''; | ||
| 110 | + api_levelHead:string = 'http'; | ||
| 111 | + api_userId:string = ''; | ||
| 112 | + | ||
| 113 | + api_creatorId:string = ''; | ||
| 114 | + api_userType:string = ''; | ||
| 115 | + api_authIcon:string = ''; | ||
| 100 | 116 | ||
| 101 | } | 117 | } |
| 102 | 118 | ||
| @@ -106,3 +122,18 @@ export class commentItemShareInfoModel { | @@ -106,3 +122,18 @@ export class commentItemShareInfoModel { | ||
| 106 | shareTitle: string = '' | 122 | shareTitle: string = '' |
| 107 | shareUrl: string = '' | 123 | shareUrl: string = '' |
| 108 | } | 124 | } |
| 125 | + | ||
| 126 | +export class commentStatusModel { | ||
| 127 | + commentId:string = ''; | ||
| 128 | + status:string = ''; | ||
| 129 | + | ||
| 130 | + level:string = ''; | ||
| 131 | + levelHead:string = ''; | ||
| 132 | + userId:string = ''; | ||
| 133 | + | ||
| 134 | + | ||
| 135 | + creatorId:string = ''; | ||
| 136 | + userType:string = ''; | ||
| 137 | + authIcon:string = ''; | ||
| 138 | + | ||
| 139 | +} |
| @@ -6,6 +6,13 @@ import { commentItemModel, commentListModel, WDPublicUserType } from '../model/C | @@ -6,6 +6,13 @@ import { commentItemModel, commentListModel, WDPublicUserType } from '../model/C | ||
| 6 | import commentViewModel from '../viewmodel/CommentViewModel' | 6 | import commentViewModel from '../viewmodel/CommentViewModel' |
| 7 | import { CommentText } from './CommentText'; | 7 | import { CommentText } from './CommentText'; |
| 8 | import measure from '@ohos.measure' | 8 | import measure from '@ohos.measure' |
| 9 | +import {CommentCustomDialog} from './CommentCustomDialog' | ||
| 10 | + | ||
| 11 | +const TAG = 'CommentComponent'; | ||
| 12 | + | ||
| 13 | + | ||
| 14 | + | ||
| 15 | + | ||
| 9 | 16 | ||
| 10 | @Entry | 17 | @Entry |
| 11 | @Preview | 18 | @Preview |
| @@ -13,10 +20,19 @@ import measure from '@ohos.measure' | @@ -13,10 +20,19 @@ import measure from '@ohos.measure' | ||
| 13 | export struct CommentComponent { | 20 | export struct CommentComponent { |
| 14 | @State private browSingModel: commentListModel = new commentListModel() | 21 | @State private browSingModel: commentListModel = new commentListModel() |
| 15 | isloading: boolean = false | 22 | isloading: boolean = false |
| 16 | - // @State allDatas :commentItemModel[] = []; | ||
| 17 | - | ||
| 18 | @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource(); | 23 | @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource(); |
| 19 | 24 | ||
| 25 | + dialogController: CustomDialogController = new CustomDialogController({ | ||
| 26 | + builder: CommentCustomDialog(), | ||
| 27 | + autoCancel: true, | ||
| 28 | + alignment: DialogAlignment.Bottom, | ||
| 29 | + customStyle: true, | ||
| 30 | + offset: { | ||
| 31 | + dx: 0, | ||
| 32 | + dy: -20 | ||
| 33 | + } | ||
| 34 | + }) | ||
| 35 | + | ||
| 20 | aboutToAppear() { | 36 | aboutToAppear() { |
| 21 | this.getData(); | 37 | this.getData(); |
| 22 | this.getData(); | 38 | this.getData(); |
| @@ -59,7 +75,7 @@ export struct CommentComponent { | @@ -59,7 +75,7 @@ export struct CommentComponent { | ||
| 59 | .height('32') | 75 | .height('32') |
| 60 | .objectFit(ImageFit.Cover) | 76 | .objectFit(ImageFit.Cover) |
| 61 | .borderRadius(16) | 77 | .borderRadius(16) |
| 62 | - Image($r('app.media.icon_border_test')) | 78 | + Image(item.api_levelHead) |
| 63 | .width('48') | 79 | .width('48') |
| 64 | .height('48') | 80 | .height('48') |
| 65 | .objectFit(ImageFit.Cover) | 81 | .objectFit(ImageFit.Cover) |
| @@ -167,7 +183,6 @@ export struct CommentComponent { | @@ -167,7 +183,6 @@ export struct CommentComponent { | ||
| 167 | // ///1天~2天:1天前 | 183 | // ///1天~2天:1天前 |
| 168 | // ///2天~:日期隐藏 | 184 | // ///2天~:日期隐藏 |
| 169 | 185 | ||
| 170 | - | ||
| 171 | Text(DateTimeUtils.getCommentTime(Number.parseFloat(item.createTime))) | 186 | Text(DateTimeUtils.getCommentTime(Number.parseFloat(item.createTime))) |
| 172 | .fontColor($r('app.color.color_B0B0B0')) | 187 | .fontColor($r('app.color.color_B0B0B0')) |
| 173 | .fontSize(12) | 188 | .fontSize(12) |
| @@ -212,6 +227,10 @@ export struct CommentComponent { | @@ -212,6 +227,10 @@ export struct CommentComponent { | ||
| 212 | 227 | ||
| 213 | List() { | 228 | List() { |
| 214 | ListItemGroup({ header: this.titleHeader() }) | 229 | ListItemGroup({ header: this.titleHeader() }) |
| 230 | + .onClick(()=>{ | ||
| 231 | + console.log(TAG) | ||
| 232 | + this.dialogController.open() | ||
| 233 | + }) | ||
| 215 | LazyForEach(this.allDatas, (item: commentItemModel, index: number) => { | 234 | LazyForEach(this.allDatas, (item: commentItemModel, index: number) => { |
| 216 | if (item.hasMore) { | 235 | if (item.hasMore) { |
| 217 | ListItemGroup({ header: this.CommentHeaderItem(item), footer: this.GroupFooterView(item) }) { | 236 | ListItemGroup({ header: this.CommentHeaderItem(item), footer: this.GroupFooterView(item) }) { |
| @@ -219,6 +238,9 @@ export struct CommentComponent { | @@ -219,6 +238,9 @@ export struct CommentComponent { | ||
| 219 | ListItem() { | 238 | ListItem() { |
| 220 | ChildCommentItem(); | 239 | ChildCommentItem(); |
| 221 | } | 240 | } |
| 241 | + .onClick(()=>{ | ||
| 242 | + console.log(TAG) | ||
| 243 | + }) | ||
| 222 | }) | 244 | }) |
| 223 | } | 245 | } |
| 224 | }else { | 246 | }else { |
| @@ -227,6 +249,9 @@ export struct CommentComponent { | @@ -227,6 +249,9 @@ export struct CommentComponent { | ||
| 227 | ListItem() { | 249 | ListItem() { |
| 228 | ChildCommentItem(); | 250 | ChildCommentItem(); |
| 229 | } | 251 | } |
| 252 | + .onClick(()=>{ | ||
| 253 | + console.log(TAG) | ||
| 254 | + }) | ||
| 230 | }) | 255 | }) |
| 231 | } | 256 | } |
| 232 | } | 257 | } |
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentCustomDialog.ets
0 → 100644
| 1 | +@Preview | ||
| 2 | +@CustomDialog | ||
| 3 | +export struct CommentCustomDialog { | ||
| 4 | + controller: CustomDialogController = new CustomDialogController({ | ||
| 5 | + builder: CommentCustomDialog(), | ||
| 6 | + autoCancel: true, | ||
| 7 | + alignment: DialogAlignment.Bottom, | ||
| 8 | + customStyle: true, | ||
| 9 | + }) | ||
| 10 | + | ||
| 11 | + build() { | ||
| 12 | + Column() { | ||
| 13 | + Row() { | ||
| 14 | + TextArea({ placeholder: '优质评论会获得最佳评论人的称号' }) | ||
| 15 | + .height('100%') | ||
| 16 | + .width('100%') | ||
| 17 | + .backgroundColor($r('app.color.color_transparent')) | ||
| 18 | + } | ||
| 19 | + .backgroundColor('#F9F9F9') | ||
| 20 | + // .width('100%') | ||
| 21 | + .margin({ top: 12,right: 12, left: 12, bottom: 10 }) | ||
| 22 | + .height(80) | ||
| 23 | + .borderRadius(4) | ||
| 24 | + | ||
| 25 | + Row(){ | ||
| 26 | + Row() { | ||
| 27 | + Row({ space: 12 }) { | ||
| 28 | + //语音暂时不做,隐藏 | ||
| 29 | + // Image($r('app.media.WDInput_voice')).width(30).height(30) | ||
| 30 | + | ||
| 31 | + Image($r('app.media.WDInput_keyboardImage')).width(30).height(30) | ||
| 32 | + } | ||
| 33 | + // Blank() | ||
| 34 | + | ||
| 35 | + Row() { | ||
| 36 | + Text('发布') | ||
| 37 | + .backgroundColor('#F89381') | ||
| 38 | + .width(80) | ||
| 39 | + .height(30) | ||
| 40 | + .fontSize(15) | ||
| 41 | + .fontColor(Color.White) | ||
| 42 | + .textAlign(TextAlign.Center) | ||
| 43 | + .borderRadius(4) | ||
| 44 | + } | ||
| 45 | + }.justifyContent(FlexAlign.SpaceBetween) | ||
| 46 | + .width('100%') | ||
| 47 | + .height(60) | ||
| 48 | + // .margin({ right: 12, left: 12 }) | ||
| 49 | + // .backgroundColor(Color.Red) | ||
| 50 | + }.padding({left:12, right:12}) | ||
| 51 | + }.backgroundColor(Color.White) | ||
| 52 | + .width('100%') | ||
| 53 | + .offset({ | ||
| 54 | + y: 20 | ||
| 55 | + }) | ||
| 56 | + } | ||
| 57 | +} | ||
| 58 | + | ||
| 59 | + | ||
| 60 | + | ||
| 61 | + |
| @@ -11,7 +11,7 @@ export struct LiveCommentComponent { | @@ -11,7 +11,7 @@ export struct LiveCommentComponent { | ||
| 11 | 11 | ||
| 12 | build() { | 12 | build() { |
| 13 | Row() { | 13 | Row() { |
| 14 | - Image($r('app.media.back_icon')) | 14 | + Image($r('app.media.iv_back_left_black')) |
| 15 | .width(24) | 15 | .width(24) |
| 16 | .height(24) | 16 | .height(24) |
| 17 | .margin({ | 17 | .margin({ |
| @@ -71,7 +71,7 @@ export struct LiveCommentComponent { | @@ -71,7 +71,7 @@ export struct LiveCommentComponent { | ||
| 71 | left: 6, | 71 | left: 6, |
| 72 | right: 2 | 72 | right: 2 |
| 73 | }) | 73 | }) |
| 74 | - Image(this.isLike ? $r('app.media.iv_live_comment_hert_light') : $r('app.media.comment_like_normal')) | 74 | + Image(this.isLike ? $r('app.media.icon_like_selected_redheart') : $r('app.media.iv_live_heart_normal')) |
| 75 | .width(24) | 75 | .width(24) |
| 76 | .height(24) | 76 | .height(24) |
| 77 | .margin({ | 77 | .margin({ |
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
| @@ -2,7 +2,8 @@ import { ViewType } from 'wdConstant/Index' | @@ -2,7 +2,8 @@ import { ViewType } from 'wdConstant/Index' | ||
| 2 | import { DateTimeUtils, LazyDataSource, WindowModel } from 'wdKit/Index' | 2 | import { DateTimeUtils, LazyDataSource, WindowModel } from 'wdKit/Index' |
| 3 | import { commentItemModel, commentListModel } from '../model/CommentModel' | 3 | import { commentItemModel, commentListModel } from '../model/CommentModel' |
| 4 | import commentViewModel from '../viewmodel/CommentViewModel' | 4 | import commentViewModel from '../viewmodel/CommentViewModel' |
| 5 | -import { window } from '@kit.ArkUI' | 5 | +import { router, window } from '@kit.ArkUI' |
| 6 | +import { CustomTitleUI } from '../../reusable/CustomTitleUI' | ||
| 6 | 7 | ||
| 7 | const TAG = 'QualityCommentsComponent'; | 8 | const TAG = 'QualityCommentsComponent'; |
| 8 | 9 | ||
| @@ -10,11 +11,14 @@ const TAG = 'QualityCommentsComponent'; | @@ -10,11 +11,14 @@ const TAG = 'QualityCommentsComponent'; | ||
| 10 | @Preview | 11 | @Preview |
| 11 | @Component | 12 | @Component |
| 12 | export struct QualityCommentsComponent { | 13 | export struct QualityCommentsComponent { |
| 14 | + @State tileOpacity: number = 0; | ||
| 15 | + firstPositionY: number = 0; | ||
| 13 | bottomSafeHeight: string = AppStorage.get<number>('bottomSafeHeight') + 'px'; | 16 | bottomSafeHeight: string = AppStorage.get<number>('bottomSafeHeight') + 'px'; |
| 17 | + topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; | ||
| 14 | @State private browSingModel: commentListModel = new commentListModel() | 18 | @State private browSingModel: commentListModel = new commentListModel() |
| 15 | isloading: boolean = false | 19 | isloading: boolean = false |
| 16 | - lastWindowColor:string = '#ffffff' | ||
| 17 | - currentWindowColor:string = '#FF4202' | 20 | + lastWindowColor: string = '#ffffff' |
| 21 | + currentWindowColor: string = '#FF4202' | ||
| 18 | @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource(); | 22 | @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource(); |
| 19 | 23 | ||
| 20 | aboutToDisappear(): void { | 24 | aboutToDisappear(): void { |
| @@ -32,25 +36,25 @@ export struct QualityCommentsComponent { | @@ -32,25 +36,25 @@ export struct QualityCommentsComponent { | ||
| 32 | this.fullScreen(); | 36 | this.fullScreen(); |
| 33 | 37 | ||
| 34 | 38 | ||
| 35 | - commentViewModel.fetchQualityCommentListLocal(getContext()).then(commentListModel => { | ||
| 36 | - this.allDatas.push(...commentListModel.list) | ||
| 37 | - }) | ||
| 38 | - | ||
| 39 | - // commentViewModel.fetchQualityCommentList('1').then((commentListModel) => { | ||
| 40 | - // if (commentListModel && commentListModel.list && commentListModel.list.length > 0) { | ||
| 41 | - // // commentListModel.hasMore = true; | ||
| 42 | - // // this.browSingModel.viewType = ViewType.LOADED; | 39 | + // commentViewModel.fetchQualityCommentListLocal(getContext()).then(commentListModel => { |
| 43 | // this.allDatas.push(...commentListModel.list) | 40 | // this.allDatas.push(...commentListModel.list) |
| 44 | - // // if (commentListModel.list.length === this.browSingModel.pageSize) { | ||
| 45 | - // // this.browSingModel.currentPage++; | ||
| 46 | - // // this.browSingModel.hasMore = true; | ||
| 47 | - // // } else { | ||
| 48 | - // // this.browSingModel.hasMore = false; | ||
| 49 | - // // } | 41 | + // }) |
| 42 | + | ||
| 43 | + commentViewModel.fetchQualityCommentList('1').then((commentListModel) => { | ||
| 44 | + if (commentListModel && commentListModel.list && commentListModel.list.length > 0) { | ||
| 45 | + // commentListModel.hasMore = true; | ||
| 46 | + // this.browSingModel.viewType = ViewType.LOADED; | ||
| 47 | + this.allDatas.push(...commentListModel.list) | ||
| 48 | + // if (commentListModel.list.length === this.browSingModel.pageSize) { | ||
| 49 | + // this.browSingModel.currentPage++; | ||
| 50 | + // this.browSingModel.hasMore = true; | ||
| 50 | // } else { | 51 | // } else { |
| 51 | - // this.browSingModel.viewType = ViewType.EMPTY; | 52 | + // this.browSingModel.hasMore = false; |
| 52 | // } | 53 | // } |
| 53 | - // }) | 54 | + } else { |
| 55 | + this.browSingModel.viewType = ViewType.EMPTY; | ||
| 56 | + } | ||
| 57 | + }) | ||
| 54 | } | 58 | } |
| 55 | 59 | ||
| 56 | fullScreen() { | 60 | fullScreen() { |
| @@ -69,30 +73,143 @@ export struct QualityCommentsComponent { | @@ -69,30 +73,143 @@ export struct QualityCommentsComponent { | ||
| 69 | @Builder | 73 | @Builder |
| 70 | titleHeader() { | 74 | titleHeader() { |
| 71 | Row() { | 75 | Row() { |
| 72 | - Image($r('app.media.comment_img_banner')).width('100%').aspectRatio(375 / 283); | 76 | + Image($r('app.media.comment_img_banner')).width('100%') |
| 77 | + .height(283) | ||
| 78 | + // .aspectRatio(375 / 283); | ||
| 79 | + } | ||
| 80 | + .onAreaChange((oldValue: Area, newValue: Area) => { | ||
| 81 | + | ||
| 82 | + let persent = Math.abs(Number(newValue.globalPosition.y)) / 150 | ||
| 83 | + if (persent > 1) { | ||
| 84 | + persent = 1 | ||
| 85 | + } | ||
| 86 | + this.tileOpacity = persent | ||
| 87 | + | ||
| 88 | + }) | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + /*透明导航栏*/ | ||
| 92 | + @Builder | ||
| 93 | + TabbarTransparent() { | ||
| 94 | + RelativeContainer() { | ||
| 95 | + //标题栏目 | ||
| 96 | + Image($r('app.media.icon_arrow_left_white')) | ||
| 97 | + .width(24) | ||
| 98 | + .height(24) | ||
| 99 | + .objectFit(ImageFit.Auto) | ||
| 100 | + .id("back_icon") | ||
| 101 | + .alignRules({ | ||
| 102 | + center: { anchor: "__container__", align: VerticalAlign.Center }, | ||
| 103 | + left: { anchor: "__container__", align: HorizontalAlign.Start } | ||
| 104 | + }) | ||
| 105 | + .offset({ | ||
| 106 | + y: (this.topSafeHeight / 2) + 'px' | ||
| 107 | + }) | ||
| 108 | + .margin({ left: 16 }) | ||
| 109 | + .onClick(() => { | ||
| 110 | + router.back() | ||
| 111 | + }) | ||
| 73 | } | 112 | } |
| 113 | + .visibility(this.tileOpacity > 0 ? 1 : 0) | ||
| 114 | + .height(this.topSafeHeight + vp2px(44) + 'px') | ||
| 115 | + .width('100%') | ||
| 116 | + .backgroundColor($r('app.color.color_transparent')) | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + /*导航栏*/ | ||
| 120 | + @Builder | ||
| 121 | + TabbarNormal() { | ||
| 122 | + RelativeContainer() { | ||
| 123 | + //标题栏目 | ||
| 124 | + Image($r('app.media.icon_arrow_left')) | ||
| 125 | + .width(24) | ||
| 126 | + .height(24) | ||
| 127 | + .objectFit(ImageFit.Auto) | ||
| 128 | + .id("back_icon") | ||
| 129 | + .alignRules({ | ||
| 130 | + center: { anchor: "__container__", align: VerticalAlign.Center }, | ||
| 131 | + left: { anchor: "__container__", align: HorizontalAlign.Start } | ||
| 132 | + }) | ||
| 133 | + .offset({ | ||
| 134 | + y: (this.topSafeHeight / 2) + 'px' | ||
| 135 | + }) | ||
| 136 | + .margin({ left: 16 }) | ||
| 137 | + .onClick(() => { | ||
| 138 | + router.back() | ||
| 139 | + }) | ||
| 140 | + | ||
| 141 | + Text('精选评论') | ||
| 142 | + // .height('42lpx') | ||
| 143 | + .maxLines(1) | ||
| 144 | + .id("title") | ||
| 145 | + .fontSize('35lpx') | ||
| 146 | + .fontWeight(400) | ||
| 147 | + .fontColor($r('app.color.color_222222')) | ||
| 148 | + .lineHeight('42lpx') | ||
| 149 | + .alignRules({ | ||
| 150 | + center: {anchor: "__container__", align: VerticalAlign.Center}, | ||
| 151 | + middle: {anchor: "__container__", align: HorizontalAlign.Center} | ||
| 152 | + }) | ||
| 153 | + .offset({ | ||
| 154 | + y: (this.topSafeHeight / 2) + 'px' | ||
| 155 | + }) | ||
| 156 | + } | ||
| 157 | + .visibility(this.tileOpacity > 0 ? 0 : 1) | ||
| 158 | + .opacity(this.tileOpacity) | ||
| 159 | + .height(this.topSafeHeight + vp2px(44) + 'px') | ||
| 160 | + .width('100%') | ||
| 161 | + .backgroundColor($r('app.color.white')) | ||
| 74 | } | 162 | } |
| 75 | 163 | ||
| 76 | build() { | 164 | build() { |
| 77 | Column() { | 165 | Column() { |
| 78 | - // this.titleHeader() | ||
| 79 | - List({ space: 28 }) { | ||
| 80 | - ListItemGroup({ header: this.titleHeader() }) | 166 | + Stack({ alignContent: Alignment.Top }) { |
| 167 | + | ||
| 168 | + Scroll() { | ||
| 169 | + Column() { | ||
| 170 | + Stack() { | ||
| 171 | + this.titleHeader() | ||
| 81 | 172 | ||
| 173 | + List({ space: 12 }) { | ||
| 174 | + // ListItemGroup({ header: this.titleHeader() }) | ||
| 82 | LazyForEach(this.allDatas, (item: commentItemModel, index: number) => { | 175 | LazyForEach(this.allDatas, (item: commentItemModel, index: number) => { |
| 83 | ListItem() { | 176 | ListItem() { |
| 84 | QualityCommentItem({ item: item }).margin({ left: 12, right: 12 }) | 177 | QualityCommentItem({ item: item }).margin({ left: 12, right: 12 }) |
| 85 | } | 178 | } |
| 86 | - // .offset({ | ||
| 87 | - // y:-87 | ||
| 88 | - // }) | ||
| 89 | }) | 179 | }) |
| 180 | + ListItem() { | ||
| 181 | + | ||
| 182 | + }.height(this.bottomSafeHeight) | ||
| 90 | } | 183 | } |
| 91 | - // .contentStartOffset(- 87) | 184 | + .margin({ top: 196 }) |
| 185 | + .height("100%") | ||
| 186 | + .width("100%") | ||
| 92 | .edgeEffect(EdgeEffect.Spring) | 187 | .edgeEffect(EdgeEffect.Spring) |
| 93 | - .margin({bottom:this.bottomSafeHeight}) | 188 | + .nestedScroll({ |
| 189 | + scrollForward: NestedScrollMode.PARENT_FIRST, | ||
| 190 | + scrollBackward: NestedScrollMode.SELF_FIRST | ||
| 191 | + }) | ||
| 192 | + | ||
| 193 | + // .margin({ bottom: this.bottomSafeHeight }) | ||
| 194 | + | ||
| 94 | // .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | 195 | // .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) |
| 95 | - }.backgroundColor(this.currentWindowColor).height('100%').width('100%') | 196 | + }.alignContent(Alignment.Top) |
| 197 | + }.backgroundColor(this.currentWindowColor).width('100%') | ||
| 198 | + } | ||
| 199 | + .friction(0.6) | ||
| 200 | + .scrollBar(BarState.Off) | ||
| 201 | + .edgeEffect(EdgeEffect.None) | ||
| 202 | + .width('100%') | ||
| 203 | + .height('100%') | ||
| 204 | + | ||
| 205 | + this.TabbarTransparent() | ||
| 206 | + this.TabbarNormal() | ||
| 207 | + | ||
| 208 | + | ||
| 209 | + } | ||
| 210 | + | ||
| 211 | + } | ||
| 212 | + | ||
| 96 | } | 213 | } |
| 97 | } | 214 | } |
| 98 | 215 | ||
| @@ -103,8 +220,11 @@ struct QualityCommentItem { | @@ -103,8 +220,11 @@ struct QualityCommentItem { | ||
| 103 | 220 | ||
| 104 | build() { | 221 | build() { |
| 105 | Column() { | 222 | Column() { |
| 223 | + Column().height(16).width('100%').opacity(0) | ||
| 224 | + Column() { | ||
| 106 | /*头像以及昵称*/ | 225 | /*头像以及昵称*/ |
| 107 | RelativeContainer() { | 226 | RelativeContainer() { |
| 227 | + | ||
| 108 | Image(this.item.fromUserHeader) | 228 | Image(this.item.fromUserHeader) |
| 109 | .width(50) | 229 | .width(50) |
| 110 | .height(50) | 230 | .height(50) |
| @@ -185,22 +305,35 @@ struct QualityCommentItem { | @@ -185,22 +305,35 @@ struct QualityCommentItem { | ||
| 185 | /*时间 点赞评论*/ | 305 | /*时间 点赞评论*/ |
| 186 | Row() { | 306 | Row() { |
| 187 | 307 | ||
| 188 | - Text(DateTimeUtils.getCommentTime(DateTimeUtils.getDateTimestamp(this.item.createTime))).fontSize(14).fontColor('#999999') | 308 | + Text(DateTimeUtils.getCommentTime(DateTimeUtils.getDateTimestamp(this.item.createTime))) |
| 309 | + .fontSize(14) | ||
| 310 | + .fontColor('#999999') | ||
| 189 | 311 | ||
| 190 | - Row({space:16}){ | ||
| 191 | - Row(){ | 312 | + Row({ space: 16 }) { |
| 313 | + Row() { | ||
| 192 | Image($r('app.media.comment_icon_pinglun')).width(16).height(16) | 314 | Image($r('app.media.comment_icon_pinglun')).width(16).height(16) |
| 193 | } | 315 | } |
| 194 | 316 | ||
| 195 | - Row(){ | 317 | + Row() { |
| 196 | //comment_like_select | 318 | //comment_like_select |
| 197 | - Image($r(this.item.likeNum?'app.media.comment_like_select':'app.media.comment_like_normal')).width(16).height(16) | ||
| 198 | - if (this.item.likeNum){Text(this.item.likeNum).fontColor(this.item.isLike?'#ED2800':'#999999').fontSize(14).margin({left:3})} | 319 | + Image($r(this.item.likeNum ? 'app.media.comment_like_select' : 'app.media.comment_like_normal')) |
| 320 | + .width(16) | ||
| 321 | + .height(16) | ||
| 322 | + if (this.item.likeNum) { | ||
| 323 | + Text(this.item.likeNum) | ||
| 324 | + .fontColor(this.item.isLike ? '#ED2800' : '#999999') | ||
| 325 | + .fontSize(14) | ||
| 326 | + .margin({ left: 3 }) | ||
| 327 | + } | ||
| 199 | } | 328 | } |
| 200 | } | 329 | } |
| 201 | }.height(38).width('100%').justifyContent(FlexAlign.SpaceBetween) | 330 | }.height(38).width('100%').justifyContent(FlexAlign.SpaceBetween) |
| 202 | 331 | ||
| 203 | }.backgroundColor('#FFFFFF').padding({ top: 0, left: 16, right: 16 }).borderRadius(4) | 332 | }.backgroundColor('#FFFFFF').padding({ top: 0, left: 16, right: 16 }).borderRadius(4) |
| 333 | + } | ||
| 204 | 334 | ||
| 205 | } | 335 | } |
| 206 | } | 336 | } |
| 337 | + | ||
| 338 | + | ||
| 339 | + |
| 1 | import { Logger, ResourcesUtils } from 'wdKit/Index'; | 1 | import { Logger, ResourcesUtils } from 'wdKit/Index'; |
| 2 | -import { HttpUrlUtils, ResponseDTO } from 'wdNetwork/Index'; | 2 | +import { HttpBizUtil, HttpUrlUtils, ResponseDTO } from 'wdNetwork/Index'; |
| 3 | import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; | 3 | import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; |
| 4 | -import { commentItemModel, commentListModel } from '../model/CommentModel'; | 4 | +import { commentItemModel, commentListModel, commentStatusListModel, commentStatusModel } from '../model/CommentModel'; |
| 5 | import HashMap from '@ohos.util.HashMap'; | 5 | import HashMap from '@ohos.util.HashMap'; |
| 6 | +import { ifaa } from '@kit.OnlineAuthenticationKit'; | ||
| 6 | 7 | ||
| 7 | const TAG = "CommentViewModel" | 8 | const TAG = "CommentViewModel" |
| 8 | 9 | ||
| 9 | class CommentViewModel { | 10 | class CommentViewModel { |
| 10 | private static instance: CommentViewModel | 11 | private static instance: CommentViewModel |
| 12 | + | ||
| 11 | /** | 13 | /** |
| 12 | * 单例模式 | 14 | * 单例模式 |
| 13 | * @returns | 15 | * @returns |
| @@ -19,35 +21,34 @@ class CommentViewModel { | @@ -19,35 +21,34 @@ class CommentViewModel { | ||
| 19 | return CommentViewModel.instance; | 21 | return CommentViewModel.instance; |
| 20 | } | 22 | } |
| 21 | 23 | ||
| 22 | - | ||
| 23 | /*获取本地mock数据*/ | 24 | /*获取本地mock数据*/ |
| 24 | async getCommentLocal(context: Context): Promise<commentListModel> { | 25 | async getCommentLocal(context: Context): Promise<commentListModel> { |
| 25 | Logger.info(TAG, `getBottomNavDataMock start`); | 26 | Logger.info(TAG, `getBottomNavDataMock start`); |
| 26 | - let compRes: ResponseDTO<commentListModel> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<commentListModel>>(context,'comment_local.json' ); | 27 | + let compRes: ResponseDTO<commentListModel> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<commentListModel>>(context, 'comment_local.json'); |
| 27 | if (!compRes || !compRes.data) { | 28 | if (!compRes || !compRes.data) { |
| 28 | Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`); | 29 | Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`); |
| 29 | return new commentListModel() | 30 | return new commentListModel() |
| 30 | } | 31 | } |
| 31 | Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`); | 32 | Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`); |
| 32 | - return compRes.data | 33 | + return this.fetchCommentStatusAndConfigAuthIcon(compRes.data) |
| 34 | + // this.fetchCommentStatusAndConfigAuthIcon(compRes.data) | ||
| 35 | + // return compRes.data | ||
| 33 | } | 36 | } |
| 34 | 37 | ||
| 35 | - /*获取本地mock数据*/ | 38 | + /*获取热门评论本地mock数据*/ |
| 36 | async fetchQualityCommentListLocal(context: Context): Promise<commentListModel> { | 39 | async fetchQualityCommentListLocal(context: Context): Promise<commentListModel> { |
| 37 | Logger.info(TAG, `getBottomNavDataMock start`); | 40 | Logger.info(TAG, `getBottomNavDataMock start`); |
| 38 | - let compRes: ResponseDTO<commentListModel> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<commentListModel>>(context,'qualityComment_local.json' ); | 41 | + let compRes: ResponseDTO<commentListModel> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<commentListModel>>(context, 'qualityComment_local.json'); |
| 39 | if (!compRes || !compRes.data) { | 42 | if (!compRes || !compRes.data) { |
| 40 | Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`); | 43 | Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`); |
| 41 | return new commentListModel() | 44 | return new commentListModel() |
| 42 | } | 45 | } |
| 43 | Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`); | 46 | Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`); |
| 44 | - return compRes.data | 47 | + return this.fetchCommentStatusAndConfigAuthIcon(compRes.data) |
| 45 | } | 48 | } |
| 46 | 49 | ||
| 47 | - | ||
| 48 | - | ||
| 49 | - //qualityComment_local.json | ||
| 50 | - fetchQualityCommentList(pageNum: string) { | 50 | + /*获取热门评论*/ |
| 51 | + fetchQualityCommentList(pageNum: string): Promise<commentListModel> { | ||
| 51 | let url = HttpUrlUtils.getQualityCommentUrl() + `?&pageSize=${10}&pageNum=${pageNum}` | 52 | let url = HttpUrlUtils.getQualityCommentUrl() + `?&pageSize=${10}&pageNum=${pageNum}` |
| 52 | let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | 53 | let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 53 | return new Promise<commentListModel>((success, fail) => { | 54 | return new Promise<commentListModel>((success, fail) => { |
| @@ -62,7 +63,15 @@ class CommentViewModel { | @@ -62,7 +63,15 @@ class CommentViewModel { | ||
| 62 | } | 63 | } |
| 63 | let listData = data.data as commentListModel | 64 | let listData = data.data as commentListModel |
| 64 | 65 | ||
| 65 | - success(listData) | 66 | + this.fetchCommentStatusAndConfigAuthIcon(listData).then((commentListModel) =>{ |
| 67 | + console.log(TAG, 'fetchCommentStatusAndConfigAuthIcon完成') | ||
| 68 | + success(commentListModel) | ||
| 69 | + }) | ||
| 70 | + | ||
| 71 | + // return this.fetchCommentStatusAndConfigAuthIcon(listData) | ||
| 72 | + | ||
| 73 | + // this.fetchCommentStatusAndConfigAuthIcon(listData) | ||
| 74 | + // success(listData) | ||
| 66 | }, (error: Error) => { | 75 | }, (error: Error) => { |
| 67 | fail(error.message) | 76 | fail(error.message) |
| 68 | Logger.debug(TAG, error.toString()) | 77 | Logger.debug(TAG, error.toString()) |
| @@ -70,35 +79,192 @@ class CommentViewModel { | @@ -70,35 +79,192 @@ class CommentViewModel { | ||
| 70 | }) | 79 | }) |
| 71 | } | 80 | } |
| 72 | 81 | ||
| 82 | + /*多接口批查*/ | ||
| 83 | + fetchCommentStatusAndConfigAuthIcon(model: commentListModel): Promise<commentListModel> { | ||
| 84 | + | ||
| 85 | + let commentIDs: string[] = []; | ||
| 86 | + | ||
| 87 | + let fromUserIDs: string[] = []; | ||
| 88 | + | ||
| 89 | + let creatorIDs: string[] = []; | ||
| 90 | + | ||
| 91 | + //主评论 | ||
| 92 | + for (const element of model.list) { | ||
| 93 | + if ((element.id + '').length > 0) { | ||
| 94 | + commentIDs.push(element.id + '') | ||
| 95 | + } | ||
| 96 | + if ((element.fromUserId + '').length > 0) { | ||
| 97 | + fromUserIDs.push(element.fromUserId) | ||
| 98 | + } | ||
| 99 | + if ((element.fromCreatorId + '').length > 0) { | ||
| 100 | + creatorIDs.push(element.fromCreatorId) | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + | ||
| 104 | + //子评论 | ||
| 105 | + if (element.childComments) { | ||
| 106 | + for (const obj2 of element.childComments) { | ||
| 107 | + if ((obj2.id + '').length > 0) { | ||
| 108 | + commentIDs.push(obj2.id + '') | ||
| 109 | + } | ||
| 110 | + if ((obj2.fromUserId + '').length > 0) { | ||
| 111 | + fromUserIDs.push(obj2.fromUserId) | ||
| 112 | + } | ||
| 113 | + if ((obj2.fromCreatorId + '').length > 0) { | ||
| 114 | + creatorIDs.push(obj2.fromCreatorId) | ||
| 115 | + } | ||
| 116 | + } | ||
| 117 | + } | ||
| 118 | + } | ||
| 73 | 119 | ||
| 74 | - // BaseGetRequest(contentID:number,contentType:string,pageNum:string){ | ||
| 75 | - // let url = HttpUrlUtils.getMyCollectionListDataUrl()+ `?type=${type}&operateTag=${1}&pageSize=${10}&pageNum=${pageNum}` | ||
| 76 | - // if (tagId.length > 0) { | ||
| 77 | - // url = url + `&tagId=${tagId}` | ||
| 78 | - // } | ||
| 79 | - // let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders() | ||
| 80 | - // return WDHttp.get<ResponseDTO<commentListModel>>(url, headers) | ||
| 81 | - // } | ||
| 82 | - // | ||
| 83 | - // | ||
| 84 | - // fetchCommentList(contentID:number,contentType:string,pageNum:string):Promise<commentListModel>{ | ||
| 85 | - // return new Promise<commentListModel>((success,error) => { | ||
| 86 | - // this.BaseGetRequest(contentID,contentType,pageNum).then((navResDTO: ResponseDTO<commentListModel>) => { | ||
| 87 | - // if (!navResDTO || navResDTO.code != 0) { | ||
| 88 | - // // success(this.getAppointmentListDataLocal(context)) | ||
| 89 | - // return | ||
| 90 | - // } | ||
| 91 | - // Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp); | ||
| 92 | - // let listData = navResDTO.data as commentListModel | ||
| 93 | - // success(listData) | ||
| 94 | - // }).catch((err: Error) => { | ||
| 95 | - // Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 96 | - // error("page data invalid"); | ||
| 97 | - // }) | ||
| 98 | - // }) | ||
| 99 | - // } | ||
| 100 | 120 | ||
| 121 | + let promiseArray: Promise<commentStatusListModel | void>[] = []; | ||
| 101 | 122 | ||
| 123 | + //TODO 未登录不用批查 | ||
| 124 | + if (commentIDs.length > 0) { | ||
| 125 | + let promise1 = new Promise<void>((success) => { | ||
| 126 | + // HttpRequest HttpBizUtil | ||
| 127 | + let url = HttpUrlUtils.getBatchCommentStatusUrl(); | ||
| 128 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 129 | + let bean: Record<string, string[]> = {}; | ||
| 130 | + bean['commentIdList'] = commentIDs; | ||
| 131 | + HttpRequest.post<ResponseDTO<commentStatusModel[]>>(url, bean, headers).then((data: ResponseDTO<commentStatusModel[]>) => { | ||
| 132 | + if (!data || !data.data) { | ||
| 133 | + success() | ||
| 134 | + return | ||
| 135 | + } | ||
| 136 | + if (data.code != 0) { | ||
| 137 | + success() | ||
| 138 | + return | ||
| 139 | + } | ||
| 140 | + if (data.data.length == 0) { | ||
| 141 | + success() | ||
| 142 | + return | ||
| 143 | + } | ||
| 144 | + let listData = data.data as commentStatusModel[] | ||
| 145 | + | ||
| 146 | + for (const element of listData) { | ||
| 147 | + for (const commentModel of model.list) { | ||
| 148 | + if (element.commentId == commentModel.id) { | ||
| 149 | + commentModel.api_status = element.status | ||
| 150 | + } | ||
| 151 | + if (commentModel.childComments) { | ||
| 152 | + for (const childCommentModel of commentModel.childComments) { | ||
| 153 | + if (element.commentId == childCommentModel.id) { | ||
| 154 | + childCommentModel.api_status = element.status | ||
| 155 | + } | ||
| 156 | + } | ||
| 157 | + } | ||
| 158 | + } | ||
| 159 | + } | ||
| 160 | + success() | ||
| 161 | + }, (error: Error) => { | ||
| 162 | + success() | ||
| 163 | + Logger.debug(TAG, error.toString()) | ||
| 164 | + }) | ||
| 165 | + }) | ||
| 166 | + promiseArray.push(promise1); | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + if (fromUserIDs.length > 0) { | ||
| 170 | + let promise2 = new Promise<void>((success) => { | ||
| 171 | + let url = HttpUrlUtils.getBatchUserUrl(); | ||
| 172 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 173 | + // HttpRequest HttpBizUtil | ||
| 174 | + HttpRequest.post<ResponseDTO<commentStatusModel[]>>(url, fromUserIDs, headers).then((data: ResponseDTO<commentStatusModel[]>) => { | ||
| 175 | + if (!data || !data.data) { | ||
| 176 | + success() | ||
| 177 | + return | ||
| 178 | + } | ||
| 179 | + if (data.code != 0) { | ||
| 180 | + success() | ||
| 181 | + return | ||
| 182 | + } | ||
| 183 | + if (data.data.length == 0) { | ||
| 184 | + success() | ||
| 185 | + return | ||
| 186 | + } | ||
| 187 | + let listData = data.data as commentStatusModel[] | ||
| 188 | + | ||
| 189 | + for (const element of listData) { | ||
| 190 | + for (const commentModel of model.list) { | ||
| 191 | + if (element.userId == commentModel.fromUserId) { | ||
| 192 | + commentModel.api_levelHead = element.levelHead | ||
| 193 | + } | ||
| 194 | + if (commentModel.childComments) { | ||
| 195 | + for (const childCommentModel of commentModel.childComments) { | ||
| 196 | + if (element.userId == childCommentModel.fromUserId) { | ||
| 197 | + childCommentModel.api_levelHead = element.levelHead | ||
| 198 | + } | ||
| 199 | + } | ||
| 200 | + } | ||
| 201 | + } | ||
| 202 | + } | ||
| 203 | + success() | ||
| 204 | + }, (error: Error) => { | ||
| 205 | + success() | ||
| 206 | + Logger.debug(TAG, error.toString()) | ||
| 207 | + }) | ||
| 208 | + }) | ||
| 209 | + promiseArray.push(promise2); | ||
| 210 | + } | ||
| 211 | + | ||
| 212 | + //TODO 一次20个上限 | ||
| 213 | + if (creatorIDs.length > 0) { | ||
| 214 | + let promise3 = new Promise<void>((success) => { | ||
| 215 | + let url = HttpUrlUtils.getDetailListUrl(); | ||
| 216 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 217 | + let bean: Record<string, string[]> = {}; | ||
| 218 | + bean['creatorIdList'] = creatorIDs; | ||
| 219 | + // HttpRequest HttpBizUtil | ||
| 220 | + HttpRequest.post<ResponseDTO<commentStatusModel[]>>(url, bean, headers).then((data: ResponseDTO<commentStatusModel[]>) => { | ||
| 221 | + if (!data || !data.data) { | ||
| 222 | + success() | ||
| 223 | + return | ||
| 224 | + } | ||
| 225 | + if (data.code != 0) { | ||
| 226 | + success() | ||
| 227 | + return | ||
| 228 | + } | ||
| 229 | + if (data.data.length == 0) { | ||
| 230 | + success() | ||
| 231 | + return | ||
| 232 | + } | ||
| 233 | + let listData = data.data as commentStatusModel[] | ||
| 234 | + | ||
| 235 | + for (const element of listData) { | ||
| 236 | + for (const commentModel of model.list) { | ||
| 237 | + if (element.creatorId == commentModel.fromCreatorId) { | ||
| 238 | + commentModel.api_authIcon = element.authIcon | ||
| 239 | + } | ||
| 240 | + if (commentModel.childComments) { | ||
| 241 | + for (const childCommentModel of commentModel.childComments) { | ||
| 242 | + if (element.creatorId == childCommentModel.fromCreatorId) { | ||
| 243 | + childCommentModel.api_authIcon = element.authIcon | ||
| 244 | + } | ||
| 245 | + } | ||
| 246 | + } | ||
| 247 | + } | ||
| 248 | + } | ||
| 249 | + success() | ||
| 250 | + }, (error: Error) => { | ||
| 251 | + success() | ||
| 252 | + Logger.debug(TAG, error.toString()) | ||
| 253 | + }) | ||
| 254 | + }) | ||
| 255 | + promiseArray.push(promise3); | ||
| 256 | + } | ||
| 257 | + | ||
| 258 | + return new Promise<commentListModel>((success) => { | ||
| 259 | + Promise.all(promiseArray).then(() => { | ||
| 260 | + console.log(TAG, 'Promise.all'); | ||
| 261 | + success(model) | ||
| 262 | + }) | ||
| 263 | + | ||
| 264 | + }) | ||
| 265 | + | ||
| 266 | + | ||
| 267 | + } | ||
| 102 | } | 268 | } |
| 103 | 269 | ||
| 104 | 270 |
| @@ -19,7 +19,6 @@ export default struct MinePagePersonFunctionUI { | @@ -19,7 +19,6 @@ export default struct MinePagePersonFunctionUI { | ||
| 19 | .interpolation(ImageInterpolation.High) | 19 | .interpolation(ImageInterpolation.High) |
| 20 | Text(`${item.msg}`) | 20 | Text(`${item.msg}`) |
| 21 | .margin({top:'8lpx'}) | 21 | .margin({top:'8lpx'}) |
| 22 | - .width('50lpx') | ||
| 23 | .height('23lpx') | 22 | .height('23lpx') |
| 24 | .fontColor($r('app.color.color_222222')) | 23 | .fontColor($r('app.color.color_222222')) |
| 25 | .fontSize('23lpx') | 24 | .fontSize('23lpx') |
| 1 | -import { StringUtils } from 'wdKit/Index' | 1 | +import { StringUtils, ToastUtils } from 'wdKit/Index' |
| 2 | import { HttpUrlUtils } from 'wdNetwork/Index' | 2 | import { HttpUrlUtils } from 'wdNetwork/Index' |
| 3 | +import { WDRouterRule, WDRouterPage } from 'wdRouter/Index' | ||
| 3 | import MinePageDatasModel from '../../../model/MinePageDatasModel' | 4 | import MinePageDatasModel from '../../../model/MinePageDatasModel' |
| 4 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem' | 5 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem' |
| 5 | import { FollowOperationRequestItem } from '../../../viewmodel/FollowOperationRequestItem' | 6 | import { FollowOperationRequestItem } from '../../../viewmodel/FollowOperationRequestItem' |
| @@ -12,14 +13,18 @@ export struct FollowChildComponent{ | @@ -12,14 +13,18 @@ export struct FollowChildComponent{ | ||
| 12 | build() { | 13 | build() { |
| 13 | if(this.type == 0 ){ | 14 | if(this.type == 0 ){ |
| 14 | Column(){ | 15 | Column(){ |
| 15 | - Blank().height('27lpx') | 16 | + Column(){ |
| 16 | 17 | ||
| 17 | Row() { | 18 | Row() { |
| 19 | + Row(){ | ||
| 18 | Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.default_head'):this.data.headPhotoUrl) | 20 | Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.default_head'):this.data.headPhotoUrl) |
| 19 | .objectFit(ImageFit.Auto) | 21 | .objectFit(ImageFit.Auto) |
| 20 | .width('92lpx') | 22 | .width('92lpx') |
| 21 | .height('92lpx') | 23 | .height('92lpx') |
| 22 | .margin({right:'15lpx'}) | 24 | .margin({right:'15lpx'}) |
| 25 | + .borderRadius(50) | ||
| 26 | + .borderWidth('1lpx') | ||
| 27 | + .borderColor($r('app.color.color_0D000000')) | ||
| 23 | 28 | ||
| 24 | Column(){ | 29 | Column(){ |
| 25 | Text(this.data.cnUserName) | 30 | Text(this.data.cnUserName) |
| @@ -28,17 +33,30 @@ export struct FollowChildComponent{ | @@ -28,17 +33,30 @@ export struct FollowChildComponent{ | ||
| 28 | .lineHeight('38lpx') | 33 | .lineHeight('38lpx') |
| 29 | .fontColor($r('app.color.color_222222')) | 34 | .fontColor($r('app.color.color_222222')) |
| 30 | .maxLines(1) | 35 | .maxLines(1) |
| 36 | + .margin({bottom:'8lpx'}) | ||
| 37 | + | ||
| 31 | Text(`粉丝${this.data.cnFansNum}`) | 38 | Text(`粉丝${this.data.cnFansNum}`) |
| 32 | .fontColor($r('app.color.color_B0B0B0')) | 39 | .fontColor($r('app.color.color_B0B0B0')) |
| 33 | .fontSize('23lpx') | 40 | .fontSize('23lpx') |
| 34 | - .maxLines(1) | 41 | + .fontWeight('400lpx') |
| 42 | + .lineHeight('31lpx') | ||
| 43 | + .margin({bottom:'8lpx'}) | ||
| 44 | + | ||
| 35 | Text(`${this.data.introduction}`) | 45 | Text(`${this.data.introduction}`) |
| 36 | .fontColor($r('app.color.color_B0B0B0')) | 46 | .fontColor($r('app.color.color_B0B0B0')) |
| 37 | .fontSize('23lpx') | 47 | .fontSize('23lpx') |
| 38 | .maxLines(2) | 48 | .maxLines(2) |
| 49 | + .textAlign(TextAlign.Start) | ||
| 39 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 50 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 40 | - }.layoutWeight(1) | 51 | + } |
| 52 | + .layoutWeight(1) | ||
| 41 | .alignItems(HorizontalAlign.Start) | 53 | .alignItems(HorizontalAlign.Start) |
| 54 | + .justifyContent(FlexAlign.Start) | ||
| 55 | + }.layoutWeight(1) | ||
| 56 | + .alignItems(VerticalAlign.Top) | ||
| 57 | + .onClick(()=>{ | ||
| 58 | + this.jumpCreatorHomePage() | ||
| 59 | + }) | ||
| 42 | 60 | ||
| 43 | if(this.data.status == "1"){ | 61 | if(this.data.status == "1"){ |
| 44 | Row(){ | 62 | Row(){ |
| @@ -47,18 +65,13 @@ export struct FollowChildComponent{ | @@ -47,18 +65,13 @@ export struct FollowChildComponent{ | ||
| 47 | .fontSize('23lpx') | 65 | .fontSize('23lpx') |
| 48 | .fontWeight('500lpx') | 66 | .fontWeight('500lpx') |
| 49 | .lineHeight('35lpx') | 67 | .lineHeight('35lpx') |
| 50 | - }.backgroundColor($r('app.color.color_F5F5F5')) | ||
| 51 | - .borderRadius('6lpx') | ||
| 52 | - .borderColor($r('app.color.color_F5F5F5')) | ||
| 53 | - .borderWidth('2lpx') | 68 | + } |
| 54 | .justifyContent(FlexAlign.Center) | 69 | .justifyContent(FlexAlign.Center) |
| 55 | .width('100lpx') | 70 | .width('100lpx') |
| 56 | .height('46lpx') | 71 | .height('46lpx') |
| 57 | - .margin({left:'4lpx',top:'23lpx'}) | ||
| 58 | .onClick(()=>{ | 72 | .onClick(()=>{ |
| 59 | this.followOperation() | 73 | this.followOperation() |
| 60 | - // this.data.status = "0" | ||
| 61 | - }) | 74 | + }).margin({top:'29lpx'}) |
| 62 | }else{ | 75 | }else{ |
| 63 | Row(){ | 76 | Row(){ |
| 64 | Image($r('app.media.follow_icon')) | 77 | Image($r('app.media.follow_icon')) |
| @@ -76,27 +89,27 @@ export struct FollowChildComponent{ | @@ -76,27 +89,27 @@ export struct FollowChildComponent{ | ||
| 76 | .justifyContent(FlexAlign.Center) | 89 | .justifyContent(FlexAlign.Center) |
| 77 | .width('100lpx') | 90 | .width('100lpx') |
| 78 | .height('46lpx') | 91 | .height('46lpx') |
| 79 | - .margin({left:'4lpx',top:'23lpx'}) | 92 | + .margin({top:'29lpx'}) |
| 80 | .onClick(()=>{ | 93 | .onClick(()=>{ |
| 81 | this.followOperation() | 94 | this.followOperation() |
| 82 | - // this.data.status = "1" | ||
| 83 | }) | 95 | }) |
| 84 | } | 96 | } |
| 85 | - }.alignItems(VerticalAlign.Top) | 97 | + } |
| 98 | + .padding({top:'27lpx'}) | ||
| 86 | .width('100%') | 99 | .width('100%') |
| 87 | - .layoutWeight(1) | 100 | + .justifyContent(FlexAlign.SpaceBetween) |
| 101 | + .alignItems(VerticalAlign.Top) | ||
| 102 | + | ||
| 103 | + }.height('202lpx') | ||
| 104 | + .justifyContent(FlexAlign.Start) | ||
| 88 | 105 | ||
| 89 | Divider().width('100%') | 106 | Divider().width('100%') |
| 90 | - .height('2lpx') | 107 | + .height('1lpx') |
| 91 | .strokeWidth('1lpx') | 108 | .strokeWidth('1lpx') |
| 92 | .backgroundColor($r('app.color.color_EDEDED')) | 109 | .backgroundColor($r('app.color.color_EDEDED')) |
| 110 | + }.width('100%') | ||
| 93 | 111 | ||
| 94 | - }.height('146lpx') | ||
| 95 | - .justifyContent(FlexAlign.Center) | ||
| 96 | - .onClick(()=>{ | ||
| 97 | - //跳转 人民号的 主页 | ||
| 98 | - }) | ||
| 99 | - }else if(this.type == 1 ){ | 112 | + }else { |
| 100 | Column(){ | 113 | Column(){ |
| 101 | Column(){ | 114 | Column(){ |
| 102 | 115 | ||
| @@ -140,7 +153,13 @@ export struct FollowChildComponent{ | @@ -140,7 +153,13 @@ export struct FollowChildComponent{ | ||
| 140 | .layoutWeight(1) | 153 | .layoutWeight(1) |
| 141 | .alignItems(HorizontalAlign.Start) | 154 | .alignItems(HorizontalAlign.Start) |
| 142 | }.layoutWeight(1) | 155 | }.layoutWeight(1) |
| 156 | + .onClick(()=>{ | ||
| 157 | + this.jumpCreatorHomePage() | ||
| 158 | + }) | ||
| 143 | 159 | ||
| 160 | + if(this.type === 2){ | ||
| 161 | + Blank() | ||
| 162 | + }else { | ||
| 144 | if(this.data.status == "1"){ | 163 | if(this.data.status == "1"){ |
| 145 | Row(){ | 164 | Row(){ |
| 146 | Text(`已关注`) | 165 | Text(`已关注`) |
| @@ -177,6 +196,7 @@ export struct FollowChildComponent{ | @@ -177,6 +196,7 @@ export struct FollowChildComponent{ | ||
| 177 | }) | 196 | }) |
| 178 | } | 197 | } |
| 179 | } | 198 | } |
| 199 | + } | ||
| 180 | .width('100%') | 200 | .width('100%') |
| 181 | .height('92lpx') | 201 | .height('92lpx') |
| 182 | .justifyContent(FlexAlign.SpaceBetween) | 202 | .justifyContent(FlexAlign.SpaceBetween) |
| @@ -206,4 +226,15 @@ export struct FollowChildComponent{ | @@ -206,4 +226,15 @@ export struct FollowChildComponent{ | ||
| 206 | } | 226 | } |
| 207 | }) | 227 | }) |
| 208 | } | 228 | } |
| 229 | + | ||
| 230 | + jumpCreatorHomePage() { | ||
| 231 | + if(this.data.mainControl === 0){ | ||
| 232 | + ToastUtils.shortToast("无法查看此用户主页") | ||
| 233 | + }else if(this.data.banControl === 1){ | ||
| 234 | + ToastUtils.shortToast("该账号已封禁,不予访问") | ||
| 235 | + }else{ | ||
| 236 | + let params = {'creatorId': this.data.creatorId} as Record<string, string>; | ||
| 237 | + WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) | ||
| 238 | + } | ||
| 239 | + } | ||
| 209 | } | 240 | } |
| 1 | import { LazyDataSource } from 'wdKit'; | 1 | import { LazyDataSource } from 'wdKit'; |
| 2 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; | 2 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; |
| 3 | +import SearcherAboutDataModel from '../../../model/SearcherAboutDataModel'; | ||
| 4 | +import { CreatorDetailRequestItem } from '../../../viewmodel/CreatorDetailRequestItem'; | ||
| 3 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem' | 5 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem' |
| 4 | import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem'; | 6 | import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem'; |
| 5 | import { FollowListStatusRequestItem } from '../../../viewmodel/FollowListStatusRequestItem'; | 7 | import { FollowListStatusRequestItem } from '../../../viewmodel/FollowListStatusRequestItem'; |
| @@ -73,8 +75,7 @@ export struct FollowListDetailUI{ | @@ -73,8 +75,7 @@ export struct FollowListDetailUI{ | ||
| 73 | this.hasMore = false | 75 | this.hasMore = false |
| 74 | }else{ | 76 | }else{ |
| 75 | value.list.forEach((value)=>{ | 77 | value.list.forEach((value)=>{ |
| 76 | - | ||
| 77 | - this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum+"",value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.attentionUserType,value.attentionUserId)) | 78 | + this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum+"",value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.attentionUserType,value.attentionUserId,value.mainControl,value.banControl)) |
| 78 | }) | 79 | }) |
| 79 | this.data.notifyDataReload() | 80 | this.data.notifyDataReload() |
| 80 | this.count = this.data.totalCount() | 81 | this.count = this.data.totalCount() |
| @@ -109,31 +110,72 @@ export struct FollowListDetailUI{ | @@ -109,31 +110,72 @@ export struct FollowListDetailUI{ | ||
| 109 | } | 110 | } |
| 110 | } | 111 | } |
| 111 | 112 | ||
| 112 | - getFollowListStatus(value:MineFollowListDetailItem){ | 113 | + getFollowListStatus(result:MineFollowListDetailItem){ |
| 114 | + let data_temp : FollowListDetailItem[] = [] | ||
| 115 | + result.list.forEach((item)=>{ | ||
| 116 | + data_temp.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0",item.attentionUserId,item.cnUserType,item.cnUserId,item.cnMainControl,-1)) | ||
| 117 | + }) | ||
| 118 | + let request = new CreatorDetailRequestItem() | ||
| 119 | + | ||
| 120 | + data_temp.forEach((data)=>{ | ||
| 121 | + request.creatorIdList.push(data.creatorId) | ||
| 122 | + }) | ||
| 123 | + SearcherAboutDataModel.getCreatorDetailListData(request).then((value)=>{ | ||
| 124 | + if(value!=null && value.length>0){ | ||
| 125 | + data_temp.forEach((data)=>{ | ||
| 126 | + value.forEach((item)=>{ | ||
| 127 | + if(data.creatorId == item.creatorId){ | ||
| 128 | + data.headPhotoUrl = item.headPhotoUrl | ||
| 129 | + if(item.fansNum>10000){ | ||
| 130 | + let temp = (item.fansNum/10000)+"" | ||
| 131 | + let index = temp.indexOf('.') | ||
| 132 | + if(index != -1){ | ||
| 133 | + temp = temp.substring(0,index+2) | ||
| 134 | + }else{ | ||
| 135 | + temp = temp | ||
| 136 | + } | ||
| 137 | + data.cnFansNum = temp + "万" | ||
| 138 | + }else{ | ||
| 139 | + data.cnFansNum = item.fansNum + "" | ||
| 140 | + } | ||
| 141 | + data.introduction = item.introduction | ||
| 142 | + data.mainControl = item.mainControl | ||
| 143 | + data.banControl = item.banControl | ||
| 144 | + } | ||
| 145 | + }) | ||
| 146 | + }) | ||
| 147 | + this.getFollowStatus(data_temp,result.totalCount) | ||
| 148 | + } | ||
| 149 | + }).catch((err:Error)=>{ | ||
| 150 | + console.log(TAG,JSON.stringify(err)) | ||
| 151 | + this.isLoading = false | ||
| 152 | + this.count = this.count===-1?0:this.count | ||
| 153 | + }) | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + getFollowStatus(result : FollowListDetailItem[],totalCount:number){ | ||
| 113 | let status = new FollowListStatusRequestItem() | 157 | let status = new FollowListStatusRequestItem() |
| 114 | - let data : FollowListDetailItem[] = [] | ||
| 115 | - value.list.forEach((item)=>{ | 158 | + result.forEach((item)=>{ |
| 116 | status.creatorIds.push(new QueryListIsFollowedItem(item.creatorId)) | 159 | status.creatorIds.push(new QueryListIsFollowedItem(item.creatorId)) |
| 117 | - data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0",item.attentionUserId,item.cnUserType,item.cnUserId)) | ||
| 118 | }) | 160 | }) |
| 119 | 161 | ||
| 120 | MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{ | 162 | MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{ |
| 121 | newValue.forEach((item)=>{ | 163 | newValue.forEach((item)=>{ |
| 122 | - data.forEach((list)=>{ | 164 | + result.forEach((list)=>{ |
| 123 | if (item.creatorId == list.creatorId) { | 165 | if (item.creatorId == list.creatorId) { |
| 124 | list.status = item.status | 166 | list.status = item.status |
| 125 | } | 167 | } |
| 126 | }) | 168 | }) |
| 127 | }) | 169 | }) |
| 128 | 170 | ||
| 129 | - data.forEach((item)=>{ | ||
| 130 | - this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status,item.attentionUserId,item.cnUserType,item.cnUserId)) | 171 | + result.forEach((item)=>{ |
| 172 | + this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status,item.attentionUserId,item.cnUserType,item.cnUserId,item.mainControl,item.banControl)) | ||
| 131 | }) | 173 | }) |
| 132 | 174 | ||
| 133 | this.data.notifyDataReload() | 175 | this.data.notifyDataReload() |
| 134 | 176 | ||
| 135 | this.count = this.data.totalCount() | 177 | this.count = this.data.totalCount() |
| 136 | - if (this.data.totalCount() < value.totalCount) { | 178 | + if (this.data.totalCount() < totalCount) { |
| 137 | this.curPageNum++ | 179 | this.curPageNum++ |
| 138 | }else { | 180 | }else { |
| 139 | this.hasMore = false | 181 | this.hasMore = false |
| 1 | import { Params } from 'wdBean'; | 1 | import { Params } from 'wdBean'; |
| 2 | -import { DateTimeUtils, LazyDataSource, StringUtils, UserDataLocal } from 'wdKit'; | ||
| 3 | -import { HttpUrlUtils } from 'wdNetwork'; | 2 | +import { DateTimeUtils, LazyDataSource,UserDataLocal } from 'wdKit'; |
| 4 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; | 3 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; |
| 5 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; | 4 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; |
| 6 | import { CommentListItem } from '../../../viewmodel/CommentListItem'; | 5 | import { CommentListItem } from '../../../viewmodel/CommentListItem'; |
| 7 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; | 6 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; |
| 8 | import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem'; | 7 | import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem'; |
| 9 | -import { FollowOperationRequestItem } from '../../../viewmodel/FollowOperationRequestItem'; | ||
| 10 | import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; | 8 | import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; |
| 9 | +import { FollowChildComponent } from '../follow/FollowChildComponent'; | ||
| 11 | 10 | ||
| 12 | const TAG = "HomePageBottomComponent" | 11 | const TAG = "HomePageBottomComponent" |
| 13 | @Component | 12 | @Component |
| @@ -21,6 +20,7 @@ export struct HomePageBottomComponent{ | @@ -21,6 +20,7 @@ export struct HomePageBottomComponent{ | ||
| 21 | @State count:number = 0; | 20 | @State count:number = 0; |
| 22 | @State isMineAccount:boolean = true; | 21 | @State isMineAccount:boolean = true; |
| 23 | @State userId:string = ""; | 22 | @State userId:string = ""; |
| 23 | + @Link commentNum:number | ||
| 24 | 24 | ||
| 25 | aboutToAppear(){ | 25 | aboutToAppear(){ |
| 26 | this.getNewPageData() | 26 | this.getNewPageData() |
| @@ -35,6 +35,7 @@ export struct HomePageBottomComponent{ | @@ -35,6 +35,7 @@ export struct HomePageBottomComponent{ | ||
| 35 | 35 | ||
| 36 | if(this.count === 0){ | 36 | if(this.count === 0){ |
| 37 | if(this.style === 1){ | 37 | if(this.style === 1){ |
| 38 | + Column(){ | ||
| 38 | Row(){ | 39 | Row(){ |
| 39 | Text("关注更多人民号") | 40 | Text("关注更多人民号") |
| 40 | .fontWeight('400lpx') | 41 | .fontWeight('400lpx') |
| @@ -59,6 +60,8 @@ export struct HomePageBottomComponent{ | @@ -59,6 +60,8 @@ export struct HomePageBottomComponent{ | ||
| 59 | } | 60 | } |
| 60 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params) | 61 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params) |
| 61 | }) | 62 | }) |
| 63 | + }.layoutWeight(1) | ||
| 64 | + .justifyContent(FlexAlign.Start) | ||
| 62 | }else{ | 65 | }else{ |
| 63 | ListHasNoMoreDataUI({style:2}) | 66 | ListHasNoMoreDataUI({style:2}) |
| 64 | .layoutWeight(1) | 67 | .layoutWeight(1) |
| @@ -95,7 +98,7 @@ export struct HomePageBottomComponent{ | @@ -95,7 +98,7 @@ export struct HomePageBottomComponent{ | ||
| 95 | 98 | ||
| 96 | LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => { | 99 | LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => { |
| 97 | ListItem() { | 100 | ListItem() { |
| 98 | - ChildFollowComponent({data: item}) | 101 | + FollowChildComponent({data: item,type:1}) |
| 99 | } | 102 | } |
| 100 | .onClick(() => { | 103 | .onClick(() => { |
| 101 | }) | 104 | }) |
| @@ -184,7 +187,7 @@ export struct HomePageBottomComponent{ | @@ -184,7 +187,7 @@ export struct HomePageBottomComponent{ | ||
| 184 | this.hasMore = false | 187 | this.hasMore = false |
| 185 | }else{ | 188 | }else{ |
| 186 | value.list.forEach((value)=>{ | 189 | value.list.forEach((value)=>{ |
| 187 | - this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum+"",value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.attentionUserType,value.attentionUserId)) | 190 | + this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum+"",value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.attentionUserType,value.attentionUserId,value.mainControl,value.banControl)) |
| 188 | }) | 191 | }) |
| 189 | this.data_follow.notifyDataReload() | 192 | this.data_follow.notifyDataReload() |
| 190 | this.count = this.data_follow.totalCount() | 193 | this.count = this.data_follow.totalCount() |
| @@ -210,7 +213,8 @@ export struct HomePageBottomComponent{ | @@ -210,7 +213,8 @@ export struct HomePageBottomComponent{ | ||
| 210 | this.hasMore = false | 213 | this.hasMore = false |
| 211 | }else{ | 214 | }else{ |
| 212 | value.list.forEach((value)=>{ | 215 | value.list.forEach((value)=>{ |
| 213 | - this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent,value.likeNum,0,value.id,value.targetId,value.targetType)) | 216 | + let publishTime = DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(value.createTime,DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) |
| 217 | + this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,publishTime,value.commentContent,value.likeNum,0,value.id,value.targetId,value.targetType)) | ||
| 214 | }) | 218 | }) |
| 215 | this.data_comment.notifyDataReload() | 219 | this.data_comment.notifyDataReload() |
| 216 | this.count = this.data_comment.totalCount() | 220 | this.count = this.data_comment.totalCount() |
| @@ -221,6 +225,7 @@ export struct HomePageBottomComponent{ | @@ -221,6 +225,7 @@ export struct HomePageBottomComponent{ | ||
| 221 | } | 225 | } |
| 222 | } | 226 | } |
| 223 | this.isLoading = false | 227 | this.isLoading = false |
| 228 | + this.commentNum = value.totalCount | ||
| 224 | }).catch((err:Error)=>{ | 229 | }).catch((err:Error)=>{ |
| 225 | console.log(TAG,"请求失败") | 230 | console.log(TAG,"请求失败") |
| 226 | this.isLoading = false | 231 | this.isLoading = false |
| @@ -231,107 +236,6 @@ export struct HomePageBottomComponent{ | @@ -231,107 +236,6 @@ export struct HomePageBottomComponent{ | ||
| 231 | } | 236 | } |
| 232 | 237 | ||
| 233 | @Component | 238 | @Component |
| 234 | -struct ChildFollowComponent { | ||
| 235 | - @ObjectLink data: FollowListDetailItem | ||
| 236 | - | ||
| 237 | - build() { | ||
| 238 | - Column(){ | ||
| 239 | - Blank().height('27lpx') | ||
| 240 | - | ||
| 241 | - Row() { | ||
| 242 | - Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.default_head'):this.data.headPhotoUrl) | ||
| 243 | - .objectFit(ImageFit.Auto) | ||
| 244 | - .width('92lpx') | ||
| 245 | - .height('92lpx') | ||
| 246 | - .margin({right:'15lpx'}) | ||
| 247 | - | ||
| 248 | - Column(){ | ||
| 249 | - Text(this.data.cnUserName) | ||
| 250 | - .fontWeight('400lpx') | ||
| 251 | - .fontSize('31lpx') | ||
| 252 | - .lineHeight('38lpx') | ||
| 253 | - .fontColor($r('app.color.color_222222')) | ||
| 254 | - Text(`粉丝${this.data.cnFansNum}`) | ||
| 255 | - .fontColor($r('app.color.color_B0B0B0')) | ||
| 256 | - .fontSize('23lpx') | ||
| 257 | - .maxLines(1) | ||
| 258 | - Text(`${this.data.introduction}`) | ||
| 259 | - .fontColor($r('app.color.color_B0B0B0')) | ||
| 260 | - .fontSize('23lpx') | ||
| 261 | - .maxLines(2) | ||
| 262 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 263 | - }.layoutWeight(1) | ||
| 264 | - .alignItems(HorizontalAlign.Start) | ||
| 265 | - | ||
| 266 | - if(this.data.status == "1"){ | ||
| 267 | - Row(){ | ||
| 268 | - Text(`已关注`) | ||
| 269 | - .fontColor($r('app.color.color_CCCCCC')) | ||
| 270 | - .fontSize('23lpx') | ||
| 271 | - .fontWeight('500lpx') | ||
| 272 | - .lineHeight('35lpx') | ||
| 273 | - }.backgroundColor($r('app.color.color_F5F5F5')) | ||
| 274 | - .borderRadius('6lpx') | ||
| 275 | - .borderColor($r('app.color.color_F5F5F5')) | ||
| 276 | - .borderWidth('2lpx') | ||
| 277 | - .justifyContent(FlexAlign.Center) | ||
| 278 | - .width('100lpx') | ||
| 279 | - .height('46lpx') | ||
| 280 | - .margin({left:'4lpx',top:'23lpx'}) | ||
| 281 | - .onClick(()=>{ | ||
| 282 | - // this.data.status = "0" | ||
| 283 | - this.followOperation() | ||
| 284 | - }) | ||
| 285 | - }else{ | ||
| 286 | - Row(){ | ||
| 287 | - Image($r('app.media.follow_icon')) | ||
| 288 | - .margin({right:'4lpx'}) | ||
| 289 | - .width('23lpx') | ||
| 290 | - .height('23lpx') | ||
| 291 | - Text(`关注`) | ||
| 292 | - .fontColor($r('app.color.color_ED2800')) | ||
| 293 | - .fontSize('23lpx') | ||
| 294 | - .fontWeight('500lpx') | ||
| 295 | - .lineHeight('35lpx') | ||
| 296 | - }.borderColor($r('app.color.color_1AED2800')) | ||
| 297 | - .borderRadius('6lpx') | ||
| 298 | - .borderWidth('2lpx') | ||
| 299 | - .justifyContent(FlexAlign.Center) | ||
| 300 | - .width('100lpx') | ||
| 301 | - .height('46lpx') | ||
| 302 | - .margin({left:'4lpx',top:'23lpx'}) | ||
| 303 | - .onClick(()=>{ | ||
| 304 | - // this.data.status = "1" | ||
| 305 | - this.followOperation() | ||
| 306 | - }) | ||
| 307 | - } | ||
| 308 | - }.alignItems(VerticalAlign.Top) | ||
| 309 | - .width('100%') | ||
| 310 | - .layoutWeight(1) | ||
| 311 | - | ||
| 312 | - Divider().width('100%') | ||
| 313 | - .height('2lpx') | ||
| 314 | - .strokeWidth('1lpx') | ||
| 315 | - .backgroundColor($r('app.color.color_EDEDED')) | ||
| 316 | - | ||
| 317 | - }.height('146lpx') | ||
| 318 | - .justifyContent(FlexAlign.Center) | ||
| 319 | - } | ||
| 320 | - | ||
| 321 | - followOperation(){ | ||
| 322 | - let item = new FollowOperationRequestItem(this.data.cnUserType,this.data.cnUserId,this.data.creatorId,UserDataLocal.getUserType(),UserDataLocal.getUserId(),this.data.status==="0" ? 1:0) | ||
| 323 | - MinePageDatasModel.getFollowOperation(item,getContext(this)).then((value)=>{ | ||
| 324 | - if(value!=null){ | ||
| 325 | - if (value.code === 0 || value.code.toString() === "0") { | ||
| 326 | - this.data.status = this.data.status ==="0"?"1":"0" | ||
| 327 | - } | ||
| 328 | - } | ||
| 329 | - }) | ||
| 330 | - } | ||
| 331 | - | ||
| 332 | -} | ||
| 333 | - | ||
| 334 | -@Component | ||
| 335 | struct ChildCommentComponent { | 239 | struct ChildCommentComponent { |
| 336 | @ObjectLink data: CommentListItem | 240 | @ObjectLink data: CommentListItem |
| 337 | isLastItem: boolean = false | 241 | isLastItem: boolean = false |
| @@ -5,6 +5,7 @@ import MinePageDatasModel from '../../../model/MinePageDatasModel'; | @@ -5,6 +5,7 @@ import MinePageDatasModel from '../../../model/MinePageDatasModel'; | ||
| 5 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; | 5 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; |
| 6 | import { UserFollowListRequestItem } from '../../../viewmodel/UserFollowListRequestItem'; | 6 | import { UserFollowListRequestItem } from '../../../viewmodel/UserFollowListRequestItem'; |
| 7 | import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; | 7 | import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; |
| 8 | +import { FollowChildComponent } from '../follow/FollowChildComponent'; | ||
| 8 | 9 | ||
| 9 | const TAG = "HomePageBottomComponent" | 10 | const TAG = "HomePageBottomComponent" |
| 10 | @Component | 11 | @Component |
| @@ -62,7 +63,7 @@ export struct OtherHomePageBottomFollowComponent{ | @@ -62,7 +63,7 @@ export struct OtherHomePageBottomFollowComponent{ | ||
| 62 | 63 | ||
| 63 | LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => { | 64 | LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => { |
| 64 | ListItem() { | 65 | ListItem() { |
| 65 | - ChildFollowComponent({data: item}) | 66 | + FollowChildComponent({data: item,type:2}) |
| 66 | } | 67 | } |
| 67 | .onClick(() => { | 68 | .onClick(() => { |
| 68 | }) | 69 | }) |
| @@ -116,7 +117,7 @@ export struct OtherHomePageBottomFollowComponent{ | @@ -116,7 +117,7 @@ export struct OtherHomePageBottomFollowComponent{ | ||
| 116 | this.hasMore = false | 117 | this.hasMore = false |
| 117 | }else{ | 118 | }else{ |
| 118 | value.list.forEach((value)=>{ | 119 | value.list.forEach((value)=>{ |
| 119 | - this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum+"",value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.cnUserType,value.cnUserId)) | 120 | + this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum+"",value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.cnUserType,value.cnUserId,value.mainControl,value.banControl)) |
| 120 | }) | 121 | }) |
| 121 | this.data_follow.notifyDataReload() | 122 | this.data_follow.notifyDataReload() |
| 122 | this.count = this.data_follow.totalCount() | 123 | this.count = this.data_follow.totalCount() |
| @@ -135,49 +136,3 @@ export struct OtherHomePageBottomFollowComponent{ | @@ -135,49 +136,3 @@ export struct OtherHomePageBottomFollowComponent{ | ||
| 135 | } | 136 | } |
| 136 | } | 137 | } |
| 137 | } | 138 | } |
| 138 | - | ||
| 139 | -@Component | ||
| 140 | -struct ChildFollowComponent { | ||
| 141 | - @ObjectLink data: FollowListDetailItem | ||
| 142 | - | ||
| 143 | - build() { | ||
| 144 | - Column(){ | ||
| 145 | - Blank().height('27lpx') | ||
| 146 | - | ||
| 147 | - Row() { | ||
| 148 | - Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.default_head'):this.data.headPhotoUrl) | ||
| 149 | - .objectFit(ImageFit.Auto) | ||
| 150 | - .width('92lpx') | ||
| 151 | - .height('92lpx') | ||
| 152 | - .margin({right:'15lpx'}) | ||
| 153 | - | ||
| 154 | - Column(){ | ||
| 155 | - Text(this.data.cnUserName) | ||
| 156 | - .fontWeight('400lpx') | ||
| 157 | - .fontSize('31lpx') | ||
| 158 | - .lineHeight('38lpx') | ||
| 159 | - .fontColor($r('app.color.color_222222')) | ||
| 160 | - Text(`粉丝${this.data.cnFansNum}`) | ||
| 161 | - .fontColor($r('app.color.color_B0B0B0')) | ||
| 162 | - .fontSize('23lpx') | ||
| 163 | - .maxLines(1) | ||
| 164 | - Text(`${this.data.introduction}`) | ||
| 165 | - .fontColor($r('app.color.color_B0B0B0')) | ||
| 166 | - .fontSize('23lpx') | ||
| 167 | - .maxLines(2) | ||
| 168 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 169 | - }.layoutWeight(1) | ||
| 170 | - .alignItems(HorizontalAlign.Start) | ||
| 171 | - }.alignItems(VerticalAlign.Top) | ||
| 172 | - .width('100%') | ||
| 173 | - .layoutWeight(1) | ||
| 174 | - | ||
| 175 | - Divider().width('100%') | ||
| 176 | - .height('2lpx') | ||
| 177 | - .strokeWidth('1lpx') | ||
| 178 | - .backgroundColor($r('app.color.color_EDEDED')) | ||
| 179 | - | ||
| 180 | - }.height('146lpx') | ||
| 181 | - .justifyContent(FlexAlign.Center) | ||
| 182 | - } | ||
| 183 | -} |
| @@ -66,7 +66,7 @@ export struct BottomNavigationComponent { | @@ -66,7 +66,7 @@ export struct BottomNavigationComponent { | ||
| 66 | } else { | 66 | } else { |
| 67 | TopNavigationComponent({ | 67 | TopNavigationComponent({ |
| 68 | groupId: navItem.id, | 68 | groupId: navItem.id, |
| 69 | - topNavList: navItem.topNavChannelList, | 69 | + topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073), |
| 70 | _currentNavIndex: this.currentNavIndex, | 70 | _currentNavIndex: this.currentNavIndex, |
| 71 | changeBarBackgroundColor: (color: Color) => { | 71 | changeBarBackgroundColor: (color: Color) => { |
| 72 | this.barBackgroundColor = color | 72 | this.barBackgroundColor = color |
| @@ -2,7 +2,7 @@ import { CustomTitleAndEditUI } from '../reusable/CustomTitleAndEditUI' | @@ -2,7 +2,7 @@ import { CustomTitleAndEditUI } from '../reusable/CustomTitleAndEditUI' | ||
| 2 | import MyCollectionViewModel from '../../viewmodel/MyCollectionViewModel'; | 2 | import MyCollectionViewModel from '../../viewmodel/MyCollectionViewModel'; |
| 3 | import PageModel from '../../viewmodel/PageModel'; | 3 | import PageModel from '../../viewmodel/PageModel'; |
| 4 | import { CommonConstants, ViewType } from 'wdConstant' | 4 | import { CommonConstants, ViewType } from 'wdConstant' |
| 5 | -import { EmptyComponent } from '../view/EmptyComponent' | 5 | +import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent' |
| 6 | import { ErrorComponent } from '../view/ErrorComponent' | 6 | import { ErrorComponent } from '../view/ErrorComponent' |
| 7 | import RefreshLayout from './RefreshLayout' | 7 | import RefreshLayout from './RefreshLayout' |
| 8 | import { RefreshLayoutBean } from './RefreshLayoutBean'; | 8 | import { RefreshLayoutBean } from './RefreshLayoutBean'; |
| @@ -41,31 +41,28 @@ struct BrowsingHistoryPage { | @@ -41,31 +41,28 @@ struct BrowsingHistoryPage { | ||
| 41 | this.deleteNum = 0 | 41 | this.deleteNum = 0 |
| 42 | }}) | 42 | }}) |
| 43 | 43 | ||
| 44 | - CustomPullToRefresh({ | ||
| 45 | - alldata:this.allDatas, | ||
| 46 | - scroller:this.scroller, | ||
| 47 | - customList:()=>{ | ||
| 48 | - this.ListLayout() | ||
| 49 | - }, | ||
| 50 | - onRefresh:(resolve)=>{ | ||
| 51 | - this.browSingModel.currentPage = 0 | ||
| 52 | - this.getData(resolve) | ||
| 53 | - }, | ||
| 54 | - onLoadMore:(resolve)=> { | ||
| 55 | - this.browSingModel.currentPage++ | ||
| 56 | - this.getData() | ||
| 57 | - } | ||
| 58 | - }) | ||
| 59 | - | ||
| 60 | - | ||
| 61 | // if (this.browSingModel.viewType == ViewType.LOADING){ | 44 | // if (this.browSingModel.viewType == ViewType.LOADING){ |
| 62 | // this.LoadingLayout() | 45 | // this.LoadingLayout() |
| 63 | // }else if(this.browSingModel.viewType == ViewType.ERROR){ | 46 | // }else if(this.browSingModel.viewType == ViewType.ERROR){ |
| 64 | // ErrorComponent() | 47 | // ErrorComponent() |
| 65 | // }else if(this.browSingModel.viewType == ViewType.EMPTY){ | 48 | // }else if(this.browSingModel.viewType == ViewType.EMPTY){ |
| 66 | - // EmptyComponent() | 49 | + EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoHistory}) |
| 67 | // }else { | 50 | // }else { |
| 51 | + // CustomPullToRefresh({ | ||
| 52 | + // alldata:this.allDatas, | ||
| 53 | + // scroller:this.scroller, | ||
| 54 | + // customList:()=>{ | ||
| 68 | // this.ListLayout() | 55 | // this.ListLayout() |
| 56 | + // }, | ||
| 57 | + // onRefresh:(resolve)=>{ | ||
| 58 | + // this.browSingModel.currentPage = 0 | ||
| 59 | + // this.getData(resolve) | ||
| 60 | + // }, | ||
| 61 | + // onLoadMore:(resolve)=> { | ||
| 62 | + // this.browSingModel.currentPage++ | ||
| 63 | + // this.getData() | ||
| 64 | + // } | ||
| 65 | + // }) | ||
| 69 | // } | 66 | // } |
| 70 | 67 | ||
| 71 | if (this.isEditState){ | 68 | if (this.isEditState){ |
| @@ -298,7 +298,7 @@ struct ChannelDialog { | @@ -298,7 +298,7 @@ struct ChannelDialog { | ||
| 298 | .zIndex(this.dragItem == item.num ? 1 : 0) | 298 | .zIndex(this.dragItem == item.num ? 1 : 0) |
| 299 | .translate(this.dragItem == item.num ? { x: this.offsetX, y: this.offsetY } : { x: 0, y: 0 }) | 299 | .translate(this.dragItem == item.num ? { x: this.offsetX, y: this.offsetY } : { x: 0, y: 0 }) |
| 300 | .gesture( | 300 | .gesture( |
| 301 | - GestureGroup(GestureMode.Sequence, | 301 | + GestureGroup(GestureMode.Parallel, |
| 302 | TapGesture() | 302 | TapGesture() |
| 303 | .onAction((event?: GestureEvent) => { | 303 | .onAction((event?: GestureEvent) => { |
| 304 | if (this.isEditIng) { | 304 | if (this.isEditIng) { |
| @@ -127,7 +127,8 @@ struct EditUserInfoPage { | @@ -127,7 +127,8 @@ struct EditUserInfoPage { | ||
| 127 | lunar:false, | 127 | lunar:false, |
| 128 | onAccept:(value:DatePickerResult) => { | 128 | onAccept:(value:DatePickerResult) => { |
| 129 | let mon = value.month as number + 1 | 129 | let mon = value.month as number + 1 |
| 130 | - this.currentUserInfo.userExtend.birthday = value.year+'-'+mon.toString()+'-'+value.day; | 130 | + let monStr = mon < 10? '0'+mon.toString():mon.toString(); |
| 131 | + this.currentUserInfo.userExtend.birthday = value.year+'-'+monStr+'-'+value.day; | ||
| 131 | this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_birthday | 132 | this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_birthday |
| 132 | this.updateEditModel() | 133 | this.updateEditModel() |
| 133 | } | 134 | } |
| @@ -171,8 +172,10 @@ struct EditUserInfoPage { | @@ -171,8 +172,10 @@ struct EditUserInfoPage { | ||
| 171 | 172 | ||
| 172 | updateEditModel(){ | 173 | updateEditModel(){ |
| 173 | this.listData = [] | 174 | this.listData = [] |
| 174 | - this.listData.push(...EditInfoViewModel.getEditListInfo(this.currentUserInfo)) | ||
| 175 | - EditInfoViewModel.updateUserInfo(this.currentUserInfo) | 175 | + // this.listData.push(...EditInfoViewModel.getEditListInfo(this.currentUserInfo)) |
| 176 | + EditInfoViewModel.updateUserInfo(this.currentUserInfo).then(()=>{ | ||
| 177 | + this.getAccountOwnerInfo() | ||
| 178 | + }) | ||
| 176 | } | 179 | } |
| 177 | getAccountOwnerInfo(){ | 180 | getAccountOwnerInfo(){ |
| 178 | EditInfoViewModel.queryAccountOwnerInfo(1,getContext(this)).then((editModel) => { | 181 | EditInfoViewModel.queryAccountOwnerInfo(1,getContext(this)).then((editModel) => { |
| @@ -19,7 +19,6 @@ import { | @@ -19,7 +19,6 @@ import { | ||
| 19 | struct PeopleShipHomePage { | 19 | struct PeopleShipHomePage { |
| 20 | // Todo 传入数据 后续在修改 | 20 | // Todo 传入数据 后续在修改 |
| 21 | creatorId: string = (router.getParams() as Record<string, string>)['creatorId']; | 21 | creatorId: string = (router.getParams() as Record<string, string>)['creatorId']; |
| 22 | - @State arr: number[] = [] | ||
| 23 | // 页面详情数据 | 22 | // 页面详情数据 |
| 24 | @Provide detailModel: PeopleShipUserDetailData = {} as PeopleShipUserDetailData | 23 | @Provide detailModel: PeopleShipUserDetailData = {} as PeopleShipUserDetailData |
| 25 | // 每个分类数量 | 24 | // 每个分类数量 |
| @@ -108,9 +107,12 @@ struct PeopleShipHomePage { | @@ -108,9 +107,12 @@ struct PeopleShipHomePage { | ||
| 108 | Logger.debug('PeopleShipHomePage', '获取页面信息', `${JSON.stringify(this.detailModel)}`) | 107 | Logger.debug('PeopleShipHomePage', '获取页面信息', `${JSON.stringify(this.detailModel)}`) |
| 109 | 108 | ||
| 110 | // 获取关注 | 109 | // 获取关注 |
| 110 | + // 登录后获取,是否关注 | ||
| 111 | + if (HttpUrlUtils.getUserId()) { | ||
| 111 | let followList: QueryListIsFollowedItem[] = await PeopleShipHomePageDataModel.getHomePageFollowListStatusData(this.creatorId) | 112 | let followList: QueryListIsFollowedItem[] = await PeopleShipHomePageDataModel.getHomePageFollowListStatusData(this.creatorId) |
| 112 | Logger.debug('PeopleShipHomePage', '获取关注信息', `${JSON.stringify(followList)}`) | 113 | Logger.debug('PeopleShipHomePage', '获取关注信息', `${JSON.stringify(followList)}`) |
| 113 | this.findFollowStata(followList) | 114 | this.findFollowStata(followList) |
| 115 | + } | ||
| 114 | 116 | ||
| 115 | } catch (exception) { | 117 | } catch (exception) { |
| 116 | 118 | ||
| @@ -128,14 +130,17 @@ struct PeopleShipHomePage { | @@ -128,14 +130,17 @@ struct PeopleShipHomePage { | ||
| 128 | } | 130 | } |
| 129 | 131 | ||
| 130 | handleChangeAttentionStata() { | 132 | handleChangeAttentionStata() { |
| 133 | + | ||
| 131 | if (!this.isLoadingAttention) { | 134 | if (!this.isLoadingAttention) { |
| 132 | return | 135 | return |
| 133 | } | 136 | } |
| 134 | // 未登录,跳转登录 | 137 | // 未登录,跳转登录 |
| 135 | if (!HttpUrlUtils.getUserId()) { | 138 | if (!HttpUrlUtils.getUserId()) { |
| 139 | + this.isLoadingAttention = false | ||
| 136 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | 140 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) |
| 137 | return | 141 | return |
| 138 | } | 142 | } |
| 143 | + | ||
| 139 | let status = 0 | 144 | let status = 0 |
| 140 | if (this.isAttention == '0') { | 145 | if (this.isAttention == '0') { |
| 141 | status = 1 | 146 | status = 1 |
| @@ -20,24 +20,26 @@ import { RefreshLayoutBean } from '../page/RefreshLayoutBean' | @@ -20,24 +20,26 @@ import { RefreshLayoutBean } from '../page/RefreshLayoutBean' | ||
| 20 | import CustomRefreshLoadLayout from '../page/CustomRefreshLoadLayout' | 20 | import CustomRefreshLoadLayout from '../page/CustomRefreshLoadLayout' |
| 21 | import { ErrorComponent } from '../view/ErrorComponent'; | 21 | import { ErrorComponent } from '../view/ErrorComponent'; |
| 22 | import NoMoreLayout from '../page/NoMoreLayout'; | 22 | import NoMoreLayout from '../page/NoMoreLayout'; |
| 23 | -import { LazyDataSource } from 'wdKit'; | 23 | +// import { LazyDataSource } from 'wdKit'; |
| 24 | +import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh' | ||
| 24 | 25 | ||
| 25 | const TAG = 'PeopleShipHomeArticleListComponent'; | 26 | const TAG = 'PeopleShipHomeArticleListComponent'; |
| 26 | 27 | ||
| 27 | @Component | 28 | @Component |
| 28 | export struct PeopleShipHomeArticleListComponent { | 29 | export struct PeopleShipHomeArticleListComponent { |
| 29 | - // @State arr: ContentDTO[] = [] | ||
| 30 | - @State arr: LazyDataSource<ContentDTO> = new LazyDataSource(); | 30 | + @State arr: ContentDTO[] = [] |
| 31 | + // @State arr: LazyDataSource<ContentDTO> = new LazyDataSource(); | ||
| 31 | @State typeModel: ArticleTypeData = new ArticleTypeData() | 32 | @State typeModel: ArticleTypeData = new ArticleTypeData() |
| 32 | @State creatorId: string = '' | 33 | @State creatorId: string = '' |
| 33 | @Consume detailModel: PeopleShipUserDetailData | 34 | @Consume detailModel: PeopleShipUserDetailData |
| 34 | - @State private viewType: number = 1; | ||
| 35 | - currentIndex: number = 0 | 35 | + @State private viewType: number = 1 |
| 36 | + currentIndex: number = 1 | ||
| 36 | @Link @Watch('onChange') currentTopSelectedIndex: number | 37 | @Link @Watch('onChange') currentTopSelectedIndex: number |
| 37 | @State private hasMore: boolean = true | 38 | @State private hasMore: boolean = true |
| 38 | - @State currentPage: number = 1 | 39 | + @State private currentPage: number = 1 |
| 39 | @State private isLoading: boolean = false | 40 | @State private isLoading: boolean = false |
| 40 | @Consume topHeight: number | 41 | @Consume topHeight: number |
| 42 | + private scroller: Scroller = new Scroller() | ||
| 41 | 43 | ||
| 42 | build() { | 44 | build() { |
| 43 | if (this.viewType == 1) { | 45 | if (this.viewType == 1) { |
| @@ -46,7 +48,34 @@ export struct PeopleShipHomeArticleListComponent { | @@ -46,7 +48,34 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 46 | } else if (this.viewType == 2) { | 48 | } else if (this.viewType == 2) { |
| 47 | ErrorComponent() | 49 | ErrorComponent() |
| 48 | } else { | 50 | } else { |
| 51 | + CustomPullToRefresh({ | ||
| 52 | + alldata:this.arr, | ||
| 53 | + scroller:this.scroller, | ||
| 54 | + hasMore: this.hasMore, | ||
| 55 | + customList:()=>{ | ||
| 49 | this.ListLayout() | 56 | this.ListLayout() |
| 57 | + }, | ||
| 58 | + onRefresh:(resolve)=>{ | ||
| 59 | + this.currentPage = 1 | ||
| 60 | + this.getPeopleShipPageArticleList(resolve) | ||
| 61 | + }, | ||
| 62 | + onLoadMore:(resolve)=> { | ||
| 63 | + if (this.hasMore === false) { | ||
| 64 | + if(resolve) { | ||
| 65 | + resolve('') | ||
| 66 | + } | ||
| 67 | + return | ||
| 68 | + } | ||
| 69 | + if(!this.isLoading && this.hasMore){ | ||
| 70 | + //加载分页数据 | ||
| 71 | + this.getPeopleShipPageArticleList(resolve) | ||
| 72 | + }else { | ||
| 73 | + if(resolve) { | ||
| 74 | + resolve('') | ||
| 75 | + } | ||
| 76 | + } | ||
| 77 | + }, | ||
| 78 | + }) | ||
| 50 | } | 79 | } |
| 51 | 80 | ||
| 52 | } | 81 | } |
| @@ -62,10 +91,10 @@ export struct PeopleShipHomeArticleListComponent { | @@ -62,10 +91,10 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 62 | @Builder | 91 | @Builder |
| 63 | ListLayout() { | 92 | ListLayout() { |
| 64 | 93 | ||
| 65 | - List() { | 94 | + List({scroller: this.scroller}) { |
| 66 | // 下拉刷新 | 95 | // 下拉刷新 |
| 67 | 96 | ||
| 68 | - LazyForEach(this.arr, (item: ContentDTO) => { | 97 | + ForEach(this.arr, (item: ContentDTO) => { |
| 69 | ListItem() { | 98 | ListItem() { |
| 70 | CardParser({ contentDTO: item }) | 99 | CardParser({ contentDTO: item }) |
| 71 | }.width("100%") | 100 | }.width("100%") |
| @@ -74,25 +103,25 @@ export struct PeopleShipHomeArticleListComponent { | @@ -74,25 +103,25 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 74 | 103 | ||
| 75 | // 加载更多 | 104 | // 加载更多 |
| 76 | ListItem() { | 105 | ListItem() { |
| 77 | - if (!this.hasMore) { | 106 | + if (!this.hasMore && !this.isLoading) { |
| 78 | NoMoreLayout() | 107 | NoMoreLayout() |
| 79 | } | 108 | } |
| 80 | } | 109 | } |
| 81 | } | 110 | } |
| 82 | .width("100%") | 111 | .width("100%") |
| 83 | .height("100%") | 112 | .height("100%") |
| 84 | - .edgeEffect(EdgeEffect.Spring) | 113 | + .edgeEffect(EdgeEffect.None) |
| 85 | .nestedScroll({ | 114 | .nestedScroll({ |
| 86 | scrollForward: NestedScrollMode.PARENT_FIRST, | 115 | scrollForward: NestedScrollMode.PARENT_FIRST, |
| 87 | scrollBackward: NestedScrollMode.SELF_FIRST | 116 | scrollBackward: NestedScrollMode.SELF_FIRST |
| 88 | }) | 117 | }) |
| 89 | 118 | ||
| 90 | - .onReachEnd(() => { | ||
| 91 | - if(!this.isLoading && this.hasMore){ | ||
| 92 | - //加载分页数据 | ||
| 93 | - this.getPeopleShipPageArticleList() | ||
| 94 | - } | ||
| 95 | - }) | 119 | + // .onReachEnd(() => { |
| 120 | + // if(!this.isLoading && this.hasMore){ | ||
| 121 | + // //加载分页数据 | ||
| 122 | + // this.getPeopleShipPageArticleList() | ||
| 123 | + // } | ||
| 124 | + // }) | ||
| 96 | } | 125 | } |
| 97 | 126 | ||
| 98 | aboutToAppear() { | 127 | aboutToAppear() { |
| @@ -109,16 +138,28 @@ export struct PeopleShipHomeArticleListComponent { | @@ -109,16 +138,28 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 109 | } | 138 | } |
| 110 | } | 139 | } |
| 111 | 140 | ||
| 112 | - private async getPeopleShipPageArticleList() { | 141 | + |
| 142 | + private async getPeopleShipPageArticleList(resolve?: (value: string | PromiseLike<string>) => void) { | ||
| 113 | Logger.info(`获取页面信息PeopleShipHomeArticleListComponent${this.typeModel.type}`) | 143 | Logger.info(`获取页面信息PeopleShipHomeArticleListComponent${this.typeModel.type}`) |
| 114 | if (this.isLoading) { | 144 | if (this.isLoading) { |
| 145 | + if (resolve) { | ||
| 146 | + resolve('') | ||
| 147 | + } | ||
| 115 | return | 148 | return |
| 116 | } | 149 | } |
| 117 | try { | 150 | try { |
| 118 | this.isLoading = true | 151 | this.isLoading = true |
| 119 | let listData: ArticleListData = await PeopleShipHomePageDataModel.getPeopleShipHomePageArticleListData(this.creatorId, this.currentPage, 20, this.typeModel.type) | 152 | let listData: ArticleListData = await PeopleShipHomePageDataModel.getPeopleShipHomePageArticleListData(this.creatorId, this.currentPage, 20, this.typeModel.type) |
| 120 | Logger.debug(TAG, `获取页面信息, ${listData.list.length}`); | 153 | Logger.debug(TAG, `获取页面信息, ${listData.list.length}`); |
| 154 | + Logger.debug(TAG, `已更新值最新, ${this.currentPage}`); | ||
| 121 | 155 | ||
| 156 | + if (resolve ) { | ||
| 157 | + if (this.currentPage == 1) { | ||
| 158 | + resolve('已更新至最新') | ||
| 159 | + }else { | ||
| 160 | + resolve('') | ||
| 161 | + } | ||
| 162 | + } | ||
| 122 | if (listData && listData.list && listData.list.length > 0) { | 163 | if (listData && listData.list && listData.list.length > 0) { |
| 123 | this.viewType = 3; | 164 | this.viewType = 3; |
| 124 | if (listData.list.length === 20) { | 165 | if (listData.list.length === 20) { |
| @@ -130,15 +171,18 @@ export struct PeopleShipHomeArticleListComponent { | @@ -130,15 +171,18 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 130 | } else { | 171 | } else { |
| 131 | this.viewType = 1; | 172 | this.viewType = 1; |
| 132 | } | 173 | } |
| 174 | + this.isLoading = false | ||
| 133 | this.queryArticleContentInteractCount(listData) | 175 | this.queryArticleContentInteractCount(listData) |
| 134 | - Logger.debug(TAG, '展示的总数', `${this.arr.totalCount()}`) | 176 | + Logger.debug(TAG, '展示的总数', `${this.arr.length}`) |
| 135 | }catch (exception) { | 177 | }catch (exception) { |
| 178 | + if (resolve) { | ||
| 179 | + resolve('') | ||
| 180 | + } | ||
| 136 | this.isLoading = false | 181 | this.isLoading = false |
| 137 | - if (this.arr.totalCount() == 0) { | 182 | + if (this.arr.length == 0) { |
| 138 | this.viewType = 2 | 183 | this.viewType = 2 |
| 139 | } | 184 | } |
| 140 | } | 185 | } |
| 141 | - | ||
| 142 | } | 186 | } |
| 143 | 187 | ||
| 144 | /** | 188 | /** |
| @@ -15,13 +15,13 @@ export struct PeopleShipHomePageHeadComponent { | @@ -15,13 +15,13 @@ export struct PeopleShipHomePageHeadComponent { | ||
| 15 | .borderWidth('1vp') | 15 | .borderWidth('1vp') |
| 16 | .borderStyle(BorderStyle.Solid) | 16 | .borderStyle(BorderStyle.Solid) |
| 17 | .borderColor(Color.White) | 17 | .borderColor(Color.White) |
| 18 | - .objectFit(ImageFit.Auto) | 18 | + .objectFit(ImageFit.Cover) |
| 19 | if(this.authIcon.length > 0 ) { | 19 | if(this.authIcon.length > 0 ) { |
| 20 | Image( this.authIcon ) | 20 | Image( this.authIcon ) |
| 21 | .width(this.iconDiameter) | 21 | .width(this.iconDiameter) |
| 22 | .height(this.iconDiameter) | 22 | .height(this.iconDiameter) |
| 23 | .borderRadius(this.iconDiameter/2) | 23 | .borderRadius(this.iconDiameter/2) |
| 24 | - .objectFit(ImageFit.Auto) | 24 | + .objectFit(ImageFit.Cover) |
| 25 | .margin({ | 25 | .margin({ |
| 26 | right: '-3vp' | 26 | right: '-3vp' |
| 27 | }) | 27 | }) |
| @@ -10,7 +10,7 @@ export struct CustomPullToRefresh { | @@ -10,7 +10,7 @@ export struct CustomPullToRefresh { | ||
| 10 | onLoadMore: (resolve?: (value: string | PromiseLike<string>) => void) => void = () => { | 10 | onLoadMore: (resolve?: (value: string | PromiseLike<string>) => void) => void = () => { |
| 11 | } | 11 | } |
| 12 | ///是否存在上拉更多 | 12 | ///是否存在上拉更多 |
| 13 | - @State hasMore: boolean = true | 13 | + @Prop hasMore: boolean = true |
| 14 | refreshConfigurator: PullToRefreshConfigurator = new PullToRefreshConfigurator().setHasLoadMore(this.hasMore); | 14 | refreshConfigurator: PullToRefreshConfigurator = new PullToRefreshConfigurator().setHasLoadMore(this.hasMore); |
| 15 | build() { | 15 | build() { |
| 16 | Column(){ | 16 | Column(){ |
| 1 | +import { ToastUtils } from 'wdKit/Index' | ||
| 2 | +import { WDRouterRule, WDRouterPage } from 'wdRouter/Index' | ||
| 1 | import { SearchRmhDescription } from '../../viewmodel/SearchResultContentItem' | 3 | import { SearchRmhDescription } from '../../viewmodel/SearchResultContentItem' |
| 2 | 4 | ||
| 3 | @Component | 5 | @Component |
| @@ -21,5 +23,19 @@ export struct SearchCreatorComponent{ | @@ -21,5 +23,19 @@ export struct SearchCreatorComponent{ | ||
| 21 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 23 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 22 | }.alignItems(HorizontalAlign.Center) | 24 | }.alignItems(HorizontalAlign.Center) |
| 23 | .justifyContent(FlexAlign.Center) | 25 | .justifyContent(FlexAlign.Center) |
| 26 | + .onClick(()=>{ | ||
| 27 | + this.jumpCreatorHomePage() | ||
| 28 | + }) | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + jumpCreatorHomePage() { | ||
| 32 | + if(Number.parseInt(this.item.mainControl) === 0){ | ||
| 33 | + ToastUtils.shortToast("无法查看此用户主页") | ||
| 34 | + }else if(Number.parseInt(this.item.banControl) === 1){ | ||
| 35 | + ToastUtils.shortToast("该账号已封禁,不予访问") | ||
| 36 | + }else{ | ||
| 37 | + let params = {'creatorId': this.item.id} as Record<string, string>; | ||
| 38 | + WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) | ||
| 39 | + } | ||
| 24 | } | 40 | } |
| 25 | } | 41 | } |
| @@ -72,6 +72,7 @@ export struct SearchResultContentComponent{ | @@ -72,6 +72,7 @@ export struct SearchResultContentComponent{ | ||
| 72 | value.forEach((item)=>{ | 72 | value.forEach((item)=>{ |
| 73 | if(data.creatorId == item.creatorId){ | 73 | if(data.creatorId == item.creatorId){ |
| 74 | data.headerPhotoUrl = item.headPhotoUrl.split("?")[0] | 74 | data.headerPhotoUrl = item.headPhotoUrl.split("?")[0] |
| 75 | + data.mainControl = item.mainControl+"" | ||
| 75 | } | 76 | } |
| 76 | }) | 77 | }) |
| 77 | }) | 78 | }) |
| 1 | import { BottomNavi, CommonConstants, SpConstants } from 'wdConstant'; | 1 | import { BottomNavi, CommonConstants, SpConstants } from 'wdConstant'; |
| 2 | -import { Logger, SPHelper } from 'wdKit'; | 2 | +import { Logger, SPHelper, StringUtils } from 'wdKit'; |
| 3 | import PageViewModel from '../../viewmodel/PageViewModel'; | 3 | import PageViewModel from '../../viewmodel/PageViewModel'; |
| 4 | import storageStatistics from "@ohos.file.storageStatistics"; | 4 | import storageStatistics from "@ohos.file.storageStatistics"; |
| 5 | import { BusinessError } from '@ohos.base'; | 5 | import { BusinessError } from '@ohos.base'; |
| @@ -12,7 +12,7 @@ import { CustomCacheDialog } from './CustomCacheDialog'; | @@ -12,7 +12,7 @@ import { CustomCacheDialog } from './CustomCacheDialog'; | ||
| 12 | import MineSettingDatasModel from '../../model/MineSettingDatasModel'; | 12 | import MineSettingDatasModel from '../../model/MineSettingDatasModel'; |
| 13 | import { MineMainSettingFunctionItem } from '../../viewmodel/MineMainSettingFunctionItem'; | 13 | import { MineMainSettingFunctionItem } from '../../viewmodel/MineMainSettingFunctionItem'; |
| 14 | import common from '@ohos.app.ability.common'; | 14 | import common from '@ohos.app.ability.common'; |
| 15 | - | 15 | +import dataPreferences from '@ohos.data.preferences'; |
| 16 | 16 | ||
| 17 | @Component | 17 | @Component |
| 18 | export struct MineSettingComponent { | 18 | export struct MineSettingComponent { |
| @@ -21,6 +21,7 @@ export struct MineSettingComponent { | @@ -21,6 +21,7 @@ export struct MineSettingComponent { | ||
| 21 | @State privacySwitch: boolean = false | 21 | @State privacySwitch: boolean = false |
| 22 | @State cacheSize: number = 0 | 22 | @State cacheSize: number = 0 |
| 23 | @State accountState:boolean=false | 23 | @State accountState:boolean=false |
| 24 | + preferences: dataPreferences.Preferences | null = null; | ||
| 24 | dialogController: CustomDialogController = new CustomDialogController({ | 25 | dialogController: CustomDialogController = new CustomDialogController({ |
| 25 | builder: CustomCacheDialog({ | 26 | builder: CustomCacheDialog({ |
| 26 | cancel: () => { | 27 | cancel: () => { |
| @@ -41,6 +42,8 @@ export struct MineSettingComponent { | @@ -41,6 +42,8 @@ export struct MineSettingComponent { | ||
| 41 | 42 | ||
| 42 | this.getAccountState() | 43 | this.getAccountState() |
| 43 | 44 | ||
| 45 | + this.addLoginStatusObserver() | ||
| 46 | + | ||
| 44 | } | 47 | } |
| 45 | 48 | ||
| 46 | async getAccountState(){ | 49 | async getAccountState(){ |
| @@ -304,4 +307,14 @@ export struct MineSettingComponent { | @@ -304,4 +307,14 @@ export struct MineSettingComponent { | ||
| 304 | } | 307 | } |
| 305 | }); | 308 | }); |
| 306 | } | 309 | } |
| 310 | + | ||
| 311 | + async addLoginStatusObserver(){ | ||
| 312 | + this.preferences = await SPHelper.default.getPreferences(); | ||
| 313 | + let observer = (key: string) => { | ||
| 314 | + if(key == SpConstants.USER_ID){ | ||
| 315 | + this.getSettingPageData() | ||
| 316 | + } | ||
| 317 | + } | ||
| 318 | + this.preferences.on('change', observer); | ||
| 319 | + } | ||
| 307 | } | 320 | } |
| @@ -108,6 +108,8 @@ export struct EmptyComponent { | @@ -108,6 +108,8 @@ export struct EmptyComponent { | ||
| 108 | let contentString: string = '暂无内容' | 108 | let contentString: string = '暂无内容' |
| 109 | if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCollection) { | 109 | if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCollection) { |
| 110 | contentString = '暂无收藏' | 110 | contentString = '暂无收藏' |
| 111 | + } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoHistory) { | ||
| 112 | + contentString = '暂无浏览历史' | ||
| 111 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoMessage) { | 113 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoMessage) { |
| 112 | contentString = '暂无消息' | 114 | contentString = '暂无消息' |
| 113 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment) { | 115 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment) { |
| @@ -140,7 +142,7 @@ export struct EmptyComponent { | @@ -140,7 +142,7 @@ export struct EmptyComponent { | ||
| 140 | buildNoDataTipImage(): Resource | string { | 142 | buildNoDataTipImage(): Resource | string { |
| 141 | Logger.info(TAG, "buildNoDataTip"); | 143 | Logger.info(TAG, "buildNoDataTip"); |
| 142 | let imageString: Resource | string = $r('app.media.icon_no_content') | 144 | let imageString: Resource | string = $r('app.media.icon_no_content') |
| 143 | - if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCollection) { | 145 | + if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCollection||this.emptyType === WDViewDefaultType.WDViewDefaultType_NoHistory) { |
| 144 | imageString = $r('app.media.icon_no_collection') | 146 | imageString = $r('app.media.icon_no_collection') |
| 145 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoMessage) { | 147 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoMessage) { |
| 146 | imageString = $r('app.media.icon_no_message') | 148 | imageString = $r('app.media.icon_no_message') |
| 1 | +import { image } from '@kit.ImageKit'; | ||
| 2 | +import { matrix4, promptAction, window } from '@kit.ArkUI'; | ||
| 3 | +import { BusinessError } from '@kit.BasicServicesKit'; | ||
| 4 | +import { ScaleModel } from '../../model/ScaleModel'; | ||
| 5 | +import { OffsetModel } from '../../model/OffsetModel'; | ||
| 6 | +import { windowSizeManager } from '../../utils/Managers'; | ||
| 7 | +import { runWithAnimation } from '../../utils/FuncUtils'; | ||
| 8 | +import { PhotoListBean } from 'wdBean/Index'; | ||
| 9 | +import { http } from '@kit.NetworkKit'; | ||
| 10 | + | ||
| 11 | +// TODO:知识点:组件复用 | ||
| 12 | +@Reusable | ||
| 13 | +@Component | ||
| 14 | +export struct ImageItemView { | ||
| 15 | + @Consume private bgc: Color; | ||
| 16 | + @Link isEnableSwipe: boolean; // TODO:需求:多图切换 | ||
| 17 | + @State isEnableOffset: boolean = false; | ||
| 18 | + @State imageScaleInfo: ScaleModel = new ScaleModel(1.0, 1.0, 1.5, 0.3); | ||
| 19 | + @State imageOffsetInfo: OffsetModel = new OffsetModel(0, 0); | ||
| 20 | + @State matrix: matrix4.Matrix4Transit = matrix4.identity().copy(); | ||
| 21 | + @State imagePixelMap: image.PixelMap | null = null; // 当前图片pixelMap,用于Image组件显示 | ||
| 22 | + @State fitWH: "width" | "height" | undefined = undefined; // 表示当前图片是根据宽度适配还是高度适配 | ||
| 23 | + @State imageDefaultSize: image.Size = { width: 0, height: 0 }; // 图片默认大小,即,与屏幕大小最适配的显示大小 | ||
| 24 | + imageUri: string = ""; // 当前图片uri | ||
| 25 | + imageWHRatio: number = 0; // 图片原始宽高比 | ||
| 26 | + private MultiPictureDetailItem: PhotoListBean = {} as PhotoListBean | ||
| 27 | + @State imageBuffer: ArrayBuffer | undefined = undefined; // 图片ArrayBuffer | ||
| 28 | + | ||
| 29 | + aboutToAppear(): void { | ||
| 30 | + this.imageUri = this.MultiPictureDetailItem.picPath | ||
| 31 | + this.getPicture() | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 通过http的request方法从网络下载图片资源 | ||
| 36 | + */ | ||
| 37 | + async getPicture() { | ||
| 38 | + console.info(`cj2024 getPicture`) | ||
| 39 | + http.createHttp() | ||
| 40 | + .request(this.imageUri, | ||
| 41 | + (error: BusinessError, data: http.HttpResponse) => { | ||
| 42 | + if (error) { | ||
| 43 | + // 下载失败时弹窗提示检查网络,不执行后续逻辑 | ||
| 44 | + promptAction.showToast({ | ||
| 45 | + message: $r('app.string.image_request_fail'), | ||
| 46 | + duration: 2000 | ||
| 47 | + }) | ||
| 48 | + return; | ||
| 49 | + } | ||
| 50 | + this.transcodePixelMap(data); | ||
| 51 | + // 判断网络获取到的资源是否为ArrayBuffer类型 | ||
| 52 | + console.info(`cj2024 getPicture ${data.result}`) | ||
| 53 | + if (data.result instanceof ArrayBuffer) { | ||
| 54 | + console.info(`cj2024 getPicture 222`) | ||
| 55 | + this.imageBuffer = data.result as ArrayBuffer; | ||
| 56 | + } | ||
| 57 | + } | ||
| 58 | + ) | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + /** | ||
| 62 | + * 使用createPixelMap将ArrayBuffer类型的图片装换为PixelMap类型 | ||
| 63 | + * @param data:网络获取到的资源 | ||
| 64 | + */ | ||
| 65 | + transcodePixelMap(data: http.HttpResponse) { | ||
| 66 | + console.info(`cj2024 transcodePixelMap ${data.responseCode}`) | ||
| 67 | + if (http.ResponseCode.OK === data.responseCode) { | ||
| 68 | + const imageData: ArrayBuffer = data.result as ArrayBuffer; | ||
| 69 | + // 通过ArrayBuffer创建图片源实例。 | ||
| 70 | + const imageSource: image.ImageSource = image.createImageSource(imageData); | ||
| 71 | + this.initCurrentImageInfo(imageSource); | ||
| 72 | + } | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + /** | ||
| 76 | + * 根据图片宽高比及窗口大小计算图片的默认宽高,即,图片最适配屏幕的大小 | ||
| 77 | + * @param imageWHRatio:图片原始宽高比 | ||
| 78 | + * @param size:窗口大小{with:number,height:number} | ||
| 79 | + * @returns image.Size | ||
| 80 | + */ | ||
| 81 | + calcImageDefaultSize(imageWHRatio: number, size: window.Size): image.Size { | ||
| 82 | + let width = 0 | ||
| 83 | + let height = 0; | ||
| 84 | + if (imageWHRatio > size.width / size.height) { | ||
| 85 | + // 图片宽高比大于屏幕宽高比,图片默认以屏幕宽度进行显示 | ||
| 86 | + width = size.width; | ||
| 87 | + height = size.width / imageWHRatio; | ||
| 88 | + } else { | ||
| 89 | + height = size.height; | ||
| 90 | + width = size.height * imageWHRatio; | ||
| 91 | + } | ||
| 92 | + return { width: width, height: height }; | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + /** | ||
| 96 | + * TODO:知识点:根据图片大小(宽高<=屏幕宽高)和屏幕大小计算图片放大适配屏幕进行显示的缩放倍率 | ||
| 97 | + * @param imageSize:图片当前大小 | ||
| 98 | + * @param windowSize:窗口大小 | ||
| 99 | + * @returns:缩放倍率 | ||
| 100 | + */ | ||
| 101 | + calcFitScaleRatio(imageSize: image.Size, windowSize: window.Size): number { | ||
| 102 | + let ratio: number = 1.0; | ||
| 103 | + if (windowSize.width > imageSize.width) { | ||
| 104 | + ratio = windowSize.width / imageSize.width; | ||
| 105 | + } else { | ||
| 106 | + ratio = windowSize.height / imageSize.height; | ||
| 107 | + } | ||
| 108 | + return ratio; | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + /** | ||
| 112 | + * 设置当前图片的相关信息:uri、whRatio、pixelMap、fitWH、defaultSize、maxScaleValue | ||
| 113 | + * TODO:知识点:提前获取图片的信息,以进行Image组件的尺寸设置及后续的相关计算 | ||
| 114 | + */ | ||
| 115 | + initCurrentImageInfo(imageSource: image.ImageSource): void { | ||
| 116 | + this.matrix = matrix4.identity().copy(); | ||
| 117 | + // const imageSource: image.ImageSource = image.createImageSource(this.imageUri); | ||
| 118 | + imageSource.getImageInfo(0).then((data: image.ImageInfo) => { | ||
| 119 | + this.imageWHRatio = data.size.width / data.size.height; | ||
| 120 | + this.imageDefaultSize = this.calcImageDefaultSize(this.imageWHRatio, windowSizeManager.get()); | ||
| 121 | + if (this.imageDefaultSize.width === windowSizeManager.get().width) { | ||
| 122 | + this.fitWH = "width"; | ||
| 123 | + } else { | ||
| 124 | + this.fitWH = "height"; | ||
| 125 | + } | ||
| 126 | + this.imageScaleInfo.maxScaleValue += this.fitWH === "width" ? | ||
| 127 | + (windowSizeManager.get().height / this.imageDefaultSize.height) : | ||
| 128 | + (windowSizeManager.get().width / this.imageDefaultSize.width); | ||
| 129 | + }).catch((err: BusinessError) => { | ||
| 130 | + console.error(`[error][getImageInfo]${err.message}`); | ||
| 131 | + }); | ||
| 132 | + imageSource.createPixelMap().then((data: image.PixelMap) => { | ||
| 133 | + this.imagePixelMap = data; | ||
| 134 | + }).catch((err: BusinessError) => { | ||
| 135 | + console.error(`[error][createPixelMap]${err.message}`); | ||
| 136 | + }); | ||
| 137 | + this.isEnableOffset = false; | ||
| 138 | + this.imageScaleInfo.reset(); | ||
| 139 | + this.imageOffsetInfo.reset(); | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + /** | ||
| 143 | + * 在图片消失时,将当前图片的信息设置为默认值 | ||
| 144 | + */ | ||
| 145 | + resetCurrentImageInfo(): void { | ||
| 146 | + this.imageScaleInfo.reset(); | ||
| 147 | + this.imageOffsetInfo.reset(); | ||
| 148 | + this.matrix = matrix4.identity().copy(); | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + /** | ||
| 152 | + * TODO:需求:在偏移时评估是否到达边界,以便进行位移限制与图片的切换 | ||
| 153 | + * @returns:长度为4的boolean数组,表示上下左右是否到达边界 | ||
| 154 | + */ | ||
| 155 | + evaluateBound(): boolean[] { | ||
| 156 | + return [false, false, false, false]; | ||
| 157 | + } | ||
| 158 | + | ||
| 159 | + build() { | ||
| 160 | + Stack() { | ||
| 161 | + Image(this.imagePixelMap)// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 | ||
| 162 | + .width(this.fitWH === "width" ? "100%" : undefined) | ||
| 163 | + .height(this.fitWH === "height" ? "100%" : undefined) | ||
| 164 | + .aspectRatio(this.imageWHRatio) | ||
| 165 | + .objectFit(ImageFit.Cover)// TODO:知识点:保持宽高比进行缩放,可以超出父组件,以便实现多图切换的增强功能 | ||
| 166 | + .autoResize(false) | ||
| 167 | + .transform(this.matrix)// TODO:知识点:通过matrix控制图片的缩放 | ||
| 168 | + .defaultFocus(true) | ||
| 169 | + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 170 | + .offset({ | ||
| 171 | + // TODO:知识点:通过offset控制图片的偏移 | ||
| 172 | + x: this.imageOffsetInfo.currentX, | ||
| 173 | + y: this.imageOffsetInfo.currentY | ||
| 174 | + }) | ||
| 175 | + } | ||
| 176 | + .onBlur(() => { | ||
| 177 | + this.resetCurrentImageInfo(); | ||
| 178 | + }) | ||
| 179 | + // .backgroundColor(this.bgc) | ||
| 180 | + .alignContent(Alignment.Center) | ||
| 181 | + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 182 | + .width("100%") | ||
| 183 | + .height("100%") | ||
| 184 | + .gesture( | ||
| 185 | + GestureGroup( | ||
| 186 | + GestureMode.Exclusive, | ||
| 187 | + // TODO:知识点:双击切换图片大小 | ||
| 188 | + TapGesture({ count: 2 }) | ||
| 189 | + .onAction(() => { | ||
| 190 | + let fn: Function; | ||
| 191 | + // 已经是放大状态下,双击缩小 | ||
| 192 | + if (this.imageScaleInfo.scaleValue > this.imageScaleInfo.defaultScaleValue) { | ||
| 193 | + fn = () => { | ||
| 194 | + this.isEnableSwipe = true; | ||
| 195 | + this.imageScaleInfo.reset(); | ||
| 196 | + this.imageOffsetInfo.reset(); | ||
| 197 | + this.matrix = matrix4.identity().copy(); | ||
| 198 | + }; | ||
| 199 | + } else { | ||
| 200 | + // 已经是缩小状态,双击放大 | ||
| 201 | + fn = () => { | ||
| 202 | + this.isEnableSwipe = false; | ||
| 203 | + const ratio: number = this.calcFitScaleRatio(this.imageDefaultSize, windowSizeManager.get()); | ||
| 204 | + this.imageScaleInfo.scaleValue = ratio; | ||
| 205 | + this.imageOffsetInfo.reset(); | ||
| 206 | + this.matrix = matrix4.identity().scale({ | ||
| 207 | + x: ratio, | ||
| 208 | + y: ratio, | ||
| 209 | + }).copy(); | ||
| 210 | + this.imageScaleInfo.stash(); | ||
| 211 | + } | ||
| 212 | + } | ||
| 213 | + runWithAnimation(fn); | ||
| 214 | + }), | ||
| 215 | + // 单击切换背景色 | ||
| 216 | + // TapGesture({ count: 1 }).onAction(() => { | ||
| 217 | + // runWithAnimation(() => { | ||
| 218 | + // this.bgc = this.bgc === Color.White ? Color.Black : Color.White; | ||
| 219 | + // }); | ||
| 220 | + // }), | ||
| 221 | + // TODO:知识点:双指捏合缩放图片 | ||
| 222 | + PinchGesture({ fingers: 2, distance: 1 }) | ||
| 223 | + .onActionUpdate((event: GestureEvent) => { | ||
| 224 | + this.imageScaleInfo.scaleValue = this.imageScaleInfo.lastValue * event.scale; | ||
| 225 | + // TODO:知识点:缩放时不允许大于最大缩放因子+额外缩放因子,不允许小于默认大小-额外缩放因子,额外缩放因子用于提升用户体验 | ||
| 226 | + if (this.imageScaleInfo.scaleValue > this.imageScaleInfo.maxScaleValue * | ||
| 227 | + (1 + this.imageScaleInfo.extraScaleValue) | ||
| 228 | + ) { | ||
| 229 | + this.imageScaleInfo.scaleValue = this.imageScaleInfo.maxScaleValue * | ||
| 230 | + (1 + this.imageScaleInfo.extraScaleValue); | ||
| 231 | + } | ||
| 232 | + if (this.imageScaleInfo.scaleValue < this.imageScaleInfo.defaultScaleValue * | ||
| 233 | + (1 - this.imageScaleInfo.extraScaleValue)) { | ||
| 234 | + this.imageScaleInfo.scaleValue = this.imageScaleInfo.defaultScaleValue * | ||
| 235 | + (1 - this.imageScaleInfo.extraScaleValue); | ||
| 236 | + } | ||
| 237 | + // TODO:知识点:matrix默认缩放中心为组件中心 | ||
| 238 | + this.matrix = matrix4.identity().scale({ | ||
| 239 | + x: this.imageScaleInfo.scaleValue, | ||
| 240 | + y: this.imageScaleInfo.scaleValue, | ||
| 241 | + }).copy(); | ||
| 242 | + console.debug(this.imageScaleInfo.toString()); | ||
| 243 | + }) | ||
| 244 | + .onActionEnd((event: GestureEvent) => { | ||
| 245 | + /** | ||
| 246 | + * TODO:知识点:当小于默认大小时,恢复为默认大小 | ||
| 247 | + */ | ||
| 248 | + if (this.imageScaleInfo.scaleValue < this.imageScaleInfo.defaultScaleValue) { | ||
| 249 | + runWithAnimation(() => { | ||
| 250 | + this.imageScaleInfo.reset(); | ||
| 251 | + this.imageOffsetInfo.reset(); | ||
| 252 | + this.matrix = matrix4.identity().copy(); | ||
| 253 | + }) | ||
| 254 | + } | ||
| 255 | + // TODO:知识点:当大于最大缩放因子时,恢复到最大 | ||
| 256 | + if (this.imageScaleInfo.scaleValue > this.imageScaleInfo.maxScaleValue) { | ||
| 257 | + runWithAnimation(() => { | ||
| 258 | + this.imageScaleInfo.scaleValue = this.imageScaleInfo.maxScaleValue; | ||
| 259 | + this.matrix = matrix4.identity() | ||
| 260 | + .scale({ | ||
| 261 | + x: this.imageScaleInfo.maxScaleValue, | ||
| 262 | + y: this.imageScaleInfo.maxScaleValue | ||
| 263 | + }); | ||
| 264 | + }) | ||
| 265 | + } | ||
| 266 | + this.imageScaleInfo.stash(); | ||
| 267 | + }), | ||
| 268 | + // // TODO:知识点:滑动图片 | ||
| 269 | + // PanGesture({ fingers: 1 })// TODO:需求:默认大小下左右滑动应当是切换图片 | ||
| 270 | + // .onActionUpdate((event: GestureEvent) => { | ||
| 271 | + // if (this.imageScaleInfo.scaleValue === this.imageScaleInfo.defaultScaleValue) { | ||
| 272 | + // // 默认大小下不允许移动 | ||
| 273 | + // return; | ||
| 274 | + // } | ||
| 275 | + // this.imageOffsetInfo.currentX = this.imageOffsetInfo.lastX + event.offsetX; | ||
| 276 | + // this.imageOffsetInfo.currentY = this.imageOffsetInfo.lastY + event.offsetY; | ||
| 277 | + // }) | ||
| 278 | + // .onActionEnd((event: GestureEvent) => { | ||
| 279 | + // this.imageOffsetInfo.stash(); | ||
| 280 | + // }) | ||
| 281 | + ), | ||
| 282 | + ) | ||
| 283 | + } | ||
| 284 | +} |
| 1 | +import { Logger } from 'wdKit/Index' | ||
| 2 | +import { LikeViewModel } from '../../viewmodel/LikeViewModel' | ||
| 3 | + | ||
| 4 | +@Component | ||
| 5 | +export struct LikeComponent { | ||
| 6 | + @State likeStatus: boolean = false | ||
| 7 | + viewModel: LikeViewModel = new LikeViewModel() | ||
| 8 | + @Prop data: Record<string, string> | ||
| 9 | + enableBtn = true | ||
| 10 | + | ||
| 11 | + //上层传值 样例 | ||
| 12 | + // this.data['contentId'] = '30035444649' //必须 | ||
| 13 | + // this.data['userName'] = '人民日报网友2kD2xW' | ||
| 14 | + // this.data['contentType'] = '8' //必须 | ||
| 15 | + // this.data['title'] = '开创两校交流先河!克罗地亚教育代表团访问同济大学' | ||
| 16 | + // this.data['userHeaderUrl'] = "" | ||
| 17 | + // this.data['channelId'] = "2059" //必须 | ||
| 18 | + // this.data['status'] = "1" //必须 | ||
| 19 | + | ||
| 20 | + aboutToAppear(): void { | ||
| 21 | + if (this.data) { | ||
| 22 | + Logger.debug("ddd: " + this.data['status']) | ||
| 23 | + if (this.data['status'] == '1') { | ||
| 24 | + this.likeStatus = true | ||
| 25 | + } else { | ||
| 26 | + this.likeStatus = false | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + build() { | ||
| 34 | + Column() { | ||
| 35 | + Image(this.likeStatus ? $r('app.media.icon_like_select') : $r('app.media.icon_like_default')) | ||
| 36 | + .width(24) | ||
| 37 | + .height(24) | ||
| 38 | + .onClick(() => { | ||
| 39 | + if (!this.enableBtn) { | ||
| 40 | + return | ||
| 41 | + } | ||
| 42 | + if (this.likeStatus) { | ||
| 43 | + //1 | ||
| 44 | + this.executeLike('1') | ||
| 45 | + } else { | ||
| 46 | + //0 | ||
| 47 | + this.executeLike('0') | ||
| 48 | + } | ||
| 49 | + }) | ||
| 50 | + }.width(24).height(24) | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + executeLike(status: string) { | ||
| 54 | + this.data['status'] = status | ||
| 55 | + this.viewModel.executeLike2(this.data).then(() => { | ||
| 56 | + this.likeStatus = !this.likeStatus | ||
| 57 | + this.enableBtn = true | ||
| 58 | + }).catch(() => { | ||
| 59 | + this.enableBtn = true | ||
| 60 | + }) | ||
| 61 | + } | ||
| 62 | +} |
| 1 | -import { ToastUtils, Logger, NumberFormatterUtils } from 'wdKit'; | 1 | +import { ToastUtils, Logger, NumberFormatterUtils, SPHelper } from 'wdKit'; |
| 2 | import { | 2 | import { |
| 3 | InputMethodProperty, | 3 | InputMethodProperty, |
| 4 | batchLikeAndCollectResult, | 4 | batchLikeAndCollectResult, |
| @@ -15,6 +15,7 @@ import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailV | @@ -15,6 +15,7 @@ import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailV | ||
| 15 | import { HttpUrlUtils } from 'wdNetwork/Index'; | 15 | import { HttpUrlUtils } from 'wdNetwork/Index'; |
| 16 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 16 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| 17 | import { PageRepository } from '../../repository/PageRepository'; | 17 | import { PageRepository } from '../../repository/PageRepository'; |
| 18 | +import { SpConstants } from 'wdConstant/Index'; | ||
| 18 | 19 | ||
| 19 | export interface OperationItem { | 20 | export interface OperationItem { |
| 20 | icon: Resource; | 21 | icon: Resource; |
| @@ -53,8 +54,9 @@ export struct OperRowListView { | @@ -53,8 +54,9 @@ export struct OperRowListView { | ||
| 53 | } | 54 | } |
| 54 | ] | 55 | ] |
| 55 | 56 | ||
| 56 | - aboutToAppear() { | ||
| 57 | - if (HttpUrlUtils.getUserId()) { | 57 | + async aboutToAppear() { |
| 58 | + const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') | ||
| 59 | + if (user_id) { | ||
| 58 | this.getInteractDataStatus() | 60 | this.getInteractDataStatus() |
| 59 | } | 61 | } |
| 60 | this.queryContentInteractCount() | 62 | this.queryContentInteractCount() |
| @@ -338,9 +340,10 @@ export struct OperRowListView { | @@ -338,9 +340,10 @@ export struct OperRowListView { | ||
| 338 | /** | 340 | /** |
| 339 | * 点赞、取消点赞 | 341 | * 点赞、取消点赞 |
| 340 | */ | 342 | */ |
| 341 | - toggleLikeStatus() { | 343 | + async toggleLikeStatus() { |
| 342 | // 未登录,跳转登录 | 344 | // 未登录,跳转登录 |
| 343 | - if (!HttpUrlUtils.getUserId()) { | 345 | + const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') |
| 346 | + if (!user_id) { | ||
| 344 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | 347 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) |
| 345 | return | 348 | return |
| 346 | } | 349 | } |
| @@ -361,9 +364,10 @@ export struct OperRowListView { | @@ -361,9 +364,10 @@ export struct OperRowListView { | ||
| 361 | /** | 364 | /** |
| 362 | * 收藏、取消收藏 | 365 | * 收藏、取消收藏 |
| 363 | */ | 366 | */ |
| 364 | - toggleCollectStatus() { | 367 | + async toggleCollectStatus() { |
| 365 | // 未登录,跳转登录 | 368 | // 未登录,跳转登录 |
| 366 | - if (!HttpUrlUtils.getUserId()) { | 369 | + const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') |
| 370 | + if (!user_id) { | ||
| 367 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | 371 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) |
| 368 | return | 372 | return |
| 369 | } | 373 | } |
| @@ -33,6 +33,7 @@ export struct SecondLevelComponent { | @@ -33,6 +33,7 @@ export struct SecondLevelComponent { | ||
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | onFirstChange(){ | 35 | onFirstChange(){ |
| 36 | + this.select = 0 | ||
| 36 | if (!this.currentFirst) { | 37 | if (!this.currentFirst) { |
| 37 | this.mTip = '暂无数据'; | 38 | this.mTip = '暂无数据'; |
| 38 | } else { | 39 | } else { |
| @@ -34,10 +34,11 @@ export struct ThirdLevelComponent { | @@ -34,10 +34,11 @@ export struct ThirdLevelComponent { | ||
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | onFirstChange(){ | 36 | onFirstChange(){ |
| 37 | - | 37 | + this.select = 0 |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | onSecondChange(){ | 40 | onSecondChange(){ |
| 41 | + this.select = 0 | ||
| 41 | if (!this.currentSecondBean) { | 42 | if (!this.currentSecondBean) { |
| 42 | this.mTip = '暂无数据'; | 43 | this.mTip = '暂无数据'; |
| 43 | } else { | 44 | } else { |
| 1 | +import { HashMap } from '@kit.ArkTS'; | ||
| 2 | +import { Logger } from 'wdKit/Index'; | ||
| 3 | +import { HttpUrlUtils, ResponseDTO } from 'wdNetwork/Index'; | ||
| 4 | +import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; | ||
| 5 | + | ||
| 6 | +export class LikeModel { | ||
| 7 | + executeLike(data: Record<string, string>) { | ||
| 8 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 9 | + | ||
| 10 | + return new Promise<object>((success, fail) => { | ||
| 11 | + HttpRequest.post<ResponseDTO<object>>(HttpUrlUtils.executeLike(), data, headers).then((data: ResponseDTO<object>) => { | ||
| 12 | + if (data.code != 0) { | ||
| 13 | + fail(data.message) | ||
| 14 | + return | ||
| 15 | + } | ||
| 16 | + success(data) | ||
| 17 | + }, (error: Error) => { | ||
| 18 | + fail(error.message) | ||
| 19 | + Logger.debug("LoginViewModel:error ", error.toString()) | ||
| 20 | + }) | ||
| 21 | + }) | ||
| 22 | + } | ||
| 23 | +} |
| @@ -60,7 +60,7 @@ class MinePageDatasModel{ | @@ -60,7 +60,7 @@ class MinePageDatasModel{ | ||
| 60 | return this.personalData | 60 | return this.personalData |
| 61 | } | 61 | } |
| 62 | this.personalData.push(new MinePagePersonalFunctionsItem("评论",$r('app.media.mine_comment_icon'))) | 62 | this.personalData.push(new MinePagePersonalFunctionsItem("评论",$r('app.media.mine_comment_icon'))) |
| 63 | - this.personalData.push(new MinePagePersonalFunctionsItem("关注",$r('app.media.mine_order_icon'))) | 63 | + this.personalData.push(new MinePagePersonalFunctionsItem("关注",$r('app.media.mine_follow_icon'))) |
| 64 | this.personalData.push(new MinePagePersonalFunctionsItem("收藏",$r('app.media.mine_collect_icon'))) | 64 | this.personalData.push(new MinePagePersonalFunctionsItem("收藏",$r('app.media.mine_collect_icon'))) |
| 65 | this.personalData.push(new MinePagePersonalFunctionsItem("历史",$r('app.media.mine_history_icon'))) | 65 | this.personalData.push(new MinePagePersonalFunctionsItem("历史",$r('app.media.mine_history_icon'))) |
| 66 | this.personalData.push(new MinePagePersonalFunctionsItem("消息",$r('app.media.mine_msg_icon'))) | 66 | this.personalData.push(new MinePagePersonalFunctionsItem("消息",$r('app.media.mine_msg_icon'))) |
| 1 | +@Observed | ||
| 2 | +export class OffsetModel { | ||
| 3 | + public currentX: number; | ||
| 4 | + public currentY: number; | ||
| 5 | + public lastX: number = 0; | ||
| 6 | + public lastY: number = 0; | ||
| 7 | + | ||
| 8 | + constructor(currentX: number = 0, currentY: number = 0) { | ||
| 9 | + this.currentX = currentX; | ||
| 10 | + this.currentY = currentY; | ||
| 11 | + } | ||
| 12 | + | ||
| 13 | + reset(): void { | ||
| 14 | + this.currentX = 0; | ||
| 15 | + this.currentY = 0; | ||
| 16 | + this.lastX = 0; | ||
| 17 | + this.lastY = 0; | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + stash(): void { | ||
| 21 | + this.lastX = this.currentX; | ||
| 22 | + this.lastY = this.currentY; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + toString(): string { | ||
| 26 | + return `[currentX: ${this.currentX} currentY: ${this.currentY} lastX: ${this.lastX} lastY: ${this.lastY}]`; | ||
| 27 | + } | ||
| 28 | +} |
| 1 | +@Observed | ||
| 2 | +export class ScaleModel { | ||
| 3 | + /** | ||
| 4 | + * scaleValue: 本次缩放因子,用于控制图片的大小显示 | ||
| 5 | + * lastValue:记录上次缩放完后的缩放因子 | ||
| 6 | + * defaultMaxScaleValue:默认的最大放大值 | ||
| 7 | + * defaultScaleValue:默认缩放值,1 | ||
| 8 | + */ | ||
| 9 | + public scaleValue: number; | ||
| 10 | + public lastValue: number; | ||
| 11 | + public maxScaleValue: number; | ||
| 12 | + public extraScaleValue: number; | ||
| 13 | + public readonly defaultScaleValue: number = 1; | ||
| 14 | + | ||
| 15 | + constructor(scaleValue: number = 1.0, lastValue: number = 1.0, | ||
| 16 | + maxScaleValue: number = 1.5, extraScaleValue: number = 0.2) { | ||
| 17 | + this.scaleValue = scaleValue; | ||
| 18 | + this.lastValue = lastValue; | ||
| 19 | + this.maxScaleValue = maxScaleValue; | ||
| 20 | + this.extraScaleValue = extraScaleValue; | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + reset(): void { | ||
| 24 | + this.scaleValue = this.defaultScaleValue; | ||
| 25 | + this.lastValue = this.scaleValue; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + stash(): void { | ||
| 29 | + this.lastValue = this.scaleValue; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + toString(): string { | ||
| 33 | + return `[scaleValue: ${this.scaleValue} lastValue: ${this.lastValue}]`; | ||
| 34 | + } | ||
| 35 | +} |
| @@ -185,10 +185,10 @@ struct MineHomePage { | @@ -185,10 +185,10 @@ struct MineHomePage { | ||
| 185 | //tab 页面 | 185 | //tab 页面 |
| 186 | Tabs({controller: this.controller}) { | 186 | Tabs({controller: this.controller}) { |
| 187 | TabContent() { | 187 | TabContent() { |
| 188 | - HomePageBottomComponent({style:0}) | 188 | + HomePageBottomComponent({style:0,commentNum:$commentNum}) |
| 189 | }.tabBar(this.TabBuilder(0,"评论")) | 189 | }.tabBar(this.TabBuilder(0,"评论")) |
| 190 | TabContent() { | 190 | TabContent() { |
| 191 | - HomePageBottomComponent({style:1}) | 191 | + HomePageBottomComponent({style:1,commentNum:$commentNum}) |
| 192 | }.tabBar(this.TabBuilder(1,"关注")) | 192 | }.tabBar(this.TabBuilder(1,"关注")) |
| 193 | } | 193 | } |
| 194 | .backgroundColor($r('app.color.white')) | 194 | .backgroundColor($r('app.color.white')) |
| @@ -40,8 +40,9 @@ struct SearchCreatorPage { | @@ -40,8 +40,9 @@ struct SearchCreatorPage { | ||
| 40 | this.hasMore = false | 40 | this.hasMore = false |
| 41 | this.isLoading = false | 41 | this.isLoading = false |
| 42 | }else{ | 42 | }else{ |
| 43 | + this.data_temp = [] | ||
| 43 | result.list.forEach((data)=>{ | 44 | result.list.forEach((data)=>{ |
| 44 | - this.data_temp.push(new FollowListDetailItem("",data.data.creatorName,"0","",data.data.id,"0",data.data.userId,data.data.userType,data.data.userId)) | 45 | + this.data_temp.push(new FollowListDetailItem("",data.data.creatorName,"0","",data.data.id,"0",data.data.userId,data.data.userType,data.data.userId,Number.parseInt(data.data.mainControl),-1)) |
| 45 | }) | 46 | }) |
| 46 | 47 | ||
| 47 | let request = new CreatorDetailRequestItem() | 48 | let request = new CreatorDetailRequestItem() |
| @@ -69,6 +70,8 @@ struct SearchCreatorPage { | @@ -69,6 +70,8 @@ struct SearchCreatorPage { | ||
| 69 | data.cnFansNum = item.fansNum + "" | 70 | data.cnFansNum = item.fansNum + "" |
| 70 | } | 71 | } |
| 71 | data.introduction = item.introduction | 72 | data.introduction = item.introduction |
| 73 | + data.mainControl = item.mainControl | ||
| 74 | + data.banControl = item.banControl | ||
| 72 | } | 75 | } |
| 73 | }) | 76 | }) |
| 74 | }) | 77 | }) |
| @@ -104,7 +107,7 @@ struct SearchCreatorPage { | @@ -104,7 +107,7 @@ struct SearchCreatorPage { | ||
| 104 | }) | 107 | }) |
| 105 | 108 | ||
| 106 | this.data_temp.forEach((item)=>{ | 109 | this.data_temp.forEach((item)=>{ |
| 107 | - this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status,item.attentionUserId,item.cnUserType,item.cnUserId)) | 110 | + this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status,item.attentionUserId,item.cnUserType,item.cnUserId,item.mainControl,item.banControl)) |
| 108 | }) | 111 | }) |
| 109 | 112 | ||
| 110 | this.data.notifyDataReload() | 113 | this.data.notifyDataReload() |
| 1 | +/** | ||
| 2 | + * 给函数的执行加上动画 | ||
| 3 | + * @param fn:要在动画内执行的回调函数,通常fn里面会改变状态变量 | ||
| 4 | + * @param duration:动画持续时长 | ||
| 5 | + * @param curve:动画区线 | ||
| 6 | + */ | ||
| 7 | +import { ImageViewerConstants } from '../constants/ImageViewerConstants'; | ||
| 8 | + | ||
| 9 | +export function runWithAnimation( | ||
| 10 | + fn: Function, | ||
| 11 | + duration: number = ImageViewerConstants.ANIMATE_DURATION, | ||
| 12 | + curve: Curve = Curve.Smooth): void { | ||
| 13 | + animateTo({ duration: duration, curve: curve }, () => { | ||
| 14 | + fn(); | ||
| 15 | + }) | ||
| 16 | +} |
| 1 | +import { window } from '@kit.ArkUI'; | ||
| 2 | + | ||
| 3 | +class WindowSizeManager { | ||
| 4 | + private size: window.Size = { width: 0, height: 0 }; | ||
| 5 | + | ||
| 6 | + constructor() { | ||
| 7 | + window.getLastWindow(getContext()).then((value: window.Window) => { | ||
| 8 | + const rect: window.Rect = value.getWindowProperties().windowRect; | ||
| 9 | + this.size.width = px2vp(rect.width); | ||
| 10 | + this.size.height = px2vp(rect.height); | ||
| 11 | + console.log(`[windowWidth]${this.size.width} [windowHeight]${this.size.height}`); | ||
| 12 | + }) | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + get(): window.Size { | ||
| 16 | + return this.size; | ||
| 17 | + } | ||
| 18 | +} | ||
| 19 | + | ||
| 20 | +export const windowSizeManager: WindowSizeManager = new WindowSizeManager(); |
| @@ -44,7 +44,7 @@ class EditInfoViewModel { | @@ -44,7 +44,7 @@ class EditInfoViewModel { | ||
| 44 | new EditListInfo('简介',item&&item.userExtend.introduction?item.userExtend.introduction:'待完善'), | 44 | new EditListInfo('简介',item&&item.userExtend.introduction?item.userExtend.introduction:'待完善'), |
| 45 | new EditListInfo('地区',item&&item.userExtend.address?item.userExtend.address:'待完善'), | 45 | new EditListInfo('地区',item&&item.userExtend.address?item.userExtend.address:'待完善'), |
| 46 | new EditListInfo('生日',item&&item.userExtend.birthday?item.userExtend.birthday:'待完善'), | 46 | new EditListInfo('生日',item&&item.userExtend.birthday?item.userExtend.birthday:'待完善'), |
| 47 | - new EditListInfo('性别',item?(item.userExtend.sex === 1?'男':'女'):'待完善'),] | 47 | + new EditListInfo('性别',item?(item.userExtend.sex === 10?'待完善':(item.userExtend.sex === 1?'男':'女')):'待完善'),] |
| 48 | return this.editListData | 48 | return this.editListData |
| 49 | } | 49 | } |
| 50 | 50 | ||
| @@ -129,6 +129,7 @@ class EditInfoViewModel { | @@ -129,6 +129,7 @@ class EditInfoViewModel { | ||
| 129 | .then((navResDTO: ResponseDTO) => { | 129 | .then((navResDTO: ResponseDTO) => { |
| 130 | if (navResDTO.code == 0) { | 130 | if (navResDTO.code == 0) { |
| 131 | promptAction.showToast({ message: '修改成功' }) | 131 | promptAction.showToast({ message: '修改成功' }) |
| 132 | + success(navResDTO) | ||
| 132 | }else { | 133 | }else { |
| 133 | promptAction.showToast({ message: navResDTO.message }) | 134 | promptAction.showToast({ message: navResDTO.message }) |
| 134 | } | 135 | } |
| @@ -71,16 +71,20 @@ export class FollowListDetailItem{ | @@ -71,16 +71,20 @@ export class FollowListDetailItem{ | ||
| 71 | 71 | ||
| 72 | cnUserType:string = "" | 72 | cnUserType:string = "" |
| 73 | cnUserId:string = "" | 73 | cnUserId:string = "" |
| 74 | + mainControl:number = 0 | ||
| 74 | 75 | ||
| 76 | + cnMainControl:number = 0 | ||
| 75 | attentionCreatorId:string = "" | 77 | attentionCreatorId:string = "" |
| 76 | attentionUserType:string = "" | 78 | attentionUserType:string = "" |
| 77 | 79 | ||
| 78 | attentionHeadPhotoUrl:string = "" | 80 | attentionHeadPhotoUrl:string = "" |
| 79 | attentionUserName:string = "" | 81 | attentionUserName:string = "" |
| 80 | fansNum :number = 0 | 82 | fansNum :number = 0 |
| 83 | + banControl:number = -1 | ||
| 81 | 84 | ||
| 82 | 85 | ||
| 83 | - constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:string,introduction:string,creatorId:string,status:string,attentionUserId:string,cnUserType:string,cnUserId:string) { | 86 | + |
| 87 | + constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:string,introduction:string,creatorId:string,status:string,attentionUserId:string,cnUserType:string,cnUserId:string,mainControl:number,banControl:number) { | ||
| 84 | this.headPhotoUrl = headPhotoUrl | 88 | this.headPhotoUrl = headPhotoUrl |
| 85 | this.cnUserName = cnUserName | 89 | this.cnUserName = cnUserName |
| 86 | this.cnFansNum = cnFansNum | 90 | this.cnFansNum = cnFansNum |
| @@ -90,5 +94,7 @@ export class FollowListDetailItem{ | @@ -90,5 +94,7 @@ export class FollowListDetailItem{ | ||
| 90 | this.attentionUserId = attentionUserId | 94 | this.attentionUserId = attentionUserId |
| 91 | this.cnUserType = cnUserType | 95 | this.cnUserType = cnUserType |
| 92 | this.cnUserId = cnUserId | 96 | this.cnUserId = cnUserId |
| 97 | + this.mainControl = mainControl | ||
| 98 | + this.banControl = banControl | ||
| 93 | } | 99 | } |
| 94 | } | 100 | } |
| 1 | +import { LikeModel } from '../model/LikeModel' | ||
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * 点赞*/ | ||
| 5 | +export class LikeViewModel { | ||
| 6 | + likeModel: LikeModel | ||
| 7 | + | ||
| 8 | + constructor() { | ||
| 9 | + this.likeModel = new LikeModel(); | ||
| 10 | + } | ||
| 11 | + | ||
| 12 | + executeLike(contentId: string, userName: string, contentType: string, title: string, userHeaderUrl: string, channelId: string, status: string) { | ||
| 13 | + let bean: Record<string, string> = {} | ||
| 14 | + bean['contentId'] = contentId | ||
| 15 | + bean['userName'] = userName | ||
| 16 | + bean['contentType'] = contentType | ||
| 17 | + bean['title'] = title | ||
| 18 | + bean['userHeaderUrl'] = userHeaderUrl | ||
| 19 | + bean['channelId'] = channelId | ||
| 20 | + bean['status'] = status | ||
| 21 | + this.likeModel.executeLike(bean) | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + executeLike2(bean: Record<string, string>) { | ||
| 25 | + | ||
| 26 | + return new Promise<object>((success, fail) => { | ||
| 27 | + this.likeModel.executeLike(bean).then((data) => { | ||
| 28 | + success(data) | ||
| 29 | + }).catch((error: string) => { | ||
| 30 | + fail(error) | ||
| 31 | + }) | ||
| 32 | + }) | ||
| 33 | + | ||
| 34 | + } | ||
| 35 | +} |
| 1 | -import { PageDTO, CompDTO, PageInfoDTO } from 'wdBean'; | 1 | +import { PageDTO, CompDTO, PageInfoDTO, ContentDTO } from 'wdBean'; |
| 2 | import { CompStyle, ViewType } from 'wdConstant/Index'; | 2 | import { CompStyle, ViewType } from 'wdConstant/Index'; |
| 3 | import { CollectionUtils, DateTimeUtils, Logger } from 'wdKit'; | 3 | import { CollectionUtils, DateTimeUtils, Logger } from 'wdKit'; |
| 4 | import { closeRefresh } from '../utils/PullDownRefresh'; | 4 | import { closeRefresh } from '../utils/PullDownRefresh'; |
| @@ -58,7 +58,6 @@ export class PageHelper { | @@ -58,7 +58,6 @@ export class PageHelper { | ||
| 58 | if (pageDto && pageDto.compList && pageDto.compList.length > 0) { | 58 | if (pageDto && pageDto.compList && pageDto.compList.length > 0) { |
| 59 | pageModel.viewType = ViewType.LOADED; | 59 | pageModel.viewType = ViewType.LOADED; |
| 60 | let sizeBefore: number = pageModel.compList.size(); | 60 | let sizeBefore: number = pageModel.compList.size(); |
| 61 | - pageModel.compList.push(...pageDto.compList) | ||
| 62 | if (pageDto.compList.length === pageModel.pageSize) { | 61 | if (pageDto.compList.length === pageModel.pageSize) { |
| 63 | pageModel.currentPage++; | 62 | pageModel.currentPage++; |
| 64 | pageModel.hasMore = true; | 63 | pageModel.hasMore = true; |
| @@ -66,6 +65,11 @@ export class PageHelper { | @@ -66,6 +65,11 @@ export class PageHelper { | ||
| 66 | pageModel.hasMore = false; | 65 | pageModel.hasMore = false; |
| 67 | } | 66 | } |
| 68 | 67 | ||
| 68 | + //移除音频 和 活动 | ||
| 69 | + this.removeComp(pageModel,pageDto) | ||
| 70 | + | ||
| 71 | + // pageModel.compList.push(...pageDto.compList) | ||
| 72 | + | ||
| 69 | // TODO 暂时去掉互动数据,待优化。(主要是互动数据返回,如何渲染到ui上) | 73 | // TODO 暂时去掉互动数据,待优化。(主要是互动数据返回,如何渲染到ui上) |
| 70 | // TODO updateItems(sizeBefore, data),这里可能有时序问题,导致覆盖别的group数据,需要优化,考虑精准替换 | 74 | // TODO updateItems(sizeBefore, data),这里可能有时序问题,导致覆盖别的group数据,需要优化,考虑精准替换 |
| 71 | // 二次请求,批查互动数据 | 75 | // 二次请求,批查互动数据 |
| @@ -108,7 +112,11 @@ export class PageHelper { | @@ -108,7 +112,11 @@ export class PageHelper { | ||
| 108 | pageModel.hasMore = false; | 112 | pageModel.hasMore = false; |
| 109 | } | 113 | } |
| 110 | let sizeBefore: number = pageModel.compList.size(); | 114 | let sizeBefore: number = pageModel.compList.size(); |
| 111 | - pageModel.compList.push(...data.compList) | 115 | + |
| 116 | + //移除音频 和 活动 | ||
| 117 | + this.removeComp(pageModel,data) | ||
| 118 | + // | ||
| 119 | + // pageModel.compList.push(...data.compList) | ||
| 112 | PageViewModel.getInteractData(data.compList).then((data: CompDTO[]) => { | 120 | PageViewModel.getInteractData(data.compList).then((data: CompDTO[]) => { |
| 113 | // 刷新,替换所有数据 | 121 | // 刷新,替换所有数据 |
| 114 | pageModel.compList.updateItems(sizeBefore, data) | 122 | pageModel.compList.updateItems(sizeBefore, data) |
| @@ -119,6 +127,23 @@ export class PageHelper { | @@ -119,6 +127,23 @@ export class PageHelper { | ||
| 119 | promptAction.showToast({ message: err }); | 127 | promptAction.showToast({ message: err }); |
| 120 | }) | 128 | }) |
| 121 | } | 129 | } |
| 130 | + | ||
| 131 | + /** | ||
| 132 | + * 移除comp | ||
| 133 | + */ | ||
| 134 | + private removeComp(pageModel: PageModel, pageDto: PageDTO) { | ||
| 135 | + let datas = pageDto.compList | ||
| 136 | + for (let index = 0; index < datas.length; index++) { | ||
| 137 | + const element = datas[index]; | ||
| 138 | + let contentInfo: ContentDTO = CollectionUtils.getElement(element.operDataList, 0); | ||
| 139 | + //移除音频 和 活动 | ||
| 140 | + if (contentInfo && (contentInfo.objectType === '13' || contentInfo.objectType === '3')) { | ||
| 141 | + Logger.debug(TAG, 'getGroupData 移除音频 和 活动'); | ||
| 142 | + }else { | ||
| 143 | + pageModel.compList.push(element) | ||
| 144 | + } | ||
| 145 | + } | ||
| 146 | + } | ||
| 122 | } | 147 | } |
| 123 | 148 | ||
| 124 | 149 |
| @@ -39,6 +39,14 @@ | @@ -39,6 +39,14 @@ | ||
| 39 | { | 39 | { |
| 40 | "name": "image_request_fail", | 40 | "name": "image_request_fail", |
| 41 | "value": "图片加载失败,请检查网络" | 41 | "value": "图片加载失败,请检查网络" |
| 42 | + }, | ||
| 43 | + { | ||
| 44 | + "name": "EntryAbility_desc", | ||
| 45 | + "value": "$string:app_desc" | ||
| 46 | + }, | ||
| 47 | + { | ||
| 48 | + "name": "reason_read_write_media", | ||
| 49 | + "value": "user_grant" | ||
| 42 | } | 50 | } |
| 43 | ] | 51 | ] |
| 44 | } | 52 | } |
1.15 KB
581 Bytes
789 Bytes
sight_harmony/features/wdComponent/src/main/resources/base/media/iv_live_heart_normal.png
0 → 100644
2.29 KB
| @@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
| 6 | "pages/MineHomePage", | 6 | "pages/MineHomePage", |
| 7 | "components/page/SettingPage", | 7 | "components/page/SettingPage", |
| 8 | "components/page/SettingAboutPage", | 8 | "components/page/SettingAboutPage", |
| 9 | + "components/page/QualityCommentsPage", | ||
| 9 | "components/page/PrivacySettingPage", | 10 | "components/page/PrivacySettingPage", |
| 10 | "components/page/EditUserInfoPage", | 11 | "components/page/EditUserInfoPage", |
| 11 | "components/page/EditUserNikeNamePage", | 12 | "components/page/EditUserNikeNamePage", |
| 1 | import { LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' | 1 | import { LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' |
| 2 | -import { EmptyComponent, ErrorComponent, ListHasNoMoreDataUI } from 'wdComponent/Index' | 2 | +import { EmptyComponent, ErrorComponent, ListHasNoMoreDataUI,WDViewDefaultType } from 'wdComponent/Index' |
| 3 | import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' | 3 | import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' |
| 4 | import LoadMoreLayout from 'wdComponent/src/main/ets/components/page/LoadMoreLayout' | 4 | import LoadMoreLayout from 'wdComponent/src/main/ets/components/page/LoadMoreLayout' |
| 5 | import RefreshLayout from 'wdComponent/src/main/ets/components/page/RefreshLayout' | 5 | import RefreshLayout from 'wdComponent/src/main/ets/components/page/RefreshLayout' |
| @@ -79,7 +79,7 @@ export struct TabChatComponent { | @@ -79,7 +79,7 @@ export struct TabChatComponent { | ||
| 79 | getLiveChatList() { | 79 | getLiveChatList() { |
| 80 | this.pageModel.currentPage = 1 | 80 | this.pageModel.currentPage = 1 |
| 81 | this.liveViewModel.getLiveChatList( | 81 | this.liveViewModel.getLiveChatList( |
| 82 | - 1, | 82 | + this.pageModel.currentPage, |
| 83 | this.liveDetailsBean?.liveInfo?.mlive?.mliveId, | 83 | this.liveDetailsBean?.liveInfo?.mlive?.mliveId, |
| 84 | this.liveDetailsBean?.newsId, | 84 | this.liveDetailsBean?.newsId, |
| 85 | 20,) | 85 | 20,) |
| 1 | import { LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' | 1 | import { LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' |
| 2 | -import { ListHasNoMoreDataUI } from 'wdComponent/Index' | 2 | +import { EmptyComponent, ErrorComponent, ListHasNoMoreDataUI } from 'wdComponent/Index' |
| 3 | import { StringUtils } from 'wdKit/Index' | 3 | import { StringUtils } from 'wdKit/Index' |
| 4 | import { LiveViewModel } from '../../viewModel/LiveViewModel' | 4 | import { LiveViewModel } from '../../viewModel/LiveViewModel' |
| 5 | import { TabLiveItemComponent } from './TabLiveItemComponent' | 5 | import { TabLiveItemComponent } from './TabLiveItemComponent' |
| 6 | +import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' | ||
| 7 | +import { RefreshLayoutBean } from 'wdComponent/src/main/ets/components/page/RefreshLayoutBean' | ||
| 8 | +import PageModel from 'wdComponent/src/main/ets/viewmodel/PageModel' | ||
| 9 | +import { ViewType } from 'wdConstant/Index' | ||
| 10 | +import LoadMoreLayout from 'wdComponent/src/main/ets/components/page/LoadMoreLayout' | ||
| 11 | +import RefreshLayout from 'wdComponent/src/main/ets/components/page/RefreshLayout' | ||
| 6 | 12 | ||
| 7 | @Component | 13 | @Component |
| 8 | export struct TabLiveComponent { | 14 | export struct TabLiveComponent { |
| 9 | liveViewModel: LiveViewModel = new LiveViewModel() | 15 | liveViewModel: LiveViewModel = new LiveViewModel() |
| 10 | @State liveList: Array<LiveRoomItemBean> = [] | 16 | @State liveList: Array<LiveRoomItemBean> = [] |
| 11 | @Consume @Watch('updateDate') liveDetailsBean: LiveDetailsBean | 17 | @Consume @Watch('updateDate') liveDetailsBean: LiveDetailsBean |
| 18 | + @State private pageModel: PageModel = new PageModel() | ||
| 12 | 19 | ||
| 13 | updateDate() { | 20 | updateDate() { |
| 14 | this.getLiveList() | 21 | this.getLiveList() |
| @@ -20,36 +27,70 @@ export struct TabLiveComponent { | @@ -20,36 +27,70 @@ export struct TabLiveComponent { | ||
| 20 | 27 | ||
| 21 | build() { | 28 | build() { |
| 22 | Stack() { | 29 | Stack() { |
| 23 | - if (this.liveList.length == 0) { | ||
| 24 | - ListHasNoMoreDataUI({ style: 2 }) | 30 | + if (this.pageModel.viewType == ViewType.LOADING) { |
| 31 | + this.LoadingLayout() | ||
| 32 | + } else if (this.pageModel.viewType == ViewType.ERROR) { | ||
| 33 | + ErrorComponent() | ||
| 34 | + } else if (this.pageModel.viewType == ViewType.EMPTY) { | ||
| 35 | + EmptyComponent() | ||
| 25 | } else { | 36 | } else { |
| 37 | + this.ListLayout() | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | + .alignContent(Alignment.Top) | ||
| 41 | + .backgroundColor('#F5F5F5') | ||
| 42 | + .height('100%') | ||
| 43 | + .width('100%') | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + @Builder | ||
| 47 | + ListLayout() { | ||
| 26 | List() { | 48 | List() { |
| 49 | + ListItem() { | ||
| 50 | + // 下拉刷新 | ||
| 51 | + RefreshLayout({ | ||
| 52 | + refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullDown, this.pageModel.pullDownRefreshImage, | ||
| 53 | + this.pageModel.pullDownRefreshText, this.pageModel.pullDownRefreshHeight) | ||
| 54 | + }) | ||
| 55 | + } | ||
| 56 | + | ||
| 27 | ForEach(this.liveList, (item: LiveRoomItemBean) => { | 57 | ForEach(this.liveList, (item: LiveRoomItemBean) => { |
| 28 | ListItem() { | 58 | ListItem() { |
| 29 | TabLiveItemComponent({ item: item }) | 59 | TabLiveItemComponent({ item: item }) |
| 30 | } | 60 | } |
| 31 | }) | 61 | }) |
| 62 | + // 加载更多 | ||
| 32 | ListItem() { | 63 | ListItem() { |
| 64 | + if (this.pageModel.hasMore) { | ||
| 65 | + LoadMoreLayout({ | ||
| 66 | + refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullUpLoad, this.pageModel.pullUpLoadImage, | ||
| 67 | + this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight) | ||
| 68 | + }) | ||
| 69 | + } else { | ||
| 33 | ListHasNoMoreDataUI() | 70 | ListHasNoMoreDataUI() |
| 34 | } | 71 | } |
| 35 | } | 72 | } |
| 36 | } | 73 | } |
| 37 | } | 74 | } |
| 38 | - .alignContent(Alignment.Top) | ||
| 39 | - .backgroundColor('#F5F5F5') | ||
| 40 | - .height('100%') | ||
| 41 | - .width('100%') | ||
| 42 | 75 | ||
| 76 | + @Builder | ||
| 77 | + LoadingLayout() { | ||
| 78 | + CustomRefreshLoadLayout({ | ||
| 79 | + refreshBean: new RefreshLayoutBean(true, | ||
| 80 | + $r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), this.pageModel.pullDownRefreshHeight) | ||
| 81 | + }) | ||
| 43 | } | 82 | } |
| 44 | 83 | ||
| 45 | getLiveList() { | 84 | getLiveList() { |
| 85 | + this.pageModel.currentPage = 1 | ||
| 46 | this.liveViewModel.getLiveList( | 86 | this.liveViewModel.getLiveList( |
| 47 | - 1, | 87 | + this.pageModel.currentPage, |
| 48 | this.liveDetailsBean?.liveInfo?.mlive?.mliveId, | 88 | this.liveDetailsBean?.liveInfo?.mlive?.mliveId, |
| 49 | this.liveDetailsBean?.newsId, | 89 | this.liveDetailsBean?.newsId, |
| 50 | 20) | 90 | 20) |
| 51 | .then( | 91 | .then( |
| 52 | (data) => { | 92 | (data) => { |
| 93 | + if (data.barrageResponses && data.barrageResponses.length > 0) { | ||
| 53 | /** | 94 | /** |
| 54 | * 在直播聊天添加一条新内容逻辑: | 95 | * 在直播聊天添加一条新内容逻辑: |
| 55 | 判断 oldNewsId:迁移id非空 且 直播状态不是预约:"wait" | 96 | 判断 oldNewsId:迁移id非空 且 直播状态不是预约:"wait" |
| @@ -58,13 +99,26 @@ export struct TabLiveComponent { | @@ -58,13 +99,26 @@ export struct TabLiveComponent { | ||
| 58 | 2.名称固定:人民日报主持人 | 99 | 2.名称固定:人民日报主持人 |
| 59 | 3.内容:详情接口的简介,newIntroduction | 100 | 3.内容:详情接口的简介,newIntroduction |
| 60 | */ | 101 | */ |
| 61 | - if (StringUtils.isNotEmpty(this.liveDetailsBean.oldNewsId) && this.liveDetailsBean && this.liveDetailsBean.liveInfo.liveState != 'wait') { | 102 | + if (StringUtils.isNotEmpty(this.liveDetailsBean.oldNewsId) |
| 103 | + && this.liveDetailsBean | ||
| 104 | + && this.liveDetailsBean.liveInfo.liveState != 'wait' | ||
| 105 | + && this.pageModel.currentPage == 1) { | ||
| 62 | let liveRoomItemBeanTemp: LiveRoomItemBean = {} as LiveRoomItemBean | 106 | let liveRoomItemBeanTemp: LiveRoomItemBean = {} as LiveRoomItemBean |
| 63 | liveRoomItemBeanTemp.text = this.liveDetailsBean.newIntroduction | 107 | liveRoomItemBeanTemp.text = this.liveDetailsBean.newIntroduction |
| 64 | liveRoomItemBeanTemp.senderUserName = '人民日报主持人' | 108 | liveRoomItemBeanTemp.senderUserName = '人民日报主持人' |
| 65 | data.barrageResponses.push(liveRoomItemBeanTemp) | 109 | data.barrageResponses.push(liveRoomItemBeanTemp) |
| 66 | } | 110 | } |
| 67 | - this.liveList = data.barrageResponses | 111 | + this.pageModel.viewType = ViewType.LOADED; |
| 112 | + this.liveList.push(...data.barrageResponses) | ||
| 113 | + if (data.barrageResponses.length === this.pageModel.pageSize) { | ||
| 114 | + this.pageModel.currentPage++; | ||
| 115 | + this.pageModel.hasMore = true; | ||
| 116 | + } else { | ||
| 117 | + this.pageModel.hasMore = false; | ||
| 118 | + } | ||
| 119 | + } else { | ||
| 120 | + this.pageModel.viewType = ViewType.EMPTY; | ||
| 121 | + } | ||
| 68 | }, | 122 | }, |
| 69 | () => { | 123 | () => { |
| 70 | 124 |
| 1 | -import { LiveRoomItemBean } from 'wdBean/Index' | 1 | +import { LiveRoomItemBean, PhotoListBean } from 'wdBean/Index' |
| 2 | import { DateTimeUtils, StringUtils } from 'wdKit/Index' | 2 | import { DateTimeUtils, StringUtils } from 'wdKit/Index' |
| 3 | 3 | ||
| 4 | @Component | 4 | @Component |
| 5 | export struct TabLiveItemComponent { | 5 | export struct TabLiveItemComponent { |
| 6 | item: LiveRoomItemBean = {} as LiveRoomItemBean | 6 | item: LiveRoomItemBean = {} as LiveRoomItemBean |
| 7 | + photoList: PhotoListBean[] = [] | ||
| 7 | 8 | ||
| 8 | aboutToAppear(): void { | 9 | aboutToAppear(): void { |
| 9 | 10 | ||
| @@ -86,8 +87,17 @@ export struct TabLiveItemComponent { | @@ -86,8 +87,17 @@ export struct TabLiveItemComponent { | ||
| 86 | .aspectRatio(310 / 174) | 87 | .aspectRatio(310 / 174) |
| 87 | .objectFit(ImageFit.Auto) | 88 | .objectFit(ImageFit.Auto) |
| 88 | .borderRadius(4) | 89 | .borderRadius(4) |
| 90 | + }.onClick(() => { | ||
| 91 | + for (let item of this.item.pictureUrls) { | ||
| 92 | + this.photoList.push({ | ||
| 93 | + width: 0, | ||
| 94 | + height: 0, | ||
| 95 | + picPath: item, | ||
| 96 | + picDesc: '' | ||
| 97 | + }) | ||
| 89 | } | 98 | } |
| 90 | }) | 99 | }) |
| 100 | + }) | ||
| 91 | }.margin({ | 101 | }.margin({ |
| 92 | left: 32, | 102 | left: 32, |
| 93 | top: 8 | 103 | top: 8 |
| @@ -200,6 +200,8 @@ export struct PlayUIComponent { | @@ -200,6 +200,8 @@ export struct PlayUIComponent { | ||
| 200 | } else { | 200 | } else { |
| 201 | Blank() | 201 | Blank() |
| 202 | } | 202 | } |
| 203 | + if (this.liveDetailsBean?.liveInfo?.liveState == 'running' | ||
| 204 | + || this.liveDetailsBean?.liveInfo?.liveState == 'end') { | ||
| 203 | Image($r('app.media.icon_live_player_full_screen')) | 205 | Image($r('app.media.icon_live_player_full_screen')) |
| 204 | .width(24) | 206 | .width(24) |
| 205 | .height(24) | 207 | .height(24) |
| @@ -213,6 +215,7 @@ export struct PlayUIComponent { | @@ -213,6 +215,7 @@ export struct PlayUIComponent { | ||
| 213 | window.Orientation.LANDSCAPE); | 215 | window.Orientation.LANDSCAPE); |
| 214 | }) | 216 | }) |
| 215 | } | 217 | } |
| 218 | + } | ||
| 216 | .alignItems(VerticalAlign.Center) | 219 | .alignItems(VerticalAlign.Center) |
| 217 | .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] }) | 220 | .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] }) |
| 218 | .width('100%') | 221 | .width('100%') |
| @@ -4,9 +4,9 @@ import { WDRouterPage } from 'wdRouter'; | @@ -4,9 +4,9 @@ import { WDRouterPage } from 'wdRouter'; | ||
| 4 | @Entry | 4 | @Entry |
| 5 | @Component | 5 | @Component |
| 6 | struct GuidePages { | 6 | struct GuidePages { |
| 7 | - guideImage = [$r('app.media.guide_static1'), $r('app.media.guide_static2'), $r('app.media.guide_static3'), $r('app.media.guide_static4')] | ||
| 8 | - guideTitle = [$r('app.media.guide_title1'), $r('app.media.guide_title2'), $r('app.media.guide_title3'), $r('app.media.guide_title4')] | ||
| 9 | - guideIndex = [$r('app.media.guide_index1'), $r('app.media.guide_index2'), $r('app.media.guide_index3'), $r('app.media.guide_button')] | 7 | + guideImage = [$r('app.media.guide_static1'), $r('app.media.guide_static2'), $r('app.media.guide_static3'), $r('app.media.guide_static4'),$r('app.media.guide_static5')] |
| 8 | + guideTitle = [$r('app.media.guide_title1'), $r('app.media.guide_title2'), $r('app.media.guide_title3'), $r('app.media.guide_title4'),$r('app.media.guide_title5')] | ||
| 9 | + guideIndex = [$r('app.media.guide_index1'), $r('app.media.guide_index2'), $r('app.media.guide_index3'),$r('app.media.guide_index4'), $r('app.media.guide_button')] | ||
| 10 | 10 | ||
| 11 | build() { | 11 | build() { |
| 12 | Column() { | 12 | Column() { |
| @@ -57,7 +57,7 @@ struct GuidePages { | @@ -57,7 +57,7 @@ struct GuidePages { | ||
| 57 | .margin({ bottom: 85 }) | 57 | .margin({ bottom: 85 }) |
| 58 | .height(40) | 58 | .height(40) |
| 59 | .onClick(() => { | 59 | .onClick(() => { |
| 60 | - if (index == 3) { | 60 | + if (index == 4) { |
| 61 | // 跳转到首页 | 61 | // 跳转到首页 |
| 62 | //WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) | 62 | //WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) |
| 63 | //跳转到兴趣偏好选择页 | 63 | //跳转到兴趣偏好选择页 |
No preview for this file type
No preview for this file type
| @@ -85,7 +85,7 @@ export struct WDPlayerRenderLiveView { | @@ -85,7 +85,7 @@ export struct WDPlayerRenderLiveView { | ||
| 85 | console.log('insId===', this.insId) | 85 | console.log('insId===', this.insId) |
| 86 | this.xComponentController.setXComponentSurfaceSize({ | 86 | this.xComponentController.setXComponentSurfaceSize({ |
| 87 | surfaceWidth: 1920, | 87 | surfaceWidth: 1920, |
| 88 | - surfaceHeight: 1080 | 88 | + surfaceHeight: 720 |
| 89 | }); | 89 | }); |
| 90 | this.playerController?.setXComponentController(this.xComponentController) | 90 | this.playerController?.setXComponentController(this.xComponentController) |
| 91 | if (this.onLoad) { | 91 | if (this.onLoad) { |
| @@ -3,6 +3,7 @@ import { WDRouterRule } from 'wdRouter'; | @@ -3,6 +3,7 @@ import { WDRouterRule } from 'wdRouter'; | ||
| 3 | import { WDRouterPage } from 'wdRouter'; | 3 | import { WDRouterPage } from 'wdRouter'; |
| 4 | import { SPHelper } from 'wdKit/Index'; | 4 | import { SPHelper } from 'wdKit/Index'; |
| 5 | import { SpConstants } from 'wdConstant/Index'; | 5 | import { SpConstants } from 'wdConstant/Index'; |
| 6 | +import { ButtonOptions, promptAction } from '@kit.ArkUI'; | ||
| 6 | 7 | ||
| 7 | @Entry | 8 | @Entry |
| 8 | @Component | 9 | @Component |
| @@ -79,6 +80,11 @@ struct LaunchInterestsHobbiesPage { | @@ -79,6 +80,11 @@ struct LaunchInterestsHobbiesPage { | ||
| 79 | .margin({top:'2lpx',left:'19lpx'}) | 80 | .margin({top:'2lpx',left:'19lpx'}) |
| 80 | .width('100%') | 81 | .width('100%') |
| 81 | .height('31lpx') | 82 | .height('31lpx') |
| 83 | + Image(item.choose ? $r('app.media.interestsSelected') : $r('app.media.interestsSelectNot')) | ||
| 84 | + .height('32lpx') | ||
| 85 | + .width('32lpx') | ||
| 86 | + .margin({top:'80lpx',left:'110lpx'}) | ||
| 87 | + | ||
| 82 | }.justifyContent(FlexAlign.Start) | 88 | }.justifyContent(FlexAlign.Start) |
| 83 | } | 89 | } |
| 84 | 90 | ||
| @@ -87,7 +93,7 @@ struct LaunchInterestsHobbiesPage { | @@ -87,7 +93,7 @@ struct LaunchInterestsHobbiesPage { | ||
| 87 | .width('100%') | 93 | .width('100%') |
| 88 | .height('100%') | 94 | .height('100%') |
| 89 | .backgroundColor(Color.White) | 95 | .backgroundColor(Color.White) |
| 90 | - .opacity(item.choose?0:0.7) | 96 | + .opacity(item.choose?0:0.6) |
| 91 | .borderRadius(5) | 97 | .borderRadius(5) |
| 92 | } | 98 | } |
| 93 | } | 99 | } |
| @@ -122,7 +128,21 @@ struct LaunchInterestsHobbiesPage { | @@ -122,7 +128,21 @@ struct LaunchInterestsHobbiesPage { | ||
| 122 | .borderRadius('10lpx') | 128 | .borderRadius('10lpx') |
| 123 | .width('662lpx') | 129 | .width('662lpx') |
| 124 | .height('84lpx') | 130 | .height('84lpx') |
| 131 | + Image('') | ||
| 132 | + .width('662lpx') | ||
| 133 | + .height('84lpx') | ||
| 134 | + .backgroundColor(Color.White) | ||
| 135 | + .opacity(this.selectCount == 0 ? 0.6 : 0) | ||
| 136 | + .borderRadius('10lpx') | ||
| 125 | .onClick(()=>{ | 137 | .onClick(()=>{ |
| 138 | + if (this.selectCount == 0) { | ||
| 139 | + promptAction.showToast({ | ||
| 140 | + message : '请先选择您感兴趣的内容哦', | ||
| 141 | + duration: 2000, | ||
| 142 | + bottom: 50 | ||
| 143 | + }) | ||
| 144 | + return | ||
| 145 | + } | ||
| 126 | this.saveTagIds() | 146 | this.saveTagIds() |
| 127 | //跳转首页 | 147 | //跳转首页 |
| 128 | WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) | 148 | WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) |
1.73 KB
| @@ -502,6 +502,406 @@ | @@ -502,6 +502,406 @@ | ||
| 502 | "topicType": null, | 502 | "topicType": null, |
| 503 | "uuid": "dcc25c99-8e27-42fc-aa29-861beec958f2", | 503 | "uuid": "dcc25c99-8e27-42fc-aa29-861beec958f2", |
| 504 | "visitorComment": 1 | 504 | "visitorComment": 1 |
| 505 | + }, { | ||
| 506 | + "authorLike": 0, | ||
| 507 | + "avatarFrame": "", | ||
| 508 | + "checkStatus": 2, | ||
| 509 | + "commentContent": "外婆企图", | ||
| 510 | + "commentContentSensitive": "", | ||
| 511 | + "commentLevel": 1, | ||
| 512 | + "commentPics": "", | ||
| 513 | + "commentSensitive": "", | ||
| 514 | + "commentType": "2", | ||
| 515 | + "contentAuthor": 0, | ||
| 516 | + "createTime": "2024-04-01 14:22:37", | ||
| 517 | + "creatorFlag": 0, | ||
| 518 | + "fromCreatorId": "", | ||
| 519 | + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 520 | + "fromUserId": "574444396143685", | ||
| 521 | + "fromUserName": "人民日报网友2Ai3yZ", | ||
| 522 | + "fromUserType": 1, | ||
| 523 | + "h5Url": "", | ||
| 524 | + "highQualityExpireTime": "2024-04-15T18:26:05+0800", | ||
| 525 | + "highQualityTime": "2024-04-12T18:26:05+0800", | ||
| 526 | + "id": 56792966, | ||
| 527 | + "likeNum": 0, | ||
| 528 | + "mySelf": 0, | ||
| 529 | + "pageId": null, | ||
| 530 | + "parentId": -1, | ||
| 531 | + "region": "安徽", | ||
| 532 | + "replyNum": 0, | ||
| 533 | + "rootCommentId": 56792966, | ||
| 534 | + "sensitiveExist": 0, | ||
| 535 | + "sensitiveShow": 1, | ||
| 536 | + "shareInfo": { | ||
| 537 | + "shareCoverUrl": "", | ||
| 538 | + "shareSummary": "说话的艺术,说到底就是生活的艺术。", | ||
| 539 | + "shareTitle": "学会这三种说话方式,受益无穷", | ||
| 540 | + "shareUrl": "https://people.pdnews.cn/column/30044115488-500005262017" | ||
| 541 | + }, | ||
| 542 | + "targetId": "30044115488", | ||
| 543 | + "targetRelId": "500005262017", | ||
| 544 | + "targetRelObjectId": "2003", | ||
| 545 | + "targetRelType": 1, | ||
| 546 | + "targetStatus": 0, | ||
| 547 | + "targetTitle": "学会这三种说话方式,受益无穷", | ||
| 548 | + "targetType": 13, | ||
| 549 | + "toUserContentAuthor": 0, | ||
| 550 | + "toUserName": "", | ||
| 551 | + "topFlag": 0, | ||
| 552 | + "topicType": null, | ||
| 553 | + "uuid": "dcc25c99-8e27-42fc-aa29-861beec958f2", | ||
| 554 | + "visitorComment": 1 | ||
| 555 | + }, { | ||
| 556 | + "authorLike": 0, | ||
| 557 | + "avatarFrame": "", | ||
| 558 | + "checkStatus": 2, | ||
| 559 | + "commentContent": "外婆企图", | ||
| 560 | + "commentContentSensitive": "", | ||
| 561 | + "commentLevel": 1, | ||
| 562 | + "commentPics": "", | ||
| 563 | + "commentSensitive": "", | ||
| 564 | + "commentType": "2", | ||
| 565 | + "contentAuthor": 0, | ||
| 566 | + "createTime": "2024-04-01 14:22:37", | ||
| 567 | + "creatorFlag": 0, | ||
| 568 | + "fromCreatorId": "", | ||
| 569 | + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 570 | + "fromUserId": "574444396143685", | ||
| 571 | + "fromUserName": "人民日报网友2Ai3yZ", | ||
| 572 | + "fromUserType": 1, | ||
| 573 | + "h5Url": "", | ||
| 574 | + "highQualityExpireTime": "2024-04-15T18:26:05+0800", | ||
| 575 | + "highQualityTime": "2024-04-12T18:26:05+0800", | ||
| 576 | + "id": 56792966, | ||
| 577 | + "likeNum": 0, | ||
| 578 | + "mySelf": 0, | ||
| 579 | + "pageId": null, | ||
| 580 | + "parentId": -1, | ||
| 581 | + "region": "安徽", | ||
| 582 | + "replyNum": 0, | ||
| 583 | + "rootCommentId": 56792966, | ||
| 584 | + "sensitiveExist": 0, | ||
| 585 | + "sensitiveShow": 1, | ||
| 586 | + "shareInfo": { | ||
| 587 | + "shareCoverUrl": "", | ||
| 588 | + "shareSummary": "说话的艺术,说到底就是生活的艺术。", | ||
| 589 | + "shareTitle": "学会这三种说话方式,受益无穷", | ||
| 590 | + "shareUrl": "https://people.pdnews.cn/column/30044115488-500005262017" | ||
| 591 | + }, | ||
| 592 | + "targetId": "30044115488", | ||
| 593 | + "targetRelId": "500005262017", | ||
| 594 | + "targetRelObjectId": "2003", | ||
| 595 | + "targetRelType": 1, | ||
| 596 | + "targetStatus": 0, | ||
| 597 | + "targetTitle": "学会这三种说话方式,受益无穷", | ||
| 598 | + "targetType": 13, | ||
| 599 | + "toUserContentAuthor": 0, | ||
| 600 | + "toUserName": "", | ||
| 601 | + "topFlag": 0, | ||
| 602 | + "topicType": null, | ||
| 603 | + "uuid": "dcc25c99-8e27-42fc-aa29-861beec958f2", | ||
| 604 | + "visitorComment": 1 | ||
| 605 | + }, { | ||
| 606 | + "authorLike": 0, | ||
| 607 | + "avatarFrame": "", | ||
| 608 | + "checkStatus": 2, | ||
| 609 | + "commentContent": "外婆企图", | ||
| 610 | + "commentContentSensitive": "", | ||
| 611 | + "commentLevel": 1, | ||
| 612 | + "commentPics": "", | ||
| 613 | + "commentSensitive": "", | ||
| 614 | + "commentType": "2", | ||
| 615 | + "contentAuthor": 0, | ||
| 616 | + "createTime": "2024-04-01 14:22:37", | ||
| 617 | + "creatorFlag": 0, | ||
| 618 | + "fromCreatorId": "", | ||
| 619 | + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 620 | + "fromUserId": "574444396143685", | ||
| 621 | + "fromUserName": "人民日报网友2Ai3yZ", | ||
| 622 | + "fromUserType": 1, | ||
| 623 | + "h5Url": "", | ||
| 624 | + "highQualityExpireTime": "2024-04-15T18:26:05+0800", | ||
| 625 | + "highQualityTime": "2024-04-12T18:26:05+0800", | ||
| 626 | + "id": 56792966, | ||
| 627 | + "likeNum": 0, | ||
| 628 | + "mySelf": 0, | ||
| 629 | + "pageId": null, | ||
| 630 | + "parentId": -1, | ||
| 631 | + "region": "安徽", | ||
| 632 | + "replyNum": 0, | ||
| 633 | + "rootCommentId": 56792966, | ||
| 634 | + "sensitiveExist": 0, | ||
| 635 | + "sensitiveShow": 1, | ||
| 636 | + "shareInfo": { | ||
| 637 | + "shareCoverUrl": "", | ||
| 638 | + "shareSummary": "说话的艺术,说到底就是生活的艺术。", | ||
| 639 | + "shareTitle": "学会这三种说话方式,受益无穷", | ||
| 640 | + "shareUrl": "https://people.pdnews.cn/column/30044115488-500005262017" | ||
| 641 | + }, | ||
| 642 | + "targetId": "30044115488", | ||
| 643 | + "targetRelId": "500005262017", | ||
| 644 | + "targetRelObjectId": "2003", | ||
| 645 | + "targetRelType": 1, | ||
| 646 | + "targetStatus": 0, | ||
| 647 | + "targetTitle": "学会这三种说话方式,受益无穷", | ||
| 648 | + "targetType": 13, | ||
| 649 | + "toUserContentAuthor": 0, | ||
| 650 | + "toUserName": "", | ||
| 651 | + "topFlag": 0, | ||
| 652 | + "topicType": null, | ||
| 653 | + "uuid": "dcc25c99-8e27-42fc-aa29-861beec958f2", | ||
| 654 | + "visitorComment": 1 | ||
| 655 | + }, { | ||
| 656 | + "authorLike": 0, | ||
| 657 | + "avatarFrame": "", | ||
| 658 | + "checkStatus": 2, | ||
| 659 | + "commentContent": "外婆企图", | ||
| 660 | + "commentContentSensitive": "", | ||
| 661 | + "commentLevel": 1, | ||
| 662 | + "commentPics": "", | ||
| 663 | + "commentSensitive": "", | ||
| 664 | + "commentType": "2", | ||
| 665 | + "contentAuthor": 0, | ||
| 666 | + "createTime": "2024-04-01 14:22:37", | ||
| 667 | + "creatorFlag": 0, | ||
| 668 | + "fromCreatorId": "", | ||
| 669 | + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 670 | + "fromUserId": "574444396143685", | ||
| 671 | + "fromUserName": "人民日报网友2Ai3yZ", | ||
| 672 | + "fromUserType": 1, | ||
| 673 | + "h5Url": "", | ||
| 674 | + "highQualityExpireTime": "2024-04-15T18:26:05+0800", | ||
| 675 | + "highQualityTime": "2024-04-12T18:26:05+0800", | ||
| 676 | + "id": 56792966, | ||
| 677 | + "likeNum": 0, | ||
| 678 | + "mySelf": 0, | ||
| 679 | + "pageId": null, | ||
| 680 | + "parentId": -1, | ||
| 681 | + "region": "安徽", | ||
| 682 | + "replyNum": 0, | ||
| 683 | + "rootCommentId": 56792966, | ||
| 684 | + "sensitiveExist": 0, | ||
| 685 | + "sensitiveShow": 1, | ||
| 686 | + "shareInfo": { | ||
| 687 | + "shareCoverUrl": "", | ||
| 688 | + "shareSummary": "说话的艺术,说到底就是生活的艺术。", | ||
| 689 | + "shareTitle": "学会这三种说话方式,受益无穷", | ||
| 690 | + "shareUrl": "https://people.pdnews.cn/column/30044115488-500005262017" | ||
| 691 | + }, | ||
| 692 | + "targetId": "30044115488", | ||
| 693 | + "targetRelId": "500005262017", | ||
| 694 | + "targetRelObjectId": "2003", | ||
| 695 | + "targetRelType": 1, | ||
| 696 | + "targetStatus": 0, | ||
| 697 | + "targetTitle": "学会这三种说话方式,受益无穷", | ||
| 698 | + "targetType": 13, | ||
| 699 | + "toUserContentAuthor": 0, | ||
| 700 | + "toUserName": "", | ||
| 701 | + "topFlag": 0, | ||
| 702 | + "topicType": null, | ||
| 703 | + "uuid": "dcc25c99-8e27-42fc-aa29-861beec958f2", | ||
| 704 | + "visitorComment": 1 | ||
| 705 | + }, { | ||
| 706 | + "authorLike": 0, | ||
| 707 | + "avatarFrame": "", | ||
| 708 | + "checkStatus": 2, | ||
| 709 | + "commentContent": "外婆企图", | ||
| 710 | + "commentContentSensitive": "", | ||
| 711 | + "commentLevel": 1, | ||
| 712 | + "commentPics": "", | ||
| 713 | + "commentSensitive": "", | ||
| 714 | + "commentType": "2", | ||
| 715 | + "contentAuthor": 0, | ||
| 716 | + "createTime": "2024-04-01 14:22:37", | ||
| 717 | + "creatorFlag": 0, | ||
| 718 | + "fromCreatorId": "", | ||
| 719 | + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 720 | + "fromUserId": "574444396143685", | ||
| 721 | + "fromUserName": "人民日报网友2Ai3yZ", | ||
| 722 | + "fromUserType": 1, | ||
| 723 | + "h5Url": "", | ||
| 724 | + "highQualityExpireTime": "2024-04-15T18:26:05+0800", | ||
| 725 | + "highQualityTime": "2024-04-12T18:26:05+0800", | ||
| 726 | + "id": 56792966, | ||
| 727 | + "likeNum": 0, | ||
| 728 | + "mySelf": 0, | ||
| 729 | + "pageId": null, | ||
| 730 | + "parentId": -1, | ||
| 731 | + "region": "安徽", | ||
| 732 | + "replyNum": 0, | ||
| 733 | + "rootCommentId": 56792966, | ||
| 734 | + "sensitiveExist": 0, | ||
| 735 | + "sensitiveShow": 1, | ||
| 736 | + "shareInfo": { | ||
| 737 | + "shareCoverUrl": "", | ||
| 738 | + "shareSummary": "说话的艺术,说到底就是生活的艺术。", | ||
| 739 | + "shareTitle": "学会这三种说话方式,受益无穷", | ||
| 740 | + "shareUrl": "https://people.pdnews.cn/column/30044115488-500005262017" | ||
| 741 | + }, | ||
| 742 | + "targetId": "30044115488", | ||
| 743 | + "targetRelId": "500005262017", | ||
| 744 | + "targetRelObjectId": "2003", | ||
| 745 | + "targetRelType": 1, | ||
| 746 | + "targetStatus": 0, | ||
| 747 | + "targetTitle": "学会这三种说话方式,受益无穷", | ||
| 748 | + "targetType": 13, | ||
| 749 | + "toUserContentAuthor": 0, | ||
| 750 | + "toUserName": "", | ||
| 751 | + "topFlag": 0, | ||
| 752 | + "topicType": null, | ||
| 753 | + "uuid": "dcc25c99-8e27-42fc-aa29-861beec958f2", | ||
| 754 | + "visitorComment": 1 | ||
| 755 | + }, { | ||
| 756 | + "authorLike": 0, | ||
| 757 | + "avatarFrame": "", | ||
| 758 | + "checkStatus": 2, | ||
| 759 | + "commentContent": "外婆企图", | ||
| 760 | + "commentContentSensitive": "", | ||
| 761 | + "commentLevel": 1, | ||
| 762 | + "commentPics": "", | ||
| 763 | + "commentSensitive": "", | ||
| 764 | + "commentType": "2", | ||
| 765 | + "contentAuthor": 0, | ||
| 766 | + "createTime": "2024-04-01 14:22:37", | ||
| 767 | + "creatorFlag": 0, | ||
| 768 | + "fromCreatorId": "", | ||
| 769 | + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 770 | + "fromUserId": "574444396143685", | ||
| 771 | + "fromUserName": "人民日报网友2Ai3yZ", | ||
| 772 | + "fromUserType": 1, | ||
| 773 | + "h5Url": "", | ||
| 774 | + "highQualityExpireTime": "2024-04-15T18:26:05+0800", | ||
| 775 | + "highQualityTime": "2024-04-12T18:26:05+0800", | ||
| 776 | + "id": 56792966, | ||
| 777 | + "likeNum": 0, | ||
| 778 | + "mySelf": 0, | ||
| 779 | + "pageId": null, | ||
| 780 | + "parentId": -1, | ||
| 781 | + "region": "安徽", | ||
| 782 | + "replyNum": 0, | ||
| 783 | + "rootCommentId": 56792966, | ||
| 784 | + "sensitiveExist": 0, | ||
| 785 | + "sensitiveShow": 1, | ||
| 786 | + "shareInfo": { | ||
| 787 | + "shareCoverUrl": "", | ||
| 788 | + "shareSummary": "说话的艺术,说到底就是生活的艺术。", | ||
| 789 | + "shareTitle": "学会这三种说话方式,受益无穷", | ||
| 790 | + "shareUrl": "https://people.pdnews.cn/column/30044115488-500005262017" | ||
| 791 | + }, | ||
| 792 | + "targetId": "30044115488", | ||
| 793 | + "targetRelId": "500005262017", | ||
| 794 | + "targetRelObjectId": "2003", | ||
| 795 | + "targetRelType": 1, | ||
| 796 | + "targetStatus": 0, | ||
| 797 | + "targetTitle": "学会这三种说话方式,受益无穷", | ||
| 798 | + "targetType": 13, | ||
| 799 | + "toUserContentAuthor": 0, | ||
| 800 | + "toUserName": "", | ||
| 801 | + "topFlag": 0, | ||
| 802 | + "topicType": null, | ||
| 803 | + "uuid": "dcc25c99-8e27-42fc-aa29-861beec958f2", | ||
| 804 | + "visitorComment": 1 | ||
| 805 | + }, { | ||
| 806 | + "authorLike": 0, | ||
| 807 | + "avatarFrame": "", | ||
| 808 | + "checkStatus": 2, | ||
| 809 | + "commentContent": "外婆企图", | ||
| 810 | + "commentContentSensitive": "", | ||
| 811 | + "commentLevel": 1, | ||
| 812 | + "commentPics": "", | ||
| 813 | + "commentSensitive": "", | ||
| 814 | + "commentType": "2", | ||
| 815 | + "contentAuthor": 0, | ||
| 816 | + "createTime": "2024-04-01 14:22:37", | ||
| 817 | + "creatorFlag": 0, | ||
| 818 | + "fromCreatorId": "", | ||
| 819 | + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 820 | + "fromUserId": "574444396143685", | ||
| 821 | + "fromUserName": "人民日报网友2Ai3yZ", | ||
| 822 | + "fromUserType": 1, | ||
| 823 | + "h5Url": "", | ||
| 824 | + "highQualityExpireTime": "2024-04-15T18:26:05+0800", | ||
| 825 | + "highQualityTime": "2024-04-12T18:26:05+0800", | ||
| 826 | + "id": 56792966, | ||
| 827 | + "likeNum": 0, | ||
| 828 | + "mySelf": 0, | ||
| 829 | + "pageId": null, | ||
| 830 | + "parentId": -1, | ||
| 831 | + "region": "安徽", | ||
| 832 | + "replyNum": 0, | ||
| 833 | + "rootCommentId": 56792966, | ||
| 834 | + "sensitiveExist": 0, | ||
| 835 | + "sensitiveShow": 1, | ||
| 836 | + "shareInfo": { | ||
| 837 | + "shareCoverUrl": "", | ||
| 838 | + "shareSummary": "说话的艺术,说到底就是生活的艺术。", | ||
| 839 | + "shareTitle": "学会这三种说话方式,受益无穷", | ||
| 840 | + "shareUrl": "https://people.pdnews.cn/column/30044115488-500005262017" | ||
| 841 | + }, | ||
| 842 | + "targetId": "30044115488", | ||
| 843 | + "targetRelId": "500005262017", | ||
| 844 | + "targetRelObjectId": "2003", | ||
| 845 | + "targetRelType": 1, | ||
| 846 | + "targetStatus": 0, | ||
| 847 | + "targetTitle": "学会这三种说话方式,受益无穷", | ||
| 848 | + "targetType": 13, | ||
| 849 | + "toUserContentAuthor": 0, | ||
| 850 | + "toUserName": "", | ||
| 851 | + "topFlag": 0, | ||
| 852 | + "topicType": null, | ||
| 853 | + "uuid": "dcc25c99-8e27-42fc-aa29-861beec958f2", | ||
| 854 | + "visitorComment": 1 | ||
| 855 | + }, { | ||
| 856 | + "authorLike": 0, | ||
| 857 | + "avatarFrame": "", | ||
| 858 | + "checkStatus": 2, | ||
| 859 | + "commentContent": "外婆企图", | ||
| 860 | + "commentContentSensitive": "", | ||
| 861 | + "commentLevel": 1, | ||
| 862 | + "commentPics": "", | ||
| 863 | + "commentSensitive": "", | ||
| 864 | + "commentType": "2", | ||
| 865 | + "contentAuthor": 0, | ||
| 866 | + "createTime": "2024-04-01 14:22:37", | ||
| 867 | + "creatorFlag": 0, | ||
| 868 | + "fromCreatorId": "", | ||
| 869 | + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 870 | + "fromUserId": "574444396143685", | ||
| 871 | + "fromUserName": "人民日报网友2Ai3yZ", | ||
| 872 | + "fromUserType": 1, | ||
| 873 | + "h5Url": "", | ||
| 874 | + "highQualityExpireTime": "2024-04-15T18:26:05+0800", | ||
| 875 | + "highQualityTime": "2024-04-12T18:26:05+0800", | ||
| 876 | + "id": 56792966, | ||
| 877 | + "likeNum": 0, | ||
| 878 | + "mySelf": 0, | ||
| 879 | + "pageId": null, | ||
| 880 | + "parentId": -1, | ||
| 881 | + "region": "安徽", | ||
| 882 | + "replyNum": 0, | ||
| 883 | + "rootCommentId": 56792966, | ||
| 884 | + "sensitiveExist": 0, | ||
| 885 | + "sensitiveShow": 1, | ||
| 886 | + "shareInfo": { | ||
| 887 | + "shareCoverUrl": "", | ||
| 888 | + "shareSummary": "说话的艺术,说到底就是生活的艺术。", | ||
| 889 | + "shareTitle": "学会这三种说话方式,受益无穷", | ||
| 890 | + "shareUrl": "https://people.pdnews.cn/column/30044115488-500005262017" | ||
| 891 | + }, | ||
| 892 | + "targetId": "30044115488", | ||
| 893 | + "targetRelId": "500005262017", | ||
| 894 | + "targetRelObjectId": "2003", | ||
| 895 | + "targetRelType": 1, | ||
| 896 | + "targetStatus": 0, | ||
| 897 | + "targetTitle": "学会这三种说话方式,受益无穷", | ||
| 898 | + "targetType": 13, | ||
| 899 | + "toUserContentAuthor": 0, | ||
| 900 | + "toUserName": "", | ||
| 901 | + "topFlag": 0, | ||
| 902 | + "topicType": null, | ||
| 903 | + "uuid": "dcc25c99-8e27-42fc-aa29-861beec958f2", | ||
| 904 | + "visitorComment": 1 | ||
| 505 | }], | 905 | }], |
| 506 | "pageNum": 1, | 906 | "pageNum": 1, |
| 507 | "pageSize": 10, | 907 | "pageSize": 10, |
-
Please register or login to post a comment