张善主

Merge remote-tracking branch 'origin/main'

Showing 147 changed files with 2120 additions and 811 deletions
@@ -47,4 +47,5 @@ export class SpConstants{ @@ -47,4 +47,5 @@ export class SpConstants{
47 47
48 //游客状态下首次评论时间 48 //游客状态下首次评论时间
49 static FIRSTCOMMENTTIME = 'firstCommentTime' 49 static FIRSTCOMMENTTIME = 'firstCommentTime'
  50 + static TOURIST_NICK_NAME = 'touristNickName'
50 } 51 }
@@ -135,6 +135,14 @@ export class HttpUrlUtils { @@ -135,6 +135,14 @@ export class HttpUrlUtils {
135 */ 135 */
136 static readonly APPOINTMENT_ExecuteCollcet_PATH: string = "/api/rmrb-interact/interact/zh/c/collect/executeCollcetRecord"; 136 static readonly APPOINTMENT_ExecuteCollcet_PATH: string = "/api/rmrb-interact/interact/zh/c/collect/executeCollcetRecord";
137 /** 137 /**
  138 + * 个人中心 - 消息
  139 + */
  140 + static readonly APPOINTMENT_MessageList_PATH: string = "/api/rmrb-inside-mail/zh/c/inside-mail/private";
  141 + /**
  142 + * 个人中心 - 消息 点赞数
  143 + */
  144 + static readonly APPOINTMENT_getMessageLikeCount_PATH: string = "/api/rmrb-inside-mail/zh/c/inside-mail/private/getLikeCount";
  145 + /**
138 * 个人中心 我的评论列表 146 * 个人中心 我的评论列表
139 */ 147 */
140 static readonly MINE_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/myCommentList"; 148 static readonly MINE_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/myCommentList";
@@ -316,6 +324,10 @@ export class HttpUrlUtils { @@ -316,6 +324,10 @@ export class HttpUrlUtils {
316 */ 324 */
317 static readonly FEEDBACK_TYPE_PATH: string = "/api/rmrb-interact/interact/c/user/optionClassify/list"; 325 static readonly FEEDBACK_TYPE_PATH: string = "/api/rmrb-interact/interact/c/user/optionClassify/list";
318 326
  327 + /**
  328 + * 查询点赞、回复我的、系统消息的未读数量以及回复/评论人
  329 + */
  330 + static readonly MESSAGE_UN_READ_DATA_PATH: string = "/api/rmrb-inside-mail/zh/c/inside-mail/private/polymerizationInfo?createTime=";
319 331
320 static getHost(): string { 332 static getHost(): string {
321 return HostManager.getHost(); 333 return HostManager.getHost();
@@ -478,6 +490,16 @@ export class HttpUrlUtils { @@ -478,6 +490,16 @@ export class HttpUrlUtils {
478 return url 490 return url
479 } 491 }
480 492
  493 + static getMessageListDataUrl() {
  494 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.APPOINTMENT_MessageList_PATH
  495 + return url
  496 + }
  497 +
  498 + static getMessageLikeCount() {
  499 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.APPOINTMENT_getMessageLikeCount_PATH
  500 + return url
  501 + }
  502 +
481 static getExecuteCollcetUrl() { 503 static getExecuteCollcetUrl() {
482 let url = HttpUrlUtils.getHost() + HttpUrlUtils.APPOINTMENT_ExecuteCollcet_PATH 504 let url = HttpUrlUtils.getHost() + HttpUrlUtils.APPOINTMENT_ExecuteCollcet_PATH
483 return url 505 return url
@@ -714,4 +736,14 @@ export class HttpUrlUtils { @@ -714,4 +736,14 @@ export class HttpUrlUtils {
714 return url; 736 return url;
715 } 737 }
716 738
717 -}  
  739 + //获取消息未读接口
  740 + static getMessageUnReadDataUrl() {
  741 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.MESSAGE_UN_READ_DATA_PATH
  742 + return url
  743 + }
  744 +
  745 + static reportDeviceInfo() {
  746 + let url = HttpUrlUtils.getHost() + "/api/rmrb-user-center/common/user/c/device/push";
  747 + return url;
  748 + }
  749 +}
@@ -136,4 +136,9 @@ export class WDRouterPage { @@ -136,4 +136,9 @@ export class WDRouterPage {
136 136
137 //意见反馈 137 //意见反馈
138 static feedBackActivity = new WDRouterPage("wdComponent", "ets/components/FeedBackActivity"); 138 static feedBackActivity = new WDRouterPage("wdComponent", "ets/components/FeedBackActivity");
  139 +
  140 + // 人民号主页头像显示
  141 + static showHomePageHeaderPage = new WDRouterPage("wdComponent", "ets/pages/ShowHomePageHeaderPage");
  142 +
  143 +
139 } 144 }
@@ -108,7 +108,11 @@ export class ProcessUtils { @@ -108,7 +108,11 @@ export class ProcessUtils {
108 break; 108 break;
109 case ContentConstants.TYPE_TELETEXT: 109 case ContentConstants.TYPE_TELETEXT:
110 // 图文详情,跳转h5 110 // 图文详情,跳转h5
111 - ProcessUtils.gotoWeb(content); 111 + if(content?.linkUrl){ //有 linkUrl 走专题页展示逻辑
  112 + ProcessUtils.gotoSpecialTopic(content)
  113 + }else{
  114 + ProcessUtils.gotoWeb(content);
  115 + }
112 break; 116 break;
113 case ContentConstants.TYPE_LINK: 117 case ContentConstants.TYPE_LINK:
114 ProcessUtils.gotoDefaultWeb(content); 118 ProcessUtils.gotoDefaultWeb(content);
@@ -452,7 +456,15 @@ export class ProcessUtils { @@ -452,7 +456,15 @@ export class ProcessUtils {
452 pageID: 'FeedBackActivity' 456 pageID: 'FeedBackActivity'
453 } as Params, 457 } as Params,
454 }; 458 };
  459 +
455 WDRouterRule.jumpWithAction(taskAction) 460 WDRouterRule.jumpWithAction(taskAction)
456 } 461 }
457 462
  463 + /**
  464 + * 跳转到登录页
  465 + */
  466 + public static gotoLoginPage() {
  467 +
  468 + WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
  469 + }
458 } 470 }
@@ -55,7 +55,7 @@ export struct WdWebLocalComponent { @@ -55,7 +55,7 @@ export struct WdWebLocalComponent {
55 .mixedMode(MixedMode.All) 55 .mixedMode(MixedMode.All)
56 .onlineImageAccess(true) 56 .onlineImageAccess(true)
57 .enableNativeEmbedMode(true) 57 .enableNativeEmbedMode(true)
58 - .layoutMode(WebLayoutMode.FIT_CONTENT) 58 + // .layoutMode(WebLayoutMode.FIT_CONTENT)
59 // .nestedScroll({ scrollForward: NestedScrollMode.SELF_FIRST, scrollBackward: NestedScrollMode.PARENT_FIRST }) 59 // .nestedScroll({ scrollForward: NestedScrollMode.SELF_FIRST, scrollBackward: NestedScrollMode.PARENT_FIRST })
60 .height(this.webHeight) 60 .height(this.webHeight)
61 .onPageBegin((event) => { 61 .onPageBegin((event) => {
@@ -84,7 +84,7 @@ export class ContentDTO implements BaseDTO { @@ -84,7 +84,7 @@ export class ContentDTO implements BaseDTO {
84 openType: string = ''; 84 openType: string = '';
85 extra: string = '' 85 extra: string = ''
86 86
87 - static clone(old:ContentDTO): ContentDTO { 87 + static clone(old: ContentDTO): ContentDTO {
88 let content = new ContentDTO(); 88 let content = new ContentDTO();
89 content.appStyle = old.appStyle; 89 content.appStyle = old.appStyle;
90 content.cityCode = old.cityCode; 90 content.cityCode = old.cityCode;
1 export interface commentInfo { 1 export interface commentInfo {
2 commentTitle: string, 2 commentTitle: string,
3 newsTitle: string, 3 newsTitle: string,
4 - userName: string,  
5 - userHeaderUrl: string, 4 + userId?: string,
  5 + userName?: string,
  6 + userHeaderUrl?: string,
6 publishTime: number, 7 publishTime: number,
7 commentId: string, 8 commentId: string,
8 newsId: string, 9 newsId: string,
9 relId: string; 10 relId: string;
10 relType: string; 11 relType: string;
11 - userId: string;  
12 - newsType?: string 12 + newsType?: string,
  13 + objectType?: string,
13 } 14 }
@@ -67,7 +67,7 @@ export { FirstTabTopSearchComponent } from "./src/main/ets/components/search/Fir @@ -67,7 +67,7 @@ export { FirstTabTopSearchComponent } from "./src/main/ets/components/search/Fir
67 67
68 export { ListHasNoMoreDataUI } from "./src/main/ets/components/reusable/ListHasNoMoreDataUI" 68 export { ListHasNoMoreDataUI } from "./src/main/ets/components/reusable/ListHasNoMoreDataUI"
69 69
70 -export { LottieView } from './src/main/ets/lottie/LottieView' 70 +export { LottieView } from './src/main/ets/components/lottie/LottieView'
71 71
72 export { SpacialTopicPageComponent } from './src/main/ets/components/SpacialTopicPageComponent' 72 export { SpacialTopicPageComponent } from './src/main/ets/components/SpacialTopicPageComponent'
73 73
1 -import { CommonConstants, CompStyle } from 'wdConstant';  
2 -import { ContentDTO } from 'wdBean'; 1 +import { CompStyle } from 'wdConstant';
  2 +import { CompDTO, ContentDTO } from 'wdBean';
3 import { Card2Component } from './cardview/Card2Component'; 3 import { Card2Component } from './cardview/Card2Component';
4 import { Card3Component } from './cardview/Card3Component'; 4 import { Card3Component } from './cardview/Card3Component';
5 import { Card4Component } from './cardview/Card4Component'; 5 import { Card4Component } from './cardview/Card4Component';
@@ -24,13 +24,14 @@ import { Card21Component } from './cardview/Card21Component'; @@ -24,13 +24,14 @@ import { Card21Component } from './cardview/Card21Component';
24 @Component 24 @Component
25 export struct CardParser { 25 export struct CardParser {
26 @State contentDTO: ContentDTO = new ContentDTO(); 26 @State contentDTO: ContentDTO = new ContentDTO();
  27 + @State compDTO: CompDTO = {} as CompDTO
27 28
28 build() { 29 build() {
29 - this.contentBuilder(this.contentDTO); 30 + this.contentBuilder(this.contentDTO, this.compDTO);
30 } 31 }
31 32
32 @Builder 33 @Builder
33 - contentBuilder(contentDTO: ContentDTO) { 34 + contentBuilder(contentDTO: ContentDTO, compDTO: CompDTO) {
34 if (contentDTO.appStyle === CompStyle.Card_02) { 35 if (contentDTO.appStyle === CompStyle.Card_02) {
35 Card2Component({ contentDTO }) 36 Card2Component({ contentDTO })
36 } else if (contentDTO.appStyle === CompStyle.Card_03) { 37 } else if (contentDTO.appStyle === CompStyle.Card_03) {
@@ -38,7 +39,7 @@ export struct CardParser { @@ -38,7 +39,7 @@ export struct CardParser {
38 } else if (contentDTO.appStyle === CompStyle.Card_04) { 39 } else if (contentDTO.appStyle === CompStyle.Card_04) {
39 Card4Component({ contentDTO }) 40 Card4Component({ contentDTO })
40 } else if (contentDTO.appStyle === CompStyle.Card_05) { 41 } else if (contentDTO.appStyle === CompStyle.Card_05) {
41 - Card5Component({ contentDTO }) 42 + Card5Component({ contentDTO, titleShowPolicy: compDTO.titleShowPolicy })
42 } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle 43 } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle
43 .Card_13) { 44 .Card_13) {
44 Card6Component({ contentDTO }) 45 Card6Component({ contentDTO })
@@ -64,8 +65,7 @@ export struct CardParser { @@ -64,8 +65,7 @@ export struct CardParser {
64 Card20Component({ contentDTO }) 65 Card20Component({ contentDTO })
65 } else if (contentDTO.appStyle === CompStyle.Card_21) { 66 } else if (contentDTO.appStyle === CompStyle.Card_21) {
66 Card21Component({ contentDTO }) 67 Card21Component({ contentDTO })
67 - }  
68 - else { 68 + } else {
69 // todo:组件未实现 / Component Not Implemented 69 // todo:组件未实现 / Component Not Implemented
70 // Text(contentDTO.appStyle) 70 // Text(contentDTO.appStyle)
71 // .width(CommonConstants.FULL_PARENT) 71 // .width(CommonConstants.FULL_PARENT)
@@ -32,12 +32,12 @@ import { LiveHorizontalCardComponent } from './view/LiveHorizontalCardComponent' @@ -32,12 +32,12 @@ import { LiveHorizontalCardComponent } from './view/LiveHorizontalCardComponent'
32 @Component 32 @Component
33 export struct CompParser { 33 export struct CompParser {
34 @State compDTO: CompDTO = {} as CompDTO 34 @State compDTO: CompDTO = {} as CompDTO
35 - @State private pageModel: PageModel = new PageModel();  
36 @State compIndex: number = 0; 35 @State compIndex: number = 0;
  36 + @State private pageModel: PageModel = new PageModel();
37 37
38 build() { 38 build() {
39 Column() { 39 Column() {
40 - if (this.compDTO.name !="月度排行卡") { 40 + if (this.compDTO.name != "月度排行卡") {
41 41
42 this.componentBuilder(this.compDTO, this.compIndex); 42 this.componentBuilder(this.compDTO, this.compIndex);
43 } 43 }
@@ -53,7 +53,8 @@ export struct CompParser { @@ -53,7 +53,8 @@ export struct CompParser {
53 } else if (compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { 53 } else if (compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
54 ZhCarouselLayout01({ compDTO: compDTO }) 54 ZhCarouselLayout01({ compDTO: compDTO })
55 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 55 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
56 - } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_01 && compDTO.imageScale === 2) {// && compDTO.name ==="横划卡" 56 + } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_01 &&
  57 + compDTO.imageScale === 2) { // && compDTO.name ==="横划卡"
57 58
58 LiveHorizontalCardComponent({ compDTO: compDTO }) 59 LiveHorizontalCardComponent({ compDTO: compDTO })
59 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 60 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
@@ -87,7 +88,7 @@ export struct CompParser { @@ -87,7 +88,7 @@ export struct CompParser {
87 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 88 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
88 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) { 89 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
89 //头图卡 和comStyle 2相同, 90 //头图卡 和comStyle 2相同,
90 - Card5Component({ contentDTO: compDTO.operDataList[0] }) 91 + Card5Component({ contentDTO: compDTO.operDataList[0], titleShowPolicy: compDTO.titleShowPolicy })
91 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 92 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
92 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_03) { 93 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
93 // 大图卡 94 // 大图卡
@@ -107,10 +108,9 @@ export struct CompParser { @@ -107,10 +108,9 @@ export struct CompParser {
107 //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 16, right: 16 }) 108 //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 16, right: 16 })
108 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 109 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
109 } else if (!Number.isNaN(Number(compDTO.compStyle))) { 110 } else if (!Number.isNaN(Number(compDTO.compStyle))) {
110 - CardParser({ contentDTO: compDTO.operDataList[0] }); 111 + CardParser({ contentDTO: compDTO.operDataList[0], compDTO });
111 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 112 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
112 - }  
113 - else { 113 + } else {
114 Text(compDTO.compStyle) 114 Text(compDTO.compStyle)
115 .width(CommonConstants.FULL_PARENT) 115 .width(CommonConstants.FULL_PARENT)
116 .padding(10) 116 .padding(10)
@@ -69,6 +69,7 @@ export struct DynamicDetailComponent { @@ -69,6 +69,7 @@ export struct DynamicDetailComponent {
69 @State isNetConnected: boolean = true 69 @State isNetConnected: boolean = true
70 @State isPageEnd: boolean = false 70 @State isPageEnd: boolean = false
71 @State publishCommentModel: publishCommentModel = new publishCommentModel() 71 @State publishCommentModel: publishCommentModel = new publishCommentModel()
  72 + @State reachEndIncreament: number = 0
72 73
73 async aboutToAppear() { 74 async aboutToAppear() {
74 await this.getContentDetailData() 75 await this.getContentDetailData()
@@ -709,4 +710,4 @@ interface radiusType { @@ -709,4 +710,4 @@ interface radiusType {
709 topRight: number | Resource; 710 topRight: number | Resource;
710 bottomLeft: number | Resource; 711 bottomLeft: number | Resource;
711 bottomRight: number | Resource; 712 bottomRight: number | Resource;
712 -}  
  713 +}
@@ -148,18 +148,19 @@ export struct ENewspaperPageComponent { @@ -148,18 +148,19 @@ export struct ENewspaperPageComponent {
148 this.calendarDialogController.close() 148 this.calendarDialogController.close()
149 } 149 }
150 }) 150 })
151 -  
152 - Image($r('app.media.icon_share'))  
153 - .height($r('app.float.top_arrow_size'))  
154 - .width($r('app.float.top_arrow_size'))  
155 - .alignRules({  
156 - right: { anchor: "__container__", align: HorizontalAlign.End },  
157 - center: { anchor: "__container__", align: VerticalAlign.Center }  
158 - })  
159 - .id('e_newspaper_share')  
160 - .onClick(() => {  
161 - ToastUtils.showToast('分享为公共方法,待开发', 1000);  
162 - }) 151 + if (this.newspaperListBean && this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
  152 + Image($r('app.media.icon_share'))
  153 + .height($r('app.float.top_arrow_size'))
  154 + .width($r('app.float.top_arrow_size'))
  155 + .alignRules({
  156 + right: { anchor: "__container__", align: HorizontalAlign.End },
  157 + center: { anchor: "__container__", align: VerticalAlign.Center }
  158 + })
  159 + .id('e_newspaper_share')
  160 + .onClick(() => {
  161 + ToastUtils.showToast('分享为公共方法,待开发', 1000);
  162 + })
  163 + }
163 } 164 }
164 .margin({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') }) 165 .margin({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') })
165 .height($r('app.float.top_bar_height')) 166 .height($r('app.float.top_bar_height'))
@@ -311,6 +312,7 @@ export struct ENewspaperPageComponent { @@ -311,6 +312,7 @@ export struct ENewspaperPageComponent {
311 .width('100%') 312 .width('100%')
312 .height('100%') 313 .height('100%')
313 .backgroundColor($r('app.color.color_80000000')) 314 .backgroundColor($r('app.color.color_80000000'))
  315 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
314 .id('e_newspaper_container') 316 .id('e_newspaper_container')
315 317
316 if (this.isOpenListDialog) { 318 if (this.isOpenListDialog) {
@@ -52,6 +52,7 @@ export struct ImageAndTextPageComponent { @@ -52,6 +52,7 @@ export struct ImageAndTextPageComponent {
52 @State isNetConnected: boolean = true 52 @State isNetConnected: boolean = true
53 @State info: Area | null = null 53 @State info: Area | null = null
54 @State likeNum: number = 0 54 @State likeNum: number = 0
  55 + @State reachEndIncreament : number = 0
55 56
56 build() { 57 build() {
57 Column() { 58 Column() {
@@ -141,7 +142,12 @@ export struct ImageAndTextPageComponent { @@ -141,7 +142,12 @@ export struct ImageAndTextPageComponent {
141 if (this.contentDetailData?.openComment) { 142 if (this.contentDetailData?.openComment) {
142 Divider().strokeWidth(6).color('#f5f5f5') 143 Divider().strokeWidth(6).color('#f5f5f5')
143 CommentComponent({ 144 CommentComponent({
144 - publishCommentModel: this.publishCommentModel 145 + publishCommentModel: this.publishCommentModel,
  146 + fixedHeightMode: false,
  147 + reachEndIncreament: this.reachEndIncreament,
  148 + reachEndLoadMoreFinish: () => {
  149 +
  150 + }
145 }).onAreaChange((oldValue: Area, newValue: Area) => { 151 }).onAreaChange((oldValue: Area, newValue: Area) => {
146 this.info = newValue 152 this.info = newValue
147 }) 153 })
@@ -157,6 +163,9 @@ export struct ImageAndTextPageComponent { @@ -157,6 +163,9 @@ export struct ImageAndTextPageComponent {
157 .padding({ bottom: 76 }) 163 .padding({ bottom: 76 })
158 .scrollBar(BarState.Off) 164 .scrollBar(BarState.Off)
159 .align(Alignment.Top) 165 .align(Alignment.Top)
  166 + .onReachEnd(() => {
  167 + this.reachEndIncreament += 1
  168 + })
160 169
161 if (!this.isNetConnected) { 170 if (!this.isNetConnected) {
162 EmptyComponent({ 171 EmptyComponent({
@@ -228,6 +237,7 @@ export struct ImageAndTextPageComponent { @@ -228,6 +237,7 @@ export struct ImageAndTextPageComponent {
228 this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId) 237 this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
229 this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle) 238 this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
230 this.publishCommentModel.targetType = String(this.contentDetailData?.newsType) 239 this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
  240 + this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
231 } 241 }
232 if (this.contentDetailData?.openAudio && this.contentDetailData?.audioList?.length && 242 if (this.contentDetailData?.openAudio && this.contentDetailData?.audioList?.length &&
233 this.contentDetailData?.audioList[0].audioUrl) { 243 this.contentDetailData?.audioList[0].audioUrl) {
@@ -340,4 +350,4 @@ export struct ImageAndTextPageComponent { @@ -340,4 +350,4 @@ export struct ImageAndTextPageComponent {
340 350
341 aboutToDisappear() { 351 aboutToDisappear() {
342 } 352 }
343 -}  
  353 +}
  1 +import { ContentDTO } from 'wdBean/Index';
  2 +import { ProcessUtils } from 'wdRouter/Index';
  3 +import { InteractMessageModel } from '../../model/InteractMessageModel'
1 4
2 @Component 5 @Component
3 export struct InteractMComponent { 6 export struct InteractMComponent {
  7 + messageModel:InteractMessageModel = new InteractMessageModel;
  8 +///"remark": "{"beReply":"乐事薯片,大家的最爱!!",
  9 + // "headUrl":"https: //uatjdcdnphoto.aikan.pdnews.cn//zhbj/img/user/2023122211/2A59F725E69849A38CEE8823B0D9D141.jpg",
  10 + // "contentId":"30035774121","contentRelObjectid":"2012","contentTitle":"乐事推出华夏风光限定罐七款城市地标包装让出游“有滋有味”",
  11 + // "commentContent":"大家都爱吃!!","userName":"人民日报网友a8dKCV","userId":"504964178466309","contentRelId":"500002866426",
  12 + // "shareUrl":"https: //pd-people-uat.pdnews.cn/column/30035774121-500002866426","userType":"1",
  13 + // "contentRelType":"1","visitor":"0","contentType":"8"}",
  14 +
4 build() { 15 build() {
5 Row(){ 16 Row(){
6 - Image('')  
7 - .backgroundColor(Color.Red) 17 + Image(this.messageModel.InteractMsubM.headUrl)
8 .width(36) 18 .width(36)
9 .height(36) 19 .height(36)
10 .borderRadius(18) 20 .borderRadius(18)
11 21
12 Column(){ 22 Column(){
13 Row(){ 23 Row(){
14 - Text('用户名') 24 + Text(this.messageModel.InteractMsubM.userName)
15 .fontSize('14fp').fontColor('#222222') 25 .fontSize('14fp').fontColor('#222222')
16 26
17 - Text('回复了你的评论') 27 + Text(this.buildContentString())
18 .fontSize('14fp').fontColor('#999999') 28 .fontSize('14fp').fontColor('#999999')
19 .margin({left:5}) 29 .margin({left:5})
20 }.width('100%') 30 }.width('100%')
21 31
22 - Text('两天前') 32 + Text(this.messageModel.time)
23 .margin({top:2}) 33 .margin({top:2})
24 - .fontSize('12fp').fontColor('#B0B0B0')  
25 -  
26 - Text('评论内容')  
27 - .margin({top:8,bottom:10})  
28 - .fontSize('16fp').fontColor('#222222')  
29 - .width('100%')  
30 - .constraintSize({maxHeight:500}) 34 + .fontSize('12fp').fontColor('#B0B0B0').margin({top:10,bottom:10})
31 35
32 - Column(){  
33 - Text('[你的评论]乐事薯片,大家的最爱').fontSize('14fp').fontColor('#666666').constraintSize({maxHeight:500})  
34 - .margin({top:5,bottom:5}) 36 + if (this.messageModel.contentType === '208' || this.messageModel.contentType === '209'){
  37 + Text(this.messageModel.message)
  38 + .margin({bottom:10})
  39 + .fontSize('16fp').fontColor('#222222')
35 .width('100%') 40 .width('100%')
  41 + .constraintSize({maxHeight:500})
  42 + }
36 43
37 - Divider()  
38 - .color('#f5f5f5')  
39 - .backgroundColor('#f5f5f5')  
40 - .width('100%')  
41 - .height(1) 44 + Column(){
  45 + if (this.messageModel.contentType === '207' || this.messageModel.contentType === '209'){
  46 + Text('[你的评论]'+this.buildCommentContent()).fontSize('14fp').fontColor('#666666').constraintSize({maxHeight:500})
  47 + .margin({top:15,bottom:10})
  48 + .width('100%')
42 49
  50 + Divider()
  51 + .color('#EDEDED')
  52 + .backgroundColor('#EDEDED')
  53 + .width('100%')
  54 + .height(1)
  55 + }
43 Row(){ 56 Row(){
44 - Text('乐事薯片,大家的最爱!!!!').fontSize('12fp').fontColor('#666666').constraintSize({maxHeight:500}) 57 + Image($r('app.media.MessageOriginTextIcon'))
  58 + .width('12')
  59 + .height('12')
  60 + Text(this.messageModel.InteractMsubM.contentTitle)
  61 + .fontSize('12fp')
  62 + .fontColor('#666666')
  63 + .maxLines(1)
  64 + .width('90%')
  65 + .textOverflow({overflow:TextOverflow.Ellipsis})
45 66
46 Blank() 67 Blank()
47 68
48 Image($r('app.media.mine_user_edit')) 69 Image($r('app.media.mine_user_edit'))
49 .width('12') 70 .width('12')
50 .height('12') 71 .height('12')
51 - }.margin({top:5,bottom:5}).width('100%')  
52 - }.alignItems(HorizontalAlign.Start).backgroundColor('#f5f5f5').borderRadius(5)  
53 - }.padding({left:5}).alignItems(HorizontalAlign.Start)  
54 - }.padding({top:5,left:16,right:16}).width('100%').height(160).alignItems(VerticalAlign.Top).backgroundColor(Color.Red) 72 + }.margin({top:10,bottom:15})
  73 + }.padding({left:10,right:10}).alignItems(HorizontalAlign.Start).backgroundColor('#f5f5f5').borderRadius(5)
  74 + .onClick(()=>{
  75 + let contentDTO :ContentDTO = new ContentDTO();
  76 + contentDTO.objectType = this.messageModel.InteractMsubM.contentType
  77 + contentDTO.objectId = this.messageModel.InteractMsubM.contentId
  78 + ProcessUtils.processPage(contentDTO)
  79 + })
  80 + }.padding({left:5,right:5}).alignItems(HorizontalAlign.Start).width('90%')
  81 + }.padding({top:10,left:16,right:16}).width('100%').alignItems(VerticalAlign.Top)
  82 + }
  83 +
  84 + buildContentString(): string {
  85 + let contentString: string = ''
  86 + if (this.messageModel.contentType === '206') {
  87 + contentString = '赞了你的作品'
  88 + }else if(this.messageModel.contentType === '207'){
  89 + contentString = '赞了你的评论'
  90 + }else if(this.messageModel.contentType === '208'){
  91 + contentString = '评论了你的作品'
  92 + }else if(this.messageModel.contentType === '209'){
  93 + contentString = '回复了你的评论'
  94 + }else if(this.messageModel.contentType === '210'){
  95 + contentString = '转发了您的作品'
  96 + }else if(this.messageModel.contentType === '211'){
  97 + contentString = '关注了你'
  98 + }
  99 + return contentString;
  100 + }
  101 + buildCommentContent(): string {
  102 + let contentString : string = this.messageModel.contentType === '207'?this.messageModel.message:this.messageModel.InteractMsubM.beReply;
  103 + return contentString;
55 } 104 }
56 } 105 }
@@ -61,6 +61,8 @@ export struct MorningEveningPaperComponent { @@ -61,6 +61,8 @@ export struct MorningEveningPaperComponent {
61 @State mixedBgColor: string = '' 61 @State mixedBgColor: string = ''
62 // 顶部安全高度赋值 62 // 顶部安全高度赋值
63 @State topSafeHeight: number = 0; 63 @State topSafeHeight: number = 0;
  64 + @State bottomSafeHeight: number = 0;
  65 +
64 private audioDataList: AudioDataList[] = [] 66 private audioDataList: AudioDataList[] = []
65 private playerController: WDPlayerController = new WDPlayerController(); 67 private playerController: WDPlayerController = new WDPlayerController();
66 simpleAudioDialog: CustomDialogController = new CustomDialogController({ 68 simpleAudioDialog: CustomDialogController = new CustomDialogController({
@@ -112,6 +114,7 @@ export struct MorningEveningPaperComponent { @@ -112,6 +114,7 @@ export struct MorningEveningPaperComponent {
112 // await windowHight.setWindowLayoutFullScreen(true); 114 // await windowHight.setWindowLayoutFullScreen(true);
113 // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) 115 // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
114 this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height) 116 this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)
  117 + this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
115 118
116 const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String 119 const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String
117 console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId) 120 console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId)
@@ -248,14 +251,15 @@ export struct MorningEveningPaperComponent { @@ -248,14 +251,15 @@ export struct MorningEveningPaperComponent {
248 }) 251 })
249 } 252 }
250 } 253 }
251 - .height('100%') 254 + .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`)
252 255
253 PaperTitleComponent() 256 PaperTitleComponent()
254 } 257 }
255 .width('100%') 258 .width('100%')
256 .height('100%') 259 .height('100%')
257 .padding({ 260 .padding({
258 - top: this.topSafeHeight 261 + top: this.topSafeHeight,
  262 + bottom: this.bottomSafeHeight
259 }) 263 })
260 // .backgroundColor(Color.Black) 264 // .backgroundColor(Color.Black)
261 // .backgroundColor(this.pageInfoBean?.backgroundColor ?? Color.Black) 265 // .backgroundColor(this.pageInfoBean?.backgroundColor ?? Color.Black)
@@ -449,6 +449,7 @@ export struct MultiPictureDetailPageComponent { @@ -449,6 +449,7 @@ export struct MultiPictureDetailPageComponent {
449 this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId) 449 this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
450 this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle) 450 this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
451 this.publishCommentModel.targetType = String(this.contentDetailData?.newsType) 451 this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
  452 + this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
452 } 453 }
453 // this.contentDetailData.photoList = [] 454 // this.contentDetailData.photoList = []
454 if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length === 0) { 455 if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length === 0) {
@@ -72,6 +72,7 @@ export struct SpacialTopicPageComponent { @@ -72,6 +72,7 @@ export struct SpacialTopicPageComponent {
72 this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId) 72 this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
73 this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle) 73 this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
74 this.publishCommentModel.targetType = String(this.contentDetailData?.newsType) 74 this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
  75 + this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
75 // } 76 // }
76 this.trySendData2H5() 77 this.trySendData2H5()
77 } 78 }
@@ -113,4 +114,4 @@ export struct SpacialTopicPageComponent { @@ -113,4 +114,4 @@ export struct SpacialTopicPageComponent {
113 } 114 }
114 this.getDetail() 115 this.getDetail()
115 } 116 }
116 -}  
  117 +}
@@ -25,7 +25,7 @@ export struct RmhTitle { @@ -25,7 +25,7 @@ export struct RmhTitle {
25 /** 25 /**
26 * 默认未关注 点击去关注 26 * 默认未关注 点击去关注
27 */ 27 */
28 - @State followStatus: String = '0'; 28 + @State followStatus: string = '0';
29 29
30 /** 30 /**
31 * 关注号主 31 * 关注号主
@@ -45,7 +45,7 @@ export struct RmhTitle { @@ -45,7 +45,7 @@ export struct RmhTitle {
45 status: this.followStatus == '0' ? 1 : 0, 45 status: this.followStatus == '0' ? 1 : 0,
46 } 46 }
47 ContentDetailRequest.postInteractAccentionOperate(params2).then(res => { 47 ContentDetailRequest.postInteractAccentionOperate(params2).then(res => {
48 - console.log('关注号主==', JSON.stringify(res.data)) 48 + console.log('rmhTitle-data', JSON.stringify(res.data))
49 if (this.followStatus == '1') { 49 if (this.followStatus == '1') {
50 this.followStatus = '0' 50 this.followStatus = '0'
51 } else { 51 } else {
@@ -63,7 +63,7 @@ export struct RmhTitle { @@ -63,7 +63,7 @@ export struct RmhTitle {
63 /** 63 /**
64 * 查询当前登录用户是否关注作品号主 64 * 查询当前登录用户是否关注作品号主
65 * */ 65 * */
66 - private async getBatchAttentionStatus() { 66 + async getBatchAttentionStatus() {
67 try { 67 try {
68 const params: postBatchAttentionStatusParams = { 68 const params: postBatchAttentionStatusParams = {
69 creatorIds: [{ creatorId: this.rmhInfo?.rmhId ?? '' }] 69 creatorIds: [{ creatorId: this.rmhInfo?.rmhId ?? '' }]
@@ -72,17 +72,17 @@ export struct RmhTitle { @@ -72,17 +72,17 @@ export struct RmhTitle {
72 this.followStatus = data[0]?.status; 72 this.followStatus = data[0]?.status;
73 Logger.info(`rmhTitle-followStatus:${JSON.stringify(this.followStatus)}`) 73 Logger.info(`rmhTitle-followStatus:${JSON.stringify(this.followStatus)}`)
74 } catch (exception) { 74 } catch (exception) {
75 - 75 + Logger.info(`rmhTitle-followStatus:${JSON.stringify(exception)}`)
76 } 76 }
77 } 77 }
78 78
79 aboutToAppear(): void { 79 aboutToAppear(): void {
  80 + this.getBatchAttentionStatus()
  81 +
80 let page = router.getState(); 82 let page = router.getState();
81 if (page.path.includes('/page/PeopleShipHomePage') || page.path.includes('/pages/MainPage')) { 83 if (page.path.includes('/page/PeopleShipHomePage') || page.path.includes('/pages/MainPage')) {
82 this.hideTime = true; 84 this.hideTime = true;
83 } 85 }
84 -  
85 - this.getBatchAttentionStatus()  
86 } 86 }
87 87
88 getDaysBetweenDates(date: number) { 88 getDaysBetweenDates(date: number) {
@@ -143,13 +143,13 @@ export struct RmhTitle { @@ -143,13 +143,13 @@ export struct RmhTitle {
143 Blank() 143 Blank()
144 if (this.rmhInfo.cnIsAttention) { 144 if (this.rmhInfo.cnIsAttention) {
145 Row() { 145 Row() {
146 - if (this.followStatus === '0') { 146 + if (Number(this.followStatus) === 0) {
147 Image($r('app.media.rmh_follow')) 147 Image($r('app.media.rmh_follow'))
148 .width(16) 148 .width(16)
149 .height(16) 149 .height(16)
150 } 150 }
151 151
152 - Text(this.followStatus === '0' ? '关注' : '已关注') 152 + Text(Number(this.followStatus) === 0 ? '关注' : '已关注')
153 .fontSize($r('app.float.font_size_13')) 153 .fontSize($r('app.float.font_size_13'))
154 .fontColor($r('app.color.color_ED2800')) 154 .fontColor($r('app.color.color_ED2800'))
155 } 155 }
1 import { CompDTO } from 'wdBean/Index'; 1 import { CompDTO } from 'wdBean/Index';
2 -import { Logger } from 'wdKit/Index'; 2 +import { DateTimeUtils, Logger } from 'wdKit/Index';
3 import PageModel from '../../viewmodel/PageModel'; 3 import PageModel from '../../viewmodel/PageModel';
4 4
5 /** 5 /**
@@ -59,9 +59,9 @@ export struct CardAdvBottom { @@ -59,9 +59,9 @@ export struct CardAdvBottom {
59 break; 59 break;
60 } 60 }
61 } 61 }
62 - Logger.error("ZZZXXXXX","currentIndex====>"+currentIndex);  
63 if (currentIndex >= 0) { 62 if (currentIndex >= 0) {
64 this.pageModel.compList.deleteItem(currentIndex) 63 this.pageModel.compList.deleteItem(currentIndex)
  64 + this.pageModel.timestamp = DateTimeUtils.getTimeStamp().toString()
65 } 65 }
66 } 66 }
67 } 67 }
1 import { CompDTO } from 'wdBean/Index'; 1 import { CompDTO } from 'wdBean/Index';
2 -import { Logger } from 'wdKit/Index'; 2 +import { DateTimeUtils, Logger } from 'wdKit/Index';
3 import PageModel from '../../viewmodel/PageModel'; 3 import PageModel from '../../viewmodel/PageModel';
4 4
5 /** 5 /**
@@ -71,10 +71,9 @@ export struct CardAdvTop { @@ -71,10 +71,9 @@ export struct CardAdvTop {
71 break; 71 break;
72 } 72 }
73 } 73 }
74 -  
75 - Logger.error("ZZZXXXXX","currentIndex====>"+currentIndex);  
76 if (currentIndex >= 0) { 74 if (currentIndex >= 0) {
77 this.pageModel.compList.deleteItem(currentIndex) 75 this.pageModel.compList.deleteItem(currentIndex)
  76 + this.pageModel.timestamp = DateTimeUtils.getTimeStamp().toString()
78 } 77 }
79 } 78 }
80 } 79 }
@@ -48,8 +48,9 @@ export struct Card10Component { @@ -48,8 +48,9 @@ export struct Card10Component {
48 .onClick((event: ClickEvent) => { 48 .onClick((event: ClickEvent) => {
49 ProcessUtils.processPage(this.contentDTO) 49 ProcessUtils.processPage(this.contentDTO)
50 }) 50 })
51 -  
52 - Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 }) 51 + if (this.contentDTO.objectType == '5') {
  52 + Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 })
  53 + }
53 }.alignContent(Alignment.BottomStart) 54 }.alignContent(Alignment.BottomStart)
54 55
55 // 专题列表--后端返回三个, 56 // 专题列表--后端返回三个,
@@ -106,7 +107,7 @@ export struct Card10Component { @@ -106,7 +107,7 @@ export struct Card10Component {
106 .fontColor($r('app.color.color_222222')) 107 .fontColor($r('app.color.color_222222'))
107 .maxLines(2) 108 .maxLines(2)
108 .textOverflow({ overflow: TextOverflow.Ellipsis }) 109 .textOverflow({ overflow: TextOverflow.Ellipsis })
109 - .textIndent(item.objectType == '5' ? 40 : 0) 110 + .textIndent(item.objectType == '5' ? 38 : 0)
110 }.alignContent(Alignment.TopStart) 111 }.alignContent(Alignment.TopStart)
111 112
112 CardSourceInfo( 113 CardSourceInfo(
@@ -102,6 +102,9 @@ struct createImg { @@ -102,6 +102,9 @@ struct createImg {
102 CardMediaInfo({ contentDTO: this.contentDTO }) 102 CardMediaInfo({ contentDTO: this.contentDTO })
103 } 103 }
104 .align(Alignment.BottomEnd) 104 .align(Alignment.BottomEnd)
  105 + .onClick((event: ClickEvent) => {
  106 + ProcessUtils.gotoVod(this.contentDTO)
  107 + })
105 } 108 }
106 } 109 }
107 } 110 }
@@ -40,7 +40,7 @@ export struct Card2Component { @@ -40,7 +40,7 @@ export struct Card2Component {
40 .maxLines(2) 40 .maxLines(2)
41 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 41 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
42 .align(Alignment.Start) 42 .align(Alignment.Start)
43 - .textIndent(this.contentDTO.objectType == '5' ? 40 : 0) 43 + .textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
44 } 44 }
45 .alignContent(Alignment.TopStart) 45 .alignContent(Alignment.TopStart)
46 46
@@ -12,7 +12,7 @@ const TAG: string = 'Card5Component'; @@ -12,7 +12,7 @@ const TAG: string = 'Card5Component';
12 @Component 12 @Component
13 export struct Card5Component { 13 export struct Card5Component {
14 @State contentDTO: ContentDTO = new ContentDTO(); 14 @State contentDTO: ContentDTO = new ContentDTO();
15 - @State titleShowPolicy: number | string = 1 15 + @Prop titleShowPolicy: number | string
16 @State loadImg: boolean = false; 16 @State loadImg: boolean = false;
17 @State clicked: boolean = false; 17 @State clicked: boolean = false;
18 18
@@ -22,12 +22,13 @@ export struct Card5Component { @@ -22,12 +22,13 @@ export struct Card5Component {
22 22
23 build() { 23 build() {
24 Stack() { 24 Stack() {
  25 +
25 Image(this.loadImg ? this.contentDTO.coverUrl : '') 26 Image(this.loadImg ? this.contentDTO.coverUrl : '')
26 .backgroundColor(0xf5f5f5) 27 .backgroundColor(0xf5f5f5)
27 .width(CommonConstants.FULL_WIDTH) 28 .width(CommonConstants.FULL_WIDTH)
28 .autoResize(true) 29 .autoResize(true)
29 .borderRadius($r('app.float.image_border_radius')) 30 .borderRadius($r('app.float.image_border_radius'))
30 - // if ((this.titleShowPolicy === 1 || this.contentDTO.titleShow === 1) && this.contentDTO.newsTitle) { 31 + if (this.titleShowPolicy === 1) {
31 Row() 32 Row()
32 .width(CommonConstants.FULL_WIDTH) 33 .width(CommonConstants.FULL_WIDTH)
33 .height(59) 34 .height(59)
@@ -41,20 +42,21 @@ export struct Card5Component { @@ -41,20 +42,21 @@ export struct Card5Component {
41 if (this.contentDTO.objectType == '5') { 42 if (this.contentDTO.objectType == '5') {
42 Notes({ objectType: this.contentDTO.objectType }) 43 Notes({ objectType: this.contentDTO.objectType })
43 } 44 }
  45 +
44 Text(this.contentDTO.newsTitle) 46 Text(this.contentDTO.newsTitle)
45 - .width(CommonConstants.FULL_WIDTH)// .height(CommonConstants.FULL_HEIGHT) 47 + .width(CommonConstants.FULL_WIDTH)
46 .fontColor(Color.White) 48 .fontColor(Color.White)
47 .fontSize($r('app.float.normal_text_size')) 49 .fontSize($r('app.float.normal_text_size'))
48 .fontWeight(FontWeight.Bold) 50 .fontWeight(FontWeight.Bold)
49 .maxLines(2) 51 .maxLines(2)
50 .align(Alignment.TopStart) 52 .align(Alignment.TopStart)
51 - .textIndent(this.contentDTO.objectType == '5' ? 40 : 0) 53 + .textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
52 }.alignContent(Alignment.TopStart) 54 }.alignContent(Alignment.TopStart)
53 } 55 }
54 .justifyContent(FlexAlign.Start) 56 .justifyContent(FlexAlign.Start)
55 - // .height(40)  
56 .margin({ left: 12, bottom: 10, right: 12 }) 57 .margin({ left: 12, bottom: 10, right: 12 })
57 - // } 58 +
  59 + }
58 } 60 }
59 .alignContent(Alignment.Bottom) 61 .alignContent(Alignment.Bottom)
60 .width(CommonConstants.FULL_WIDTH) 62 .width(CommonConstants.FULL_WIDTH)
@@ -49,7 +49,7 @@ export struct Card6Component { @@ -49,7 +49,7 @@ export struct Card6Component {
49 .maxLines(3) 49 .maxLines(3)
50 .alignSelf(ItemAlign.Start) 50 .alignSelf(ItemAlign.Start)
51 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 51 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
52 - .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 60 : 52 + .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
53 (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) || 53 (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
54 this.contentDTO.objectType == '5' ? 30 : 0) 54 this.contentDTO.objectType == '5' ? 30 : 0)
55 }.alignContent(Alignment.TopStart) 55 }.alignContent(Alignment.TopStart)
@@ -43,8 +43,11 @@ export struct Card9Component { @@ -43,8 +43,11 @@ export struct Card9Component {
43 topRight: $r('app.float.image_border_radius') 43 topRight: $r('app.float.image_border_radius')
44 }) 44 })
45 45
46 - Notes({ objectType: 5 })  
47 - .margin({ left: 5, bottom: 5 }) 46 + if (this.contentDTO.objectType == '5') {
  47 + Notes({ objectType: 5 })
  48 + .margin({ left: 5, bottom: 5 })
  49 + }
  50 +
48 }.alignContent(Alignment.BottomStart) 51 }.alignContent(Alignment.BottomStart)
49 52
50 // 时间线--后端返回三个, 53 // 时间线--后端返回三个,
@@ -13,10 +13,10 @@ export struct Notes { @@ -13,10 +13,10 @@ export struct Notes {
13 build() { 13 build() {
14 if (this.returnTypeTitleFn()) { 14 if (this.returnTypeTitleFn()) {
15 Text(this.returnTypeTitleFn()) 15 Text(this.returnTypeTitleFn())
16 - .fontSize($r('app.float.font_size_12')) 16 + .fontSize($r('app.float.font_size_11'))
17 .padding({ 17 .padding({
18 - left: 5,  
19 - right: 5, 18 + left: 4,
  19 + right: 4,
20 top: 3, 20 top: 3,
21 bottom: 3 21 bottom: 3
22 }) 22 })
@@ -20,6 +20,8 @@ export class publishCommentModel { @@ -20,6 +20,8 @@ export class publishCommentModel {
20 targetType: string = '' 20 targetType: string = ''
21 /*评论总数*/ 21 /*评论总数*/
22 totalCommentNumer: string = '0' 22 totalCommentNumer: string = '0'
  23 + /// 游客评论开关:visitorComment 1:打开;0:关闭
  24 + visitorComment: string = "0"
23 25
24 //评论传参 26 //评论传参
25 /*评论图片url,多个逗号隔开*/ 27 /*评论图片url,多个逗号隔开*/
@@ -8,9 +8,11 @@ import { HttpUtils } from 'wdNetwork/Index'; @@ -8,9 +8,11 @@ import { HttpUtils } from 'wdNetwork/Index';
8 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 8 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
9 import NoMoreLayout from '../../page/NoMoreLayout'; 9 import NoMoreLayout from '../../page/NoMoreLayout';
10 import { EmptyComponent } from '../../view/EmptyComponent'; 10 import { EmptyComponent } from '../../view/EmptyComponent';
  11 +import { ContentDetailDTO, Params } from 'wdBean/Index';
11 12
12 const TAG = 'CommentComponent'; 13 const TAG = 'CommentComponent';
13 14
  15 +
14 const testString = '因为读书的人\n是低着头向上看的人\n身处一隅,却能放眼世界\n2,因为读书的人\n总是比不读书的人\n活得有趣一点\n3,因为读书的人\n即使平凡,绝不平庸' 16 const testString = '因为读书的人\n是低着头向上看的人\n身处一隅,却能放眼世界\n2,因为读书的人\n总是比不读书的人\n活得有趣一点\n3,因为读书的人\n即使平凡,绝不平庸'
15 17
16 // @Entry 18 // @Entry
@@ -22,14 +24,20 @@ export struct CommentComponent { @@ -22,14 +24,20 @@ export struct CommentComponent {
22 @State isComments: boolean = true 24 @State isComments: boolean = true
23 /*必传*/ 25 /*必传*/
24 @ObjectLink publishCommentModel: publishCommentModel 26 @ObjectLink publishCommentModel: publishCommentModel
  27 + @Consume contentDetailData: ContentDetailDTO
25 listScroller: ListScroller = new ListScroller(); // scroller控制器 28 listScroller: ListScroller = new ListScroller(); // scroller控制器
26 historyOffset: number = 0; // 上次浏览到列表距离顶端的偏移量offset 29 historyOffset: number = 0; // 上次浏览到列表距离顶端的偏移量offset
27 - isloading: boolean = false  
28 @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource(); 30 @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource();
29 @State dialogController: CustomDialogController | null = null; 31 @State dialogController: CustomDialogController | null = null;
30 32
31 // @State private browSingModel: commentListModel = new commentListModel() 33 // @State private browSingModel: commentListModel = new commentListModel()
32 34
  35 + // 是否为固定高度模式。true时,里面上拉加载更多生效,外层不能包Scroll。
  36 + // false时,外层实现加载更多,并通过reachEndIncreament通知开发加载更多,reachEndLoadMoreFinish 通知上层加载更多完成
  37 + fixedHeightMode: boolean = false
  38 + @Prop @Watch("parentOnReachEnd") reachEndIncreament : number = 0
  39 + reachEndLoadMoreFinish?: () => void
  40 +
33 // 在自定义组件即将析构销毁时将dialogControlle置空 41 // 在自定义组件即将析构销毁时将dialogControlle置空
34 aboutToDisappear() { 42 aboutToDisappear() {
35 this.dialogController = null // 将dialogController置空 43 this.dialogController = null // 将dialogController置空
@@ -180,31 +188,52 @@ export struct CommentComponent { @@ -180,31 +188,52 @@ export struct CommentComponent {
180 } 188 }
181 } 189 }
182 }, (item: commentItemModel, index: number) => JSON.stringify(item) + index.toString()) 190 }, (item: commentItemModel, index: number) => JSON.stringify(item) + index.toString())
183 - 191 +
184 // 加载更多 192 // 加载更多
185 ListItem() { 193 ListItem() {
186 - if (this.hasMore === false) { 194 + if (this.hasMore == false) {
187 NoMoreLayout() 195 NoMoreLayout()
188 } 196 }
189 } 197 }
190 } 198 }
191 -  
192 } 199 }
  200 + .margin({bottom: 10})
193 .onReachEnd(() => { 201 .onReachEnd(() => {
  202 + if (!this.fixedHeightMode) {
  203 + return
  204 + }
194 if (this.hasMore) { 205 if (this.hasMore) {
195 this.getData() 206 this.getData()
196 } 207 }
197 }) 208 })
198 - .enableScrollInteraction(false) 209 + .enableScrollInteraction(this.fixedHeightMode ? true: false)
  210 + // .nestedScroll({
  211 + // scrollForward: NestedScrollMode.PARENT_FIRST,
  212 + // scrollBackward: NestedScrollMode.SELF_FIRST
  213 + // })
199 } 214 }
200 215
201 } 216 }
202 217
  218 + parentOnReachEnd() {
  219 + if (this.fixedHeightMode) {
  220 + return
  221 + }
  222 + if (this.hasMore) {
  223 + this.getData()
  224 + } else {
  225 + if (this.reachEndLoadMoreFinish) {
  226 + this.reachEndLoadMoreFinish()
  227 + }
  228 + }
  229 + }
  230 +
203 //获取数据 231 //获取数据
204 async getData() { 232 async getData() {
205 commentViewModel.fetchContentCommentList(this.currentPage + '', this.publishCommentModel.targetId, 233 commentViewModel.fetchContentCommentList(this.currentPage + '', this.publishCommentModel.targetId,
206 this.publishCommentModel.targetType) 234 this.publishCommentModel.targetType)
207 .then(commentListModel => { 235 .then(commentListModel => {
  236 + console.log('评论:', JSON.stringify(commentListModel.list))
208 this.currentPage++ 237 this.currentPage++
209 238
210 if (Number.parseInt(commentListModel.totalCommentNum) > 239 if (Number.parseInt(commentListModel.totalCommentNum) >
@@ -237,6 +266,9 @@ export struct CommentComponent { @@ -237,6 +266,9 @@ export struct CommentComponent {
237 } else { 266 } else {
238 this.hasMore = false 267 this.hasMore = false
239 } 268 }
  269 + if (!this.fixedHeightMode && this.reachEndLoadMoreFinish) {
  270 + this.reachEndLoadMoreFinish()
  271 + }
240 }) 272 })
241 } 273 }
242 } 274 }
@@ -247,6 +279,7 @@ struct ChildCommentItem { @@ -247,6 +279,7 @@ struct ChildCommentItem {
247 @Link publishCommentModel: publishCommentModel 279 @Link publishCommentModel: publishCommentModel
248 @Link dialogController: CustomDialogController | null 280 @Link dialogController: CustomDialogController | null
249 @ObjectLink item: commentItemModel 281 @ObjectLink item: commentItemModel
  282 + @Consume contentDetailData: ContentDetailDTO
250 283
251 build() { 284 build() {
252 Column() { 285 Column() {
@@ -271,6 +304,14 @@ struct ChildCommentItem { @@ -271,6 +304,14 @@ struct ChildCommentItem {
271 .alignContent(Alignment.Center) 304 .alignContent(Alignment.Center)
272 .onClick(() => { 305 .onClick(() => {
273 // TODO 跳转个人详情 306 // TODO 跳转个人详情
  307 + // 跳转到号主页
  308 + if (this.contentDetailData.rmhInfo?.cnMainControl === 1) {
  309 + const params: Params = {
  310 + creatorId: this.contentDetailData.rmhInfo.rmhId,
  311 + pageID: ''
  312 + }
  313 + WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params)
  314 + }
274 }) 315 })
275 316
276 //昵称 317 //昵称
@@ -455,7 +496,7 @@ struct commentHeaderView { @@ -455,7 +496,7 @@ struct commentHeaderView {
455 .margin({ left: 8 }) 496 .margin({ left: 8 })
456 .alignContent(Alignment.Center) 497 .alignContent(Alignment.Center)
457 .onClick(() => { 498 .onClick(() => {
458 - // TODO 跳转个人详情 499 + commentViewModel.jumpToAccountPage(this.item)
459 }) 500 })
460 501
461 //昵称 502 //昵称
  1 +import { ContentDetailDTO, PageInfoDTO } from 'wdBean/Index'
  2 +import { publishCommentModel } from '../model/PublishCommentModel'
  3 +
  4 +@CustomDialog
  5 +export struct CommentListDialog {
  6 +
  7 + /// 内部使用
  8 + private publishCommentModel: publishCommentModel = new publishCommentModel()
  9 + controller?: CustomDialogController
  10 +
  11 + /// 外部初始化
  12 + contentDetail?: ContentDetailDTO
  13 + pageInfo?: PageInfoDTO
  14 +
  15 + build() {
  16 + }
  17 +
  18 +
  19 +}
@@ -11,11 +11,12 @@ export struct CommentTabComponent { @@ -11,11 +11,12 @@ export struct CommentTabComponent {
11 } 11 }
12 @ObjectLink publishCommentModel: publishCommentModel 12 @ObjectLink publishCommentModel: publishCommentModel
13 @Prop contentDetail: ContentDetailDTO 13 @Prop contentDetail: ContentDetailDTO
  14 + @Prop pageComponentType: number = -1 //1:视频详情页
14 /*展示类型*/ 15 /*展示类型*/
15 @State type: number = 1 16 @State type: number = 1
16 @State placeHolder: string = '说两句...' 17 @State placeHolder: string = '说两句...'
17 @State dialogController: CustomDialogController | null = null; 18 @State dialogController: CustomDialogController | null = null;
18 - styleType : number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏) 19 + styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏)
19 /*回调方法*/ 20 /*回调方法*/
20 dialogControllerConfirm: () => void = () => { 21 dialogControllerConfirm: () => void = () => {
21 } 22 }
@@ -46,16 +47,44 @@ export struct CommentTabComponent { @@ -46,16 +47,44 @@ export struct CommentTabComponent {
46 Row() { 47 Row() {
47 Stack({ alignContent: Alignment.Start }) { 48 Stack({ alignContent: Alignment.Start }) {
48 RelativeContainer() { 49 RelativeContainer() {
49 - Image($r('app.media.comment_img_input_hui'))  
50 - .objectFit(ImageFit.Fill)  
51 - .resizable({ slice: { top: 1, left: 1, right: 20, bottom: 1 } }) 50 +
  51 + if (this.pageComponentType === 1) {
  52 + Row() {
  53 +
  54 + }
  55 + .width('100%')
  56 + .height(30)
  57 + .borderRadius(2)
  58 + .backgroundColor(this.pageComponentType === 1 ? '#1a1a1a' : Color.Transparent)
  59 + .margin({
  60 + right: 16,
  61 + })
52 .alignRules({ 62 .alignRules({
53 top: { anchor: "__container__", align: VerticalAlign.Top }, 63 top: { anchor: "__container__", align: VerticalAlign.Top },
54 left: { anchor: "__container__", align: HorizontalAlign.Start }, 64 left: { anchor: "__container__", align: HorizontalAlign.Start },
55 right: { anchor: "__container__", align: HorizontalAlign.End }, 65 right: { anchor: "__container__", align: HorizontalAlign.End },
56 bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, 66 bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
57 }) 67 })
58 - .id("Image") 68 + .id("RowBg")
  69 + } else {
  70 + Image($r('app.media.comment_img_input_hui'))
  71 + .objectFit(ImageFit.Fill)
  72 + .resizable({
  73 + slice: {
  74 + top: 1,
  75 + left: 1,
  76 + right: 20,
  77 + bottom: 1
  78 + }
  79 + })
  80 + .alignRules({
  81 + top: { anchor: "__container__", align: VerticalAlign.Top },
  82 + left: { anchor: "__container__", align: HorizontalAlign.Start },
  83 + right: { anchor: "__container__", align: HorizontalAlign.End },
  84 + bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
  85 + })
  86 + .id("Image")
  87 + }
59 Text(this.placeHolder) 88 Text(this.placeHolder)
60 .fontSize(12) 89 .fontSize(12)
61 .fontColor('#999999') 90 .fontColor('#999999')
@@ -91,7 +120,7 @@ export struct CommentIconComponent { @@ -91,7 +120,7 @@ export struct CommentIconComponent {
91 @ObjectLink publishCommentModel: publishCommentModel 120 @ObjectLink publishCommentModel: publishCommentModel
92 /*展示类型*/ 121 /*展示类型*/
93 @State type: number = 1 122 @State type: number = 1
94 - styleType : number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏) 123 + styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏)
95 // aboutToAppear(): void { 124 // aboutToAppear(): void {
96 // setTimeout(() => { 125 // setTimeout(() => {
97 // this.publishCommentModel.totalCommentNumer = '444' 126 // this.publishCommentModel.totalCommentNumer = '444'
@@ -412,33 +412,7 @@ struct QualityCommentItem { @@ -412,33 +412,7 @@ struct QualityCommentItem {
412 412
413 jumpToAccountOwner() { 413 jumpToAccountOwner() {
414 414
415 - let url = HttpUrlUtils.getOtherUserDetailDataUrl()  
416 - let item : Record<string, string >= {  
417 - "creatorId": this.item.fromCreatorId || "",  
418 - "userType": `${this.item.fromUserType}`,  
419 - "userId": this.item.fromUserId || "-1",  
420 - }  
421 - HttpBizUtil.post<ResponseDTO<MasterDetailRes>>(url, item).then((result) => {  
422 - if (!result.data || result.data.mainControl != 1) {  
423 - ToastUtils.longToast("暂时无法查看该创作者主页")  
424 - return  
425 - }  
426 -  
427 - if (result.data.banControl == 1) {  
428 - ToastUtils.longToast("该账号已封禁,不予访问")  
429 - return  
430 - }  
431 -  
432 - if (result.data.userType === "1") { // 普通用户  
433 - let params: Record<string, string> = {'userId': result.data.userId};  
434 - WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params)  
435 - } else { // 非普通用户  
436 - ProcessUtils.gotoPeopleShipHomePage(result.data.creatorId)  
437 - }  
438 -  
439 - }).catch(() => {  
440 - ToastUtils.longToast("暂时无法查看该创作者主页")  
441 - }) 415 + commentViewModel.jumpToAccountPage(this.item)
442 } 416 }
443 417
444 jumpToDetail() { 418 jumpToDetail() {
  1 +import { MasterDetailRes } from 'wdBean/Index';
1 import { SpConstants } from 'wdConstant/Index'; 2 import { SpConstants } from 'wdConstant/Index';
2 -import { DateTimeUtils, Logger, SPHelper, ToastUtils, UserDataLocal } from 'wdKit/Index'; 3 +import {
  4 + AccountManagerUtils,
  5 + DateTimeUtils, DeviceUtil, Logger, SPHelper, ToastUtils, UserDataLocal } from 'wdKit/Index';
3 import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO } from 'wdNetwork/Index'; 6 import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO } from 'wdNetwork/Index';
4 import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; 7 import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest';
  8 +import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index';
5 import { 9 import {
6 commentItemModel, 10 commentItemModel,
7 commentListModel, 11 commentListModel,
@@ -160,7 +164,9 @@ class CommentViewModel { @@ -160,7 +164,9 @@ class CommentViewModel {
160 publishComment(model: publishCommentModel) { 164 publishComment(model: publishCommentModel) {
161 165
162 return new Promise<commentItemModel>((success, fail) => { 166 return new Promise<commentItemModel>((success, fail) => {
163 - let url = HttpUrlUtils.getPublishCommentUrl() 167 + const visitorMode = model.visitorComment == "1" && AccountManagerUtils.isLoginSync() == false
  168 + let url = visitorMode ? HttpUrlUtils.getNoUserPublishCommentUrl() : HttpUrlUtils.getPublishCommentUrl()
  169 +
164 let bean: Record<string, string> = {}; 170 let bean: Record<string, string> = {};
165 171
166 bean['targetId'] = model.targetId; 172 bean['targetId'] = model.targetId;
@@ -176,6 +182,11 @@ class CommentViewModel { @@ -176,6 +182,11 @@ class CommentViewModel {
176 bean['targetType'] = model.targetType 182 bean['targetType'] = model.targetType
177 bean['parentId'] = model.parentId 183 bean['parentId'] = model.parentId
178 184
  185 + if (visitorMode) {
  186 + bean['deviceId'] = DeviceUtil.clientId()
  187 + bean['userName'] = SPHelper.default.getSync(SpConstants.TOURIST_NICK_NAME, "") as string
  188 + }
  189 +
179 HttpRequest.post<ResponseDTO<commentItemModel>>(url, bean).then((data: ResponseDTO<commentItemModel>) => { 190 HttpRequest.post<ResponseDTO<commentItemModel>>(url, bean).then((data: ResponseDTO<commentItemModel>) => {
180 if (data.code != 0) { 191 if (data.code != 0) {
181 ToastUtils.showToast(data.message, 1000); 192 ToastUtils.showToast(data.message, 1000);
@@ -185,10 +196,9 @@ class CommentViewModel { @@ -185,10 +196,9 @@ class CommentViewModel {
185 ToastUtils.showToast(data.message, 1000); 196 ToastUtils.showToast(data.message, 1000);
186 let model = data.data as commentItemModel 197 let model = data.data as commentItemModel
187 198
188 - let userId = HttpUtils.getUserId()  
189 - let FIRSTCOMMENTTIME = SPHelper.default.getSync(SpConstants.FIRSTCOMMENTTIME, '') 199 + let firstCommentTime = SPHelper.default.getSync(SpConstants.FIRSTCOMMENTTIME, '') as string
190 200
191 - if (!userId && !FIRSTCOMMENTTIME) { 201 + if (visitorMode && firstCommentTime.length == 0) {
192 //保存首次评论时间 202 //保存首次评论时间
193 SPHelper.default.saveSync(SpConstants.FIRSTCOMMENTTIME, DateTimeUtils.formatDate(data.timestamp, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) 203 SPHelper.default.saveSync(SpConstants.FIRSTCOMMENTTIME, DateTimeUtils.formatDate(data.timestamp, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
194 } 204 }
@@ -472,6 +482,36 @@ class CommentViewModel { @@ -472,6 +482,36 @@ class CommentViewModel {
472 } 482 }
473 return false 483 return false
474 } 484 }
  485 +
  486 + jumpToAccountPage(commentItem: commentItemModel) {
  487 + let url = HttpUrlUtils.getOtherUserDetailDataUrl()
  488 + let item : Record<string, string >= {
  489 + "creatorId": commentItem.fromCreatorId || "",
  490 + "userType": `${commentItem.fromUserType}`,
  491 + "userId": commentItem.fromUserId || "-1",
  492 + }
  493 + HttpBizUtil.post<ResponseDTO<MasterDetailRes>>(url, item).then((result) => {
  494 + if (!result.data || result.data.mainControl != 1) {
  495 + ToastUtils.longToast("暂时无法查看该创作者主页")
  496 + return
  497 + }
  498 +
  499 + if (result.data.banControl == 1) {
  500 + ToastUtils.longToast("该账号已封禁,不予访问")
  501 + return
  502 + }
  503 +
  504 + if (result.data.userType === "1") { // 普通用户
  505 + let params: Record<string, string> = {'userId': result.data.userId};
  506 + WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params)
  507 + } else { // 非普通用户
  508 + ProcessUtils.gotoPeopleShipHomePage(result.data.creatorId)
  509 + }
  510 +
  511 + }).catch(() => {
  512 + ToastUtils.longToast("暂时无法查看该创作者主页")
  513 + })
  514 + }
475 } 515 }
476 516
477 517
@@ -214,7 +214,7 @@ struct CarouselLayout01CardView { @@ -214,7 +214,7 @@ struct CarouselLayout01CardView {
214 .align(Alignment.Bottom) 214 .align(Alignment.Bottom)
215 .maxLines(CompUtils.MAX_LINES_2) 215 .maxLines(CompUtils.MAX_LINES_2)
216 .textOverflow({ overflow: TextOverflow.Ellipsis }) 216 .textOverflow({ overflow: TextOverflow.Ellipsis })
217 - .textIndent(this.item.objectType == '5' ? 40 : 0) 217 + .textIndent(this.item.objectType == '5' ? 35 : 0)
218 } 218 }
219 // .height(39) 219 // .height(39)
220 .padding({ 220 .padding({
@@ -40,6 +40,7 @@ export struct ZhSingleRow03 { @@ -40,6 +40,7 @@ export struct ZhSingleRow03 {
40 40
41 // 请求所有预约状态 41 // 请求所有预约状态
42 async getReserveState() { 42 async getReserveState() {
  43 + this.reservedIds = []
43 const reserveBean: reserveReqItem[] = this.compDTO.operDataList.map((item: ContentDTO) => { 44 const reserveBean: reserveReqItem[] = this.compDTO.operDataList.map((item: ContentDTO) => {
44 const reqItem: reserveReqItem = { 45 const reqItem: reserveReqItem = {
45 liveId: item.objectId.toString(), 46 liveId: item.objectId.toString(),
@@ -5,13 +5,10 @@ import { ProcessUtils } from 'wdRouter'; @@ -5,13 +5,10 @@ import { ProcessUtils } from 'wdRouter';
5 import { SpConstants } from 'wdConstant/Index' 5 import { SpConstants } from 'wdConstant/Index'
6 import { 6 import {
7 batchLikeAndCollectParams, 7 batchLikeAndCollectParams,
8 - ContentDetailRequest,  
9 - contentListParams,  
10 - postExecuteCollectRecordParams,  
11 - postExecuteLikeParams,  
12 - postInteractAccentionOperateParams  
13 } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; 8 } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
14 import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel'; 9 import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel';
  10 +import commentViewModel from '../../components/comment/viewmodel/CommentViewModel';
  11 +import { commentItemModel } from '../../components/comment/model/CommentModel'
15 12
16 /** 13 /**
17 * 精选评论卡 14 * 精选评论卡
@@ -22,7 +19,9 @@ const TAG = 'Zh_Single_Row-06' @@ -22,7 +19,9 @@ const TAG = 'Zh_Single_Row-06'
22 @Component 19 @Component
23 export struct ZhSingleRow06 { 20 export struct ZhSingleRow06 {
24 @State compDTO: CompDTO = {} as CompDTO 21 @State compDTO: CompDTO = {} as CompDTO
25 - @State newsStatusOfUser: batchLikeAndCollectResult = {} as batchLikeAndCollectResult // 点赞、收藏状态 22 + @State newsStatusOfUser: batchLikeAndCollectResult = {
  23 + likeStatus: '0'
  24 + } as batchLikeAndCollectResult // 点赞、收藏状态
26 25
27 aboutToAppear(): void { 26 aboutToAppear(): void {
28 this.getInteractDataStatus() 27 this.getInteractDataStatus()
@@ -38,18 +37,24 @@ export struct ZhSingleRow06 { @@ -38,18 +37,24 @@ export struct ZhSingleRow06 {
38 WDRouterRule.jumpWithPage(WDRouterPage.loginPage) 37 WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
39 return 38 return
40 } 39 }
41 - const params: postExecuteLikeParams = {  
42 - status: this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1',  
43 - contentId: this.compDTO.operDataList[0]?.commentInfo?.newsId + '',  
44 - contentType: this.compDTO.operDataList[0]?.commentInfo?.newsType + '',  
45 - }  
46 - ContentDetailRequest.postExecuteLike(params).then(res => {  
47 - this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1' 40 +
  41 + const commentInfo = this.compDTO.operDataList[0]?.commentInfo as commentInfo;
  42 + // commentLikeChange(this.item)
  43 + this.newsStatusOfUser.likeStatus = this.newsStatusOfUser.likeStatus === '1' ? '0' : '1';
  44 + const commentLikeParam = {
  45 + targetId: commentInfo.newsId || '',
  46 + id: commentInfo.commentId,
  47 + targetType: commentInfo?.objectType || '',
  48 + api_status: this.newsStatusOfUser?.likeStatus == '1' ? false : true
  49 + } as commentItemModel;
  50 + commentViewModel.commentLike(commentLikeParam).then(() => {
  51 + }).catch(() => {
  52 + this.newsStatusOfUser.likeStatus = this.newsStatusOfUser.likeStatus === '1' ? '0' : '1';
48 }) 53 })
49 } 54 }
50 55
51 // 已登录->查询用户对作品点赞、收藏状态 56 // 已登录->查询用户对作品点赞、收藏状态
52 - private async getInteractDataStatus() { 57 + async getInteractDataStatus() {
53 // 未登录,跳转登录 58 // 未登录,跳转登录
54 const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') 59 const user_id = await SPHelper.default.get(SpConstants.USER_ID, '')
55 if (!user_id) { 60 if (!user_id) {
@@ -65,7 +70,7 @@ export struct ZhSingleRow06 { @@ -65,7 +70,7 @@ export struct ZhSingleRow06 {
65 ] 70 ]
66 } 71 }
67 let data = await MultiPictureDetailViewModel.getInteractDataStatus(params) 72 let data = await MultiPictureDetailViewModel.getInteractDataStatus(params)
68 - console.error(TAG, 'ZhSingleRow06-data', JSON.stringify(data)) 73 + Logger.info(TAG, 'ZhSingleRow06-data', JSON.stringify(data))
69 this.newsStatusOfUser = data[0]; 74 this.newsStatusOfUser = data[0];
70 Logger.info(TAG, `ZhSingleRow06-newsStatusOfUser:${JSON.stringify(this.newsStatusOfUser)}`) 75 Logger.info(TAG, `ZhSingleRow06-newsStatusOfUser:${JSON.stringify(this.newsStatusOfUser)}`)
71 } catch (exception) { 76 } catch (exception) {
@@ -124,7 +129,7 @@ export struct ZhSingleRow06 { @@ -124,7 +129,7 @@ export struct ZhSingleRow06 {
124 .fontColor(0x999999) 129 .fontColor(0x999999)
125 130
126 Row(){ 131 Row(){
127 - Image(this.newsStatusOfUser?.likeStatus == '1' ? $r('app.media.icon_like_select') : $r('app.media.icon_like')) 132 + Image(Number(this.newsStatusOfUser?.likeStatus) == 1 ? $r('app.media.icon_like_select') : $r('app.media.icon_like'))
128 .width(16) 133 .width(16)
129 .height(16) 134 .height(16)
130 .margin({right: 3}) 135 .margin({right: 3})
  1 +/**
  2 + * 直播页面点赞动画
  3 + */
  4 +
  5 +interface animationItem {
  6 + x: string | number;
  7 + y: string | number;
  8 + opacity: number;
  9 + name: string;
  10 + key: string;
  11 + url: Resource
  12 +}
  13 +
  14 +@Component
  15 +export struct LikeAnimationView {
  16 + @State @Watch('countChange') count: number = 0
  17 + @State imgList: Resource[] =
  18 + [$r('app.media.like_animation_1'), $r('app.media.like_animation_2'), $r('app.media.like_animation_3')]
  19 + @State animationList: animationItem[] = []
  20 +
  21 + countChange() {
  22 + this.animationList.push({
  23 + name: 'xxxx',
  24 + x: 0,
  25 + y: 0,
  26 + opacity: 1,
  27 + key: Math.random() + '',
  28 + url: this.getRandomUrl()
  29 +
  30 + })
  31 + }
  32 +
  33 + getRandomUrl(): Resource {
  34 + if (Math.random() >= 0 && Math.random() >= 0.33) {
  35 + return this.imgList[0]
  36 + } else if (Math.random() >= 0.33 && Math.random() >= 0.66) {
  37 + return this.imgList[1]
  38 + } else {
  39 + return this.imgList[2]
  40 + }
  41 + }
  42 +
  43 + startAnimation() {
  44 +
  45 + }
  46 +
  47 + stopAnimation() {
  48 +
  49 + }
  50 +
  51 + aboutToAppear(): void {
  52 + }
  53 +
  54 + aboutToDisappear(): void {
  55 + }
  56 +
  57 + build() {
  58 + Stack() {
  59 + ForEach(this.animationList, (item: animationItem) => {
  60 + Image(item.url)
  61 + .width(48)
  62 + .height(48)
  63 + }, (item: animationItem) => item.key)
  64 + }
  65 +
  66 + }
  67 +}
1 -import lottie, { AnimationSegment } from '@ohos/lottie'; 1 +import lottie, { AnimationItem, AnimationSegment } from '@ohos/lottie';
2 2
3 @Component 3 @Component
4 export struct LottieView { 4 export struct LottieView {
5 - @Prop name: string = ''  
6 - @Prop path: string = ''  
7 - @Prop lottieWidth?: number = 30  
8 - @Prop lottieHeight?: number = 30  
9 - @Prop autoplay?: boolean = false  
10 - @Prop loop?: boolean = false 5 + @Prop name: string
  6 + @Prop path: string
  7 + @Prop lottieWidth: number = 30
  8 + @Prop lottieHeight: number = 30
  9 + @Prop autoplay: boolean = false
  10 + @Prop loop: boolean = false
11 @Prop initialSegment?: AnimationSegment = [0, 120] // 动画起始帧 11 @Prop initialSegment?: AnimationSegment = [0, 120] // 动画起始帧
12 - @Prop onReady: (animateItem: ESObject) => void // 动画初始化完成事件 12 + @Prop onReady: (animateItem: AnimationItem | null) => void // 动画初始化完成事件
13 @Prop onComplete?: () => void // 动画完成事件 13 @Prop onComplete?: () => void // 动画完成事件
14 - private politeChickyController: CanvasRenderingContext2D = new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象  
15 - private animateItem: ESObject = null; // 初始化loadAnimation接口的返回对象 14 + private politeChickyController: CanvasRenderingContext2D =
  15 + new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象
  16 + private animateItem: AnimationItem | null = null; // 初始化loadAnimation接口的返回对象
16 17
17 // 页面隐藏销毁动画 18 // 页面隐藏销毁动画
18 onPageHide(): void { 19 onPageHide(): void {
19 - this.animateItem.destroy() 20 + this.animateItem?.destroy()
20 21
21 if (this.onComplete) { 22 if (this.onComplete) {
22 - this.animateItem.removeEventListener('complete', this.onComplete) 23 + this.animateItem?.removeEventListener('complete', this.onComplete)
23 } 24 }
24 } 25 }
25 26
@@ -44,7 +45,7 @@ export struct LottieView { @@ -44,7 +45,7 @@ export struct LottieView {
44 // initialSegment: this.initialSegment 45 // initialSegment: this.initialSegment
45 }) 46 })
46 if (this.initialSegment) { 47 if (this.initialSegment) {
47 - this.animateItem.initialSegment = this.initialSegment 48 + this.animateItem.segments = this.initialSegment
48 } 49 }
49 50
50 if (this.onComplete) { 51 if (this.onComplete) {
@@ -57,7 +58,7 @@ export struct LottieView { @@ -57,7 +58,7 @@ export struct LottieView {
57 Stack({ alignContent: Alignment.TopStart }) { 58 Stack({ alignContent: Alignment.TopStart }) {
58 Canvas(this.politeChickyController) 59 Canvas(this.politeChickyController)
59 .width(this.lottieWidth) 60 .width(this.lottieWidth)
60 - .height(this.lottieHeight) 61 + .height(this.lottieHeight)// .backgroundColor(Color.Black)
61 .onReady(() => { 62 .onReady(() => {
62 this.loadAnimation(); 63 this.loadAnimation();
63 if (this.onReady) { 64 if (this.onReady) {
@@ -65,7 +66,7 @@ export struct LottieView { @@ -65,7 +66,7 @@ export struct LottieView {
65 } 66 }
66 }) 67 })
67 .onClick(() => { 68 .onClick(() => {
68 - this.animateItem.play() 69 + this.animateItem?.play()
69 }) 70 })
70 } 71 }
71 } 72 }
1 import { WDRouterRule, WDRouterPage } from 'wdRouter' 1 import { WDRouterRule, WDRouterPage } from 'wdRouter'
2 import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem' 2 import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem'
  3 +import { PagePersonFunction } from './PagePersonFunction'
3 4
4 @Component 5 @Component
5 export default struct MinePagePersonFunctionUI { 6 export default struct MinePagePersonFunctionUI {
@@ -10,30 +11,7 @@ export default struct MinePagePersonFunctionUI { @@ -10,30 +11,7 @@ export default struct MinePagePersonFunctionUI {
10 Grid(){ 11 Grid(){
11 ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{ 12 ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{
12 GridItem(){ 13 GridItem(){
13 - Row(){  
14 - Column(){  
15 - Image(item.imgSrc)  
16 - .width('46lpx')  
17 - .height('46lpx')  
18 - .objectFit(ImageFit.Auto)  
19 - .interpolation(ImageInterpolation.High)  
20 - Text(`${item.msg}`)  
21 - .margin({top:'8lpx'})  
22 - .height('23lpx')  
23 - .fontColor($r('app.color.color_222222'))  
24 - .fontSize('23lpx')  
25 - }  
26 - .alignItems(HorizontalAlign.Center)  
27 - .width('100%')  
28 - Blank()  
29 - .layoutWeight(1)  
30 - if(index % 4 < 3 && index != this.personalData.length-1){  
31 - Text().backgroundColor($r('app.color.color_222222'))  
32 - .opacity(0.1)  
33 - .width('2lpx')  
34 - .height('29lpx')  
35 - }  
36 - } 14 + PagePersonFunction({ item: item, noDivider : (index % 4 < 3 && index != this.personalData.length-1) ? false : true})
37 }.onClick(()=>{ 15 }.onClick(()=>{
38 console.log(index+"") 16 console.log(index+"")
39 switch (item.msg){ 17 switch (item.msg){
@@ -97,4 +75,5 @@ export default struct MinePagePersonFunctionUI { @@ -97,4 +75,5 @@ export default struct MinePagePersonFunctionUI {
97 .height('234lpx') 75 .height('234lpx')
98 .margin({top:'31lpx',left:'23lpx',right:'23lpx' }) 76 .margin({top:'31lpx',left:'23lpx',right:'23lpx' })
99 } 77 }
100 -}  
  78 +}
  79 +
  1 +import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem'
  2 +
  3 +@Component
  4 +export struct PagePersonFunction{
  5 + @ObjectLink item: MinePagePersonalFunctionsItem
  6 + @State noDivider:boolean = false
  7 +
  8 + build() {
  9 + Row(){
  10 + Column(){
  11 + Stack({ alignContent: Alignment.TopEnd }){
  12 + Image(this.item.imgSrc)
  13 + .objectFit(ImageFit.Auto)
  14 + .interpolation(ImageInterpolation.High)
  15 + if (this.item.isShowRedPoint) {
  16 + Button()
  17 + .type(ButtonType.Circle)
  18 + .width("12lpx")
  19 + .height("12lpx")
  20 + .backgroundColor($r('app.color.color_ED2800'))
  21 + }
  22 + }.width('46lpx')
  23 + .height('46lpx')
  24 +
  25 + Text(`${this.item.msg}`)
  26 + .margin({top:'8lpx'})
  27 + .height('23lpx')
  28 + .fontColor($r('app.color.color_222222'))
  29 + .fontSize('23lpx')
  30 + }
  31 + .alignItems(HorizontalAlign.Center)
  32 + .width('100%')
  33 + Blank()
  34 + .layoutWeight(1)
  35 + if(!this.noDivider){
  36 + Text().backgroundColor($r('app.color.color_222222'))
  37 + .opacity(0.1)
  38 + .width('2lpx')
  39 + .height('29lpx')
  40 + }
  41 + }
  42 + }
  43 +
  44 +}
1 import { SpConstants } from 'wdConstant/Index' 1 import { SpConstants } from 'wdConstant/Index'
2 -import { DateTimeUtils, SPHelper, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index' 2 +import { SPHelper, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index'
3 import { HttpUtils } from 'wdNetwork/Index' 3 import { HttpUtils } from 'wdNetwork/Index'
4 import { WDRouterRule, WDRouterPage } from 'wdRouter/Index' 4 import { WDRouterRule, WDRouterPage } from 'wdRouter/Index'
5 import MinePageDatasModel from '../../../model/MinePageDatasModel' 5 import MinePageDatasModel from '../../../model/MinePageDatasModel'
@@ -116,9 +116,14 @@ export struct FollowChildComponent{ @@ -116,9 +116,14 @@ export struct FollowChildComponent{
116 }.height('202lpx') 116 }.height('202lpx')
117 .justifyContent(FlexAlign.Start) 117 .justifyContent(FlexAlign.Start)
118 118
119 - Text().backgroundColor($r('app.color.color_EDEDED')) 119 + // Text().backgroundColor($r('app.color.color_EDEDED'))
  120 + // .width('100%')
  121 + // .height('2lpx')
  122 + Divider()
120 .width('100%') 123 .width('100%')
121 .height('2lpx') 124 .height('2lpx')
  125 + .color($r('app.color.color_F5F5F5'))
  126 + .strokeWidth('1lpx')
122 }.width('100%') 127 }.width('100%')
123 128
124 }else { 129 }else {
@@ -230,9 +235,15 @@ export struct FollowChildComponent{ @@ -230,9 +235,15 @@ export struct FollowChildComponent{
230 }.height('146lpx') 235 }.height('146lpx')
231 .justifyContent(FlexAlign.Center) 236 .justifyContent(FlexAlign.Center)
232 237
233 - Text().backgroundColor($r('app.color.color_EDEDED')) 238 + // Text().backgroundColor($r('app.color.color_EDEDED'))
  239 + // .width('100%')
  240 + // .height('2lpx')
  241 +
  242 + Divider()
234 .width('100%') 243 .width('100%')
235 .height('2lpx') 244 .height('2lpx')
  245 + .color($r('app.color.color_F5F5F5'))
  246 + .strokeWidth('1lpx')
236 }.width('100%') 247 }.width('100%')
237 248
238 } 249 }
@@ -255,12 +266,6 @@ export struct FollowChildComponent{ @@ -255,12 +266,6 @@ export struct FollowChildComponent{
255 this.data.status = this.data.status ==="0"?"1":"0" 266 this.data.status = this.data.status ==="0"?"1":"0"
256 267
257 UserDataLocal.setUserFollowOperation(this.data.creatorId+","+this.data.status) 268 UserDataLocal.setUserFollowOperation(this.data.creatorId+","+this.data.status)
258 -  
259 - // if(this.data.status === "1"){  
260 - // UserDataLocal.setUserFollowOperation(DateTimeUtils.getTimeStamp()+"")  
261 - // }else{  
262 - // UserDataLocal.setUserFollowOperation(DateTimeUtils.getTimeStamp()+","+this.data.creatorId)  
263 - // }  
264 } 269 }
265 } 270 }
266 }) 271 })
1 import { StringUtils, ToastUtils } from 'wdKit/Index' 1 import { StringUtils, ToastUtils } from 'wdKit/Index'
  2 +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
2 import MinePageDatasModel from '../../../model/MinePageDatasModel' 3 import MinePageDatasModel from '../../../model/MinePageDatasModel'
3 import { MessageItem } from '../../../viewmodel/MessageItem' 4 import { MessageItem } from '../../../viewmodel/MessageItem'
4 import { CustomTitleUI } from '../../reusable/CustomTitleUI' 5 import { CustomTitleUI } from '../../reusable/CustomTitleUI'
@@ -86,6 +87,7 @@ export struct MessageListUI { @@ -86,6 +87,7 @@ export struct MessageListUI {
86 ToastUtils.shortToast(index+"") 87 ToastUtils.shortToast(index+"")
87 switch (index) { 88 switch (index) {
88 case 0: //互动消息 89 case 0: //互动消息
  90 + WDRouterRule.jumpWithPage(WDRouterPage.interactMessagePage)
89 break; 91 break;
90 case 1: //预约消息 92 case 1: //预约消息
91 break; 93 break;
@@ -85,6 +85,7 @@ export struct BottomNavigationComponent { @@ -85,6 +85,7 @@ export struct BottomNavigationComponent {
85 VideoChannelPage({ 85 VideoChannelPage({
86 topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073), 86 topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),
87 _currentNavIndex: $currentNavIndex, 87 _currentNavIndex: $currentNavIndex,
  88 + autoRefresh: this.autoRefresh
88 }) 89 })
89 } else { 90 } else {
90 TopNavigationComponent({ 91 TopNavigationComponent({
1 1
2 -import MyCollectionViewModel from '../../viewmodel/MyCollectionViewModel'; 2 +import InteractMessageViewModel from '../../viewmodel/InteractMessageViewModel';
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,WDViewDefaultType } from '../view/EmptyComponent' 5 import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'
6 import { ContentDTO } from 'wdBean' 6 import { ContentDTO } from 'wdBean'
7 import NoMoreLayout from './NoMoreLayout' 7 import NoMoreLayout from './NoMoreLayout'
8 -import CustomRefreshLoadLayout from './CustomRefreshLoadLayout';  
9 -import { CustomSelectUI } from '../view/CustomSelectUI';  
10 -import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI';  
11 -import { BigPicCardComponent } from '../view/BigPicCardComponent';  
12 -  
13 import { CustomTitleUI } from '../reusable/CustomTitleUI'; 8 import { CustomTitleUI } from '../reusable/CustomTitleUI';
14 -import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';  
15 import { InteractMComponent } from '../InteractMessage/InteractMComponent'; 9 import { InteractMComponent } from '../InteractMessage/InteractMComponent';
  10 +import { InteractMessageModel, WDMessageCenterMessageType } from '../../model/InteractMessageModel';
  11 +import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';
16 12
17 @Entry 13 @Entry
18 @Component 14 @Component
@@ -20,39 +16,40 @@ struct InteractMessagePage { @@ -20,39 +16,40 @@ struct InteractMessagePage {
20 @State private browSingModel: PageModel = new PageModel() 16 @State private browSingModel: PageModel = new PageModel()
21 isloading : boolean = false 17 isloading : boolean = false
22 @Provide isEditState:boolean = false 18 @Provide isEditState:boolean = false
23 - @State allDatas :ContentDTO[] = []; 19 + @State allDatas :InteractMessageModel[] = [];
24 private scroller: Scroller = new Scroller(); 20 private scroller: Scroller = new Scroller();
25 - @State likeNum: number = 20 21 + @State likeNum: number = 0
  22 + @State currentPage: number = 1;
26 23
27 aboutToAppear(){ 24 aboutToAppear(){
28 this.getData() 25 this.getData()
  26 + this.getMessageLikeCount()
29 } 27 }
30 28
31 build() { 29 build() {
32 Column(){ 30 Column(){
33 CustomTitleUI({titleName:'互动消息'}) 31 CustomTitleUI({titleName:'互动消息'})
34 - this.ListLayout()  
35 - // if(this.browSingModel.viewType == ViewType.ERROR){  
36 - // EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NetworkFailed})  
37 - // }else if(this.browSingModel.viewType == ViewType.EMPTY){  
38 - // EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoHistory})  
39 - // }else {  
40 - // CustomPullToRefresh({  
41 - // alldata:this.allDatas,  
42 - // scroller:this.scroller,  
43 - // customList:()=>{  
44 - // this.ListLayout()  
45 - // },  
46 - // onRefresh:(resolve)=>{  
47 - // this.browSingModel.currentPage = 0  
48 - // this.getData(resolve)  
49 - // },  
50 - // onLoadMore:(resolve)=> {  
51 - // this.browSingModel.currentPage++  
52 - // this.getData()  
53 - // }  
54 - // })  
55 - // } 32 + if(this.browSingModel.viewType == ViewType.ERROR){
  33 + EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NetworkFailed})
  34 + }else if(this.browSingModel.viewType == ViewType.EMPTY){
  35 + EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoHistory})
  36 + }else {
  37 + CustomPullToRefresh({
  38 + alldata:this.allDatas,
  39 + scroller:this.scroller,
  40 + customList:()=>{
  41 + this.ListLayout()
  42 + },
  43 + onRefresh:(resolve)=>{
  44 + this.browSingModel.currentPage = 0
  45 + this.getData(resolve)
  46 + },
  47 + onLoadMore:(resolve)=> {
  48 + this.browSingModel.currentPage++
  49 + this.getData()
  50 + }
  51 + })
  52 + }
56 53
57 } 54 }
58 .width(CommonConstants.FULL_WIDTH) 55 .width(CommonConstants.FULL_WIDTH)
@@ -66,9 +63,9 @@ struct InteractMessagePage { @@ -66,9 +63,9 @@ struct InteractMessagePage {
66 } 63 }
67 64
68 // 下拉刷新 65 // 下拉刷新
69 - ForEach(this.allDatas, (compDTO: ContentDTO, compIndex: number) => { 66 + ForEach(this.allDatas, (InteractM: InteractMessageModel, compIndex: number) => {
70 ListItem() { 67 ListItem() {
71 - InteractMComponent() 68 + InteractMComponent({messageModel:InteractM})
72 } 69 }
73 }) 70 })
74 // 加载更多 71 // 加载更多
@@ -112,12 +109,22 @@ struct InteractMessagePage { @@ -112,12 +109,22 @@ struct InteractMessagePage {
112 } 109 }
113 110
114 async getData(resolve?: (value: string | PromiseLike<string>) => void){ 111 async getData(resolve?: (value: string | PromiseLike<string>) => void){
115 - MyCollectionViewModel.fetchMyCollectList(2,'1',this.browSingModel.currentPage,getContext(this)).then(collectionItem => { 112 + InteractMessageViewModel.fetchMessageList(WDMessageCenterMessageType.WDMessageCenterMessageType_Interact,this.currentPage).then(InteractMessageMItem => {
116 if(resolve) resolve('刷新成功') 113 if(resolve) resolve('刷新成功')
117 - if (collectionItem && collectionItem.list && collectionItem.list.length > 0) { 114 + if (InteractMessageMItem && InteractMessageMItem.list && InteractMessageMItem.list.length > 0) {
118 this.browSingModel.viewType = ViewType.LOADED; 115 this.browSingModel.viewType = ViewType.LOADED;
119 - this.allDatas.push(...collectionItem.list)  
120 - if (collectionItem.list.length === this.browSingModel.pageSize) { 116 +
  117 + if (this.currentPage === 1) {
  118 + this.allDatas = []
  119 + }
  120 +
  121 + for (let index = 0; index < InteractMessageMItem.list.length; index++) {
  122 + const element = InteractMessageMItem.list[index];
  123 + element.InteractMsubM = JSON.parse(element.remark)
  124 + }
  125 +
  126 + this.allDatas.push(...InteractMessageMItem.list)
  127 + if (InteractMessageMItem.list.length === this.browSingModel.pageSize) {
121 this.browSingModel.currentPage++; 128 this.browSingModel.currentPage++;
122 this.browSingModel.hasMore = true; 129 this.browSingModel.hasMore = true;
123 } else { 130 } else {
@@ -129,4 +136,11 @@ struct InteractMessagePage { @@ -129,4 +136,11 @@ struct InteractMessagePage {
129 }) 136 })
130 } 137 }
131 138
  139 + async getMessageLikeCount(){
  140 + InteractMessageViewModel.getMessageLikeCount().then(num => {
  141 + this.likeNum = num
  142 + })
  143 + }
  144 +
  145 +
132 } 146 }
@@ -53,8 +53,25 @@ export struct MinePageComponent { @@ -53,8 +53,25 @@ export struct MinePageComponent {
53 this.getUserLogin() 53 this.getUserLogin()
54 this.getFunctionData() 54 this.getFunctionData()
55 this.addLoginStatusObserver() 55 this.addLoginStatusObserver()
  56 + this.getMessageData()
56 } 57 }
57 58
  59 + getMessageData(){
  60 + MinePageDatasModel.getMessageUnReadData().then((value) => {
  61 + if(value !=null) {
  62 + if(value.activeCount >0 ||value.subscribeCount > 0 || value.systemCount > 0){
  63 + this.personalData.forEach((value) => {
  64 + if(value.msg == "消息")
  65 + value.isShowRedPoint = true
  66 + })
  67 + }
  68 + }
  69 + }).catch((err: Error) => {
  70 + console.log(TAG, JSON.stringify(err))
  71 + })
  72 + }
  73 +
  74 +
58 async addLoginStatusObserver(){ 75 async addLoginStatusObserver(){
59 this.preferences = await SPHelper.default.getPreferences(); 76 this.preferences = await SPHelper.default.getPreferences();
60 this.preferences.on('change', this.observer); 77 this.preferences.on('change', this.observer);
@@ -21,6 +21,7 @@ const TAG = 'PageComponent'; @@ -21,6 +21,7 @@ const TAG = 'PageComponent';
21 export struct PageComponent { 21 export struct PageComponent {
22 @State private pageModel: PageModel = new PageModel(); 22 @State private pageModel: PageModel = new PageModel();
23 @State private pageAdvModel: PageAdModel = new PageAdModel(); 23 @State private pageAdvModel: PageAdModel = new PageAdModel();
  24 + @State timer: number = -1
24 navIndex: number = 0; 25 navIndex: number = 0;
25 pageId: string = ""; 26 pageId: string = "";
26 channelId: string = ""; 27 channelId: string = "";
@@ -29,6 +30,7 @@ export struct PageComponent { @@ -29,6 +30,7 @@ export struct PageComponent {
29 @Prop @Watch('onAutoRefresh') autoRefresh: number = 0 30 @Prop @Watch('onAutoRefresh') autoRefresh: number = 0
30 private listScroller: Scroller = new Scroller(); 31 private listScroller: Scroller = new Scroller();
31 needload: boolean = true; 32 needload: boolean = true;
  33 +
32 build() { 34 build() {
33 Column() { 35 Column() {
34 if (this.pageModel.viewType == ViewType.LOADING) { 36 if (this.pageModel.viewType == ViewType.LOADING) {
@@ -222,9 +224,10 @@ export struct PageComponent { @@ -222,9 +224,10 @@ export struct PageComponent {
222 } 224 }
223 225
224 onChange() { 226 onChange() {
225 - Logger.info(TAG, `onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`); 227 + Logger.info(TAG,
  228 + `onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`);
226 if (this.navIndex === this.currentTopNavSelectedIndex) { 229 if (this.navIndex === this.currentTopNavSelectedIndex) {
227 - if(this.needload){ 230 + if (this.needload) {
228 this.getData(); 231 this.getData();
229 } 232 }
230 this.needload = false; 233 this.needload = false;
@@ -242,13 +245,19 @@ export struct PageComponent { @@ -242,13 +245,19 @@ export struct PageComponent {
242 } 245 }
243 246
244 async getData() { 247 async getData() {
245 - Logger.info(TAG, `getData id: ${this.pageId} , ${this.channelId} , navIndex: ${this.currentTopNavSelectedIndex}`);  
246 - this.pageModel.pageId = this.pageId;  
247 - this.pageModel.groupId = this.pageId;  
248 - this.pageModel.channelId = this.channelId;  
249 - this.pageModel.currentPage = 1;  
250 - this.pageModel.pageTotalCompSize = 0;  
251 - PageHelper.getInitData(this.pageModel, this.pageAdvModel) 248 + if (this.timer) {
  249 + clearTimeout(this.timer)
  250 + }
  251 + this.timer = setTimeout(() => {
  252 + Logger.info(TAG, `getData id: ${this.pageId} , ${this.channelId} , navIndex: ${this.currentTopNavSelectedIndex}`);
  253 + this.pageModel.pageId = this.pageId;
  254 + this.pageModel.groupId = this.pageId;
  255 + this.pageModel.channelId = this.channelId;
  256 + this.pageModel.currentPage = 1;
  257 + this.pageModel.pageTotalCompSize = 0;
  258 + PageHelper.getInitData(this.pageModel, this.pageAdvModel)
  259 + }, 100)
  260 +
252 } 261 }
253 } 262 }
254 263
@@ -13,6 +13,7 @@ import { @@ -13,6 +13,7 @@ import {
13 PeopleShipUserDetailData, 13 PeopleShipUserDetailData,
14 ArticleCountData 14 ArticleCountData
15 } from 'wdBean' 15 } from 'wdBean'
  16 +import { EmptyComponent } from '../view/EmptyComponent'
16 17
17 @Entry 18 @Entry
18 @Component 19 @Component
@@ -35,65 +36,87 @@ struct PeopleShipHomePage { @@ -35,65 +36,87 @@ struct PeopleShipHomePage {
35 @Provide @Watch('handleChangeAttentionStata') isLoadingAttention: boolean = false 36 @Provide @Watch('handleChangeAttentionStata') isLoadingAttention: boolean = false
36 //关注显示 37 //关注显示
37 @State attentionOpacity: boolean = false 38 @State attentionOpacity: boolean = false
38 - @Provide topHeight: number = 400 39 + @Provide topHeight: number = 286
  40 + @State isLoading: boolean = true
39 41
40 build() { 42 build() {
41 -  
42 - Stack({ alignContent: Alignment.TopStart }) {  
43 - // 头部返回  
44 - PeopleShipHomePageNavComponent({  
45 - attentionOpacity: this.attentionOpacity,  
46 - topOpacity: this.topOpacity,  
47 - detailModel: this.detailModel  
48 - })  
49 - .height($r('app.float.top_bar_height'))  
50 - .zIndex(100)  
51 - .backgroundColor(Color.Transparent)  
52 -  
53 - if (this.detailModel && this.detailModel.userName) {  
54 - Scroll(this.scroller) {  
55 - Column() {  
56 - // 顶部相关  
57 - PeopleShipHomePageTopComponent({  
58 - creatorId: this.creatorId,  
59 - detailModel: this.detailModel,  
60 - publishCount: this.publishCount,  
61 - topHeight: this.topHeight  
62 - }) 43 + Stack({ alignContent: Alignment.TopStart }) {
  44 + // 顶部图片
  45 + Image($r('app.media.home_page_bg'))
  46 + .width('100%')
  47 + .height('120vp')
  48 + .objectFit(ImageFit.Fill)
  49 + .backgroundColor(Color.White)
  50 + .visibility(this.isLoading ? Visibility.None : Visibility.Visible)
  51 +
  52 + Column(){
  53 + // 头部返回
  54 + PeopleShipHomePageNavComponent({
  55 + attentionOpacity: this.attentionOpacity,
  56 + topOpacity: this.topOpacity,
  57 + detailModel: this.detailModel
  58 + })
  59 + .height($r('app.float.top_bar_height'))
  60 + .backgroundColor(Color.Transparent)
  61 + if (this.detailModel && this.detailModel.userName) {
  62 + Scroll(this.scroller) {
  63 + Column() {
  64 + // 顶部相关
  65 + PeopleShipHomePageTopComponent({
  66 + creatorId: this.creatorId,
  67 + detailModel: this.detailModel,
  68 + publishCount: this.publishCount,
  69 + topHeight: this.topHeight
  70 + })
  71 + .width("100%")
  72 + .height(this.topHeight)
  73 + // 列表
  74 + Column(){
  75 + PeopleShipHomeListComponent({
  76 + publishCount: this.publishCount,
  77 + creatorId: this.creatorId
  78 + })
  79 + }.height('100%')
  80 +
  81 +
  82 + }
63 .width("100%") 83 .width("100%")
64 - .height(this.topHeight) 84 + .justifyContent(FlexAlign.Start)
  85 + .alignItems(HorizontalAlign.Start)
  86 + // .height('100%')
  87 + // .height(this.publishCount == 0 ? '100%' : '')
  88 + }
  89 + .scrollable(ScrollDirection.Vertical)
  90 + // .alignSelf(ItemAlign.Start)
  91 + // .align(Alignment.Start)
  92 + .edgeEffect(EdgeEffect.None)
  93 + .friction(0.7)
  94 + .backgroundColor(Color.White)
  95 + .scrollBar(BarState.Off)
  96 + .width('100%')
  97 + .height('calc(100% - 44vp)')
  98 + // .layoutWeight(1)
  99 + .onDidScroll(() => {
  100 + // this.topOpacity = yOffset / (this.getDeviceHeight() * 0.2)
  101 + this.topOpacity = this.scroller.currentOffset().yOffset / 100
  102 + if (this.scroller.currentOffset().yOffset >= this.topHeight - 66) {
  103 + this.attentionOpacity = true
  104 + } else {
  105 + this.attentionOpacity = false
  106 + }
  107 + Logger.debug('PeopleShipHomePage',`透明度:${this.topOpacity}`)
65 108
66 - // 列表  
67 - PeopleShipHomeListComponent({  
68 - publishCount: this.publishCount,  
69 - creatorId: this.creatorId  
70 }) 109 })
71 -  
72 } 110 }
73 - .width("100%")  
74 - .justifyContent(FlexAlign.Start)  
75 - // .height(this.publishCount == 0 ? '100%' : '') 111 +
76 } 112 }
77 - .edgeEffect(EdgeEffect.None)  
78 - .friction(0.6)  
79 - .backgroundColor(Color.White)  
80 - .scrollBar(BarState.Off) 113 + .alignItems(HorizontalAlign.Start)
  114 + .justifyContent(FlexAlign.Start)
81 .width('100%') 115 .width('100%')
82 - .height('100%')  
83 - .onDidScroll(() => {  
84 - // this.topOpacity = yOffset / (this.getDeviceHeight() * 0.2)  
85 - this.topOpacity = this.scroller.currentOffset().yOffset / 100  
86 - if (this.scroller.currentOffset().yOffset >= this.topHeight - 66) {  
87 - this.attentionOpacity = true  
88 - } else {  
89 - this.attentionOpacity = false  
90 - }  
91 - Logger.debug('PeopleShipHomePage',`透明度:${this.topOpacity}`)  
92 -  
93 - }) 116 + // .height('100%')
94 } 117 }
95 -  
96 - } 118 + // .height('100%')
  119 + .width('100%')
97 120
98 } 121 }
99 122
@@ -104,9 +127,11 @@ struct PeopleShipHomePage { @@ -104,9 +127,11 @@ struct PeopleShipHomePage {
104 127
105 private async getData() { 128 private async getData() {
106 try { 129 try {
  130 + this.isLoading = true
107 // 获取页面信息 131 // 获取页面信息
108 this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '') 132 this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '')
109 Logger.debug('PeopleShipHomePage', '获取页面信息' + `${JSON.stringify(this.detailModel)}`) 133 Logger.debug('PeopleShipHomePage', '获取页面信息' + `${JSON.stringify(this.detailModel)}`)
  134 + this.isLoading = false
110 135
111 // 获取关注 136 // 获取关注
112 // 登录后获取,是否关注 137 // 登录后获取,是否关注
@@ -117,7 +142,7 @@ struct PeopleShipHomePage { @@ -117,7 +142,7 @@ struct PeopleShipHomePage {
117 } 142 }
118 143
119 } catch (exception) { 144 } catch (exception) {
120 - 145 + this.isLoading = false
121 } 146 }
122 } 147 }
123 148
  1 +import { insightIntent } from '@kit.IntentsKit';
1 import { BottomNavDTO, CompDTO, TopNavDTO } from 'wdBean'; 2 import { BottomNavDTO, CompDTO, TopNavDTO } from 'wdBean';
2 import { SpConstants } from 'wdConstant'; 3 import { SpConstants } from 'wdConstant';
3 -import { DisplayUtils, LazyDataSource, Logger, SPHelper, NetworkUtil, ToastUtils } from 'wdKit'; 4 +import { DisplayUtils, LazyDataSource, Logger, NetworkUtil, SPHelper, ToastUtils } from 'wdKit';
4 import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter'; 5 import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter';
5 import { PageComponent } from './PageComponent'; 6 import { PageComponent } from './PageComponent';
6 import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout'; 7 import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout';
@@ -8,6 +9,7 @@ import { FirstTabTopSearchComponent } from '../search/FirstTabTopSearchComponent @@ -8,6 +9,7 @@ import { FirstTabTopSearchComponent } from '../search/FirstTabTopSearchComponent
8 import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils'; 9 import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils';
9 import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent'; 10 import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent';
10 import { channelSkeleton } from '../skeleton/channelSkeleton'; 11 import { channelSkeleton } from '../skeleton/channelSkeleton';
  12 +import { common } from '@kit.AbilityKit';
11 13
12 14
13 const TAG = 'TopNavigationComponent'; 15 const TAG = 'TopNavigationComponent';
@@ -37,6 +39,7 @@ export struct TopNavigationComponent { @@ -37,6 +39,7 @@ export struct TopNavigationComponent {
37 // 顶导当前选中/焦点下标 39 // 顶导当前选中/焦点下标
38 @State currentTopNavSelectedIndex: number = 0; 40 @State currentTopNavSelectedIndex: number = 0;
39 @State currentTopNavName: string = ''; 41 @State currentTopNavName: string = '';
  42 + @State currentTopNavItem: TopNavDTO = {} as TopNavDTO
40 // 顶导数据 43 // 顶导数据
41 @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = [] 44 @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = []
42 @State compList: LazyDataSource<CompDTO> = new LazyDataSource(); 45 @State compList: LazyDataSource<CompDTO> = new LazyDataSource();
@@ -58,6 +61,8 @@ export struct TopNavigationComponent { @@ -58,6 +61,8 @@ export struct TopNavigationComponent {
58 @Prop @Watch('onAutoRefresh') autoRefresh: number = 0 61 @Prop @Watch('onAutoRefresh') autoRefresh: number = 0
59 // 传递给page的自动刷新通知 62 // 传递给page的自动刷新通知
60 @State autoRefresh2Page: number = 0 63 @State autoRefresh2Page: number = 0
  64 + //保存当前导航选中时的时间戳 意图开始时间
  65 + @State executedStartTime: number = new Date().getTime()
61 // 当前底导index 66 // 当前底导index
62 @State navIndex: number = 0 67 @State navIndex: number = 0
63 @State animationDuration: number = 0 68 @State animationDuration: number = 0
@@ -167,6 +172,7 @@ export struct TopNavigationComponent { @@ -167,6 +172,7 @@ export struct TopNavigationComponent {
167 this.currentTopNavSelectedIndex = index 172 this.currentTopNavSelectedIndex = index
168 this.currentTopNavName = this.myChannelList[index].name 173 this.currentTopNavName = this.myChannelList[index].name
169 } 174 }
  175 + this.currentTopNavItem = this.myChannelList[this.currentTopNavSelectedIndex]
170 } 176 }
171 177
172 isBroadcast(item: TopNavDTO) { 178 isBroadcast(item: TopNavDTO) {
@@ -184,6 +190,49 @@ export struct TopNavigationComponent { @@ -184,6 +190,49 @@ export struct TopNavigationComponent {
184 return item.channelType === 3 190 return item.channelType === 3
185 } 191 }
186 192
  193 + //意图共享
  194 + topNavInsightIntentShare(item: TopNavDTO){
  195 + let tapNavIntent: insightIntent.InsightIntent = {
  196 + intentName: 'ViewColumn',
  197 + intentVersion: '1.0.1',
  198 + identifier: '52dac3b0-6520-4974-81e5-25f0879449b5',
  199 + intentActionInfo: {
  200 + actionMode: 'EXPECTED',
  201 + currentPercentage: 50,
  202 + executedTimeSlots: {
  203 + executedEndTime: new Date().getTime(),
  204 + executedStartTime: this.executedStartTime
  205 + }
  206 + },
  207 + intentEntityInfo: {
  208 + entityName: 'ViewColumn',
  209 + entityId: String(item.pageId) || '',
  210 + displayName: item.name,
  211 + logoURL: 'https://www-file.huawei.com/-/media/corporate/images/home/logo/huawei_logo.png',
  212 + rankingHint: 99,
  213 + isPublicData: true
  214 + }
  215 + }
  216 +
  217 + try {
  218 + let context = getContext(this) as common.UIAbilityContext;
  219 + // 共享数据
  220 + insightIntent.shareIntent(context, [tapNavIntent], (error) => {
  221 + if (error?.code) {
  222 + // 处理业务逻辑错误
  223 + console.error(`shareIntent failed, error.code: ${error?.code}, error.message: ${error?.message}`);
  224 + return;
  225 + }
  226 + // 执行正常业务
  227 + console.log('shareIntent succeed');
  228 + });
  229 + } catch (error) {
  230 + // 处理异常
  231 + console.error(`error.code: ${error?.code}, error.message: ${error?.message}`);
  232 + }
  233 + }
  234 +
  235 +
187 build() { 236 build() {
188 Column() { 237 Column() {
189 // 顶部搜索、日报logo、早晚报 238 // 顶部搜索、日报logo、早晚报
@@ -278,7 +327,11 @@ export struct TopNavigationComponent { @@ -278,7 +327,11 @@ export struct TopNavigationComponent {
278 if (!this.isBroadcast(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index]) && 327 if (!this.isBroadcast(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index]) &&
279 !this.isLayout(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index]) 328 !this.isLayout(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index])
280 ) { 329 ) {
  330 + //在 tab 切换之前意图共享
  331 + // this.topNavInsightIntentShare(this.currentTopNavItem)
  332 +
281 this.currentTopNavSelectedIndex = index; 333 this.currentTopNavSelectedIndex = index;
  334 + this.currentTopNavItem = this.myChannelList[index]
282 } 335 }
283 if (this.isBroadcast(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index])) { 336 if (this.isBroadcast(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index])) {
284 // 跳转到播报页面 337 // 跳转到播报页面
@@ -416,9 +469,11 @@ export struct TopNavigationComponent { @@ -416,9 +469,11 @@ export struct TopNavigationComponent {
416 this.changeByClick = true 469 this.changeByClick = true
417 this.tabsController.changeIndex(index) 470 this.tabsController.changeIndex(index)
418 } 471 }
  472 +
419 }) 473 })
420 } 474 }
421 475
  476 +
422 aboutToAppear() { 477 aboutToAppear() {
423 //处理新闻tab顶导频道数据 478 //处理新闻tab顶导频道数据
424 this.topNavListHandle() 479 this.topNavListHandle()
@@ -13,6 +13,8 @@ export struct VideoChannelPage { @@ -13,6 +13,8 @@ export struct VideoChannelPage {
13 readonly MAX_LINE: number = 1; 13 readonly MAX_LINE: number = 1;
14 private groupId: number = 0 14 private groupId: number = 0
15 private swiperController: SwiperController = new SwiperController() 15 private swiperController: SwiperController = new SwiperController()
  16 + // 自动刷新触发(双击tab自动刷新)
  17 + @Prop autoRefresh: number = 0
16 @Prop topNavList: TopNavDTO[] 18 @Prop topNavList: TopNavDTO[]
17 @Link _currentNavIndex?: number; 19 @Link _currentNavIndex?: number;
18 @Consume barBackgroundColor: Color 20 @Consume barBackgroundColor: Color
@@ -91,8 +93,12 @@ export struct VideoChannelPage { @@ -91,8 +93,12 @@ export struct VideoChannelPage {
91 right: $r('app.float.top_tab_item_padding_horizontal'), 93 right: $r('app.float.top_tab_item_padding_horizontal'),
92 }) 94 })
93 .onClick(() => { 95 .onClick(() => {
  96 + if (this.currentTopNavSelectedIndex === index) {
  97 + this.autoRefresh++
  98 + }
94 this.currentTopNavSelectedIndex = index 99 this.currentTopNavSelectedIndex = index
95 this.swiperController.changeIndex(index, true) 100 this.swiperController.changeIndex(index, true)
  101 +
96 }) 102 })
97 }, (item: TopNavDTO) => item.channelId + '') 103 }, (item: TopNavDTO) => item.channelId + '')
98 } 104 }
@@ -113,6 +119,7 @@ export struct VideoChannelPage { @@ -113,6 +119,7 @@ export struct VideoChannelPage {
113 groupId: this.groupId + '', 119 groupId: this.groupId + '',
114 pageId: item.pageId + '', 120 pageId: item.pageId + '',
115 channelId: item.channelId + '', 121 channelId: item.channelId + '',
  122 + autoRefresh: this.autoRefresh,
116 }) 123 })
117 } else { 124 } else {
118 // 直播 125 // 直播
@@ -121,7 +128,7 @@ export struct VideoChannelPage { @@ -121,7 +128,7 @@ export struct VideoChannelPage {
121 navIndex: index, 128 navIndex: index,
122 pageId: item.pageId + '', 129 pageId: item.pageId + '',
123 channelId: item.channelId + '', 130 channelId: item.channelId + '',
124 - autoRefresh: this.autoRefresh2Page 131 + autoRefresh: this.autoRefresh
125 }).margin({ top: 40 }) 132 }).margin({ top: 40 })
126 } 133 }
127 }, (item: TopNavDTO) => item.channelId + '') 134 }, (item: TopNavDTO) => item.channelId + '')
1 -import { Logger, DisplayUtils} from 'wdKit' 1 +import { Logger} from 'wdKit'
2 import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel' 2 import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel'
3 import { 3 import {
4 ContentDTO, 4 ContentDTO,
@@ -16,11 +16,11 @@ import { @@ -16,11 +16,11 @@ import {
16 } from 'wdBean' 16 } from 'wdBean'
17 import { CardParser } from '../CardParser' 17 import { CardParser } from '../CardParser'
18 import { PageRepository } from '../../repository/PageRepository' 18 import { PageRepository } from '../../repository/PageRepository'
19 -import { RefreshLayoutBean } from '../page/RefreshLayoutBean'  
20 import CustomRefreshLoadLayout from '../page/CustomRefreshLoadLayout' 19 import CustomRefreshLoadLayout from '../page/CustomRefreshLoadLayout'
21 import { ErrorComponent } from '../view/ErrorComponent' 20 import { ErrorComponent } from '../view/ErrorComponent'
22 import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh' 21 import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh'
23 import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData' 22 import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'
  23 +import LoadMoreLayout from '../page/LoadMoreLayout'
24 24
25 const TAG = 'PeopleShipHomeArticleListComponent'; 25 const TAG = 'PeopleShipHomeArticleListComponent';
26 26
@@ -47,45 +47,29 @@ export struct PeopleShipHomeArticleListComponent { @@ -47,45 +47,29 @@ export struct PeopleShipHomeArticleListComponent {
47 } else if (this.viewType == 2) { 47 } else if (this.viewType == 2) {
48 ErrorComponent() 48 ErrorComponent()
49 } else { 49 } else {
50 - CustomPullToRefresh({  
51 - alldata:this.arr,  
52 - scroller:this.scroller,  
53 - hasMore: this.hasMore,  
54 - customList:()=>{  
55 - this.ListLayout()  
56 - },  
57 - onRefresh:(resolve)=>{  
58 - this.currentPage = 1  
59 - this.getPeopleShipPageArticleList(resolve)  
60 - },  
61 - onLoadMore:(resolve)=> {  
62 - if (this.hasMore === false) {  
63 - if(resolve) {  
64 - resolve('')  
65 - }  
66 - return  
67 - }  
68 - if(!this.isLoading && this.hasMore){  
69 - //加载分页数据  
70 - this.currentPage++;  
71 - this.getPeopleShipPageArticleList(resolve)  
72 - }else {  
73 - if(resolve) {  
74 - resolve('')  
75 - }  
76 - }  
77 - },  
78 - }) 50 + this.ListLayout()
  51 + // CustomPullToRefresh({
  52 + // alldata:this.arr,
  53 + // scroller:this.scroller,
  54 + // hasMore: false,
  55 + // customList:()=>{
  56 + // this.ListLayout()
  57 + // },
  58 + // onRefresh:(resolve)=>{
  59 + // this.currentPage = 1
  60 + // this.getPeopleShipPageArticleList(resolve)
  61 + // },
  62 + // })
79 } 63 }
80 64
81 } 65 }
82 66
83 @Builder 67 @Builder
84 LoadingLayout() { 68 LoadingLayout() {
85 - CustomRefreshLoadLayout({  
86 - refreshBean: new RefreshLayoutBean(true,  
87 - $r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), 20)  
88 - }).height(DisplayUtils.getDeviceHeight() - this.topHeight) 69 + // CustomRefreshLoadLayout({
  70 + // refreshBean: new RefreshLayoutBean(true,
  71 + // $r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), 20)
  72 + // }).height(DisplayUtils.getDeviceHeight() - this.topHeight)
89 } 73 }
90 74
91 @Builder 75 @Builder
@@ -93,7 +77,6 @@ export struct PeopleShipHomeArticleListComponent { @@ -93,7 +77,6 @@ export struct PeopleShipHomeArticleListComponent {
93 77
94 List({scroller: this.scroller}) { 78 List({scroller: this.scroller}) {
95 // 下拉刷新 79 // 下拉刷新
96 -  
97 ForEach(this.arr, (item: ContentDTO) => { 80 ForEach(this.arr, (item: ContentDTO) => {
98 ListItem() { 81 ListItem() {
99 CardParser({ contentDTO: item }) 82 CardParser({ contentDTO: item })
@@ -103,11 +86,14 @@ export struct PeopleShipHomeArticleListComponent { @@ -103,11 +86,14 @@ export struct PeopleShipHomeArticleListComponent {
103 86
104 // 加载更多 87 // 加载更多
105 ListItem() { 88 ListItem() {
106 - if (!this.hasMore && !this.isLoading) { 89 + if (this.hasMore && this.arr && this.arr.length > 0) {
  90 + LoadMoreLayout({ isVisible: this.hasMore })
  91 + } else if (!this.hasMore && !this.isLoading) {
107 PeopleShipNoMoreData() 92 PeopleShipNoMoreData()
108 } 93 }
109 } 94 }
110 } 95 }
  96 + .backgroundColor(Color.Transparent)
111 .width("100%") 97 .width("100%")
112 .height("100%") 98 .height("100%")
113 .edgeEffect(EdgeEffect.None) 99 .edgeEffect(EdgeEffect.None)
@@ -115,13 +101,13 @@ export struct PeopleShipHomeArticleListComponent { @@ -115,13 +101,13 @@ export struct PeopleShipHomeArticleListComponent {
115 scrollForward: NestedScrollMode.PARENT_FIRST, 101 scrollForward: NestedScrollMode.PARENT_FIRST,
116 scrollBackward: NestedScrollMode.SELF_FIRST 102 scrollBackward: NestedScrollMode.SELF_FIRST
117 }) 103 })
118 -  
119 - // .onReachEnd(() => {  
120 - // if(!this.isLoading && this.hasMore){  
121 - // //加载分页数据  
122 - // this.getPeopleShipPageArticleList()  
123 - // }  
124 - // }) 104 + .onReachEnd(() => {
  105 + if(!this.isLoading && this.hasMore){
  106 + //加载分页数据
  107 + this.currentPage++;
  108 + this.getPeopleShipPageArticleList()
  109 + }
  110 + })
125 } 111 }
126 112
127 aboutToAppear() { 113 aboutToAppear() {
@@ -313,7 +299,6 @@ export struct PeopleShipHomeArticleListComponent { @@ -313,7 +299,6 @@ export struct PeopleShipHomeArticleListComponent {
313 } 299 }
314 300
315 } 301 }
316 -  
317 // this.arr = listData.list 302 // this.arr = listData.list
318 } 303 }
319 304
@@ -24,10 +24,10 @@ export struct PeopleShipHomeListComponent { @@ -24,10 +24,10 @@ export struct PeopleShipHomeListComponent {
24 // 列表 24 // 列表
25 else if (this.publishCount == 0) { 25 else if (this.publishCount == 0) {
26 // 无数据展示 26 // 无数据展示
27 - EmptyComponent({emptyType: 12}).height(DisplayUtils.getDeviceHeight() - this.topHeight) 27 + EmptyComponent({emptyType: 12}).height('100%')
28 } else { 28 } else {
29 Column() { 29 Column() {
30 - Column() { 30 + Stack({ alignContent: Alignment.Top }){
31 // 页签 31 // 页签
32 Row() { 32 Row() {
33 Scroll() { 33 Scroll() {
@@ -44,54 +44,54 @@ export struct PeopleShipHomeListComponent { @@ -44,54 +44,54 @@ export struct PeopleShipHomeListComponent {
44 .scrollBar(BarState.Off) 44 .scrollBar(BarState.Off)
45 .width('100%') 45 .width('100%')
46 } 46 }
  47 + .zIndex(10)
47 .backgroundColor(Color.White) 48 .backgroundColor(Color.White)
  49 + .height('44vp')
48 .alignItems(VerticalAlign.Bottom) 50 .alignItems(VerticalAlign.Bottom)
49 .width('100%') 51 .width('100%')
50 - }  
51 - .justifyContent(FlexAlign.Start)  
52 - .height('44vp')  
53 - .alignItems(HorizontalAlign.Start)  
54 - .width('100%')  
55 52
56 - Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {  
57 - ForEach(this.tabArr, (item: ArticleTypeData, index: number) => {  
58 - TabContent() {  
59 - PeopleShipHomeArticleListComponent({  
60 - typeModel: item,  
61 - creatorId: this.creatorId,  
62 - currentTopSelectedIndex: this.currentIndex,  
63 - currentIndex: index  
64 - })  
65 - }  
66 - // }.tabBar(this.tabBuilder(index, item.name ?? '')) 53 + Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
  54 + ForEach(this.tabArr, (item: ArticleTypeData, index: number) => {
  55 + TabContent() {
  56 + PeopleShipHomeArticleListComponent({
  57 + typeModel: item,
  58 + creatorId: this.creatorId,
  59 + currentTopSelectedIndex: this.currentIndex,
  60 + currentIndex: index
  61 + })
  62 + }
  63 + // .tabBar(this.Tab(index, item.name ?? ''))
  64 + })
  65 +
  66 + }
  67 + .backgroundColor(Color.White)
  68 + .barWidth('100%')
  69 + .vertical(false)
  70 + .barHeight('44vp')
  71 + .height('100% ')
  72 + .animationDuration(0)
  73 + .divider({
  74 + strokeWidth: '0.5vp',
  75 + color: $r('app.color.color_F5F5F5'),
  76 + startMargin: 0,
  77 + endMargin: 0
  78 + })
  79 + .onChange((index: number) => {
  80 + this.currentIndex = index
67 }) 81 })
68 82
69 } 83 }
70 - .backgroundColor(Color.White)  
71 - .barWidth('100%')  
72 - .barHeight(0)  
73 - .vertical(false)  
74 - .height(DisplayUtils.getDeviceHeight() - 144)  
75 - .animationDuration(0)  
76 - .divider({  
77 - strokeWidth: '0.5vp',  
78 - color: $r('app.color.color_F5F5F5'),  
79 - startMargin: 0,  
80 - endMargin: 0  
81 - })  
82 - .onChange((index: number) => {  
83 - this.currentIndex = index  
84 - }) 84 +
85 } 85 }
86 } 86 }
87 } 87 }
88 88
89 @Builder 89 @Builder
90 LoadingLayout() { 90 LoadingLayout() {
91 - CustomRefreshLoadLayout({  
92 - refreshBean: new RefreshLayoutBean(true,  
93 - $r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), DisplayUtils.getDeviceHeight() - this.topHeight)  
94 - }).height(DisplayUtils.getDeviceHeight() - this.topHeight) 91 + // CustomRefreshLoadLayout({
  92 + // refreshBean: new RefreshLayoutBean(true,
  93 + // $r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), DisplayUtils.getDeviceHeight() - this.topHeight)
  94 + // }).height('100%')
95 } 95 }
96 96
97 // 单独的页签 97 // 单独的页签
@@ -43,9 +43,8 @@ export struct PeopleShipHomePageNavComponent { @@ -43,9 +43,8 @@ export struct PeopleShipHomePageNavComponent {
43 }).onClick(()=>{ 43 }).onClick(()=>{
44 let params = { 44 let params = {
45 'headPhotoUrl': this.detailModel.headPhotoUrl, 45 'headPhotoUrl': this.detailModel.headPhotoUrl,
46 - 'headType': '1'  
47 } as Record<string, string>; 46 } as Record<string, string>;
48 - WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params) 47 + WDRouterRule.jumpWithPage(WDRouterPage.showHomePageHeaderPage,params)
49 }).margin({ 48 }).margin({
50 left: '10vp', 49 left: '10vp',
51 }) 50 })
@@ -56,9 +56,8 @@ export struct PeopleShipHomePageTopComponent { @@ -56,9 +56,8 @@ export struct PeopleShipHomePageTopComponent {
56 }).onClick(() => { 56 }).onClick(() => {
57 let params = { 57 let params = {
58 'headPhotoUrl': this.detailModel.headPhotoUrl, 58 'headPhotoUrl': this.detailModel.headPhotoUrl,
59 - 'headType': '1'  
60 } as Record<string, string>; 59 } as Record<string, string>;
61 - WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage, params) 60 + WDRouterRule.jumpWithPage(WDRouterPage.showHomePageHeaderPage, params)
62 }) 61 })
63 62
64 63
@@ -369,7 +368,11 @@ export struct PeopleShipHomePageTopComponent { @@ -369,7 +368,11 @@ export struct PeopleShipHomePageTopComponent {
369 368
370 private computeShowNum(count: number) { 369 private computeShowNum(count: number) {
371 if (count >= 10000) { 370 if (count >= 10000) {
372 - return `${(count / 10000).toFixed(1)}万` 371 + let num = ( count / 10000).toFixed(1)
  372 + if (Number(num.substring(num.length-1)) == 0) {
  373 + num = num.substring(0, num.length-2)
  374 + }
  375 + return num + '万'
373 } 376 }
374 return `${count}` 377 return `${count}`
375 } 378 }
@@ -12,6 +12,7 @@ import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'; @@ -12,6 +12,7 @@ import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData';
12 import { HttpUtils } from 'wdNetwork/Index'; 12 import { HttpUtils } from 'wdNetwork/Index';
13 import { WDRouterPage, WDRouterRule } from 'wdRouter' 13 import { WDRouterPage, WDRouterRule } from 'wdRouter'
14 import { LazyDataSource } from 'wdKit/Index'; 14 import { LazyDataSource } from 'wdKit/Index';
  15 +import LoadMoreLayout from '../page/LoadMoreLayout'
15 16
16 const TAG: string = 'ReserveMorePage'; 17 const TAG: string = 'ReserveMorePage';
17 18
@@ -95,7 +96,9 @@ struct ReserveMorePage { @@ -95,7 +96,9 @@ struct ReserveMorePage {
95 ) 96 )
96 // 加载更多 97 // 加载更多
97 ListItem() { 98 ListItem() {
98 - if (!this.hasMore && !this.isLoading) { 99 + if (this.hasMore && this.data && this.data.totalCount() > 0) {
  100 + LoadMoreLayout({ isVisible: this.hasMore })
  101 + } else if (!this.hasMore && !this.isLoading) {
99 PeopleShipNoMoreData() 102 PeopleShipNoMoreData()
100 } 103 }
101 } 104 }
@@ -124,7 +127,7 @@ struct ReserveMorePage { @@ -124,7 +127,7 @@ struct ReserveMorePage {
124 buildItem(item: ContentDTO, index: number) { 127 buildItem(item: ContentDTO, index: number) {
125 Column() { 128 Column() {
126 Stack() { 129 Stack() {
127 - Image(item.fullColumnImgUrls[0].url) 130 + Image(item.fullColumnImgUrls[0]?.url)
128 .width('100%') 131 .width('100%')
129 .height(196) 132 .height(196)
130 .borderRadius(4) 133 .borderRadius(4)
@@ -136,8 +139,9 @@ struct ReserveMorePage { @@ -136,8 +139,9 @@ struct ReserveMorePage {
136 Text(item.newsTitle) 139 Text(item.newsTitle)
137 .fontSize(17) 140 .fontSize(17)
138 .maxLines(2) 141 .maxLines(2)
  142 + .lineHeight(25)
139 .textOverflow({ overflow: TextOverflow.Ellipsis }) 143 .textOverflow({ overflow: TextOverflow.Ellipsis })
140 - .margin({ top: 16, left: 12, right: 12 }) 144 + .margin({ top: 4, left: 12, right: 12 })
141 .alignSelf(ItemAlign.Start) 145 .alignSelf(ItemAlign.Start)
142 Row() { 146 Row() {
143 Row() { 147 Row() {
@@ -145,6 +149,7 @@ struct ReserveMorePage { @@ -145,6 +149,7 @@ struct ReserveMorePage {
145 .width(20) 149 .width(20)
146 .height(20) 150 .height(20)
147 .margin({ left: 10, top: 2, bottom: 2, right: 6 }) 151 .margin({ left: 10, top: 2, bottom: 2, right: 6 })
  152 +
148 // Text(DateTimeUtils.formatDate(item.liveInfo.liveStartTime, "MM月dd日 HH:mm")) 153 // Text(DateTimeUtils.formatDate(item.liveInfo.liveStartTime, "MM月dd日 HH:mm"))
149 Text(this.getReserveDate(item.liveInfo.liveStartTime, 1)) 154 Text(this.getReserveDate(item.liveInfo.liveStartTime, 1))
150 .fontSize(12) 155 .fontSize(12)
@@ -201,7 +206,7 @@ struct ReserveMorePage { @@ -201,7 +206,7 @@ struct ReserveMorePage {
201 .color(!this.isReserved(item) ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC')) 206 .color(!this.isReserved(item) ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC'))
202 .visibility((this.isLoadingAttention && this.liveId == item.objectId) ? Visibility.Visible : Visibility.None) 207 .visibility((this.isLoadingAttention && this.liveId == item.objectId) ? Visibility.Visible : Visibility.None)
203 208
204 - Text(!this.isReserved(item) ? '关注' : '已关注') 209 + Text(!this.isReserved(item) ? '预约' : '已预约')
205 .fontSize($r('app.float.vp_12')) 210 .fontSize($r('app.float.vp_12'))
206 .fontWeight(500) 211 .fontWeight(500)
207 .fontColor(!this.isReserved(item) ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC')) 212 .fontColor(!this.isReserved(item) ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC'))
@@ -253,6 +258,9 @@ struct ReserveMorePage { @@ -253,6 +258,9 @@ struct ReserveMorePage {
253 .height(24) 258 .height(24)
254 .objectFit(ImageFit.Auto) 259 .objectFit(ImageFit.Auto)
255 .id("back_icon") 260 .id("back_icon")
  261 + .margin({
  262 + left: '16vp'
  263 + })
256 .alignRules({ 264 .alignRules({
257 center: { anchor: "__container__", align: VerticalAlign.Center }, 265 center: { anchor: "__container__", align: VerticalAlign.Center },
258 left: { anchor: "__container__", align: HorizontalAlign.Start } 266 left: { anchor: "__container__", align: HorizontalAlign.Start }
@@ -264,10 +272,10 @@ struct ReserveMorePage { @@ -264,10 +272,10 @@ struct ReserveMorePage {
264 Text(this.title)// .height('42lpx') 272 Text(this.title)// .height('42lpx')
265 .maxLines(1) 273 .maxLines(1)
266 .id("title") 274 .id("title")
267 - .fontSize('35lpx') 275 + .fontSize('18vp')
268 .fontWeight(400) 276 .fontWeight(400)
269 .fontColor($r('app.color.color_222222')) 277 .fontColor($r('app.color.color_222222'))
270 - .lineHeight('42lpx') 278 + .lineHeight('22vp')
271 .alignRules({ 279 .alignRules({
272 center: { anchor: "__container__", align: VerticalAlign.Center }, 280 center: { anchor: "__container__", align: VerticalAlign.Center },
273 middle: { anchor: "__container__", align: HorizontalAlign.Center } 281 middle: { anchor: "__container__", align: HorizontalAlign.Center }
@@ -281,11 +289,14 @@ struct ReserveMorePage { @@ -281,11 +289,14 @@ struct ReserveMorePage {
281 @Builder 289 @Builder
282 LiveImage() { 290 LiveImage() {
283 Row() { 291 Row() {
284 - Image($r('app.media.reserve_icon'))  
285 - .width(22)  
286 - .height(18) 292 + Image($r('app.media.reserve_new_icon'))
  293 + .width(14)
  294 + .height(14)
  295 + .margin({
  296 + right: 3
  297 + })
287 Text('预约') 298 Text('预约')
288 - .fontSize('11fp') 299 + .fontSize('12vp')
289 .fontWeight(400) 300 .fontWeight(400)
290 .fontColor(Color.White) 301 .fontColor(Color.White)
291 } 302 }
@@ -131,10 +131,8 @@ export struct SearchResultComponent { @@ -131,10 +131,8 @@ export struct SearchResultComponent {
131 .barWidth('100%') 131 .barWidth('100%')
132 .barHeight('84lpx') 132 .barHeight('84lpx')
133 .animationDuration(0) 133 .animationDuration(0)
134 - .onChange((index: number) => {  
135 - this.currentIndex = index  
136 - })  
137 .width('100%') 134 .width('100%')
  135 + .scrollable(false)
138 .layoutWeight(1) 136 .layoutWeight(1)
139 } 137 }
140 }.width('100%') 138 }.width('100%')
1 -import { ContentDTO, 1 +import {
  2 + ContentDTO,
2 contentListParams, 3 contentListParams,
3 - FullColumnImgUrlDTO, InteractDataDTO, 4 + FullColumnImgUrlDTO,
  5 + InteractDataDTO,
4 Params, 6 Params,
5 - RmhInfoDTO, VideoInfoDTO } from 'wdBean/Index' 7 + RmhInfoDTO,
  8 + VideoInfoDTO
  9 +} from 'wdBean/Index'
6 import { LiveInfoDTO } from 'wdBean/src/main/ets/bean/detail/LiveInfoDTO' 10 import { LiveInfoDTO } from 'wdBean/src/main/ets/bean/detail/LiveInfoDTO'
7 import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO' 11 import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO'
8 -import { LazyDataSource, Logger, StringUtils, ToastUtils } from 'wdKit/Index' 12 +import { LazyDataSource, Logger, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index'
9 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' 13 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
  14 +import MinePageDatasModel from '../../model/MinePageDatasModel'
10 import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' 15 import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
11 import { CreatorDetailRequestItem } from '../../viewmodel/CreatorDetailRequestItem' 16 import { CreatorDetailRequestItem } from '../../viewmodel/CreatorDetailRequestItem'
  17 +import { FollowListDetailItem } from '../../viewmodel/FollowListDetailItem'
  18 +import { FollowListStatusRequestItem } from '../../viewmodel/FollowListStatusRequestItem'
  19 +import { QueryListIsFollowedItem } from '../../viewmodel/QueryListIsFollowedItem'
12 import { SearchResultContentData } from '../../viewmodel/SearchResultContentData' 20 import { SearchResultContentData } from '../../viewmodel/SearchResultContentData'
13 import { SearchResultContentItem, SearchRmhDescription } from '../../viewmodel/SearchResultContentItem' 21 import { SearchResultContentItem, SearchRmhDescription } from '../../viewmodel/SearchResultContentItem'
14 import { CardParser } from '../CardParser' 22 import { CardParser } from '../CardParser'
  23 +import { FollowChildComponent } from '../mine/follow/FollowChildComponent'
15 import { ListHasNoMoreDataUI } from '../reusable/ListHasNoMoreDataUI' 24 import { ListHasNoMoreDataUI } from '../reusable/ListHasNoMoreDataUI'
16 import { ActivityItemComponent } from './ActivityItemComponent' 25 import { ActivityItemComponent } from './ActivityItemComponent'
17 import { SearchCreatorComponent } from './SearchCreatorComponent' 26 import { SearchCreatorComponent } from './SearchCreatorComponent'
@@ -19,27 +28,28 @@ import { SearchCreatorComponent } from './SearchCreatorComponent' @@ -19,27 +28,28 @@ import { SearchCreatorComponent } from './SearchCreatorComponent'
19 const TAG = "SearchResultContentComponent" 28 const TAG = "SearchResultContentComponent"
20 29
21 @Component 30 @Component
22 -export struct SearchResultContentComponent{  
23 - @State keywords:string = ""  
24 - @State searchType:string = "" 31 +export struct SearchResultContentComponent {
  32 + @State keywords: string = ""
  33 + @State searchType: string = ""
25 @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); 34 @State data: LazyDataSource<ContentDTO> = new LazyDataSource();
26 @State data_rmh: SearchRmhDescription[] = [] 35 @State data_rmh: SearchRmhDescription[] = []
27 - @State count:number = -1;  
28 - @State isLoading:boolean = false  
29 - @State hasMore:boolean = true  
30 - curPageNum:number = 1;  
31 - 36 + @State count: number = -1;
  37 + @State isLoading: boolean = false
  38 + @State hasMore: boolean = true
  39 + curPageNum: number = 1;
  40 + @State bean: FollowListDetailItem = new FollowListDetailItem("", "", "", "", "", "", "", "", "", -1, -1, "")
  41 + scroller: Scroller = new Scroller()
32 42
33 aboutToAppear(): void { 43 aboutToAppear(): void {
34 - if(this.searchType == "全部"){ 44 + if (this.searchType == "全部") {
35 this.searchType = "all" 45 this.searchType = "all"
36 - }else if(this.searchType == "精选"){ 46 + } else if (this.searchType == "精选") {
37 this.searchType = "cms" 47 this.searchType = "cms"
38 - }else if(this.searchType == "人民号"){ 48 + } else if (this.searchType == "人民号") {
39 this.searchType = "rmh" 49 this.searchType = "rmh"
40 - }else if(this.searchType == "视频"){ 50 + } else if (this.searchType == "视频") {
41 this.searchType = "video" 51 this.searchType = "video"
42 - }else if(this.searchType == "活动"){ 52 + } else if (this.searchType == "活动") {
43 this.searchType = "activity" 53 this.searchType = "activity"
44 } 54 }
45 55
@@ -47,93 +57,135 @@ export struct SearchResultContentComponent{ @@ -47,93 +57,135 @@ export struct SearchResultContentComponent{
47 this.getNewSearchResultData() 57 this.getNewSearchResultData()
48 } 58 }
49 59
50 - getNewSearchResultData(){ 60 + getNewSearchResultData() {
51 this.isLoading = true 61 this.isLoading = true
52 - if(this.hasMore){  
53 - SearcherAboutDataModel.getSearchResultListData("10",`${this.curPageNum}`,this.searchType,this.keywords,getContext(this)).then((value)=>{  
54 - if (!this.data || value.list.length == 0){ 62 + if (this.hasMore) {
  63 + SearcherAboutDataModel.getSearchResultListData("15", `${this.curPageNum}`, this.searchType, this.keywords,
  64 + getContext(this)).then((value) => {
  65 + if (!this.data || value.list.length == 0) {
55 this.hasMore = false 66 this.hasMore = false
56 this.isLoading = false 67 this.isLoading = false
57 - this.count = this.count===-1?0:this.count  
58 - }else{  
59 - if(value.list[0].dataList!=null){ 68 + this.count = this.count === -1 ? 0 : this.count
  69 + } else {
  70 + if (value.list[0].dataList != null) {
60 let data_temp: SearchRmhDescription[] = [] 71 let data_temp: SearchRmhDescription[] = []
  72 +
61 data_temp = value.list[0].dataList 73 data_temp = value.list[0].dataList
62 74
63 //TODO 查询创作者详情接口 75 //TODO 查询创作者详情接口
64 let request = new CreatorDetailRequestItem() 76 let request = new CreatorDetailRequestItem()
65 77
66 - data_temp.forEach((data)=>{ 78 + data_temp.forEach((data) => {
67 request.creatorIdList.push(data.creatorId) 79 request.creatorIdList.push(data.creatorId)
68 }) 80 })
69 81
70 - SearcherAboutDataModel.getCreatorDetailListData(request).then((value)=>{  
71 - if(value!=null && value.length>0){  
72 - data_temp.forEach((data)=>{  
73 - value.forEach((item)=>{  
74 - if(data.creatorId == item.creatorId){ 82 + SearcherAboutDataModel.getCreatorDetailListData(request).then((value) => {
  83 + if (value != null && value.length > 0) {
  84 + data_temp.forEach((data) => {
  85 + value.forEach((item) => {
  86 + if (data.creatorId == item.creatorId) {
75 data.headerPhotoUrl = item.headPhotoUrl.split("?")[0] 87 data.headerPhotoUrl = item.headPhotoUrl.split("?")[0]
76 - data.mainControl = item.mainControl+"" 88 + data.mainControl = item.mainControl + ""
  89 +
  90 + if(data_temp.length === 1){
  91 + this.bean.headPhotoUrl = item.headPhotoUrl.split("?")[0]
  92 + this.bean.cnUserName = item.userName
  93 + this.bean.creatorId = item.creatorId
  94 + this.bean.authIcon = item.authIcon
  95 +
  96 + if (value[0].fansNum > 10000) {
  97 + let temp = (value[0].fansNum / 10000) + ""
  98 + let index = temp.indexOf('.')
  99 + if (index != -1) {
  100 + temp = temp.substring(0, index + 2)
  101 + } else {
  102 + temp = temp
  103 + }
  104 + this.bean.cnFansNum = temp + "万"
  105 + } else {
  106 + this.bean.cnFansNum = item.fansNum + ""
  107 + }
  108 + this.bean.introduction = item.introduction
  109 + this.bean.mainControl = item.mainControl
  110 + this.bean.banControl = item.banControl
  111 + this.bean.cnUserType = item.userType
  112 + this.bean.cnUserId = item.userId
  113 + }
77 } 114 }
78 }) 115 })
79 }) 116 })
80 } 117 }
81 - data_temp.forEach((data)=>{ 118 + data_temp.forEach((data) => {
82 this.data_rmh.push(data) 119 this.data_rmh.push(data)
83 }) 120 })
84 121
85 - }).catch((err:Error)=>{  
86 - console.log(TAG,JSON.stringify(err)) 122 + //只有一条创作者,获取 创作者信息
  123 + if (this.data_rmh.length === 1) {
  124 + if(StringUtils.isNotEmpty(UserDataLocal.getUserId())){
  125 + //查询是否被关注
  126 + let status = new FollowListStatusRequestItem()
  127 + status.creatorIds.push(new QueryListIsFollowedItem(this.data_rmh[0].creatorId))
  128 + MinePageDatasModel.getFollowListStatusData(status, getContext(this)).then((newValue) => {
  129 + this.bean.status = newValue[0].status
  130 + }).catch((err: Error) => {
  131 + console.log(TAG, "请求失败")
  132 + })
  133 + }else{
  134 + this.bean.status = ""
  135 + }
  136 + }
  137 + }).catch((err: Error) => {
  138 + console.log(TAG, JSON.stringify(err))
87 }) 139 })
88 } 140 }
89 this.getInteractData(value) 141 this.getInteractData(value)
90 } 142 }
91 - }).catch((err:Error)=>{  
92 - console.log(TAG,JSON.stringify(err)) 143 + }).catch((err: Error) => {
  144 + console.log(TAG, JSON.stringify(err))
93 this.isLoading = false 145 this.isLoading = false
94 - this.count = this.count===-1?0:this.count 146 + this.count = this.count === -1 ? 0 : this.count
95 }) 147 })
96 } 148 }
97 } 149 }
98 150
99 - getInteractData(resultData:SearchResultContentData){  
100 - if(resultData.list[0].dataList!=null){  
101 - resultData.list.splice(0,1) 151 + getInteractData(resultData: SearchResultContentData) {
  152 + if (resultData.list[0].dataList != null) {
  153 + resultData.list.splice(0, 1)
102 } 154 }
103 155
104 - let data : contentListParams = { 156 + let data: contentListParams = {
105 contentList: [] 157 contentList: []
106 } 158 }
107 - resultData.list.forEach((item)=>{ 159 + resultData.list.forEach((item) => {
108 data.contentList.push({ 160 data.contentList.push({
109 contentId: item.data.id + '', 161 contentId: item.data.id + '',
110 contentType: Number.parseInt(item.data.type) 162 contentType: Number.parseInt(item.data.type)
111 }) 163 })
112 }) 164 })
113 165
114 - SearcherAboutDataModel.getInteractListData(data,getContext(this)).then((newValue)=>{  
115 - newValue.forEach((item)=>{  
116 - resultData.list.forEach((data)=>{ 166 + SearcherAboutDataModel.getInteractListData(data, getContext(this)).then((newValue) => {
  167 + newValue.forEach((item) => {
  168 + resultData.list.forEach((data) => {
117 if (item.contentId == data.data.id) { 169 if (item.contentId == data.data.id) {
118 - data.data.collectNum = item.collectNum+""  
119 - data.data.commentNum = item.commentNum+""  
120 - data.data.likeNum = item.likeNum+""  
121 - data.data.readNum = item.readNum+""  
122 - data.data.shareNum = item.shareNum+"" 170 + data.data.collectNum = item.collectNum + ""
  171 + data.data.commentNum = item.commentNum + ""
  172 + data.data.likeNum = item.likeNum + ""
  173 + data.data.readNum = item.readNum + ""
  174 + data.data.shareNum = item.shareNum + ""
123 } 175 }
124 }) 176 })
125 }) 177 })
126 178
127 - resultData.list.forEach((value)=>{  
128 - let photos:FullColumnImgUrlDTO[] = []  
129 - if(value.data.appStyle === 4){  
130 - value.data.appStyleImages.split("&&").forEach((value)=>{  
131 - photos.push({url:value} as FullColumnImgUrlDTO) 179 + resultData.list.forEach((value) => {
  180 + let photos: FullColumnImgUrlDTO[] = []
  181 + if (value.data.appStyle === 4) {
  182 + value.data.appStyleImages.split("&&").forEach((value) => {
  183 + photos.push({ url: value } as FullColumnImgUrlDTO)
132 }) 184 })
133 } 185 }
134 186
135 - let contentDTO = this.dataTransform(value,photos);  
136 - if(contentDTO.appStyle != "13"){ 187 + let contentDTO = this.dataTransform(value, photos);
  188 + if (contentDTO.appStyle != "13") {
137 this.data.push(contentDTO) 189 this.data.push(contentDTO)
138 } 190 }
139 191
@@ -142,131 +194,189 @@ export struct SearchResultContentComponent{ @@ -142,131 +194,189 @@ export struct SearchResultContentComponent{
142 this.count = this.data.totalCount() 194 this.count = this.data.totalCount()
143 if (this.data.totalCount() < resultData.totalCount) { 195 if (this.data.totalCount() < resultData.totalCount) {
144 this.curPageNum++ 196 this.curPageNum++
145 - }else { 197 + } else {
146 this.hasMore = false 198 this.hasMore = false
147 } 199 }
148 this.isLoading = false 200 this.isLoading = false
149 201
150 - if(this.count === 0 && resultData.list.length > 0){ 202 + if (this.count === 0 && resultData.list.length > 0) {
151 this.count = -1 203 this.count = -1
152 - if(!this.isLoading){ 204 + if (!this.isLoading) {
153 //加载分页数据 205 //加载分页数据
154 this.getNewSearchResultData() 206 this.getNewSearchResultData()
155 } 207 }
156 - }else if(this.count <= 20 && resultData.list.length > 0){  
157 - if(!this.isLoading){ 208 + } else if (this.count <= 10 && resultData.list.length > 0) {
  209 + if (!this.isLoading) {
158 //加载分页数据 210 //加载分页数据
159 this.getNewSearchResultData() 211 this.getNewSearchResultData()
160 } 212 }
161 } 213 }
162 - }).catch((err:Error)=>{  
163 - console.log(TAG,"请求失败") 214 + }).catch((err: Error) => {
  215 + console.log(TAG, "请求失败")
164 this.isLoading = false 216 this.isLoading = false
165 - this.count = this.count===-1?0:this.count 217 + this.count = this.count === -1 ? 0 : this.count
166 }) 218 })
167 } 219 }
168 220
169 build() { 221 build() {
170 Column() { 222 Column() {
171 - if(this.count == 0){  
172 - ListHasNoMoreDataUI({style:2})  
173 - }else{  
174 - Column(){  
175 - if (this.data_rmh!=null && this.data_rmh.length > 0) {  
176 - //List  
177 - List({space:'8lpx'}) {  
178 - ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {  
179 - ListItem() {  
180 - SearchCreatorComponent({item:item})  
181 - }.onClick(()=>{  
182 - //TODO 跳转  
183 - })  
184 - .width('150lpx')  
185 - .height('100%')  
186 - })  
187 - 223 + if (this.count == 0) {
  224 + ListHasNoMoreDataUI({ style: 2 })
  225 + } else {
  226 + List() {
  227 + if (this.data_rmh != null && this.data_rmh.length > 0){
  228 + if (this.data_rmh.length === 1){
  229 + ListItem(){
  230 + FollowChildComponent({ data: this.bean, type: 1 })
  231 + }.padding({left:"31lpx",right:"31lpx"})
  232 + }else{
188 ListItem(){ 233 ListItem(){
189 Column(){ 234 Column(){
190 - Text("查看更多")  
191 - .width('19lpx')  
192 - .fontSize('19lpx')  
193 - .fontWeight('400lpx')  
194 - .lineHeight('27lpx')  
195 - .fontColor($r('app.color.color_9E9E9E'))  
196 - }.borderRadius({topLeft:'4lpx',bottomLeft:'4lpx'})  
197 - .height('180lpx')  
198 - .width('77lpx')  
199 - .backgroundColor($r('app.color.color_EDEDED'))  
200 - .justifyContent(FlexAlign.Center)  
201 -  
202 - }.height('100%')  
203 - .margin({left:'23lpx'})  
204 - .onClick(()=>{  
205 - let params: Params = {  
206 - pageID: this.keywords 235 + this.SearchListUI()
207 } 236 }
208 - WDRouterRule.jumpWithPage(WDRouterPage.searchCreatorPage,params)  
209 - }) 237 + }
210 } 238 }
211 - .cachedCount(6)  
212 - .edgeEffect(EdgeEffect.Spring)  
213 - .scrollBar(BarState.Off)  
214 - .listDirection(Axis.Horizontal)  
215 - .width('100%')  
216 - .height('219lpx')  
217 -  
218 - Divider()  
219 - .width('100%')  
220 - .height('12lpx')  
221 - .color($r('app.color.color_F5F5F5'))  
222 - .strokeWidth('12lpx')  
223 } 239 }
224 - //List  
225 - List({ space: '6lpx' }) {  
226 - LazyForEach(this.data, (item: ContentDTO, index: number) => {  
227 - ListItem() {  
228 - Column(){  
229 - if(this.searchType == "activity"){  
230 - ActivityItemComponent({contentDTO:item})  
231 - }else{  
232 - CardParser({contentDTO:item})  
233 - }  
234 - if(index != this.data.totalCount()-1 ){  
235 - Divider()  
236 - .width('100%')  
237 - .height('1lpx')  
238 - .color($r('app.color.color_F5F5F5'))  
239 - .strokeWidth('1lpx')  
240 - } 240 + LazyForEach(this.data, (item: ContentDTO, index: number) => {
  241 + ListItem() {
  242 + Column() {
  243 + if (this.searchType == "activity") {
  244 + ActivityItemComponent({ contentDTO: item })
  245 + } else {
  246 + CardParser({ contentDTO: item })
  247 + }
  248 + if (index != this.data.totalCount() - 1) {
  249 + Divider()
  250 + .width('100%')
  251 + .height('1lpx')
  252 + .color($r('app.color.color_F5F5F5'))
  253 + .strokeWidth('1lpx')
241 } 254 }
242 - }  
243 - }, (item: ContentDTO, index: number) => index.toString())  
244 -  
245 - //没有更多数据 显示提示  
246 - if(!this.hasMore && this.data.totalCount() > 0){  
247 - ListItem(){  
248 - ListHasNoMoreDataUI()  
249 } 255 }
250 } 256 }
251 - }.cachedCount(6)  
252 - .edgeEffect(EdgeEffect.None)  
253 - .scrollBar(BarState.Off)  
254 - .layoutWeight(1)  
255 - .onReachEnd(()=>{  
256 - console.log(TAG,"触底了");  
257 - if(!this.isLoading){  
258 - //加载分页数据  
259 - this.getNewSearchResultData() 257 + }, (item: ContentDTO, index: number) => index.toString())
  258 +
  259 + //没有更多数据 显示提示
  260 + if (!this.hasMore && this.data.totalCount() > 0) {
  261 + ListItem() {
  262 + ListHasNoMoreDataUI()
260 } 263 }
261 - })  
262 - }.layoutWeight(1) 264 + }
  265 + }.cachedCount(10)
  266 + .edgeEffect(EdgeEffect.None)
  267 + .scrollBar(BarState.Off)
  268 + .onReachEnd(() => {
  269 + console.log(TAG, "触底了");
  270 + if (!this.isLoading) {
  271 + //加载分页数据
  272 + this.getNewSearchResultData()
  273 + }
  274 + })
263 } 275 }
264 } 276 }
265 .backgroundColor($r('app.color.white')) 277 .backgroundColor($r('app.color.white'))
266 - .layoutWeight(1)  
267 .width('100%') 278 .width('100%')
268 } 279 }
269 280
  281 + @Builder
  282 + multiCreatorUI() {
  283 + Column() {
  284 + List() {
  285 + ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
  286 + ListItem() {
  287 + SearchCreatorComponent({ item: item })
  288 + }
  289 + .width('150lpx')
  290 + .height('100%')
  291 + })
  292 +
  293 + ListItem() {
  294 + Column() {
  295 + Text("查看更多")
  296 + .width('19lpx')
  297 + .fontSize('19lpx')
  298 + .fontWeight('400lpx')
  299 + .lineHeight('27lpx')
  300 + .fontColor($r('app.color.color_9E9E9E'))
  301 + }
  302 + .borderRadius({ topLeft: '4lpx', bottomLeft: '4lpx' })
  303 + .height('180lpx')
  304 + .width('77lpx')
  305 + .backgroundColor($r('app.color.color_EDEDED'))
  306 + .justifyContent(FlexAlign.Center)
  307 +
  308 + }.height('100%')
  309 + .margin({ left: '23lpx' })
  310 + .onClick(() => {
  311 + let params: Params = {
  312 + pageID: this.keywords
  313 + }
  314 + WDRouterRule.jumpWithPage(WDRouterPage.searchCreatorPage, params)
  315 + })
  316 + }
  317 + .cachedCount(6)
  318 + .edgeEffect(EdgeEffect.None)
  319 + .scrollBar(BarState.Off)
  320 + .listDirection(Axis.Horizontal)
  321 + .width('100%')
  322 + .height('219lpx')
  323 +
  324 + Divider()
  325 + .width('100%')
  326 + .height('12lpx')
  327 + .color($r('app.color.color_F5F5F5'))
  328 + .strokeWidth('12lpx')
  329 + }
  330 + }
  331 +
  332 + @Builder
  333 + SearchListUI() {
  334 + List({space:'8lpx'}) {
  335 + ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
  336 + ListItem() {
  337 + SearchCreatorComponent({item:item})
  338 + }
  339 + .width('150lpx')
  340 + .height('100%')
  341 + })
  342 +
  343 + ListItem(){
  344 + Column(){
  345 + Text("查看更多")
  346 + .width('19lpx')
  347 + .fontSize('19lpx')
  348 + .fontWeight('400lpx')
  349 + .lineHeight('27lpx')
  350 + .fontColor($r('app.color.color_9E9E9E'))
  351 + }.borderRadius({topLeft:'4lpx',bottomLeft:'4lpx'})
  352 + .height('180lpx')
  353 + .width('77lpx')
  354 + .backgroundColor($r('app.color.color_EDEDED'))
  355 + .justifyContent(FlexAlign.Center)
  356 +
  357 + }.height('100%')
  358 + .margin({left:'23lpx'})
  359 + .onClick(()=>{
  360 + let params: Params = {
  361 + pageID: this.keywords
  362 + }
  363 + WDRouterRule.jumpWithPage(WDRouterPage.searchCreatorPage,params)
  364 + })
  365 + }
  366 + .cachedCount(6)
  367 + .edgeEffect(EdgeEffect.None)
  368 + .scrollBar(BarState.Off)
  369 + .listDirection(Axis.Horizontal)
  370 + .width('100%')
  371 + .height('219lpx')
  372 +
  373 + Divider()
  374 + .width('100%')
  375 + .height('12lpx')
  376 + .color($r('app.color.color_F5F5F5'))
  377 + .strokeWidth('12lpx')
  378 + }
  379 +
270 private dataTransform(value: SearchResultContentItem, photos: FullColumnImgUrlDTO[]): ContentDTO { 380 private dataTransform(value: SearchResultContentItem, photos: FullColumnImgUrlDTO[]): ContentDTO {
271 let contentDTO = new ContentDTO(); 381 let contentDTO = new ContentDTO();
272 contentDTO.appStyle = value.data.appStyle + "" 382 contentDTO.appStyle = value.data.appStyle + ""
1 -import { Logger } from 'wdKit/Index' 1 +import { Logger, NumberFormatterUtils } from 'wdKit/Index'
2 import { LikeViewModel } from '../../viewmodel/LikeViewModel' 2 import { LikeViewModel } from '../../viewmodel/LikeViewModel'
3 import { SPHelper } from 'wdKit'; 3 import { SPHelper } from 'wdKit';
4 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 4 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
@@ -22,7 +22,7 @@ export struct LikeComponent { @@ -22,7 +22,7 @@ export struct LikeComponent {
22 @Prop data: Record<string, string> 22 @Prop data: Record<string, string>
23 enableBtn = true 23 enableBtn = true
24 componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口 24 componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口
25 - styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏) 25 + styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏) 3 透明背景
26 @State likeCount: number = 0 //点赞数 26 @State likeCount: number = 0 //点赞数
27 27
28 //上层传值 样例 28 //上层传值 样例
@@ -50,7 +50,11 @@ export struct LikeComponent { @@ -50,7 +50,11 @@ export struct LikeComponent {
50 //2: 新闻页中间位置样式 50 //2: 新闻页中间位置样式
51 this.likeCompStyle2() 51 this.likeCompStyle2()
52 } else if (this.componentType == 3) { 52 } else if (this.componentType == 3) {
  53 + //卡片底部互动样式
53 this.likeCompStyle3() 54 this.likeCompStyle3()
  55 + } else if (this.componentType == 4) {
  56 + // 直播,点赞按钮底测有灰色圆角背景+右上点赞数量
  57 + this.likeCompStyle4()
54 } else { 58 } else {
55 //1: 底部栏目样式 默认样式 59 //1: 底部栏目样式 默认样式
56 this.likeCompStyle1() 60 this.likeCompStyle1()
@@ -63,7 +67,8 @@ export struct LikeComponent { @@ -63,7 +67,8 @@ export struct LikeComponent {
63 transLikeStyle(): ILikeStyleResp { 67 transLikeStyle(): ILikeStyleResp {
64 if (this.likesStyle === 1) { 68 if (this.likesStyle === 1) {
65 return { 69 return {
66 - url: this.likeStatus ? $r(`app.media.ic_like_check`) : $r(`app.media.ic_like_uncheck`), 70 + url: this.likeStatus ? $r(`app.media.ic_like_check`) :
  71 + this.styleType == 1 ? this.componentType == 3?$r(`app.media.CarderInteraction_like`):$r('app.media.icon_like_default') : $r(`app.media.ic_like_uncheck`),
67 name: '赞' 72 name: '赞'
68 } 73 }
69 } else if (this.likesStyle === 2) { 74 } else if (this.likesStyle === 2) {
@@ -79,7 +84,9 @@ export struct LikeComponent { @@ -79,7 +84,9 @@ export struct LikeComponent {
79 } 84 }
80 } 85 }
81 return { 86 return {
82 - url: $r(`app.media.icon_like_ckeck`), name: '点赞' 87 + url: this.likeStatus ? $r(`app.media.ic_like_check`) :
  88 + this.styleType == 1 ? $r('app.media.icon_like_default') : $r(`app.media.ic_like_uncheck`),
  89 + name: '点赞'
83 } 90 }
84 } 91 }
85 92
@@ -88,9 +95,8 @@ export struct LikeComponent { @@ -88,9 +95,8 @@ export struct LikeComponent {
88 //2: 新闻页中间位置样式 95 //2: 新闻页中间位置样式
89 Column() { 96 Column() {
90 Button() { 97 Button() {
91 -  
92 Row() { 98 Row() {
93 - Image(this.likeStatus ? $r('app.media.icon_like_select') : $r('app.media.icon_like_default')) 99 + Image(this.transLikeStyle().url)
94 .width(20) 100 .width(20)
95 .height(20) 101 .height(20)
96 Text(this.likeCount.toString()) 102 Text(this.likeCount.toString())
@@ -125,13 +131,11 @@ export struct LikeComponent { @@ -125,13 +131,11 @@ export struct LikeComponent {
125 @Builder 131 @Builder
126 likeCompStyle3() { 132 likeCompStyle3() {
127 Row() { 133 Row() {
128 - Image(this.likeStatus ? $r('app.media.icon_like_select') :  
129 - this.styleType == 1 ? $r('app.media.CarderInteraction_like') :  
130 - $r('app.media.icon_like_default_white')) 134 + Image(this.transLikeStyle().url)
131 .width(18) 135 .width(18)
132 .height(18) 136 .height(18)
133 - // Text(this.likeStatus ? '已赞' : '点赞')  
134 - Text(this.likeCount > 0 ? this.likeCount.toString() : '点赞') 137 + Text(this.likeStatus ? '已赞' : '点赞')
  138 + // Text(this.likeCount > 0 ? this.likeCount.toString() : '点赞')
135 .margin({ left: 4 }) 139 .margin({ left: 4 })
136 .fontSize(14) 140 .fontSize(14)
137 .fontColor(this.likeStatus ? '#ED2800' : '#666666') 141 .fontColor(this.likeStatus ? '#ED2800' : '#666666')
@@ -147,9 +151,7 @@ export struct LikeComponent { @@ -147,9 +151,7 @@ export struct LikeComponent {
147 //1: 底部栏目样式 默认样式 151 //1: 底部栏目样式 默认样式
148 Column() { 152 Column() {
149 // Image(this.likeStatus ? $r('app.media.icon_like_select') : $r('app.media.icon_like_default')) 153 // Image(this.likeStatus ? $r('app.media.icon_like_select') : $r('app.media.icon_like_default'))
150 - Image(this.likeStatus ? $r('app.media.icon_like_select') :  
151 - this.styleType == 1 ? $r('app.media.icon_like_default') :  
152 - $r('app.media.icon_like_default_white')) 154 + Image(this.transLikeStyle().url)
153 .width(24) 155 .width(24)
154 .height(24) 156 .height(24)
155 .onClick(() => { 157 .onClick(() => {
@@ -158,6 +160,43 @@ export struct LikeComponent { @@ -158,6 +160,43 @@ export struct LikeComponent {
158 }.width(24).height(24) 160 }.width(24).height(24)
159 } 161 }
160 162
  163 + @Builder
  164 + likeCompStyle4() {
  165 + Stack({ alignContent: Alignment.Bottom }) {
  166 + Column() {
  167 + Image(this.transLikeStyle().url)
  168 + .width(24)
  169 + .height(24)
  170 + .onClick(() => {
  171 + this.clickButtonEvent()
  172 + })
  173 + }
  174 + .justifyContent(FlexAlign.Center)
  175 + .width(36)
  176 + .height(36)
  177 + .borderRadius(18)
  178 + .backgroundColor('#FFF5F5F5')
  179 +
  180 +
  181 + Row() {
  182 + Text(NumberFormatterUtils.formatNumberWithWan(this.likeCount || ''))
  183 + .fontSize(8)
  184 + .fontColor(Color.White)
  185 + .padding({ left: 4, right: 2 })
  186 + }
  187 + .height(12)
  188 + .alignItems(VerticalAlign.Center)
  189 + .position({ x: '100%', })
  190 + .markAnchor({ x: '100%' })
  191 + .backgroundImage($r('app.media.ic_like_back'))
  192 + .backgroundImageSize(ImageSize.Auto)
  193 + .visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
  194 + }
  195 + .width(36)
  196 + .height(42)
  197 +
  198 + }
  199 +
161 async clickButtonEvent() { 200 async clickButtonEvent() {
162 console.log(TAG, '点赞点击') 201 console.log(TAG, '点赞点击')
163 // 未登录,跳转登录 202 // 未登录,跳转登录
@@ -184,12 +223,19 @@ export struct LikeComponent { @@ -184,12 +223,19 @@ export struct LikeComponent {
184 this.viewModel.executeLike2(this.data).then(() => { 223 this.viewModel.executeLike2(this.data).then(() => {
185 224
186 console.log(TAG, '点赞接口调用成功') 225 console.log(TAG, '点赞接口调用成功')
187 - this.likeStatus = !this.likeStatus  
188 - //点赞和取消点赞成功后更新点赞数  
189 - if (this.likeStatus) { 226 +
  227 + // 直播点赞一直增加
  228 + if (this.contentDetailData.liveInfo) {
  229 + this.likeStatus = true
190 this.likeCount++ 230 this.likeCount++
191 } else { 231 } else {
192 - this.likeCount-- 232 + this.likeStatus = !this.likeStatus
  233 + //点赞和取消点赞成功后更新点赞数
  234 + if (this.likeStatus) {
  235 + this.likeCount++
  236 + } else {
  237 + this.likeCount--
  238 + }
193 } 239 }
194 240
195 if (this.likeCount <= 0) { 241 if (this.likeCount <= 0) {
@@ -48,6 +48,18 @@ export struct OperRowListView { @@ -48,6 +48,18 @@ export struct OperRowListView {
48 private onCommentFocus: () => void = () => { 48 private onCommentFocus: () => void = () => {
49 } 49 }
50 @Prop @Watch('onDetailUpdated') contentDetailData: ContentDetailDTO // 稿件详情 50 @Prop @Watch('onDetailUpdated') contentDetailData: ContentDetailDTO // 稿件详情
  51 + /**
  52 + * 组件样式类型,根据详情页类型传值,组件内部根据样式展现类型做判断
  53 + * 1:底部栏目样式
  54 + * 2:新闻页中间位置样式
  55 + * 3:动态Tab内容下的互动入口
  56 + * 4:视频详情页
  57 + * 5:横屏直播详情页
  58 + * 6:竖屏直播详情页
  59 + * 7:图集详情页
  60 + */
  61 + @Prop componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口
  62 + @Prop pageComponentType: number = -1 //1:视频详情页
51 @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 63 @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
52 @State operationButtonList: string[] = ['comment', 'collect', 'share'] // 组件展示条件 64 @State operationButtonList: string[] = ['comment', 'collect', 'share'] // 组件展示条件
53 @State needLike: boolean = true 65 @State needLike: boolean = true
@@ -65,6 +77,7 @@ export struct OperRowListView { @@ -65,6 +77,7 @@ export struct OperRowListView {
65 console.info(TAG, '22222----', this.styleType) 77 console.info(TAG, '22222----', this.styleType)
66 console.info(TAG, '3333----', this.needLike) 78 console.info(TAG, '3333----', this.needLike)
67 this.handleStyle() 79 this.handleStyle()
  80 + this.onDetailUpdated()
68 } 81 }
69 82
70 async onDetailUpdated() { 83 async onDetailUpdated() {
@@ -103,6 +116,8 @@ export struct OperRowListView { @@ -103,6 +116,8 @@ export struct OperRowListView {
103 } 116 }
104 117
105 build() { 118 build() {
  119 + // 视频详情页
  120 +
106 Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { 121 Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
107 // AudioDialog() 122 // AudioDialog()
108 Row() { 123 Row() {
@@ -147,9 +162,10 @@ export struct OperRowListView { @@ -147,9 +162,10 @@ export struct OperRowListView {
147 .backgroundColor(this.bgColor) 162 .backgroundColor(this.bgColor)
148 .padding({ 163 .padding({
149 top: 10, 164 top: 10,
150 - // bottom: `${this.bottomSafeHeight}px`  
151 - bottom: 50 165 + bottom: `${this.bottomSafeHeight}px`
  166 + // bottom: 50
152 }) 167 })
  168 +
153 } 169 }
154 170
155 /** 171 /**
@@ -162,12 +178,16 @@ export struct OperRowListView { @@ -162,12 +178,16 @@ export struct OperRowListView {
162 CommentTabComponent({ 178 CommentTabComponent({
163 publishCommentModel: this.publishCommentModel, 179 publishCommentModel: this.publishCommentModel,
164 contentDetail: this.contentDetailData, 180 contentDetail: this.contentDetailData,
165 - onCommentFocus: this.onCommentFocus 181 + onCommentFocus: this.onCommentFocus,
  182 + pageComponentType: this.pageComponentType
166 }) 183 })
167 } 184 }
168 } 185 }
169 - .flexShrink(1)  
170 - 186 + .layoutWeight(1)
  187 + .margin({
  188 + right: this.pageComponentType === 1 ? 16 : 0,
  189 + })
  190 +
171 if (this.showCommentIcon) { 191 if (this.showCommentIcon) {
172 Column() { 192 Column() {
173 if (this.publishCommentModel?.targetId) { 193 if (this.publishCommentModel?.targetId) {
@@ -189,7 +209,8 @@ export struct OperRowListView { @@ -189,7 +209,8 @@ export struct OperRowListView {
189 // if (this.likeBean?.contentId) { 209 // if (this.likeBean?.contentId) {
190 LikeComponent({ 210 LikeComponent({
191 data: this.likeBean, 211 data: this.likeBean,
192 - styleType: this.styleType 212 + styleType: this.styleType,
  213 + componentType: this.componentType
193 }) 214 })
194 // } 215 // }
195 } 216 }
@@ -2,6 +2,8 @@ import { Action, NewspaperListBean, NewspaperListItemBean, NewspaperPositionItem @@ -2,6 +2,8 @@ import { Action, NewspaperListBean, NewspaperListItemBean, NewspaperPositionItem
2 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO' 2 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'
3 import { WDRouterRule } from 'wdRouter/Index' 3 import { WDRouterRule } from 'wdRouter/Index'
4 import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog' 4 import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog'
  5 +import { Logger } from 'wdKit';
  6 +import { window } from '@kit.ArkUI';
5 7
6 /** 8 /**
7 * 读报纸半屏弹窗 9 * 读报纸半屏弹窗
@@ -35,6 +37,12 @@ export struct ENewspaperListDialog { @@ -35,6 +37,12 @@ export struct ENewspaperListDialog {
35 // listDialogController: CustomDialogController 37 // listDialogController: CustomDialogController
36 public closeDialog?: () => void 38 public closeDialog?: () => void
37 39
  40 + // 手势滑动相关
  41 + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Up | PanDirection.Down })
  42 + private topFixedHeight = 124
  43 + @State topHeight: number = 124
  44 + private deviceHeight: number = 0
  45 +
38 //watch监听报纸页码回调 46 //watch监听报纸页码回调
39 onCurrentPageNumUpdated(): void { 47 onCurrentPageNumUpdated(): void {
40 console.log("ENewspaperListDialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum) 48 console.log("ENewspaperListDialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum)
@@ -46,7 +54,13 @@ export struct ENewspaperListDialog { @@ -46,7 +54,13 @@ export struct ENewspaperListDialog {
46 } 54 }
47 } 55 }
48 56
49 - aboutToAppear(): void { 57 + async aboutToAppear() {
  58 + // 屏幕高度 - 滑动高度计算
  59 + let windowClass: window.Window = await window.getLastWindow(getContext(this));
  60 + let changeHeight = 85 + 44 + px2vp(windowClass.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)
  61 + changeHeight += px2vp(windowClass.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
  62 + this.deviceHeight = px2vp(windowClass.getWindowProperties().windowRect.height) - changeHeight
  63 +
50 this.isCurrentViewOpen = true 64 this.isCurrentViewOpen = true
51 console.log("ENewspaperListDialog-aboutToAppear", "currentPageNum:", this.currentPageNum) 65 console.log("ENewspaperListDialog-aboutToAppear", "currentPageNum:", this.currentPageNum)
52 let _scrollIndex = Number.parseInt(this.currentPageNum) 66 let _scrollIndex = Number.parseInt(this.currentPageNum)
@@ -56,60 +70,76 @@ export struct ENewspaperListDialog { @@ -56,60 +70,76 @@ export struct ENewspaperListDialog {
56 } 70 }
57 71
58 aboutToDisappear() { 72 aboutToDisappear() {
59 - // if (this.pageListDialogController) {  
60 - // this.pageListDialogController = null  
61 - // }  
62 this.isCurrentViewOpen = false 73 this.isCurrentViewOpen = false
63 } 74 }
64 75
65 build() { 76 build() {
66 Stack() { 77 Stack() {
67 Column() { 78 Column() {
68 - Row()  
69 - .width(43)  
70 - .height(4)  
71 - .backgroundColor('#EDEDED')  
72 - .margin({  
73 - top: 10,  
74 - bottom: 10  
75 - }) 79 + Column() {
  80 + Row()
  81 + .width(43)
  82 + .height(4)
  83 + .backgroundColor('#EDEDED')
  84 + .margin({
  85 + top: 10,
  86 + bottom: 10
  87 + })
  88 + .onClick(() => {
  89 + if (this.closeDialog) {
  90 + this.closeDialog()
  91 + }
  92 + })
  93 + Row() {
  94 + Text(this.currentPageNum)
  95 + .fontSize($r('app.float.font_size_36'))
  96 + .fontColor($r('app.color.color_222222'))
  97 + .fontFamily('BebasNeueBold')
  98 + Text('版')
  99 + .fontSize($r('app.float.font_size_16'))
  100 + .fontColor($r('app.color.color_222222'))
  101 + .margin({ bottom: 6 })
  102 +
  103 + Image($r('app.media.icon_triangle_black'))
  104 + .width($r('app.float.border_radius_6'))
  105 + .height($r('app.float.border_radius_6'))
  106 + .margin({ left: 2, bottom: 6 })
  107 + }
  108 + .alignItems(VerticalAlign.Bottom)
  109 + .margin({ left: 15 })
  110 + .alignSelf(ItemAlign.Start)
76 .onClick(() => { 111 .onClick(() => {
77 - if (this.closeDialog) {  
78 - this.closeDialog() 112 + this.pageDialogShow = !this.pageDialogShow
  113 + if (this.pageDialogShow) {
  114 + this.pageListDialogController.open()
  115 + } else {
  116 + this.pageListDialogController.close()
79 } 117 }
80 }) 118 })
81 - Row() {  
82 - Text(this.currentPageNum)  
83 - .fontSize($r('app.float.font_size_36'))  
84 - .fontColor($r('app.color.color_222222'))  
85 - .fontFamily('BebasNeueBold')  
86 - Text('版')  
87 - .fontSize($r('app.float.font_size_16'))  
88 - .fontColor($r('app.color.color_222222'))  
89 - .margin({ bottom: 6 })  
90 119
91 - Image($r('app.media.icon_triangle_black'))  
92 - .width($r('app.float.border_radius_6'))  
93 - .height($r('app.float.border_radius_6'))  
94 - .margin({ left: 2, bottom: 6 }) 120 + Image($r('app.media.line'))
  121 + .width('100%')
  122 + .height(6)
  123 + .margin({ top: 20, left: 16, right: 16 })
  124 + .objectFit(ImageFit.Contain)
95 } 125 }
96 - .alignItems(VerticalAlign.Bottom)  
97 - .margin({ left: 15 })  
98 - .alignSelf(ItemAlign.Start)  
99 - .onClick(() => {  
100 - this.pageDialogShow = !this.pageDialogShow  
101 - if (this.pageDialogShow) {  
102 - this.pageListDialogController.open()  
103 - } else {  
104 - this.pageListDialogController.close()  
105 - }  
106 - }) 126 + .width('100%')
  127 + .gesture(
  128 + PanGesture(this.panOption)
  129 + .onActionStart((event: GestureEvent) => {
  130 + Logger.debug('ENewspaperListDialog','Pan start')
  131 + })
  132 + .onActionUpdate((event: GestureEvent) => {
  133 + if (this.topFixedHeight + event.offsetY >= this.topFixedHeight) {
  134 + this.topHeight = this.topFixedHeight + event.offsetY
  135 + }
  136 + Logger.debug('ENewspaperListDialog', 'topHeight:' + this.topHeight)
  137 + })
  138 + .onActionEnd(() => {
  139 + this.onCloseGestureDialog()
  140 + })
  141 + )
107 142
108 - Image($r('app.media.line'))  
109 - .width('100%')  
110 - .height(6)  
111 - .margin({ top: 20, left: 16, right: 16 })  
112 - .objectFit(ImageFit.Contain)  
113 143
114 List({ scroller: this.listScroller, initialIndex: this.scrollIndex }) { 144 List({ scroller: this.listScroller, initialIndex: this.scrollIndex }) {
115 ForEach(this.newspaperListBean?.list, (item: NewspaperListItemBean, index: number) => { 145 ForEach(this.newspaperListBean?.list, (item: NewspaperListItemBean, index: number) => {
@@ -137,7 +167,7 @@ export struct ENewspaperListDialog { @@ -137,7 +167,7 @@ export struct ENewspaperListDialog {
137 .fontSize($r('app.float.font_size_14')) 167 .fontSize($r('app.float.font_size_14'))
138 .fontColor($r('app.color.color_222222')) 168 .fontColor($r('app.color.color_222222'))
139 .fontWeight(600) 169 .fontWeight(600)
140 - .maxLines(2) 170 + // .maxLines(2)
141 .margin({ 171 .margin({
142 bottom: 8 172 bottom: 8
143 }) 173 })
@@ -151,7 +181,7 @@ export struct ENewspaperListDialog { @@ -151,7 +181,7 @@ export struct ENewspaperListDialog {
151 .margin({ 181 .margin({
152 bottom: 8 182 bottom: 8
153 }) 183 })
154 - .maxLines(2) 184 + // .maxLines(2)
155 } 185 }
156 186
157 if (positionItem.downTitle) { 187 if (positionItem.downTitle) {
@@ -162,7 +192,7 @@ export struct ENewspaperListDialog { @@ -162,7 +192,7 @@ export struct ENewspaperListDialog {
162 .margin({ 192 .margin({
163 bottom: 8 193 bottom: 8
164 }) 194 })
165 - .maxLines(2) 195 + // .maxLines(2)
166 } 196 }
167 if (positionItem.newsTxt) { 197 if (positionItem.newsTxt) {
168 Text(positionItem.newsTxt) 198 Text(positionItem.newsTxt)
@@ -251,16 +281,13 @@ export struct ENewspaperListDialog { @@ -251,16 +281,13 @@ export struct ENewspaperListDialog {
251 this.currentPageNum = `${firstIndex < 9 ? '0' + (firstIndex + 1) : firstIndex + 1}` 281 this.currentPageNum = `${firstIndex < 9 ? '0' + (firstIndex + 1) : firstIndex + 1}`
252 // } 282 // }
253 }) 283 })
254 - .onScroll((scrollOffset: number, scrollState: ScrollState) => {  
255 - // console.info(`onScroll scrollState = ScrollState` + scrollState + `, scrollOffset = ` + scrollOffset)  
256 - // if (this.scrollOffset == 0) {  
257 - // this.scrollOffset = 0  
258 - // }  
259 - })  
260 } 284 }
261 - .margin({ top: 124 }) 285 + // .margin({ top: 124 })
  286 + .margin({ top: this.topHeight })
  287 +
262 .width('100%') 288 .width('100%')
263 .backgroundColor(Color.White) 289 .backgroundColor(Color.White)
  290 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
264 .onClick(() => { 291 .onClick(() => {
265 292
266 }) 293 })
@@ -272,6 +299,33 @@ export struct ENewspaperListDialog { @@ -272,6 +299,33 @@ export struct ENewspaperListDialog {
272 this.closeDialog() 299 this.closeDialog()
273 } 300 }
274 }) 301 })
  302 + .gesture(
  303 + PanGesture(this.panOption)
  304 + .onActionStart((event: GestureEvent) => {
  305 + Logger.debug('ENewspaperListDialog','Pan start')
  306 + })
  307 + .onActionUpdate((event: GestureEvent) => {
  308 + if (event) {
  309 + if (this.topFixedHeight + event.offsetY >= this.topFixedHeight) {
  310 + this.topHeight = this.topFixedHeight + event.offsetY
  311 + }
  312 + Logger.debug('ENewspaperListDialog', 'topHeight:' + this.topHeight)
  313 + }
  314 + })
  315 + .onActionEnd(() => {
  316 + this.onCloseGestureDialog()
  317 + })
  318 + )
  319 + }
  320 +
  321 + onCloseGestureDialog() {
  322 + if (this.topHeight >= this.deviceHeight ) {
  323 + if (this.closeDialog) {
  324 + this.closeDialog()
  325 + }
  326 + } else {
  327 + this.topHeight = this.topFixedHeight
  328 + }
275 } 329 }
276 330
277 updateRecordsData() { 331 updateRecordsData() {
1 -import lottie, { AnimationItem, AnimationSegment } from '@ohos/lottie';  
2 -  
3 -@Component  
4 -export struct LottieView {  
5 - @Prop name: string  
6 - @Prop path: string  
7 - @Prop lottieWidth: number = 30  
8 - @Prop lottieHeight: number = 30  
9 - @Prop autoplay: boolean = false  
10 - @Prop loop: boolean = false  
11 - @Prop initialSegment?: AnimationSegment = [0, 120] // 动画起始帧  
12 - @Prop onReady: (animateItem: AnimationItem | null) => void // 动画初始化完成事件  
13 - @Prop onComplete: () => void = () => {  
14 - } // 动画完成事件  
15 - private politeChickyController: CanvasRenderingContext2D = new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象  
16 - private animateItem: AnimationItem | null = null; // 初始化loadAnimation接口的返回对象  
17 -  
18 - // 页面隐藏销毁动画  
19 - onPageHide(): void {  
20 - this.animateItem?.destroy()  
21 -  
22 - if (this.onComplete) {  
23 - this.animateItem?.removeEventListener('complete', this.onComplete)  
24 - }  
25 - }  
26 -  
27 - /**  
28 - * 加载动画  
29 - * @param autoplay 控制动画是否自动播放参数  
30 - */  
31 - loadAnimation() {  
32 - // 销毁动画,减少缓存  
33 - if (this.animateItem !== null) {  
34 - this.animateItem.destroy();  
35 - this.animateItem = null;  
36 - }  
37 -  
38 - this.animateItem = lottie.loadAnimation({  
39 - container: this.politeChickyController,  
40 - renderer: 'canvas',  
41 - loop: this.loop,  
42 - autoplay: this.autoplay,  
43 - name: this.name, // 动画名称  
44 - path: this.path, // hap包内动画资源文件路径,仅支持json格式  
45 - // initialSegment: this.initialSegment  
46 - })  
47 - if (this.initialSegment) {  
48 - this.animateItem.segments = this.initialSegment  
49 - }  
50 -  
51 - if (this.onComplete) {  
52 - this.animateItem.addEventListener('complete', this.onComplete)  
53 - }  
54 -  
55 - }  
56 -  
57 - build() {  
58 - Stack({ alignContent: Alignment.TopStart }) {  
59 - Canvas(this.politeChickyController)  
60 - .width(this.lottieWidth)  
61 - .height(this.lottieHeight)  
62 - .backgroundColor(Color.Black)  
63 - .onReady(() => {  
64 - this.loadAnimation();  
65 - if (this.onReady) {  
66 - this.onReady(this.animateItem)  
67 - }  
68 - })  
69 - .onClick(() => {  
70 - this.animateItem?.play()  
71 - })  
72 - }  
73 - }  
74 -}  
  1 +
  2 +/**
  3 + * WDMessageCenterMessageType 拉取消息类型
  4 + */
  5 +export const enum WDMessageCenterMessageType {
  6 + WDMessageCenterMessageType_Interact = 1, //互动通知
  7 + WDMessageCenterMessageType_Subscribe, //预约消息
  8 + WDMessageCenterMessageType_System, //系统消息
  9 +}
  10 +
  11 +
  12 +export interface InteractMessageListModel{
  13 + data: InteractMessageMItem
  14 + code: number
  15 + message: string
  16 + success: string
  17 + timestamp: number
  18 +}
  19 +
  20 +
  21 +export class InteractMessageMItem{
  22 + pageNum:number = 0
  23 + pageSize:number = 0
  24 + totalCount:number = 0
  25 + hasNext:number = 0
  26 + list:InteractMessageModel[] = []
  27 +
  28 + constructor(list?:InteractMessageModel[],pageNum?: number,pageSize?: number,totalCount?: number,hasNext?:number) {
  29 + }
  30 +}
  31 +
  32 +export class InteractMessageModel {
  33 + classify: string = '';
  34 + contentId: string = '';
  35 + contentType: string = '';
  36 + id: number = 0;
  37 + message: string = '';
  38 + platform: string = '';
  39 + privateMailId: number = 0;
  40 + privateMailIdList: number[] = [];
  41 + privateMailIds: string = '';
  42 + privateMailNum: number = 0;
  43 + read: boolean = true;
  44 + source: string = '';
  45 + time: string = '';
  46 + title: string = '';
  47 + userId: string = '';
  48 + remark: string = '';
  49 + InteractMsubM:InteractMsubModel = new InteractMsubModel;
  50 +}
  51 +
  52 +export class InteractMsubModel {
  53 + beReply: string = '';
  54 + headUrl: string = '';
  55 + contentId: string = '';
  56 + contentRelObjectid: string = '';
  57 + contentTitle: string = '';
  58 + commentContent: string = '';
  59 + userName: string = '';
  60 + userId: string = '';
  61 + contentRelId: string = '';
  62 + shareUrl: string = '';
  63 + userType: string = '';
  64 + contentRelType: string = '';
  65 + visitor: string = '';
  66 + contentType: string = '';
  67 +}
  68 +
  69 +export interface InteractMParams {
  70 + contentType?: string;
  71 + pageNum?: string;
  72 + pageSize?: string;
  73 + userId?: string;
  74 + createTime?: string;
  75 +}
  76 +
  77 +export interface InteractMDTO{
  78 + success: boolean;
  79 + code: number;
  80 + message: string;
  81 + data: number;
  82 + timestamp?: number;
  83 +}
@@ -24,6 +24,7 @@ import { CommentLikeOperationRequestItem } from '../viewmodel/CommentLikeOperati @@ -24,6 +24,7 @@ import { CommentLikeOperationRequestItem } from '../viewmodel/CommentLikeOperati
24 import { FollowOperationRequestItem } from '../viewmodel/FollowOperationRequestItem'; 24 import { FollowOperationRequestItem } from '../viewmodel/FollowOperationRequestItem';
25 import { SpConstants } from 'wdConstant/Index'; 25 import { SpConstants } from 'wdConstant/Index';
26 import { MessageItem } from '../viewmodel/MessageItem'; 26 import { MessageItem } from '../viewmodel/MessageItem';
  27 +import { MessageUnReadItem } from '../viewmodel/MessageUnReadItem';
27 28
28 const TAG = "MinePageDatasModel" 29 const TAG = "MinePageDatasModel"
29 30
@@ -597,6 +598,33 @@ class MinePageDatasModel{ @@ -597,6 +598,33 @@ class MinePageDatasModel{
597 }) 598 })
598 }) 599 })
599 } 600 }
  601 +
  602 + /**
  603 + * 获取消息未读数据
  604 + * @param pageSize
  605 + * @param pageNum
  606 + * @returns
  607 + */
  608 + getMessageUnReadData(): Promise<MessageUnReadItem> {
  609 + return new Promise<MessageUnReadItem>((success, error) => {
  610 + this.fetchMessageUnReadData().then((navResDTO: ResponseDTO<MessageUnReadItem>) => {
  611 + if (!navResDTO || navResDTO.code != 0) {
  612 + error(null)
  613 + return
  614 + }
  615 + let navigationBean = navResDTO.data as MessageUnReadItem
  616 + success(navigationBean);
  617 + }).catch((err: Error) => {
  618 + error(null)
  619 + })
  620 + })
  621 + }
  622 +
  623 + fetchMessageUnReadData() {
  624 + let url = HttpUrlUtils.getMessageUnReadDataUrl()
  625 + return WDHttp.get<ResponseDTO<MessageUnReadItem>>(url)
  626 + };
  627 +
600 } 628 }
601 629
602 const minePageDatasModel = MinePageDatasModel.getInstance() 630 const minePageDatasModel = MinePageDatasModel.getInstance()
@@ -43,7 +43,6 @@ export interface MyCollectionListModel{ @@ -43,7 +43,6 @@ export interface MyCollectionListModel{
43 } 43 }
44 44
45 45
46 -  
47 export interface contentListItemParams{ 46 export interface contentListItemParams{
48 contentId?:string; 47 contentId?:string;
49 contentType?:string; 48 contentType?:string;
@@ -8,5 +8,6 @@ struct SearchPage { @@ -8,5 +8,6 @@ struct SearchPage {
8 SearchComponent() 8 SearchComponent()
9 }.height('100%') 9 }.height('100%')
10 .width('100%') 10 .width('100%')
  11 + .backgroundColor($r('app.color.white'))
11 } 12 }
12 } 13 }
  1 +import { router } from '@kit.ArkUI';
  2 +
  3 +@Entry
  4 +@Component
  5 +struct ShowHomePageHeaderPage {
  6 + @State headPhotoUrl: string = '';
  7 + @State params:Record<string, string> = router.getParams() as Record<string, string>;
  8 +
  9 + onPageShow() {
  10 + this.headPhotoUrl = this.params?.['headPhotoUrl'];
  11 + }
  12 +
  13 + build() {
  14 + Row() {
  15 + Image(this.headPhotoUrl)
  16 + .alt( $r('app.media.WDAccountOwnerHedaerDefaultIcon') )
  17 + .width('100%')
  18 + .objectFit(ImageFit.Contain)
  19 + }
  20 + .width('100%')
  21 + .height('100%')
  22 + .alignItems(VerticalAlign.Center)
  23 + .backgroundColor($r('app.color.color_000000'))
  24 + .onClick(()=>{
  25 + router.back()
  26 + })
  27 + }
  28 +}
@@ -4,18 +4,16 @@ import { router } from '@kit.ArkUI'; @@ -4,18 +4,16 @@ import { router } from '@kit.ArkUI';
4 @Component 4 @Component
5 struct ShowUserHeaderPage { 5 struct ShowUserHeaderPage {
6 @State headPhotoUrl: string = ''; 6 @State headPhotoUrl: string = '';
7 - @State headType: string = ''  
8 @State params:Record<string, string> = router.getParams() as Record<string, string>; 7 @State params:Record<string, string> = router.getParams() as Record<string, string>;
9 8
10 onPageShow() { 9 onPageShow() {
11 this.headPhotoUrl = this.params?.['headPhotoUrl']; 10 this.headPhotoUrl = this.params?.['headPhotoUrl'];
12 - this.headType = this.params?.['headType'] ?? '';  
13 } 11 }
14 12
15 build() { 13 build() {
16 Row() { 14 Row() {
17 Image(this.headPhotoUrl) 15 Image(this.headPhotoUrl)
18 - .alt(this.headType.length > 0 ? $r('app.media.WDAccountOwnerHedaerDefaultIcon') : $r('app.media.default_head')) 16 + .alt($r('app.media.default_head'))
19 .width('720lpx') 17 .width('720lpx')
20 .height('720lpx') 18 .height('720lpx')
21 .objectFit(ImageFit.Auto) 19 .objectFit(ImageFit.Auto)
  1 +// import { collcetRecordParams, MyCollectionItem, MyCollectionListModel } from '../model/MyCollectionModel';
  2 +import { HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork';
  3 +import { Logger } from 'wdKit';
  4 +import promptAction from '@ohos.promptAction';
  5 +import {
  6 + InteractMDTO,
  7 + InteractMessageListModel, InteractMessageMItem, InteractMParams } from '../model/InteractMessageModel';
  8 +
  9 +const TAG = "MyCollectionViewModel"
  10 +
  11 +class InteractMessageViewModel {
  12 + private static instance:InteractMessageViewModel
  13 + /**
  14 + * 单例模式
  15 + * @returns
  16 + */
  17 + public static getInstance(): InteractMessageViewModel {
  18 + if (!InteractMessageViewModel.instance) {
  19 + InteractMessageViewModel.instance = new InteractMessageViewModel();
  20 + }
  21 + return InteractMessageViewModel.instance;
  22 + }
  23 +
  24 + // ///互动通知
  25 + // WDMessageCenterMessageType_Interact = 1,
  26 + //
  27 + // ///预约消息
  28 + // WDMessageCenterMessageType_Subscribe = 2,
  29 + //
  30 + // ///系统消息
  31 + // WDMessageCenterMessageType_System = 3
  32 +
  33 + BaseGetRequest(contentType:number,pageNum:number){
  34 + let userID = HttpUtils.getUserId();
  35 + let url = HttpUrlUtils.getMessageListDataUrl()+`?contentType=${contentType}&userId=${userID}&pageSize=${20}&pageNum=${pageNum}`
  36 + return WDHttp.get<InteractMessageListModel>(url)
  37 + }
  38 +
  39 +
  40 + fetchMessageList(contentType:number,pageNum:number):Promise<InteractMessageMItem>{
  41 + return new Promise((success,error) => {
  42 + this.BaseGetRequest(contentType,pageNum).then((navResDTO: InteractMessageListModel) => {
  43 + if (!navResDTO || navResDTO.code != 0) {
  44 + return
  45 + }
  46 + Logger.info(TAG, "fetchMessageList then,navResDTO.timeStamp:" + navResDTO.timestamp);
  47 + success(navResDTO.data)
  48 + }).catch((err: Error) => {
  49 + Logger.error(TAG, `fetchMessageList catch, error.name : ${err.name}, error.message:${err.message}`);
  50 + error("page data invalid");
  51 + })
  52 + })
  53 + }
  54 +
  55 + getMessageLikeCount():Promise<number>{
  56 + return new Promise((success,error) => {
  57 + WDHttp.get<InteractMDTO>(HttpUrlUtils.getMessageLikeCount()).then((navResDTO: InteractMDTO) => {
  58 + if (navResDTO.code == 0) {
  59 + success(navResDTO.data)
  60 + }
  61 + })
  62 + .catch((error: Error) => {
  63 + Logger.info(TAG,'executeCollcet','ResponseDTO')
  64 + })
  65 + })
  66 + }
  67 +}
  68 +
  69 +const interactMViewModel = InteractMessageViewModel.getInstance();
  70 +
  71 +export default interactMViewModel as InteractMessageViewModel
@@ -49,9 +49,6 @@ export class LiveModel { @@ -49,9 +49,6 @@ export class LiveModel {
49 params['relationId'] = relationId 49 params['relationId'] = relationId
50 params['liveId'] = liveId 50 params['liveId'] = liveId
51 params['isSubscribe'] = `${isSubscribe}` 51 params['isSubscribe'] = `${isSubscribe}`
52 - Logger.info('relationId', relationId)  
53 - Logger.info('liveId', liveId)  
54 - Logger.info('isSubscribe', typeof isSubscribe)  
55 return new Promise<ResponseDTO<string>>((success, fail) => { 52 return new Promise<ResponseDTO<string>>((success, fail) => {
56 HttpRequest.post<ResponseDTO<string>>( 53 HttpRequest.post<ResponseDTO<string>>(
57 HttpUrlUtils.getLiveAppointmentUrl(), 54 HttpUrlUtils.getLiveAppointmentUrl(),
  1 +export class MessageUnReadItem{
  2 + activeCount: number = 0 //互动通知未读数
  3 + subscribeCount: number = 0 //预约消息未读数
  4 + systemCount: number = 0 //系统通知未读数
  5 +
  6 + subscribeInfo: SubscribeInfo = new SubscribeInfo()
  7 + systemInfo: SystemInfo = new SystemInfo()
  8 + activeInfo: ActiveInfo = new ActiveInfo
  9 +}
  10 +
  11 +class SubscribeInfo{
  12 + classify: string = ""
  13 + contentId: string = ""
  14 + contentType: string = ""
  15 + id: number = -1
  16 + message: string = ""
  17 + platform: string = ""
  18 + privateMailId: number = -1
  19 + privateMailIdList: Array< string > = []
  20 + privateMailIds: string = ""
  21 + privateMailNum: number = -1
  22 + read: boolean = false
  23 + source: string = ""
  24 + time: string = ""
  25 + title: string = ""
  26 + userId: number = -1
  27 + remark: string = ""
  28 +}
  29 +class SystemInfo{
  30 + classify: string = ""
  31 + contentType: string = ""
  32 + id: number = -1
  33 + message: string = ""
  34 + platform: string = ""
  35 + privateMailId: number = -1
  36 + privateMailIdList: Array< string > = []
  37 + privateMailIds: string = ""
  38 + privateMailNum: number = -1
  39 + read: boolean = false
  40 + source: string = ""
  41 + time: string = ""
  42 + title: string = ""
  43 + userId: number = -1
  44 +}
  45 +
  46 +class ActiveInfo{
  47 + id:string = ""
  48 + message: string = ""
  49 + time: string = ""
  50 + title: string = ""
  51 +}
1 1
2 import FunctionsItem from './FunctionsItem' 2 import FunctionsItem from './FunctionsItem'
3 3
  4 +@Observed
4 export default class MinePagePersonalFunctionsItem extends FunctionsItem { 5 export default class MinePagePersonalFunctionsItem extends FunctionsItem {
  6 + isShowRedPoint:boolean = false
5 } 7 }
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
24 "components/page/ThemeListPage", 24 "components/page/ThemeListPage",
25 "pages/ShowUserHeaderPage", 25 "pages/ShowUserHeaderPage",
26 "pages/MineMessagePage", 26 "pages/MineMessagePage",
27 - "components/page/InteractMessagePage" 27 + "components/page/InteractMessagePage",
  28 + "pages/ShowHomePageHeaderPage"
28 ] 29 ]
29 } 30 }
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 "main": "Index.ets", 7 "main": "Index.ets",
8 "version": "1.0.0", 8 "version": "1.0.0",
9 "dependencies": { 9 "dependencies": {
  10 + "@ohos/lottie": "2.0.10",
10 "wdComponent": "file:../../features/wdComponent", 11 "wdComponent": "file:../../features/wdComponent",
11 "wdPlayer": "file:../../features/wdPlayer", 12 "wdPlayer": "file:../../features/wdPlayer",
12 "wdNetwork": "file:../../commons/wdNetwork", 13 "wdNetwork": "file:../../commons/wdNetwork",
@@ -70,6 +70,7 @@ export struct DetailPlayLiveCommon { @@ -70,6 +70,7 @@ export struct DetailPlayLiveCommon {
70 this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId) 70 this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
71 this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle) 71 this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
72 this.publishCommentModel.targetType = String(this.contentDetailData?.newsType) 72 this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
  73 + this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
73 this.publishCommentModel.commentContent = '' 74 this.publishCommentModel.commentContent = ''
74 // } 75 // }
75 } 76 }
@@ -61,19 +61,19 @@ export struct DetailPlayLivePage { @@ -61,19 +61,19 @@ export struct DetailPlayLivePage {
61 .layoutWeight(503) 61 .layoutWeight(503)
62 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) 62 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
63 63
64 - if (this.contentDetailData?.newsId) {  
65 - OperRowListView({  
66 - operationButtonList: ['comment', 'collect', 'share', 'like'],  
67 - contentDetailData: this.contentDetailData,  
68 - publishCommentModel: this.publishCommentModel,  
69 - showCommentIcon: false,  
70 - onCommentFocus: () => {  
71 - // 切换到大家聊  
72 - this.changeToTab = Math.random()  
73 - }  
74 - })  
75 - .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)  
76 - } 64 + OperRowListView({
  65 + componentType: 4,
  66 + operationButtonList: ['comment', 'collect', 'share', 'like'],
  67 + contentDetailData: this.contentDetailData,
  68 + publishCommentModel: this.publishCommentModel,
  69 + showCommentIcon: false,
  70 + onCommentFocus: () => {
  71 + // 切换到大家聊
  72 + this.changeToTab = Math.random()
  73 + }
  74 + })
  75 + .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
  76 +
77 // LiveCommentComponent({ heartNum: this.liveRoomDataBean.likeNum }) 77 // LiveCommentComponent({ heartNum: this.liveRoomDataBean.likeNum })
78 // .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) 78 // .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
79 } 79 }
@@ -81,7 +81,7 @@ export struct DetailPlayLivePage { @@ -81,7 +81,7 @@ export struct DetailPlayLivePage {
81 .width('100%') 81 .width('100%')
82 } 82 }
83 83
84 - async aboutToDisappear() { 84 + async aboutToDisappear() {
85 Logger.info(TAG, `wyj-aboutToDisappear`) 85 Logger.info(TAG, `wyj-aboutToDisappear`)
86 await this.playerController?.stop() 86 await this.playerController?.stop()
87 await this.playerController?.release() 87 await this.playerController?.release()
@@ -127,7 +127,7 @@ export struct DetailPlayLivePage { @@ -127,7 +127,7 @@ export struct DetailPlayLivePage {
127 } else { 127 } else {
128 this.tabs = ['直播间', '大家聊'] 128 this.tabs = ['直播间', '大家聊']
129 } 129 }
130 - 130 +
131 } 131 }
132 132
133 getLiveRoomData() { 133 getLiveRoomData() {
1 import { window } from '@kit.ArkUI' 1 import { window } from '@kit.ArkUI'
  2 +import lottie from '@ohos/lottie';
  3 +
2 import { NumberFormatterUtils, StringUtils, WindowModel } from 'wdKit/Index' 4 import { NumberFormatterUtils, StringUtils, WindowModel } from 'wdKit/Index'
3 import { DateFormatUtil, WDPlayerController } from 'wdPlayer/Index' 5 import { DateFormatUtil, WDPlayerController } from 'wdPlayer/Index'
4 import { LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index' 6 import { LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index'
5 import { DisplayDirection } from 'wdConstant/Index' 7 import { DisplayDirection } from 'wdConstant/Index'
6 -import { LiveFollowComponent } from 'wdComponent/Index' 8 +import { LiveFollowComponent, LottieView } from 'wdComponent/Index'
7 9
8 @Component 10 @Component
9 export struct PlayUIComponent { 11 export struct PlayUIComponent {
@@ -44,6 +46,12 @@ export struct PlayUIComponent { @@ -44,6 +46,12 @@ export struct PlayUIComponent {
44 } 46 }
45 } 47 }
46 48
  49 + aboutToDisappear(): void {
  50 + if (this.liveDetailsBean.liveInfo?.liveState == 'running') {
  51 + lottie.destroy('live_status_wait')
  52 + }
  53 + }
  54 +
47 build() { 55 build() {
48 Column() { 56 Column() {
49 if (this.liveDetailsBean && this.liveDetailsBean.liveInfo) { 57 if (this.liveDetailsBean && this.liveDetailsBean.liveInfo) {
@@ -113,11 +121,12 @@ export struct PlayUIComponent { @@ -113,11 +121,12 @@ export struct PlayUIComponent {
113 } 121 }
114 } 122 }
115 .width('100%') 123 .width('100%')
  124 + // .width(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 'calc(100% - 80vp)' : 'calc(100% - 32vp)')
116 .padding({ 125 .padding({
117 top: 15, 126 top: 15,
118 bottom: 6, 127 bottom: 6,
119 - left: 10,  
120 - right: 10 128 + left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp',
  129 + right: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp'
121 }) 130 })
122 .alignItems(HorizontalAlign.Start) 131 .alignItems(HorizontalAlign.Start)
123 .visibility(this.isMenuVisible ? Visibility.Visible : Visibility.None) 132 .visibility(this.isMenuVisible ? Visibility.Visible : Visibility.None)
@@ -130,6 +139,7 @@ export struct PlayUIComponent { @@ -130,6 +139,7 @@ export struct PlayUIComponent {
130 // 预约 139 // 预约
131 if (this.liveDetailsBean.liveInfo?.liveState == 'wait') { 140 if (this.liveDetailsBean.liveInfo?.liveState == 'wait') {
132 Row() { 141 Row() {
  142 +
133 Image($r('app.media.icon_live_status_wait')) 143 Image($r('app.media.icon_live_status_wait'))
134 .width(22) 144 .width(22)
135 .height(18) 145 .height(18)
@@ -148,9 +158,21 @@ export struct PlayUIComponent { @@ -148,9 +158,21 @@ export struct PlayUIComponent {
148 // 直播中 158 // 直播中
149 else if (this.liveDetailsBean.liveInfo?.liveState == 'running') { 159 else if (this.liveDetailsBean.liveInfo?.liveState == 'running') {
150 Row() { 160 Row() {
151 - Image($r('app.media.icon_live_status_running'))  
152 - .width(22)  
153 - .height(18) 161 + Stack() {
  162 + Image($r('app.media.icon_live_status_running_back'))
  163 + .width(22)
  164 + .height(18)
  165 + LottieView({
  166 + name: 'live_status_wait',
  167 + path: "lottie/live_detail_living.json",
  168 + lottieWidth: 9,
  169 + lottieHeight: 9,
  170 + autoplay: true,
  171 + loop: true,
  172 + })
  173 + .margin({ right: 2 })
  174 + }
  175 +
154 Text('直播中') 176 Text('直播中')
155 .fontSize('11fp') 177 .fontSize('11fp')
156 .fontWeight(400) 178 .fontWeight(400)
@@ -271,8 +293,8 @@ export struct PlayUIComponent { @@ -271,8 +293,8 @@ export struct PlayUIComponent {
271 .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] }) 293 .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] })
272 .width('100%') 294 .width('100%')
273 .padding({ 295 .padding({
274 - left: 10,  
275 - right: 10, 296 + left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp',
  297 + right: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp',
276 top: 15, 298 top: 15,
277 bottom: 15 299 bottom: 15
278 }) 300 })
@@ -28,11 +28,11 @@ export struct TopPlayComponent { @@ -28,11 +28,11 @@ export struct TopPlayComponent {
28 28
29 updateData() { 29 updateData() {
30 //直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 30 //直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停
31 - if (this.liveDetailsBean.liveInfo && this.liveDetailsBean.liveInfo.previewUrl && this.liveDetailsBean.liveInfo.previewUrl.length > 0) { 31 + if (this.liveDetailsBean.liveInfo && this.liveDetailsBean.liveInfo.previewUrl &&
  32 + this.liveDetailsBean.liveInfo.previewUrl.length > 0) {
32 this.imgUrl = this.liveDetailsBean.liveInfo.previewUrl 33 this.imgUrl = this.liveDetailsBean.liveInfo.previewUrl
33 Logger.debug(TAG, 'ok+' + `${this.imgUrl}`) 34 Logger.debug(TAG, 'ok+' + `${this.imgUrl}`)
34 - }  
35 - else if (this.liveDetailsBean.fullColumnImgUrls && this.liveDetailsBean.fullColumnImgUrls.length > 0) { 35 + } else if (this.liveDetailsBean.fullColumnImgUrls && this.liveDetailsBean.fullColumnImgUrls.length > 0) {
36 this.imgUrl = this.liveDetailsBean.fullColumnImgUrls[0].url 36 this.imgUrl = this.liveDetailsBean.fullColumnImgUrls[0].url
37 Logger.debug(TAG, 'ok-' + `${this.imgUrl}`) 37 Logger.debug(TAG, 'ok-' + `${this.imgUrl}`)
38 } 38 }
@@ -81,6 +81,7 @@ export struct TopPlayComponent { @@ -81,6 +81,7 @@ export struct TopPlayComponent {
81 .alignSelf(ItemAlign.Center) 81 .alignSelf(ItemAlign.Center)
82 } 82 }
83 83
84 - aboutToDisappear(): void { 84 + async aboutToDisappear(): Promise<void> {
  85 + await this.playerController?.release()
85 } 86 }
86 } 87 }
@@ -115,6 +115,7 @@ export struct PlayerCommentComponent { @@ -115,6 +115,7 @@ export struct PlayerCommentComponent {
115 // 收藏、分享、点赞是否需要根据字段显隐 115 // 收藏、分享、点赞是否需要根据字段显隐
116 OperRowListView({ 116 OperRowListView({
117 styleType: 3, 117 styleType: 3,
  118 + componentType: 4,
118 operationButtonList: ['comment', 'collect', 'share', 'like'], 119 operationButtonList: ['comment', 'collect', 'share', 'like'],
119 contentDetailData: this.contentDetailData, 120 contentDetailData: this.contentDetailData,
120 publishCommentModel: this.publishCommentModel, 121 publishCommentModel: this.publishCommentModel,
@@ -37,11 +37,10 @@ export struct PlayerComponent { @@ -37,11 +37,10 @@ export struct PlayerComponent {
37 } 37 }
38 } 38 }
39 39
40 - aboutToDisappear(): void {  
41 - 40 + async aboutToDisappear(): Promise<void> {
42 this.playerController?.pause() 41 this.playerController?.pause()
43 this.playerController?.stop() 42 this.playerController?.stop()
44 - this.playerController?.release() 43 + await this.playerController?.release()
45 } 44 }
46 45
47 updateData() { 46 updateData() {
  1 +import lottie from '@ohos/lottie'
1 import { LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index' 2 import { LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index'
2 -import { LiveFollowComponent } from 'wdComponent/Index' 3 +import { LiveFollowComponent, LottieView } from 'wdComponent/Index'
3 import { NumberFormatterUtils } from 'wdKit/Index' 4 import { NumberFormatterUtils } from 'wdKit/Index'
4 5
5 @Preview 6 @Preview
@@ -9,6 +10,12 @@ export struct PlayerTitleComponent { @@ -9,6 +10,12 @@ export struct PlayerTitleComponent {
9 @Consume liveRoomDataBean: LiveRoomDataBean 10 @Consume liveRoomDataBean: LiveRoomDataBean
10 @Consume liveState: string 11 @Consume liveState: string
11 12
  13 + aboutToDisappear(): void {
  14 + if (this.liveDetailsBean.liveInfo?.liveState == 'running') {
  15 + lottie.destroy('live_status_wait')
  16 + }
  17 + }
  18 +
12 build() { 19 build() {
13 Column() { 20 Column() {
14 Row() { 21 Row() {
@@ -47,10 +54,25 @@ export struct PlayerTitleComponent { @@ -47,10 +54,25 @@ export struct PlayerTitleComponent {
47 if (this.liveRoomDataBean.liveId) { 54 if (this.liveRoomDataBean.liveId) {
48 Row() { 55 Row() {
49 if (this.liveState == 'running') { 56 if (this.liveState == 'running') {
50 - Image($r('app.media.icon_live_status_running'))  
51 - .width(22)  
52 - .height(18)  
53 - .margin({ right: 1 }) 57 + Stack() {
  58 + Image($r('app.media.icon_live_status_running_back'))
  59 + .width(22)
  60 + .height(18)
  61 + LottieView({
  62 + name: 'live_status_wait',
  63 + path: "lottie/live_detail_living.json",
  64 + lottieWidth: 9,
  65 + lottieHeight: 9,
  66 + autoplay: true,
  67 + loop: true,
  68 + })
  69 + .margin({ right: 2 })
  70 + }.margin({ right: 1 })
  71 +
  72 + // Image($r('app.media.icon_live_status_running'))
  73 + // .width(22)
  74 + // .height(18)
  75 + // .margin({ right: 1 })
54 } 76 }
55 77
56 Text(this.liveState == 'running' ? '直播中' : '回看') 78 Text(this.liveState == 'running' ? '直播中' : '回看')
  1 +import { ContentDetailDTO } from 'wdBean/Index'
  2 +import {
  3 + publishCommentModel
  4 +} from '../../../../../wdComponent/src/main/ets/components/comment/model/PublishCommentModel'
  5 +import { CommentComponent } from '../../../../../wdComponent/src/main/ets/components/comment/view/CommentComponent'
  6 +
  7 +@Component
  8 +export struct CommentComponentPage {
  9 + scroller: Scroller = new Scroller()
  10 + @Consume contentDetailData: ContentDetailDTO
  11 + @Consume showCommentList: boolean
  12 + @State publishCommentModel: publishCommentModel = new publishCommentModel()
  13 +
  14 + aboutToAppear(): void {
  15 +
  16 + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
  17 + this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
  18 + this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
  19 + this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
  20 + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
  21 + this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
  22 + this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
  23 + }
  24 +
  25 + build() {
  26 + Scroll(this.scroller) {
  27 + Stack() {
  28 + CommentComponent({
  29 + publishCommentModel: this.publishCommentModel
  30 + })
  31 + Image($r("app.media.ic_close_black"))
  32 + .width(20)
  33 + .height(20)
  34 + .onClick(() => {
  35 + this.showCommentList = false
  36 + })
  37 + .margin({ top: 10, right: 20 })
  38 + .position({ x: '100%' })
  39 + .markAnchor({ x: '100%' })
  40 +
  41 + }
  42 + }
  43 + .zIndex(1000)
  44 + .backgroundColor(Color.White)
  45 +
  46 + }
  47 +}
1 import { ContentDetailDTO, InteractDataDTO } from 'wdBean'; 1 import { ContentDetailDTO, InteractDataDTO } from 'wdBean';
2 -import { PlayerConstants, WDPlayerController, WDPlayerRenderView } from 'wdPlayer'; 2 +import { WDPlayerController, WDPlayerRenderView } from 'wdPlayer';
3 import { ContentDetailRequest } from 'wdDetailPlayApi'; 3 import { ContentDetailRequest } from 'wdDetailPlayApi';
4 import { 4 import {
5 batchLikeAndCollectParams, 5 batchLikeAndCollectParams,
@@ -11,6 +11,7 @@ import { HttpUtils } from 'wdNetwork/Index'; @@ -11,6 +11,7 @@ import { HttpUtils } from 'wdNetwork/Index';
11 import { DateTimeUtils } from 'wdKit/Index'; 11 import { DateTimeUtils } from 'wdKit/Index';
12 import { PlayerBottomView } from '../view/PlayerBottomView'; 12 import { PlayerBottomView } from '../view/PlayerBottomView';
13 import { PlayerRightView } from '../view/PlayerRightView'; 13 import { PlayerRightView } from '../view/PlayerRightView';
  14 +import { CommentComponentPage } from './CommentComponentPage';
14 15
15 const TAG = 'DetailPlayShortVideoPage'; 16 const TAG = 'DetailPlayShortVideoPage';
16 17
@@ -32,6 +33,7 @@ export struct DetailPlayShortVideoPage { @@ -32,6 +33,7 @@ export struct DetailPlayShortVideoPage {
32 @Provide followStatus: string = '0' // 关注状态 33 @Provide followStatus: string = '0' // 关注状态
33 @Provide isOpenDetail: boolean = false // 查看详情按钮点击 34 @Provide isOpenDetail: boolean = false // 查看详情按钮点击
34 @Provide isDragging: boolean = false // 拖动时间进度条 35 @Provide isDragging: boolean = false // 拖动时间进度条
  36 + @Provide showCommentList: boolean = false
35 @Consume @Watch('videoStatusChange') switchVideoStatus: boolean 37 @Consume @Watch('videoStatusChange') switchVideoStatus: boolean
36 @Consume @Watch('pageShowChange') pageShow: number 38 @Consume @Watch('pageShowChange') pageShow: number
37 @Consume topSafeHeight: number 39 @Consume topSafeHeight: number
@@ -148,6 +150,7 @@ export struct DetailPlayShortVideoPage { @@ -148,6 +150,7 @@ export struct DetailPlayShortVideoPage {
148 this.progressVal = Math.floor(position * 100 / duration); 150 this.progressVal = Math.floor(position * 100 / duration);
149 } 151 }
150 this.queryNewsInfoOfUser() 152 this.queryNewsInfoOfUser()
  153 +
151 } 154 }
152 155
153 async aboutToDisappear(): Promise<void> { 156 async aboutToDisappear(): Promise<void> {
@@ -163,10 +166,14 @@ export struct DetailPlayShortVideoPage { @@ -163,10 +166,14 @@ export struct DetailPlayShortVideoPage {
163 PlayerBottomView({ 166 PlayerBottomView({
164 playerController: this.playerController 167 playerController: this.playerController
165 }) 168 })
  169 +
166 PlayerRightView({ 170 PlayerRightView({
167 playerController: this.playerController 171 playerController: this.playerController
168 }) 172 })
169 173
  174 + CommentComponentPage({}).visibility(this.showCommentList ? Visibility.Visible : Visibility.None)
  175 + .position({ y: '100%' })
  176 + .markAnchor({ y: '100%' })
170 } 177 }
171 .height('100%') 178 .height('100%')
172 .width('100%') 179 .width('100%')
@@ -192,6 +199,7 @@ export struct DetailPlayShortVideoPage { @@ -192,6 +199,7 @@ export struct DetailPlayShortVideoPage {
192 199
193 @Builder 200 @Builder
194 playerViewBuilder() { 201 playerViewBuilder() {
  202 +
195 WDPlayerRenderView({ 203 WDPlayerRenderView({
196 playerController: this.playerController, 204 playerController: this.playerController,
197 onLoad: async () => { 205 onLoad: async () => {
@@ -205,10 +213,13 @@ export struct DetailPlayShortVideoPage { @@ -205,10 +213,13 @@ export struct DetailPlayShortVideoPage {
205 .padding({ 213 .padding({
206 bottom: this.videoLandScape === 1 ? 115 : 0, 214 bottom: this.videoLandScape === 1 ? 115 : 0,
207 }) 215 })
  216 + .layoutWeight(1)
208 .align(this.videoLandScape === 0 ? Alignment.Top : Alignment.Center) 217 .align(this.videoLandScape === 0 ? Alignment.Top : Alignment.Center)
209 .onClick(() => { 218 .onClick(() => {
210 console.error('WDPlayerRenderView=== onClick') 219 console.error('WDPlayerRenderView=== onClick')
211 this.playerController?.switchPlayOrPause(); 220 this.playerController?.switchPlayOrPause();
212 }) 221 })
  222 +
  223 +
213 } 224 }
214 } 225 }
@@ -39,6 +39,7 @@ export struct VideoChannelDetail { @@ -39,6 +39,7 @@ export struct VideoChannelDetail {
39 // private recommend?: string = '' // 0.非推荐,1.推荐; 39 // private recommend?: string = '' // 0.非推荐,1.推荐;
40 @Link @Watch('navIndexChange') bottomNavIndex: number 40 @Link @Watch('navIndexChange') bottomNavIndex: number
41 @Link @Watch('navIndexChange') topNavIndex: number 41 @Link @Watch('navIndexChange') topNavIndex: number
  42 + @Prop @Watch('autoRefreshChange') autoRefresh: number = 0
42 @Consume barBackgroundColor: Color 43 @Consume barBackgroundColor: Color
43 private swiperController: SwiperController = new SwiperController() 44 private swiperController: SwiperController = new SwiperController()
44 @Provide showComment: boolean = false 45 @Provide showComment: boolean = false
@@ -54,6 +55,18 @@ export struct VideoChannelDetail { @@ -54,6 +55,18 @@ export struct VideoChannelDetail {
54 @State isMouted: boolean = false 55 @State isMouted: boolean = false
55 @State isRequestError: boolean = false 56 @State isRequestError: boolean = false
56 57
  58 + autoRefreshChange() {
  59 + if (this.topNavIndex === 0) {
  60 + this.data = []
  61 + this.interactDataList = []
  62 + this.totalCount = 0
  63 + this.isMouted = false
  64 + this.getRecCompInfo()
  65 + this.getRecCompInfo()
  66 + }
  67 +
  68 + }
  69 +
57 pageShowChange() { 70 pageShowChange() {
58 if (this.bottomNavIndex === 2 && this.topNavIndex === 0) { 71 if (this.bottomNavIndex === 2 && this.topNavIndex === 0) {
59 this.barBackgroundColor = Color.Black 72 this.barBackgroundColor = Color.Black
@@ -43,7 +43,7 @@ export struct DetailDialog { @@ -43,7 +43,7 @@ export struct DetailDialog {
43 .height(200) 43 .height(200)
44 44
45 Row() { 45 Row() {
46 - Image($r('app.media.ic_close')) 46 + Image($r("app.media.ic_close_white"))
47 .height(24).margin({ top: 20 }).onClick(() => { 47 .height(24).margin({ top: 20 }).onClick(() => {
48 this.controller.close() 48 this.controller.close()
49 if (this.isOpenDetail) { 49 if (this.isOpenDetail) {
@@ -3,20 +3,56 @@ import { PlayerTitleView } from './PlayerTitleView' @@ -3,20 +3,56 @@ import { PlayerTitleView } from './PlayerTitleView'
3 import { PlayerProgressView } from './PlayerProgressView' 3 import { PlayerProgressView } from './PlayerProgressView'
4 import { PlayerCommentView } from './PlayerCommentView' 4 import { PlayerCommentView } from './PlayerCommentView'
5 import { PlayerTimeSeekView } from './PlayerTimeSeekView' 5 import { PlayerTimeSeekView } from './PlayerTimeSeekView'
  6 +import { OperRowListView } from '../../../../../wdComponent/src/main/ets/components/view/OperRowListView'
  7 +import {
  8 + publishCommentModel
  9 +} from '../../../../../wdComponent/src/main/ets/components/comment/model/PublishCommentModel'
  10 +import { ContentDetailDTO } from 'wdBean/Index';
  11 +import { WindowModel } from 'wdKit/Index';
6 12
7 @Component 13 @Component
8 export struct PlayerBottomView { 14 export struct PlayerBottomView {
9 private playerController?: WDPlayerController; 15 private playerController?: WDPlayerController;
  16 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
10 @Consume showComment?: boolean 17 @Consume showComment?: boolean
11 @Consume isOpenDetail?: boolean 18 @Consume isOpenDetail?: boolean
12 @Consume isDragging?: boolean 19 @Consume isDragging?: boolean
  20 + @Consume contentDetailData: ContentDetailDTO
  21 + @State publishCommentModel: publishCommentModel = new publishCommentModel()
  22 +
  23 + aboutToAppear(): void {
  24 + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
  25 + this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
  26 + this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
  27 + this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
  28 + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
  29 + this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
  30 + this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
  31 + this.publishCommentModel.commentContent = ''
  32 + }
13 33
14 build() { 34 build() {
15 Column() { 35 Column() {
16 PlayerTitleView() 36 PlayerTitleView()
17 PlayerProgressView({ playerController: this.playerController }) 37 PlayerProgressView({ playerController: this.playerController })
18 if (this.showComment) { 38 if (this.showComment) {
19 - PlayerCommentView() 39 + // PlayerCommentView()
  40 + OperRowListView({
  41 + pageComponentType: 1,
  42 + styleType: 3,
  43 + componentType: 4,
  44 + operationButtonList: ['comment',],
  45 + contentDetailData: this.contentDetailData,
  46 + publishCommentModel: this.publishCommentModel,
  47 + showCommentIcon: false,
  48 + onBack: () => {
  49 + WindowModel.shared.setWindowLayoutFullScreen(false)
  50 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
  51 + }
  52 + })
  53 + .padding({
  54 + bottom: -this.bottomSafeHeight + 'px'
  55 + })
20 } 56 }
21 } 57 }
22 .alignItems(HorizontalAlign.Start) 58 .alignItems(HorizontalAlign.Start)
@@ -32,6 +32,7 @@ export struct PlayerRightView { @@ -32,6 +32,7 @@ export struct PlayerRightView {
32 @Consume isOpenDetail: boolean 32 @Consume isOpenDetail: boolean
33 @Consume isDragging: boolean 33 @Consume isDragging: boolean
34 @Consume showComment?: boolean 34 @Consume showComment?: boolean
  35 + @Consume showCommentList: boolean
35 @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 36 @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
36 37
37 aboutToAppear() { 38 aboutToAppear() {
@@ -343,7 +344,8 @@ export struct PlayerRightView { @@ -343,7 +344,8 @@ export struct PlayerRightView {
343 } 344 }
344 .margin({ bottom: 20 }) 345 .margin({ bottom: 20 })
345 .onClick((event: ClickEvent) => { 346 .onClick((event: ClickEvent) => {
346 - ToastUtils.showToast('评论为公共方法,待开发', 1000); 347 + // ToastUtils.showToast('评论为公共方法,待开发', 1000);
  348 + this.showCommentList = true
347 }) 349 })
348 } 350 }
349 351
@@ -5,6 +5,14 @@ @@ -5,6 +5,14 @@
5 "value": "#FFFFFF" 5 "value": "#FFFFFF"
6 }, 6 },
7 { 7 {
  8 + "name": "color_transparent",
  9 + "value": "#00000000"
  10 + },
  11 + {
  12 + "name": "color_222222",
  13 + "value": "#222222"
  14 + },
  15 + {
8 "name": "play_track_color", 16 "name": "play_track_color",
9 "value": "#1AFFFFFF" 17 "value": "#1AFFFFFF"
10 }, 18 },
@@ -29,6 +37,18 @@ @@ -29,6 +37,18 @@
29 "value": "#4DFFFFFF" 37 "value": "#4DFFFFFF"
30 }, 38 },
31 { 39 {
  40 + "name": "color_666666",
  41 + "value": "#666666"
  42 + },
  43 + {
  44 + "name": "color_B0B0B0",
  45 + "value": "#B0B0B0"
  46 + },
  47 + {
  48 + "name": "color_EDEDED",
  49 + "value": "#EDEDED"
  50 + },
  51 + {
32 "name": "divider_color", 52 "name": "divider_color",
33 "value": "#D3D3D3" 53 "value": "#D3D3D3"
34 }, 54 },
@@ -3,6 +3,22 @@ @@ -3,6 +3,22 @@
3 { 3 {
4 "name": "shared_desc", 4 "name": "shared_desc",
5 "value": "description" 5 "value": "description"
  6 + },
  7 + {
  8 + "name": "footer_text",
  9 + "value": "已显示全部内容"
  10 + },
  11 + {
  12 + "name": "pull_up_load_text",
  13 + "value": "加载中..."
  14 + },
  15 + {
  16 + "name": "pull_down_refresh_text",
  17 + "value": "下拉刷新"
  18 + },
  19 + {
  20 + "name": "release_refresh_text",
  21 + "value": "松开刷新"
6 } 22 }
7 ] 23 ]
8 } 24 }
@@ -2,7 +2,10 @@ import HuaweiAuth from './utils/HuaweiAuth' @@ -2,7 +2,10 @@ import HuaweiAuth from './utils/HuaweiAuth'
2 import { JumpInterceptorAction, RouterJumpInterceptor, WDRouterPage } from 'wdRouter' 2 import { JumpInterceptorAction, RouterJumpInterceptor, WDRouterPage } from 'wdRouter'
3 import { BusinessError } from '@kit.BasicServicesKit' 3 import { BusinessError } from '@kit.BasicServicesKit'
4 import { router } from '@kit.ArkUI' 4 import { router } from '@kit.ArkUI'
5 -import { AccountManagerUtils } from 'wdKit/Index' 5 +import { AccountManagerUtils, SPHelper } from 'wdKit/Index'
  6 +import { LoginViewModel } from './pages/login/LoginViewModel'
  7 +import { SpConstants } from 'wdConstant/Index'
  8 +import { ReportDeviceInfo } from './reportDeviceInfo/ReportDeviceInfo'
6 9
7 class LoginJumpHandler implements JumpInterceptorAction { 10 class LoginJumpHandler implements JumpInterceptorAction {
8 11
@@ -37,4 +40,14 @@ export class LoginModule { @@ -37,4 +40,14 @@ export class LoginModule {
37 } 40 }
38 41
39 } 42 }
  43 +
  44 + // 启动进入主页 和 每次登录成功调用
  45 + static reportDeviceInfo() {
  46 + ReportDeviceInfo.reportDeviceInfo().then((res) => {
  47 + let nickName = res.touristNickName
  48 + if (res.touristNickName) {
  49 + SPHelper.default.save(SpConstants.TOURIST_NICK_NAME, res.touristNickName)
  50 + }
  51 + })
  52 + }
40 } 53 }
@@ -82,6 +82,30 @@ export class LoginModel { @@ -82,6 +82,30 @@ export class LoginModel {
82 }) 82 })
83 } 83 }
84 84
  85 + // loginType 0:手机号密码 2:手机号登录 3:QQ 4:微信 5:微博 6:APPLEID 7:手机号一键登录8:账号+密码 9:华为一键登录
  86 + thirdPartLogin(loginType: number, otherParams: Record<string, string|number>) {
  87 + otherParams['loginType'] = loginType
  88 + otherParams['deviceId'] = HttpUtils.getDeviceId()
  89 +
  90 + return new Promise<LoginBean>((success, fail) => {
  91 + HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), otherParams).then((data: ResponseDTO<LoginBean>) => {
  92 + Logger.debug("LoginViewModel:success2 ", data.message)
  93 + if (!data) {
  94 + fail("数据为空")
  95 + return
  96 + }
  97 + if (!data.data||data.code != 0) {
  98 + fail(data.message)
  99 + return
  100 + }
  101 + success(data.data)
  102 + }, (error: Error) => {
  103 + fail(error.message)
  104 + Logger.debug("LoginViewModel:error2 ", error.toString())
  105 + })
  106 + })
  107 + }
  108 +
85 // {"password":"523acd319228efde34e8a30268ee8ca5e4fc421d72affa531676e1765940d22c","phone":"13625644528","loginType":0,"oldPassword":"BA5FD74F827AF9B271FE17CADC489C36","deviceId":"60da5af6-9c59-3566-8622-8c6c00710994"} 109 // {"password":"523acd319228efde34e8a30268ee8ca5e4fc421d72affa531676e1765940d22c","phone":"13625644528","loginType":0,"oldPassword":"BA5FD74F827AF9B271FE17CADC489C36","deviceId":"60da5af6-9c59-3566-8622-8c6c00710994"}
86 appLoginByPassword(phone: string, loginType: number, password: string, oldPassword: string) { 110 appLoginByPassword(phone: string, loginType: number, password: string, oldPassword: string) {
87 let bean: Record<string, string | number> = {}; 111 let bean: Record<string, string | number> = {};
@@ -407,14 +407,9 @@ struct LoginPage { @@ -407,14 +407,9 @@ struct LoginPage {
407 407
408 queryUserDetail(){ 408 queryUserDetail(){
409 this.loginViewModel.queryUserDetail().then(()=>{ 409 this.loginViewModel.queryUserDetail().then(()=>{
410 - router.back({  
411 - url: `${WDRouterPage.getBundleInfo()}`  
412 - }  
413 - ) 410 + router.back()
414 }).catch(()=>{ 411 }).catch(()=>{
415 - router.back({  
416 - url: `${WDRouterPage.getBundleInfo()}`  
417 - }) 412 + router.back()
418 }) 413 })
419 } 414 }
420 415
@@ -10,6 +10,7 @@ import { encryptMessage } from '../../utils/cryptoUtil' @@ -10,6 +10,7 @@ import { encryptMessage } from '../../utils/cryptoUtil'
10 import { SpConstants } from 'wdConstant/Index' 10 import { SpConstants } from 'wdConstant/Index'
11 import { UserDetail } from 'wdBean/Index'; 11 import { UserDetail } from 'wdBean/Index';
12 import { HttpUtils } from 'wdNetwork/Index' 12 import { HttpUtils } from 'wdNetwork/Index'
  13 +import { LoginModule } from '../../LoginModule'
13 14
14 const TAG = "LoginViewModel" 15 const TAG = "LoginViewModel"
15 16
@@ -47,15 +48,7 @@ export class LoginViewModel { @@ -47,15 +48,7 @@ export class LoginViewModel {
47 48
48 return new Promise<LoginBean>((success, fail) => { 49 return new Promise<LoginBean>((success, fail) => {
49 this.loginModel.appLogin(phone, loginType, verificationCode).then((data: LoginBean) => { 50 this.loginModel.appLogin(phone, loginType, verificationCode).then((data: LoginBean) => {
50 - SPHelper.default.saveSync(SpConstants.USER_FIRST_MARK, data.firstMark)  
51 - SPHelper.default.saveSync(SpConstants.USER_ID, data.id)  
52 - SPHelper.default.saveSync(SpConstants.USER_JWT_TOKEN, data.jwtToken)  
53 - SPHelper.default.saveSync(SpConstants.USER_LONG_TIME_NO_LOGIN_MARK, data.longTimeNoLoginMark)  
54 - SPHelper.default.saveSync(SpConstants.USER_REFRESH_TOKEN, data.refreshToken)  
55 - SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status)  
56 - SPHelper.default.saveSync(SpConstants.USER_Type, data.userType)  
57 - SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)  
58 - EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS) 51 + this.dealWithLoginSuccess(data)
59 success(data) 52 success(data)
60 }).catch((error:string) => { 53 }).catch((error:string) => {
61 fail(error) 54 fail(error)
@@ -63,6 +56,32 @@ export class LoginViewModel { @@ -63,6 +56,32 @@ export class LoginViewModel {
63 }) 56 })
64 } 57 }
65 58
  59 + huaweiOneKeyLogin(authCode: string) {
  60 + return new Promise<LoginBean>((success, fail) => {
  61 + this.loginModel.thirdPartLogin(9, {"idToken": authCode}).then((data: LoginBean) => {
  62 + this.dealWithLoginSuccess(data)
  63 + success(data)
  64 + }).catch((error:string) => {
  65 + fail(error)
  66 + })
  67 + })
  68 + }
  69 +
  70 + //TODO: 这里要整体改掉
  71 + dealWithLoginSuccess(data: LoginBean) {
  72 + SPHelper.default.saveSync(SpConstants.USER_FIRST_MARK, data.firstMark)
  73 + SPHelper.default.saveSync(SpConstants.USER_ID, data.id)
  74 + SPHelper.default.saveSync(SpConstants.USER_JWT_TOKEN, data.jwtToken)
  75 + SPHelper.default.saveSync(SpConstants.USER_LONG_TIME_NO_LOGIN_MARK, data.longTimeNoLoginMark)
  76 + SPHelper.default.saveSync(SpConstants.USER_REFRESH_TOKEN, data.refreshToken)
  77 + SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status)
  78 + SPHelper.default.saveSync(SpConstants.USER_Type, data.userType)
  79 + SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)
  80 + EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS)
  81 +
  82 + LoginModule.reportDeviceInfo()
  83 + }
  84 +
66 async appLoginByPassword(phone: string, loginType: number, password: string, oldPassword: string) { 85 async appLoginByPassword(phone: string, loginType: number, password: string, oldPassword: string) {
67 let newLoginType: number 86 let newLoginType: number
68 let isPhone = this.verifyIsPhoneNumber(phone) 87 let isPhone = this.verifyIsPhoneNumber(phone)
@@ -75,15 +94,7 @@ export class LoginViewModel { @@ -75,15 +94,7 @@ export class LoginViewModel {
75 let passwordNew = await this.doMd(password) 94 let passwordNew = await this.doMd(password)
76 Logger.debug(TAG, "PASSWORD:" + passwordNew) 95 Logger.debug(TAG, "PASSWORD:" + passwordNew)
77 this.loginModel.appLoginByPassword(phone, newLoginType, passwordNew, oldPassword).then((data: LoginBean) => { 96 this.loginModel.appLoginByPassword(phone, newLoginType, passwordNew, oldPassword).then((data: LoginBean) => {
78 - SPHelper.default.saveSync(SpConstants.USER_FIRST_MARK, data.firstMark)  
79 - SPHelper.default.saveSync(SpConstants.USER_ID, data.id)  
80 - SPHelper.default.saveSync(SpConstants.USER_JWT_TOKEN, data.jwtToken)  
81 - SPHelper.default.saveSync(SpConstants.USER_LONG_TIME_NO_LOGIN_MARK, data.longTimeNoLoginMark)  
82 - SPHelper.default.saveSync(SpConstants.USER_REFRESH_TOKEN, data.refreshToken)  
83 - SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status)  
84 - SPHelper.default.saveSync(SpConstants.USER_Type, data.userType)  
85 - SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)  
86 - EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS) 97 + this.dealWithLoginSuccess(data)
87 success(data) 98 success(data)
88 }).catch((value: string) => { 99 }).catch((value: string) => {
89 fail(value) 100 fail(value)
@@ -219,18 +230,29 @@ export class LoginViewModel { @@ -219,18 +230,29 @@ export class LoginViewModel {
219 this.loginModel.queryUserDetail().then((data: UserDetail) => { 230 this.loginModel.queryUserDetail().then((data: UserDetail) => {
220 //保存sp 231 //保存sp
221 if(data){ 232 if(data){
222 - SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)  
223 - SPHelper.default.saveSync(SpConstants.USER_PHONE, data.phone) 233 + if(data.userName!=undefined){
  234 + SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)
  235 + }
  236 + if(data.phone!=undefined){
  237 + SPHelper.default.saveSync(SpConstants.USER_PHONE, data.phone)
  238 + }
224 } 239 }
225 if(data.userExtend){ 240 if(data.userExtend){
226 - SPHelper.default.saveSync(SpConstants.USER_SEX, data.userExtend.sex)  
227 - SPHelper.default.saveSync(SpConstants.USER_CREATOR_ID, data.userExtend.creatorId+"")  
228 - SPHelper.default.saveSync(SpConstants.USER_HEAD_PHOTO_URL, data.userExtend.headPhotoUrl)  
229 - SPHelper.default.saveSync(SpConstants.USER_BIRTHDAY, data.userExtend.birthday) 241 + if(data.userExtend.sex!=undefined){
  242 + SPHelper.default.saveSync(SpConstants.USER_SEX, data.userExtend.sex)
  243 + }
  244 + if(data.userExtend.creatorId!=undefined){
  245 + SPHelper.default.saveSync(SpConstants.USER_CREATOR_ID, data.userExtend.creatorId+"")
  246 + }
  247 + if(data.userExtend.headPhotoUrl!=undefined){
  248 + SPHelper.default.saveSync(SpConstants.USER_HEAD_PHOTO_URL, data.userExtend.headPhotoUrl)
  249 + }
  250 + if(data.userExtend.birthday!=undefined){
  251 + SPHelper.default.saveSync(SpConstants.USER_BIRTHDAY, data.userExtend.birthday)
  252 + }
230 } 253 }
231 -  
232 success(data) 254 success(data)
233 - }).catch(() => { 255 + }).catch((error:Error) => {
234 fail() 256 fail()
235 }) 257 })
236 }) 258 })
@@ -3,13 +3,30 @@ import { Params } from 'wdBean/Index' @@ -3,13 +3,30 @@ import { Params } from 'wdBean/Index'
3 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' 3 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
4 import HuaweiAuth from '../../utils/HuaweiAuth' 4 import HuaweiAuth from '../../utils/HuaweiAuth'
5 import { BusinessError } from '@kit.BasicServicesKit' 5 import { BusinessError } from '@kit.BasicServicesKit'
6 -import { ToastUtils } from 'wdKit/Index' 6 +import { Logger, ToastUtils, CustomToast, EmitterUtils, EmitterEventId } from 'wdKit/Index'
  7 +import { LoginViewModel } from './LoginViewModel'
  8 +import {InterestsHobbiesModel} from '../../../../../../../products/phone/src/main/ets/pages/viewModel/InterestsHobbiesModel'
  9 +
  10 +const TAG = "OneKeyLoginPage"
7 11
8 @Entry 12 @Entry
9 @Component 13 @Component
10 struct OneKeyLoginPage { 14 struct OneKeyLoginPage {
11 anonymousPhone: string = '' 15 anonymousPhone: string = ''
12 @State agreeProtocol: boolean = false 16 @State agreeProtocol: boolean = false
  17 + viewModel: LoginViewModel = new LoginViewModel()
  18 + @State toastText:string = ""
  19 + dialogToast: CustomDialogController = new CustomDialogController({
  20 + builder: CustomToast({
  21 + msg: this.toastText,
  22 + }),
  23 + autoCancel: false,
  24 + alignment: DialogAlignment.Center,
  25 + offset: { dx: 0, dy: -20 },
  26 + gridCount: 1,
  27 + customStyle: true,
  28 + maskColor:"#00000000"
  29 + })
13 30
14 aboutToAppear(): void { 31 aboutToAppear(): void {
15 this.anonymousPhone = HuaweiAuth.sharedInstance().anonymousPhone||"" 32 this.anonymousPhone = HuaweiAuth.sharedInstance().anonymousPhone||""
@@ -44,17 +61,7 @@ struct OneKeyLoginPage { @@ -44,17 +61,7 @@ struct OneKeyLoginPage {
44 if (!this.agreeProtocol) { 61 if (!this.agreeProtocol) {
45 return 62 return
46 } 63 }
47 - HuaweiAuth.sharedInstance().oneKeyLogin().then((authorizeCode) => {  
48 - //TODO: 调用服务端接口登录  
49 -  
50 - ToastUtils.shortToast("获取到授权code: " + authorizeCode + ",由于需要后台接口支持,暂时先跳转其他登录方式")  
51 - setTimeout(() => {  
52 - router.replaceUrl({url: WDRouterPage.loginPage.url()})  
53 - }, 3000)  
54 -  
55 - }).catch((error: BusinessError) => {  
56 -  
57 - }) 64 + this.requestLogin()
58 }) 65 })
59 } 66 }
60 .padding({ left: 25, right: 25 }) 67 .padding({ left: 25, right: 25 })
@@ -113,4 +120,47 @@ struct OneKeyLoginPage { @@ -113,4 +120,47 @@ struct OneKeyLoginPage {
113 }.margin({ top: 15, right: 15 }) 120 }.margin({ top: 15, right: 15 })
114 .width("100%") 121 .width("100%")
115 } 122 }
  123 +
  124 + async requestLogin() {
  125 + try {
  126 + let authorizeCode = await HuaweiAuth.sharedInstance().oneKeyLogin()
  127 +
  128 + let data = await this.viewModel.huaweiOneKeyLogin(authorizeCode)
  129 +
  130 + Logger.debug(TAG, "requestLogin: " + data.jwtToken)
  131 + this.showToastTip('登录成功')
  132 +
  133 + ///同步兴趣tag
  134 + let interestsModel = new InterestsHobbiesModel()
  135 + interestsModel.updateInterests()
  136 + this.queryUserDetail()
  137 + EmitterUtils.sendEvent(EmitterEventId.PEOPLE_SHIP_ATTENTION)
  138 +
  139 + } catch (error) {
  140 + if (typeof error == "string") {
  141 + this.showToastTip(error)
  142 + } else {
  143 + (error as BusinessError)
  144 + this.showToastTip("登录失败")
  145 + }
  146 + }
  147 + }
  148 +
  149 + showToastTip(msg:string){
  150 + this.toastText = msg
  151 + this.dialogToast.open()
  152 + }
  153 +
  154 + queryUserDetail(){
  155 + this.viewModel.queryUserDetail().then(()=>{
  156 + router.back({
  157 + url: `${WDRouterPage.getBundleInfo()}`
  158 + }
  159 + )
  160 + }).catch(()=>{
  161 + router.back({
  162 + url: `${WDRouterPage.getBundleInfo()}`
  163 + })
  164 + })
  165 + }
116 } 166 }
  1 +import { AppUtils, DeviceUtil, Logger, UserDataLocal } from 'wdKit/Index';
  2 +import { HttpBizUtil, HttpUrlUtils, ResponseDTO } from 'wdNetwork/Index';
  3 +
  4 +export class ReportDeviceInfo {
  5 + static reportDeviceInfo() {
  6 + const userId = UserDataLocal.getUserId() || ""
  7 + const url = HttpUrlUtils.reportDeviceInfo()
  8 +
  9 + let bean: Record<string, string | number> = {};
  10 + bean['deviceId'] = DeviceUtil.clientId()
  11 + bean['appVersion'] = AppUtils.getAppVersionCode()
  12 + bean['platform'] = 3 /// 1Android 2iOS
  13 + bean['userId'] = userId
  14 + bean['brand'] = DeviceUtil.getMarketName()
  15 + bean['modelSystemVersion'] = DeviceUtil.getDisplayVersion()
  16 + bean['tenancy'] = 3 ///1-视界 2-英文版 3-中文版
  17 +
  18 + return new Promise<ReportDeviceInfoRes>((success, fail) => {
  19 + HttpBizUtil.post<ResponseDTO<ReportDeviceInfoRes>>(url,bean).then((data: ResponseDTO<ReportDeviceInfoRes>) => {
  20 + if (!data) {
  21 + fail("数据为空")
  22 + return
  23 + }
  24 + if (data.code != 0) {
  25 + fail(data.message)
  26 + return
  27 + }
  28 + success(data.data!)
  29 + }, (error: Error) => {
  30 + fail(error.message)
  31 + Logger.debug("ReportDeviceInfo", error.toString())
  32 + })
  33 + })
  34 +
  35 + }
  36 +}
  37 +
  38 +export class ReportDeviceInfoRes {
  39 + clean : number = 0
  40 + touristNickName : string = ""
  41 +}
@@ -94,10 +94,9 @@ export struct WDPlayerRenderView { @@ -94,10 +94,9 @@ export struct WDPlayerRenderView {
94 .renderFit(RenderFit.RESIZE_COVER) 94 .renderFit(RenderFit.RESIZE_COVER)
95 } 95 }
96 96
97 - // .onAreaChange(() => {  
98 - // this.updateLayout()  
99 - // })  
100 - 97 + .onAreaChange(() => {
  98 + this.updateLayout()
  99 + })
101 .backgroundColor("#000000") 100 .backgroundColor("#000000")
102 101
103 // .height('100%') 102 // .height('100%')
@@ -3,4 +3,5 @@ @@ -3,4 +3,5 @@
3 /.preview 3 /.preview
4 /build 4 /build
5 /.cxx 5 /.cxx
6 -/.test  
  6 +/.test
  7 +/oh-package-lock.json5
  1 +{"v":"5.6.10","fr":60,"ip":0,"op":80,"w":30,"h":30,"nm":"直播页面-动效","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"空 13","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[7.5,7.375,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[50,50,100],"ix":6}},"ao":0,"ip":0,"op":80,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"形状图层 3","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[34,20.073,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15],[-2.25,-16.5],[2.25,-16.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-27.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-27.5],[-2.25,-29],[2.25,-29]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15.5],[-2.25,-17],[2.25,-17]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":30,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-3.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-3.5],[-2.25,-5],[2.25,-5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":40,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15.5],[-2.25,-17],[2.25,-17]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-27.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-27.5],[-2.25,-29],[2.25,-29]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":60,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15.625],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15.625],[-2.25,-17.125],[2.25,-17.125]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":70,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-3.375],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-3.375],[-2.25,-4.875],[2.25,-4.875]],"c":true}]},{"t":80,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15.375],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15.375],[-2.25,-16.875],[2.25,-16.875]],"c":true}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":80,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"形状图层 2","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-4,24.573,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-7.875],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-7.875],[-2.25,-9.375],[2.25,-9.375]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-20],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-20],[-2.25,-21.5],[2.25,-21.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-32],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-32],[-2.25,-33.5],[2.25,-33.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":30,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-20],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-20],[-2.25,-21.5],[2.25,-21.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":40,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-7.875],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-7.875],[-2.25,-9.375],[2.25,-9.375]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-20],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-20],[-2.25,-21.5],[2.25,-21.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":60,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-31.75],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-31.75],[-2.25,-33.25],[2.25,-33.25]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":70,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-19.875],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-19.875],[-2.25,-21.375],[2.25,-21.375]],"c":true}]},{"t":80,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-8],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-8],[-2.25,-9.5],[2.25,-9.5]],"c":true}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":80,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"形状图层 1","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[15,14.272,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-21],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-21],[-2.25,-22.5],[2.25,-22.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-9.375],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-9.375],[-2.25,-10.875],[2.25,-10.875]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,2.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,2.5],[-2.25,1],[2.25,1]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":30,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-9.375],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-9.375],[-2.25,-10.875],[2.25,-10.875]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":40,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-21.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-21.5],[-2.25,-23],[2.25,-23]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-9.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-9.5],[-2.25,-11],[2.25,-11]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":60,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,2.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,2.5],[-2.25,1],[2.25,1]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":70,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-9.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-9.5],[-2.25,-11],[2.25,-11]],"c":true}]},{"t":80,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-21.375],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-21.375],[-2.25,-22.875],[2.25,-22.875]],"c":true}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":80,"st":0,"bm":0}],"markers":[]}
  1 +{"v":"5.6.10","fr":30,"ip":0,"op":51,"w":500,"h":500,"nm":"预合成 1","ddd":0,"assets":[{"id":"image_0","w":90,"h":240,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAADwCAYAAACAL3OKAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAADW0lEQVR4nO3cv2lcQRRG8Tuzs0iBFRhcgcEVGFSBwRUYXIHBFRicqTOVJJACSfvnc+BNXvbgMUeBzi8ZJhPnDuLpYtySnEvTjarKW/8Q74GhIYaGGBpiaIihIYaGGBpiaIihIYaGjKpy1wHwRUMMDTE0xNAQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0MMDTE0xH00xBcNMTTE0BBDQwwNMTTE0BBDQwwNMTTE0BBDQwwNMTTE0BD30RBfNMTQEENDDA0xNMTQEENDDA0xNMTQEENDDA0xNMTQEEND3EdDfNEQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0MMDXEfDfFFQwwNMTTE0BBDQwwNMTTE0BBDQwwNMTTE0BBDQwwNMTTEfTTEFw0xNMTQEENDDA0xNMTQEENDDA0xNMTQEENDDA0xNMTQEPfREF80xNAQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0P6+XxO/Y+dqor3OfeW5O/GYWmFcSmuyXpVpfcez7lnO51Of6aMUAt+dUAMDTE0ZPTe/XcdAF80xNAQQ0MMDTE0xNAQQ0PcR4P76N8bh6UV3EdD3EeD++hfU0aohZHEXx0AP+8ghoaM3W7nPhrgi4YYGmJoiKEhhoYYGmJoSD+dTov9qfc595bk58ZhaYVxKa7JelVlt9vFc+7Zjsfjjykj1IJfHRBDQwwNcR8N8UVDDA0xNMTQEENDDA0xNKQfj8fF/tT7nHtL8n3jsLTCuBTXZL2qMsaI59yzHQ6Hb1NGqAW/OiCGhhgaMsYY7qMBvmiIoSGGhhgaYmiIoSGGhvTD4bDYn3qfc29JbjcOSyuMS3FN1qsq+/0+nnPP9vr6+nXKCLXgVwfE0BBDQ8Z+v3cfDfBFQwwNMTTE0BBDQwwNMTSkv7y8LPan3ufcW5IvG4elFcaluCbrVZWrq6t4zj3b8/Pz5ykj1IL/fzTEzzuIoSHj+vrafTTAFw0xNMTQEENDDA0xNMTQkP709LTYn3qfc29JPm0cllYYj4+P/uoA9CS5ubmJ59yzPTw8fHzrab8H7qMhhoYYGtKSfHjrH+I98C9DiKEhhoYYGmJoiKEhhob0+/v7xf7U+5x7S7LbOCytMO7u7vzVAWlJmufc8x+/85zyNf84xgAAAABJRU5ErkJggg==","e":1}],"fonts":{"list":[{"fName":"SourceHanSansSC-Normal","fFamily":"Source Han Sans SC","fStyle":"Normal","ascent":79.608999023214}]},"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"“图层 1”轮廓 2","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[160.08,177.473,0],"ix":2},"a":{"a":0,"k":[8.095,35.425,0],"ix":1},"s":{"a":0,"k":[300,300,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[1.244,-10.704],[-4.109,-12.458],[-0.711,-0.358],[-0.35,-0.041],[-0.041,-0.003],[-0.374,0.124],[-0.135,1.161],[0,0],[0.134,0.407],[-1.276,10.984],[-5.322,9.464],[0,0]],"o":[[-5.704,10.153],[-1.377,11.862],[0.249,0.755],[0.314,0.159],[0.041,0.005],[0.393,0.029],[1.109,-0.366],[0,0],[0.046,-0.426],[-3.832,-11.619],[1.152,-9.916],[0,0],[0,0]],"v":[[2.846,-34.399],[-7.576,-3.114],[-3.479,33.365],[-1.98,35.104],[-0.976,35.405],[-0.852,35.417],[0.31,35.274],[2.35,32.771],[2.353,32.749],[2.219,31.485],[-1.616,-2.421],[8.095,-31.491],[7.16,-35.425]],"c":true},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[8.094,35.425],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":51,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"矩形 1624.png","cl":"png","tt":1,"refId":"image_0","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":4,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":6,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":29,"s":[100]},{"t":34,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[170.767,290.291,0],"ix":2},"a":{"a":0,"k":[45.395,241.486,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":1,"s":[100,10,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":7,"s":[100,56,100]},{"t":12,"s":[100,100,100]}],"ix":6}},"ao":0,"ip":1,"op":52,"st":1,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"形状图层 3","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":1,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":7,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":29,"s":[100]},{"t":34,"s":[0]}],"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":1,"s":[-51]},{"t":12,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":1,"s":[157.75,279.75,0],"to":[-6.112,-21.415,0],"ti":[-5.612,39.702,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":7,"s":[145.538,168,0],"to":[5.612,-39.702,0],"ti":[-10.945,22.085,0]},{"t":12,"s":[174.75,77.75,0]}],"ix":2},"a":{"a":0,"k":[-75.25,-172.25,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-96.5,-181.5],[-62.25,-189],[-54,-155.5]],"c":false},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":18,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"形状 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":1,"op":52,"st":1,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"形状图层 1","parent":5,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":20,"ix":10},"p":{"a":0,"k":[34.937,47.412,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[33.333,33.333,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,0],[28.935,-6.447],[9,-5.25],[-17.25,4],[-21.26,3.424],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-24.106,5.371],[-16.232,9.469],[9.485,-2.2],[33.448,-5.387],[9.5,4.25],[-2.25,2.5]],"v":[[52.75,-14.25],[-9.435,-6.803],[-56.25,10.25],[-46.25,39],[7.26,24.826],[88,19],[89,36.25]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[{"i":[[0,0],[26.479,-4.851],[8.679,-2.444],[-17.998,2.691],[-23.469,3.069],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-12.46,2.283],[-15.41,4.339],[4.383,-0.655],[33.593,-4.393],[9.5,4.25],[-2.25,2.5]],"v":[[58,-15],[-7.178,-6.584],[-53.707,4.823],[-47,29.75],[0.76,22.576],[88,19],[89,36.25]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":15,"s":[{"i":[[0,0],[26.919,0.031],[6.044,-0.659],[-15.132,-2.622],[-23.644,1.071],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-13.471,-0.016],[-14.086,1.535],[4.404,0.763],[32.111,-1.455],[9.5,4.25],[-2.25,2.5]],"v":[[54.157,-14.073],[-2.442,-8.813],[-49.103,-6.764],[-50.1,19.6],[-0.512,21.013],[88,19],[89,36.25]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":24,"s":[{"i":[[0,0],[26.479,-4.851],[8.679,-2.444],[-17.998,2.691],[-23.469,3.069],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-12.46,2.283],[-15.41,4.339],[4.383,-0.655],[33.593,-4.393],[9.5,4.25],[-2.25,2.5]],"v":[[58,-15],[-7.178,-6.584],[-53.707,4.823],[-47,29.75],[0.76,22.576],[88,19],[89,36.25]],"c":false}]},{"t":40,"s":[{"i":[[0,0],[28.935,-6.447],[9,-5.25],[-17.25,4],[-21.26,3.424],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-24.106,5.371],[-16.232,9.469],[9.485,-2.2],[33.448,-5.387],[9.5,4.25],[-2.25,2.5]],"v":[[58,-15],[-9.435,-6.803],[-56.25,10.25],[-46.25,39],[7.26,24.826],[88,19],[89,36.25]],"c":false}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":12,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"形状 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":50,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"“img_hand”轮廓","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.775],"y":[0.621]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[-20]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":10,"s":[12]},{"t":40.0234375,"s":[-19.954]}],"ix":10},"p":{"a":0,"k":[447.982,216,0],"ix":2},"a":{"a":0,"k":[100.827,59.333,0],"ix":1},"s":{"a":0,"k":[300,300,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"形状 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.033,0.015],[0,0],[0.783,-0.214],[0.314,-0.792],[-0.133,-0.656],[-0.603,-0.563],[-0.587,-0.233],[0,0],[-0.073,-0.04],[-0.516,-0.842],[0.479,-1.208],[0.953,-0.502],[0,0],[0,0],[0,0],[-1.392,-0.86],[0.091,-1.641],[2.925,-1.592],[2.563,-0.334],[1.888,-0.636],[1.036,-1.094],[0.103,-0.722],[-0.26,-0.631],[-1.483,0.566],[-3.818,0.653],[-5.209,0.17],[-9.286,3.911],[0,0],[0,0],[-0.469,-0.165],[-0.024,-0.01],[0,0],[-0.206,-0.489],[0.163,-0.467],[0.01,-0.026],[0.495,-0.209],[0,0],[6.587,-0.214],[2.994,-0.511],[4.409,-1.635],[1.511,0.673],[0.629,1.524],[-0.21,1.467],[-0.98,1.035],[-2.962,0.997],[-2.561,0.334],[-1.666,0.907],[-0.117,0.852],[0.021,0.025],[0.515,0.318],[-2.348,-0.527],[0,0],[0,0],[-2.029,-0.079],[-0.168,0.089],[-0.048,0.103],[0.49,0.277],[0,0],[0.631,0.589],[0.298,1.464],[-0.637,1.605],[-1.864,0.508],[-0.535,0.015],[-0.648,1.306],[-1.813,0.428],[-1.806,-0.438],[-0.392,1.028],[-0.023,0.048],[-2.123,0.451],[-2.602,-1.082],[-0.033,-0.016],[0,0],[-0.034,-0.019],[-1.699,-3.421],[0,0],[0,0],[0.169,-0.503],[0.013,-0.032],[0.443,-0.22],[0.502,0.17],[0.033,0.013],[0.219,0.442],[0,0],[6.83,3.793],[0,0],[1.064,-0.227],[0.455,-0.915],[-0.154,-0.539],[-0.497,-0.308],[0,0],[0.408,-1.027],[1.026,0.405],[0,0],[0,0],[0.068,0.036],[0,0],[0.842,-0.198],[0.277,-0.557],[-0.093,-0.504],[-0.425,-0.402],[0,0],[0.237,-0.935],[0.032,-0.08],[0.015,-0.033],[0.934,0.237],[0.08,0.031]],"o":[[0,0],[-1.444,-0.567],[-0.577,0.157],[-0.344,0.868],[0.128,0.627],[0.263,0.245],[0,0],[0.077,0.03],[1.204,0.661],[0.679,1.108],[-0.415,1.046],[-0.842,0.444],[0,0],[0,0],[0,0],[2.121,1.31],[-0.133,2.377],[-2.104,1.145],[-2.301,0.3],[-2.333,0.785],[-0.397,0.419],[-0.107,0.745],[0.49,1.186],[4.665,-1.731],[3.174,-0.542],[6.094,-0.198],[0,0],[0,0],[0.458,-0.193],[0.024,0.009],[0,0],[0.491,0.2],[0.192,0.456],[-0.009,0.027],[-0.198,0.499],[0,0],[-9.741,4.104],[-5.028,0.164],[-3.573,0.611],[-1.873,0.715],[-1.375,-0.612],[-0.539,-1.304],[0.223,-1.562],[1.492,-1.576],[2.135,-0.719],[2.069,-0.269],[1.546,-0.841],[-0.014,-0.019],[-0.21,-0.254],[-1.135,-0.701],[1.606,0.361],[0,0],[0,0],[0.359,0.014],[0.069,-0.036],[-0.151,-0.213],[0,0],[-1.055,-0.418],[-1.228,-1.144],[-0.291,-1.433],[0.805,-2.031],[0.48,-0.13],[-0.099,-1.203],[0.833,-1.68],[1.331,-0.314],[0.031,-0.905],[0.019,-0.05],[1.024,-2.145],[1.886,-0.401],[0.034,0.014],[0,0],[0.034,0.016],[7.589,4.209],[0,0],[0,0],[0.236,0.476],[-0.012,0.033],[-0.182,0.46],[-0.475,0.236],[-0.033,-0.011],[-0.459,-0.182],[0,0],[-1.329,-2.67],[0,0],[-1.813,-0.748],[-0.816,0.173],[-0.338,0.913],[0.115,0.405],[0,0],[1.026,0.408],[-0.406,1.025],[0,0],[0,0],[-0.071,-0.028],[0,0],[-1.472,-0.43],[-0.593,0.14],[-0.357,0.721],[0.077,0.416],[0,0],[0.876,0.403],[-0.021,0.083],[-0.013,0.033],[-0.403,0.876],[-0.084,-0.021],[-0.033,-0.014]],"v":[[1.962,-13.096],[-8.76,-18.034],[-12.1,-18.564],[-13.438,-17.141],[-13.753,-14.855],[-12.658,-13.071],[-11.383,-12.354],[0.275,-7.73],[0.501,-7.625],[3.081,-5.371],[3.381,-1.898],[1.329,0.424],[-1.686,0.991],[-2.437,0.965],[-1.432,7.985],[4.895,10.726],[7.939,15.152],[3.353,21.106],[-3.648,23.325],[-9.932,24.728],[-14.984,27.546],[-15.734,29.258],[-15.503,31.322],[-12.544,32.252],[0.181,28.677],[12.755,27.609],[35.825,21.445],[35.827,21.444],[35.831,21.442],[37.273,21.398],[37.346,21.426],[37.363,21.432],[38.452,22.508],[38.497,23.942],[38.468,24.022],[37.385,25.128],[37.379,25.13],[12.887,31.607],[0.855,32.62],[-11.118,35.989],[-16.195,36.052],[-19.201,32.848],[-19.693,28.692],[-17.889,24.796],[-11.208,20.937],[-4.163,19.358],[1.439,17.593],[3.934,15.053],[3.882,14.987],[2.794,14.129],[-2.327,11.916],[-1.459,8.034],[-2.393,1.013],[-1.324,-2.997],[-0.535,-3.116],[-0.359,-3.325],[-1.32,-4.06],[-12.856,-8.636],[-15.385,-10.146],[-17.674,-14.058],[-17.156,-18.616],[-13.152,-22.424],[-11.63,-22.643],[-10.805,-26.407],[-6.835,-29.569],[-2.13,-29.383],[-1.495,-32.282],[-1.432,-32.43],[3.288,-36.324],[10.021,-35.302],[10.12,-35.257],[31.193,-25.105],[31.295,-25.052],[45.227,-13.607],[45.228,-13.604],[45.229,-13.603],[45.333,-12.075],[45.296,-11.977],[44.326,-10.922],[42.799,-10.819],[42.7,-10.855],[41.646,-11.825],[41.642,-11.833],[29.404,-21.527],[8.436,-31.629],[4.12,-32.411],[2.213,-30.778],[1.936,-28.6],[2.854,-27.53],[8.822,-25.163],[9.944,-22.566],[7.352,-21.443],[7.348,-21.444],[1.316,-23.823],[1.107,-23.919],[-2.447,-25.328],[-5.917,-25.676],[-7.222,-24.63],[-7.62,-22.792],[-6.867,-21.566],[3.635,-16.729],[4.737,-14.42],[4.658,-14.175],[4.615,-14.076],[2.307,-12.974],[2.061,-13.053]],"c":true},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[55.39,50.134],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":50,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":5,"nm":"上滑查看更多视频","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[249.5,409.099,0],"ix":2},"a":{"a":0,"k":[4.786,-22.901,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"t":{"d":{"k":[{"s":{"s":60,"f":"SourceHanSansSC-Normal","t":"上滑查看更多视频","j":2,"tr":0,"lh":72,"ls":0,"fc":[1,1,1],"sc":[0,0,0],"sw":0.00999999977648,"of":true},"t":0}]},"p":{},"m":{"g":1,"a":{"a":0,"k":[0,0],"ix":2}},"a":[]},"ip":0,"op":50,"st":0,"bm":0}],"markers":[{"tm":1,"cm":"{\n\t\"exportFlag\":\t1,\n\t\"storePath\":\t\"/Users/changkang/Downloads/中文版动效/动效导出最终版本的/动效\"\n}","dr":0}],"chars":[{"ch":"上","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[43.405,-82.883],[43.405,-3.625],[5.338,-3.625],[5.338,3.122],[95.471,3.122],[95.471,-3.625],[50.455,-3.625],[50.455,-44.614],[88.623,-44.614],[88.623,-51.361],[50.455,-51.361],[50.455,-82.883]],"c":true},"ix":2},"nm":"上","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"上","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"滑","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-3.928,-3.726],[0,0],[6.143,3.625]],"o":[[6.244,3.827],[0,0],[-3.928,-3.525],[0,0]],"v":[[9.467,-78.653],[27.594,-65.359],[31.924,-70.496],[13.696,-82.983]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-3.827,-3.122],[0,0],[5.74,2.921]],"o":[[5.841,3.122],[0,0],[-3.928,-3.122],[0,0]],"v":[[4.33,-50.656],[21.552,-39.679],[25.58,-44.916],[8.258,-55.389]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[4.633,-7.553],[0,0],[-4.431,10.272],[0,0]],"o":[[0,0],[5.035,-9.164],[0,0],[-4.935,11.078]],"v":[[7.755,1.913],[13.596,6.244],[29.105,-25.681],[23.868,-29.81]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[45.923,-22.055],[79.156,-22.055],[79.156,-14.2],[45.923,-14.2]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[45.923,-27.191],[45.923,-34.845],[79.156,-34.845],[79.156,-27.191]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":5,"ty":"sh","ix":6,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[1.41,0],[5.237,0.201],[-0.302,-1.511],[-2.618,1.007],[0,3.525],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,1.309],[-1.41,0.101],[0.806,1.611],[7.251,0],[2.618,-0.906],[0,0],[0,0]],"v":[[39.679,-40.384],[39.679,7.855],[45.923,7.855],[45.923,-9.164],[79.156,-9.164],[79.156,0.806],[77.344,2.518],[65.863,2.417],[67.776,7.956],[82.178,6.949],[85.602,0.806],[85.602,-40.384]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":6,"ty":"sh","ix":7,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[40.384,-80.667],[40.384,-53.476],[29.709,-53.476],[29.709,-36.658],[35.953,-36.658],[35.953,-47.836],[89.227,-47.836],[89.227,-36.658],[95.773,-36.658],[95.773,-53.476],[84.998,-53.476],[84.998,-80.667]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":7,"ty":"sh","ix":8,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[46.628,-53.476],[46.628,-63.144],[61.029,-63.144],[61.029,-53.476]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":8,"ty":"sh","ix":9,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[78.653,-53.476],[66.769,-53.476],[66.769,-67.978],[46.628,-67.978],[46.628,-75.229],[78.653,-75.229]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"滑","np":12,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"查","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[29.205,-21.854],[71.201,-21.854],[71.201,-12.891],[29.205,-12.891]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[29.205,-35.55],[71.201,-35.55],[71.201,-26.688],[29.205,-26.688]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[22.559,-40.585],[22.559,-7.855],[78.149,-7.855],[78.149,-40.585]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[7.654,-1.511],[7.654,4.532],[93.457,4.532],[93.457,-1.511]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[12.589,-4.33],[-1.007,-1.611],[-9.265,12.085],[0,0],[0,0],[0,0],[-14.099,-5.237],[-1.611,1.208],[8.862,9.467],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[-8.862,9.769],[1.41,1.309],[13.797,-5.539],[0,0],[0,0],[0,0],[9.366,11.884],[0.906,-1.712],[-12.991,-4.129],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[46.729,-84.494],[46.729,-71.301],[5.841,-71.301],[5.841,-65.359],[39.175,-65.359],[3.827,-42.197],[8.258,-36.758],[46.729,-65.259],[46.729,-43.707],[53.476,-43.707],[53.476,-65.359],[92.45,-37.564],[96.982,-43.103],[60.928,-65.359],[95.068,-65.359],[95.068,-71.301],[53.476,-71.301],[53.476,-84.494]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"查","np":8,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"看","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[32.73,-21.854],[78.049,-21.854],[78.049,-14.301],[32.73,-14.301]],"c":true},"ix":2},"nm":"看","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[32.73,-26.788],[32.73,-34.14],[78.049,-34.14],[78.049,-26.788]],"c":true},"ix":2},"nm":"看","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[32.73,-9.467],[78.049,-9.467],[78.049,-1.511],[32.73,-1.511]],"c":true},"ix":2},"nm":"看","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[24.573,-0.201],[-0.201,-1.611],[-9.567,0.403],[0.906,-2.518],[0,0],[0,0],[0,0],[1.41,-2.618],[0,0],[0,0],[0,0],[11.581,-6.647],[-0.906,-1.41],[-5.237,5.942],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.41,2.618],[0,0],[0,0],[0,0],[-1.108,2.719],[0,0],[0,0],[0,0],[-0.806,2.618],[-10.071,2.115]],"o":[[-15.912,3.424],[0.705,1.511],[8.862,0],[-0.705,2.518],[0,0],[0,0],[0,0],[-1.108,2.719],[0,0],[0,0],[0,0],[-6.445,10.876],[1.41,1.309],[7.15,-4.23],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[1.611,-2.417],[0,0],[0,0],[0,0],[1.208,-2.618],[0,0],[0,0],[0,0],[0.906,-2.618],[14.603,-0.906],[0,0]],"v":[[83.286,-83.588],[11.884,-78.452],[13.394,-73.114],[41.492,-73.819],[39.175,-66.367],[13.394,-66.367],[13.394,-60.928],[37.161,-60.928],[33.435,-52.771],[5.942,-52.771],[5.942,-47.131],[30.313,-47.131],[3.525,-20.142],[7.855,-14.905],[26.285,-30.313],[26.285,8.057],[32.73,8.057],[32.73,4.028],[78.049,4.028],[78.049,8.057],[84.695,8.057],[84.695,-39.578],[33.435,-39.578],[38.068,-47.131],[94.766,-47.131],[94.766,-52.771],[40.988,-52.771],[44.513,-60.928],[88.824,-60.928],[88.824,-66.367],[46.527,-66.367],[49.045,-74.222],[87.717,-78.653]],"c":true},"ix":2},"nm":"看","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"看","np":7,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"更","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.424,5.539],[0,0],[-5.136,-3.827],[12.387,-2.417],[-0.806,-1.511],[-6.747,4.532],[-23.666,-1.007],[-1.309,1.611],[12.991,6.143],[-1.309,6.345],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[4.935,-4.23]],"o":[[0,0],[3.525,6.042],[-6.244,3.625],[1.511,1.611],[13.394,-2.921],[13.797,7.452],[0.302,-2.216],[-22.961,-0.705],[5.539,-5.237],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.208,5.136],[-5.035,-3.424]],"v":[[25.177,-24.17],[19.437,-21.854],[32.327,-7.15],[4.834,2.014],[8.862,7.956],[38.47,-3.223],[94.464,7.654],[97.385,1.007],[43.909,-7.553],[53.375,-25.177],[87.817,-25.177],[87.817,-63.849],[54.382,-63.849],[54.382,-72.711],[94.061,-72.711],[94.061,-78.854],[6.546,-78.854],[6.546,-72.711],[47.433,-72.711],[47.433,-63.849],[15.912,-63.849],[15.912,-25.177],[46.326,-25.177],[37.766,-10.977]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0.101,-2.216],[0,0]],"o":[[0,0],[0,0],[0,2.216],[0,0],[0,0]],"v":[[22.357,-41.794],[47.433,-41.794],[47.433,-37.564],[47.232,-30.917],[22.357,-30.917]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,2.216],[0,0],[0,0],[0,0]],"o":[[0.101,-2.216],[0,0],[0,0],[0,0],[0,0]],"v":[[54.181,-30.917],[54.382,-37.564],[54.382,-41.794],[81.07,-41.794],[81.07,-30.917]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[22.357,-58.109],[47.433,-58.109],[47.433,-47.333],[22.357,-47.333]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[54.382,-58.109],[81.07,-58.109],[81.07,-47.333],[54.382,-47.333]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"更","np":8,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"多","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[16.214,-6.848],[-1.007,-1.611],[-6.647,5.438],[0,0],[8.157,-4.834],[4.532,2.518],[0,0],[-3.424,-3.021],[11.38,-2.014],[-0.705,-1.813],[-12.891,22.357],[0,0],[0,0],[0,0],[-2.014,2.518]],"o":[[-6.345,8.459],[1.511,1.108],[9.265,-4.431],[0,0],[-5.136,6.546],[-3.625,-3.122],[0,0],[4.129,2.417],[-10.977,5.539],[1.208,1.41],[25.681,-5.438],[0,0],[0,0],[0,0],[2.518,-2.417],[0,0]],"v":[[46.326,-84.595],[11.581,-59.216],[16.214,-54.382],[40.082,-69.388],[69.287,-69.388],[48.743,-52.267],[35.248,-61.533],[30.414,-58.008],[42.801,-49.146],[8.157,-37.665],[11.481,-31.622],[79.66,-73.114],[75.33,-75.833],[73.92,-75.531],[46.93,-75.531],[53.778,-82.983]],"c":true},"ix":2},"nm":"多","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[20.444,-7.452],[-0.906,-1.611],[-8.359,6.949],[0,0],[9.064,-5.136],[4.23,2.921],[0,0],[-3.323,-3.424],[17.322,-1.712],[-0.403,-1.913],[-14.099,29.709],[0,0],[0,0],[0,0],[-2.014,2.618]],"o":[[-7.352,10.071],[1.511,1.309],[12.79,-5.136],[0,0],[-5.136,8.258],[-3.525,-3.424],[0,0],[4.028,3.021],[-14.301,6.747],[1.108,1.611],[35.248,-4.23],[0,0],[0,0],[0,0],[2.518,-2.518],[0,0]],"v":[[62.741,-49.649],[20.444,-20.746],[24.774,-15.61],[56.598,-34.14],[84.796,-34.14],[63.144,-14.099],[50.253,-24.573],[44.714,-21.35],[56.9,-10.776],[7.956,1.511],[10.776,8.057],[94.867,-37.866],[90.436,-40.686],[89.127,-40.283],[63.345,-40.283],[70.193,-48.038]],"c":true},"ix":2},"nm":"多","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"多","np":5,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"视","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[45.721,-79.459],[45.721,-25.882],[52.167,-25.882],[52.167,-73.416],[84.192,-73.416],[84.192,-25.882],[90.939,-25.882],[90.939,-79.459]],"c":true},"ix":2},"nm":"视","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-1.813,-3.726],[0,0],[3.928,3.726]],"o":[[3.726,3.928],[0,0],[-1.813,-3.625],[0,0]],"v":[[15.912,-81.171],[25.378,-67.978],[30.817,-71.603],[21.048,-84.192]],"c":true},"ix":2},"nm":"视","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[25.378,-13.193],[-0.705,-1.41],[-3.827,11.38],[0,0],[-6.647,0],[0,0],[-0.906,15.811],[1.712,1.41],[3.726,0],[0,0],[0,2.921],[0,0],[0,0],[0,5.438],[0,0]],"o":[[0,0],[0,15.811],[1.41,1.108],[15.811,-8.258],[0,0],[0,6.445],[0,0],[8.459,0],[-1.813,-0.403],[-0.504,14.603],[0,0],[-3.021,0],[0,0],[0,0],[1.41,-5.942],[0,0],[0,0]],"v":[[64.453,-65.561],[64.453,-45.218],[35.953,2.921],[40.182,7.956],[67.676,-22.861],[67.676,-1.813],[76.941,6.345],[86.508,6.345],[96.982,-13.495],[91.241,-16.214],[86.609,1.108],[77.847,1.108],[74.02,-2.518],[74.02,-27.795],[69.086,-27.795],[70.898,-45.016],[70.898,-65.561]],"c":true},"ix":2},"nm":"视","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[10.474,-7.251],[-0.604,-1.913],[-4.028,4.431],[0,0],[0,0],[0,0],[-2.115,-3.122],[0,0],[3.827,4.028],[-2.82,7.855],[0,0],[0,0]],"o":[[0,0],[0,0],[-6.042,13.092],[1.108,1.208],[4.028,-3.021],[0,0],[0,0],[0,0],[3.726,4.633],[0,0],[-1.913,-2.216],[4.935,-6.949],[0,0],[0,0],[0,0]],"v":[[6.546,-67.072],[6.546,-60.828],[31.622,-60.828],[4.129,-27.594],[7.452,-21.149],[19.638,-32.428],[19.638,7.855],[25.983,7.855],[25.983,-36.356],[36.456,-22.458],[40.787,-27.896],[27.795,-42.499],[39.78,-64.856],[36.154,-67.273],[34.946,-67.072]],"c":true},"ix":2},"nm":"视","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"视","np":7,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"频","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[24.573,-6.647],[-0.504,-1.41],[-0.302,37.766]],"o":[[-0.302,35.751],[1.208,1.208],[26.184,-7.452],[0,0]],"v":[[70.898,-50.958],[44.916,3.323],[48.239,8.157],[76.639,-50.958]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-4.23,-4.532],[0,0],[6.848,4.834]],"o":[[6.848,5.035],[0,0],[-4.33,-4.431],[0,0]],"v":[[73.416,-8.661],[93.155,8.157],[97.284,3.726],[77.243,-12.488]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[21.249,-6.949],[-0.806,-1.712],[-5.539,22.458]],"o":[[-5.237,20.847],[1.309,1.41],[22.458,-8.157],[0,0]],"v":[[43.506,-38.873],[5.338,3.021],[8.963,8.258],[49.347,-37.463]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[4.33,-5.237],[-1.108,-0.906],[-2.316,8.258]],"o":[[-2.115,7.452],[1.511,0.806],[4.33,-5.539],[0,0]],"v":[[13.898,-39.88],[4.028,-19.638],[9.064,-16.415],[19.638,-38.672]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.41,3.726],[0,0],[0,0],[0,0],[0,0],[0,0],[1.41,-3.223]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[1.309,-3.323],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.007,3.525],[0,0]],"v":[[54.886,-61.432],[54.886,-13.898],[60.727,-13.898],[60.727,-55.994],[86.407,-55.994],[86.407,-13.998],[92.551,-13.998],[92.551,-61.432],[74.222,-61.432],[78.351,-72.409],[95.572,-72.409],[95.572,-78.452],[52.267,-78.452],[52.267,-72.409],[71.805,-72.409],[67.978,-61.432]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":5,"ty":"sh","ix":6,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[11.884,-75.632],[11.884,-52.872],[4.129,-52.872],[4.129,-46.729],[25.378,-46.729],[25.378,-16.113],[31.522,-16.113],[31.522,-46.729],[50.555,-46.729],[50.555,-52.872],[33.234,-52.872],[33.234,-65.863],[48.138,-65.863],[48.138,-71.603],[33.234,-71.603],[33.234,-84.494],[27.09,-84.494],[27.09,-52.872],[17.624,-52.872],[17.624,-75.632]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"频","np":9,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"}]}
@@ -16,12 +16,15 @@ struct ImageAndTextDetailPage { @@ -16,12 +16,15 @@ struct ImageAndTextDetailPage {
16 } 16 }
17 } 17 }
18 18
19 - pageTransition(){  
20 - // 定义页面进入时的效果,从右边侧滑入  
21 - PageTransitionEnter({ type: RouteType.None, duration: 300 }) 19 + pageTransition() {
  20 + // 为目标页面时,进入:从右边侧滑入,退出:是右侧划出;跳转别的页面:左侧划出,返回:左侧划入。
  21 + PageTransitionEnter({ type: RouteType.Push, duration: 300 })
22 .slide(SlideEffect.Right) 22 .slide(SlideEffect.Right)
23 - // 定义页面退出时的效果,向右边侧滑出  
24 - PageTransitionExit({ type: RouteType.None, duration: 300 }) 23 + PageTransitionEnter({ type: RouteType.Pop, duration: 300 })
  24 + .slide(SlideEffect.Left)
  25 + PageTransitionExit({ type: RouteType.Push, duration: 300 })
  26 + .slide(SlideEffect.Left)
  27 + PageTransitionExit({ type: RouteType.Pop, duration: 300 })
25 .slide(SlideEffect.Right) 28 .slide(SlideEffect.Right)
26 } 29 }
27 30
@@ -8,6 +8,7 @@ import router from '@ohos.router'; @@ -8,6 +8,7 @@ import router from '@ohos.router';
8 import { promptAction } from '@kit.ArkUI'; 8 import { promptAction } from '@kit.ArkUI';
9 import { UpgradeTipDialog } from "./upgradePage/UpgradeTipDialog" 9 import { UpgradeTipDialog } from "./upgradePage/UpgradeTipDialog"
10 import { ProcessUtils } from 'wdRouter/Index'; 10 import { ProcessUtils } from 'wdRouter/Index';
  11 +import { StartupManager } from '../startupmanager/StartupManager';
11 12
12 const TAG = 'MainPage'; 13 const TAG = 'MainPage';
13 14
@@ -27,6 +28,8 @@ struct MainPage { @@ -27,6 +28,8 @@ struct MainPage {
27 28
28 aboutToAppear() { 29 aboutToAppear() {
29 30
  31 + StartupManager.sharedInstance().appReachMainPage()
  32 +
30 this.breakpointSystem.register() 33 this.breakpointSystem.register()
31 34
32 let context = getContext(this) as common.UIAbilityContext 35 let context = getContext(this) as common.UIAbilityContext
@@ -18,11 +18,14 @@ struct SpacialTopicPage { @@ -18,11 +18,14 @@ struct SpacialTopicPage {
18 } 18 }
19 19
20 pageTransition() { 20 pageTransition() {
21 - // 定义页面进入时的效果,从右边侧滑入  
22 - PageTransitionEnter({ type: RouteType.None, duration: 300 }) 21 + // 为目标页面时,进入:从右边侧滑入,退出:是右侧划出;跳转别的页面:左侧划出,返回:左侧划入。
  22 + PageTransitionEnter({ type: RouteType.Push, duration: 300 })
23 .slide(SlideEffect.Right) 23 .slide(SlideEffect.Right)
24 - // 定义页面退出时的效果,向右边侧滑出  
25 - PageTransitionExit({ type: RouteType.None, duration: 300 }) 24 + PageTransitionEnter({ type: RouteType.Pop, duration: 300 })
  25 + .slide(SlideEffect.Left)
  26 + PageTransitionExit({ type: RouteType.Push, duration: 300 })
  27 + .slide(SlideEffect.Left)
  28 + PageTransitionExit({ type: RouteType.Pop, duration: 300 })
26 .slide(SlideEffect.Right) 29 .slide(SlideEffect.Right)
27 } 30 }
28 31
@@ -90,6 +90,9 @@ export class StartupManager { @@ -90,6 +90,9 @@ export class StartupManager {
90 appReachMainPage() : Promise<void> { 90 appReachMainPage() : Promise<void> {
91 return new Promise((resolve) => { 91 return new Promise((resolve) => {
92 Logger.debug(TAG, "App 进入首页,开始其他任务初始化") 92 Logger.debug(TAG, "App 进入首页,开始其他任务初始化")
  93 +
  94 + LoginModule.reportDeviceInfo()
  95 +
93 //TODO: 96 //TODO:
94 97
95 resolve() 98 resolve()
  1 +import { insightIntent, InsightIntentExecutor } from '@kit.AbilityKit';
  2 +import { window } from '@kit.ArkUI';
  3 +import { BusinessError } from '@kit.BasicServicesKit';
  4 +
  5 +/**
  6 + * 意图调用
  7 + */
  8 +export default class InsightIntentExecutorImpl extends InsightIntentExecutor {
  9 + private static readonly ViewColumn = 'ViewColumn';
  10 + /**
  11 + * override 执行前台UIAbility意图
  12 + *
  13 + * @param name 意图名称
  14 + * @param param 意图参数
  15 + * @param pageLoader 窗口
  16 + * @returns 意图调用结果
  17 + */
  18 + onExecuteInUIAbilityForegroundMode(name: string, param: Record<string, Object>, pageLoader: window.WindowStage):
  19 + Promise<insightIntent.ExecuteResult> {
  20 + // 根据意图名称分发处理逻辑
  21 + switch (name) {
  22 + case InsightIntentExecutorImpl.ViewColumn:
  23 + return this.jumpToView(param, pageLoader);
  24 + default:
  25 + break;
  26 + }
  27 + return Promise.resolve({
  28 + code: -1,
  29 + result: {
  30 + message: 'unknown intent'
  31 + }
  32 + } as insightIntent.ExecuteResult)
  33 + }
  34 + /**
  35 + * 实现跳转新闻页面功能
  36 + *
  37 + * @param param 意图参数
  38 + * @param pageLoader 窗口
  39 + */
  40 + private jumpToView(param: Record<string, Object>, pageLoader: window.WindowStage): Promise<insightIntent.ExecuteResult> {
  41 + return new Promise((resolve, reject) => {
  42 + // TODO 实现意图调用,loadContent的入参为歌曲落地页路径,例如:pages/SongPage
  43 + pageLoader.loadContent('pages/MainPage')
  44 + .then(() => {
  45 + let entityId: string = (param.items as Array<object>)?.[0]?.['entityId'];
  46 + // TODO 调用成功的情况,此处可以打印日志
  47 + resolve({
  48 + code: 0,
  49 + result: {
  50 + message: 'Intent execute success'
  51 + }
  52 + });
  53 + })
  54 + .catch((err: BusinessError) => {
  55 + // TODO 调用失败的情况
  56 + resolve({
  57 + code: -1,
  58 + result: {
  59 + message: 'Intent execute failed'
  60 + }
  61 + })
  62 + });
  63 + })
  64 + }
  65 +}
  1 +{
  2 + "insightIntents": [
  3 + {
  4 + "intentName": "ViewColumn",
  5 + "domain": "",
  6 + "intentVersion": "1.0.1",
  7 + "srcEntry": "./ets/utils/InsightIntentExecutorImpl.ets",
  8 + "uiAbility": {
  9 + "ability": "EntryAbility",
  10 + "executeMode": [
  11 + "background",
  12 + "foreground"
  13 + ]
  14 + }
  15 + }
  16 + ]
  17 +}