张善主

Merge remote-tracking branch 'origin/main'

Showing 41 changed files with 257 additions and 109 deletions
@@ -12,6 +12,8 @@ export class ContentConstants { @@ -12,6 +12,8 @@ export class ContentConstants {
12 * 2:直播 12 * 2:直播
13 */ 13 */
14 static readonly TYPE_LIVE: string = "2"; 14 static readonly TYPE_LIVE: string = "2";
  15 +
  16 + static readonly TYPE_FOUR: string = "4";
15 /** 17 /**
16 * 5:专题详情 18 * 5:专题详情
17 */ 19 */
@@ -17,6 +17,14 @@ export enum EmitterEventId { @@ -17,6 +17,14 @@ export enum EmitterEventId {
17 17
18 // 关注,取消关注 18 // 关注,取消关注
19 PEOPLE_SHIP_ATTENTION = 7, 19 PEOPLE_SHIP_ATTENTION = 7,
  20 + // 我的关注 为null
  21 + MY_FOLLOW_EMPTY = 8,
  22 +
  23 + // 登录成功
  24 + LOGIN_SUCCESS = 8,
  25 +
  26 + // 换绑成功
  27 + PHONE_CHANGE_SUCCESS = 9,
20 28
21 // App回到前台 29 // App回到前台
22 APP_ENTER_FOREGROUD = 100, 30 APP_ENTER_FOREGROUD = 100,
@@ -100,6 +100,9 @@ export class ProcessUtils { @@ -100,6 +100,9 @@ export class ProcessUtils {
100 case ContentConstants.TYPE_LIVE: 100 case ContentConstants.TYPE_LIVE:
101 ProcessUtils.gotoLive(content) 101 ProcessUtils.gotoLive(content)
102 break 102 break
  103 + case ContentConstants.TYPE_FOUR:
  104 + ProcessUtils.gotoDefaultWeb(content);
  105 + break
103 case ContentConstants.TYPE_AUDIO: 106 case ContentConstants.TYPE_AUDIO:
104 ProcessUtils.gotoAudio(content) 107 ProcessUtils.gotoAudio(content)
105 break; 108 break;
@@ -80,4 +80,6 @@ export interface ContentDTO { @@ -80,4 +80,6 @@ export interface ContentDTO {
80 commentInfo?: commentInfo 80 commentInfo?: commentInfo
81 //底部导航栏 id(用于频道跳转) 81 //底部导航栏 id(用于频道跳转)
82 bottomNavId:string; 82 bottomNavId:string;
  83 + // 链接类型: 0:无链接;1:内链(文章);2:外链
  84 + openType:string
83 } 85 }
@@ -44,7 +44,7 @@ export struct CompParser { @@ -44,7 +44,7 @@ export struct CompParser {
44 44
45 @Builder 45 @Builder
46 componentBuilder(compDTO: CompDTO, compIndex: number) { 46 componentBuilder(compDTO: CompDTO, compIndex: number) {
47 - if (compDTO.operDataList[0]?.objectType !== '3' && compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口 47 + //if (compDTO.operDataList[0]?.objectType !== '3' && compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口
48 if (compDTO.compStyle === CompStyle.Label_03) { 48 if (compDTO.compStyle === CompStyle.Label_03) {
49 LabelComponent({ compDTO: compDTO }) 49 LabelComponent({ compDTO: compDTO })
50 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 50 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
@@ -119,6 +119,6 @@ export struct CompParser { @@ -119,6 +119,6 @@ export struct CompParser {
119 } 119 }
120 } 120 }
121 121
122 - } 122 + // }
123 } 123 }
124 124
@@ -21,7 +21,7 @@ export struct CardMediaInfo { @@ -21,7 +21,7 @@ export struct CardMediaInfo {
21 Row() { 21 Row() {
22 Image($r('app.media.card_play')) 22 Image($r('app.media.card_play'))
23 .mediaLogo() 23 .mediaLogo()
24 - if(this.contentDTO.videoInfo!=null){ 24 + if (this.contentDTO.videoInfo != null) {
25 Text(DateTimeUtils.getFormattedDuration(this.contentDTO.videoInfo.videoDuration * 1000)) 25 Text(DateTimeUtils.getFormattedDuration(this.contentDTO.videoInfo.videoDuration * 1000))
26 .mediaText() 26 .mediaText()
27 } 27 }
@@ -30,7 +30,7 @@ export struct CardMediaInfo { @@ -30,7 +30,7 @@ export struct CardMediaInfo {
30 // liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 30 // liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停
31 // 显示直播信息 31 // 显示直播信息
32 Row() { 32 Row() {
33 - if(this.contentDTO.liveInfo.liveState === 'wait') { 33 + if (this.contentDTO.liveInfo.liveState === 'wait') {
34 Image($r('app.media.card_wait')) 34 Image($r('app.media.card_wait'))
35 .mediaLogo() 35 .mediaLogo()
36 Text('预约') 36 Text('预约')
@@ -45,7 +45,7 @@ export struct CardMediaInfo { @@ -45,7 +45,7 @@ export struct CardMediaInfo {
45 .mediaLogo() 45 .mediaLogo()
46 Text('回看') 46 Text('回看')
47 .mediaText() 47 .mediaText()
48 - } else if(this.contentDTO.liveInfo.liveState === 'end' && this.contentDTO.liveInfo 48 + } else if (this.contentDTO.liveInfo.liveState === 'end' && this.contentDTO.liveInfo
49 .replayUri) { 49 .replayUri) {
50 // Image($r('app.media.card_live')) 50 // Image($r('app.media.card_live'))
51 // .mediaLogo() 51 // .mediaLogo()
@@ -69,6 +69,15 @@ export struct CardMediaInfo { @@ -69,6 +69,15 @@ export struct CardMediaInfo {
69 Text(DateTimeUtils.getFormattedDuration(this.contentDTO.voiceInfo.voiceDuration * 1000)) 69 Text(DateTimeUtils.getFormattedDuration(this.contentDTO.voiceInfo.voiceDuration * 1000))
70 .mediaText() 70 .mediaText()
71 } 71 }
  72 + } else if (this.contentDTO.objectType === '4') {//广告标签
  73 + Text($r('app.string.comp_advertisement'))
  74 + .fontSize('10fp')
  75 + .fontColor($r('app.color.white'))
  76 + .width(28)
  77 + .height(16)
  78 + .backgroundColor('#4D000000')
  79 + .borderRadius(3)
  80 + .textAlign(TextAlign.Center)
72 } 81 }
73 } 82 }
74 .margin(6) 83 .margin(6)
@@ -20,14 +20,12 @@ export struct CardAdvBigImageComponent { @@ -20,14 +20,12 @@ export struct CardAdvBigImageComponent {
20 20
21 aboutToAppear(): void { 21 aboutToAppear(): void {
22 22
23 - console.error('ZZZXXXXX', '----大图卡----aboutToAppear-----')  
24 23
25 24
26 } 25 }
27 26
28 aboutToDisappear(): void { 27 aboutToDisappear(): void {
29 28
30 - console.error('ZZZXXXXX', '---大图卡-----aboutToDisappear-----')  
31 } 29 }
32 30
33 build() { 31 build() {
@@ -25,8 +25,6 @@ export struct CardAdvGanMiComponent { @@ -25,8 +25,6 @@ export struct CardAdvGanMiComponent {
25 25
26 aboutToAppear(): void { 26 aboutToAppear(): void {
27 27
28 - console.error('ZZZXXXXX', '--冠名广告------aboutToAppear-----')  
29 -  
30 let extraData = this.compDTO.matInfo.extraData 28 let extraData = this.compDTO.matInfo.extraData
31 let labelDTO = JSON.parse(extraData) as AdvExtraData 29 let labelDTO = JSON.parse(extraData) as AdvExtraData
32 this.advExtraData = labelDTO 30 this.advExtraData = labelDTO
@@ -37,7 +35,6 @@ export struct CardAdvGanMiComponent { @@ -37,7 +35,6 @@ export struct CardAdvGanMiComponent {
37 35
38 aboutToDisappear(): void { 36 aboutToDisappear(): void {
39 37
40 - console.error('ZZZXXXXX', '--冠名广告------aboutToDisappear-----')  
41 } 38 }
42 39
43 build() { 40 build() {
@@ -26,14 +26,12 @@ export struct CardAdvLongImageComponent { @@ -26,14 +26,12 @@ export struct CardAdvLongImageComponent {
26 26
27 aboutToAppear(): void { 27 aboutToAppear(): void {
28 28
29 - console.error('ZZZXXXXX', '--长通栏广告 和 顶部长通栏广告------aboutToAppear-----')  
30 29
31 this.haveTitle = this.compDTO.matInfo.advSubType === CompStyle.Card_Adv_7; 30 this.haveTitle = this.compDTO.matInfo.advSubType === CompStyle.Card_Adv_7;
32 } 31 }
33 32
34 aboutToDisappear(): void { 33 aboutToDisappear(): void {
35 34
36 - console.error('ZZZXXXXX', '--长通栏广告 和 顶部长通栏广告------aboutToDisappear-----')  
37 } 35 }
38 36
39 build() { 37 build() {
@@ -42,7 +40,7 @@ export struct CardAdvLongImageComponent { @@ -42,7 +40,7 @@ export struct CardAdvLongImageComponent {
42 40
43 //新闻标题 41 //新闻标题
44 if(this.haveTitle ){ 42 if(this.haveTitle ){
45 - Text(this.compDTO.matInfo.advTitle).bottomTextStyle().margin({ bottom: 8, }) 43 + Text(this.compDTO.matInfo.advTitle).width('100%').bottomTextStyle().margin({ bottom: 8, })
46 } 44 }
47 45
48 //长图 46 //长图
@@ -23,7 +23,6 @@ export struct CardAdvSmallImageComponent { @@ -23,7 +23,6 @@ export struct CardAdvSmallImageComponent {
23 23
24 aboutToAppear(): void { 24 aboutToAppear(): void {
25 25
26 - console.error('ZZZXXXXX', '----小图卡----aboutToAppear-----')  
27 // 计算标题文本行数 26 // 计算标题文本行数
28 let screenWith = DisplayUtils.getDeviceWidth(); 27 let screenWith = DisplayUtils.getDeviceWidth();
29 screenWith = screenWith * 0.62 28 screenWith = screenWith * 0.62
@@ -33,7 +32,6 @@ export struct CardAdvSmallImageComponent { @@ -33,7 +32,6 @@ export struct CardAdvSmallImageComponent {
33 32
34 aboutToDisappear(): void { 33 aboutToDisappear(): void {
35 34
36 - console.error('ZZZXXXXX', '---小图卡-----aboutToDisappear-----')  
37 } 35 }
38 36
39 build() { 37 build() {
@@ -22,12 +22,10 @@ export struct CardAdvThreeImageComponent { @@ -22,12 +22,10 @@ export struct CardAdvThreeImageComponent {
22 22
23 aboutToAppear(): void { 23 aboutToAppear(): void {
24 24
25 - console.error('ZZZXXXXX', '---三图卡-----aboutToAppear-----')  
26 } 25 }
27 26
28 aboutToDisappear(): void { 27 aboutToDisappear(): void {
29 28
30 - console.error('ZZZXXXXX', '----三图卡----aboutToDisappear-----')  
31 } 29 }
32 30
33 build() { 31 build() {
@@ -22,8 +22,6 @@ export struct CardAdvVideoComponent { @@ -22,8 +22,6 @@ export struct CardAdvVideoComponent {
22 @State contentDTO: ContentDTO = {} as ContentDTO 22 @State contentDTO: ContentDTO = {} as ContentDTO
23 23
24 aboutToAppear(): void { 24 aboutToAppear(): void {
25 - console.error('ZZZXXXXX', '--视频广告------aboutToAppear-----')  
26 -  
27 25
28 // this.contentDTO.objectType = '1' 26 // this.contentDTO.objectType = '1'
29 // this.contentDTO.videoInfo = { videoDuration: 1000 } as VideoInfoDTO 27 // this.contentDTO.videoInfo = { videoDuration: 1000 } as VideoInfoDTO
@@ -31,7 +29,6 @@ export struct CardAdvVideoComponent { @@ -31,7 +29,6 @@ export struct CardAdvVideoComponent {
31 29
32 aboutToDisappear(): void { 30 aboutToDisappear(): void {
33 31
34 - console.error('ZZZXXXXX', '---视频广告-----aboutToDisappear-----')  
35 } 32 }
36 33
37 build() { 34 build() {
@@ -21,7 +21,6 @@ export struct CardAdvVideoExComponent { @@ -21,7 +21,6 @@ export struct CardAdvVideoExComponent {
21 21
22 aboutToAppear(): void { 22 aboutToAppear(): void {
23 23
24 - console.error('ZZZXXXXX', '--展会广告------aboutToAppear-----')  
25 24
26 let extraData = this.compDTO.matInfo.extraData 25 let extraData = this.compDTO.matInfo.extraData
27 let labelDTO = JSON.parse(extraData) as AdvExtraData 26 let labelDTO = JSON.parse(extraData) as AdvExtraData
@@ -30,7 +29,6 @@ export struct CardAdvVideoExComponent { @@ -30,7 +29,6 @@ export struct CardAdvVideoExComponent {
30 29
31 aboutToDisappear(): void { 30 aboutToDisappear(): void {
32 31
33 - console.error('ZZZXXXXX', '----展会广告----aboutToDisappear-----')  
34 } 32 }
35 33
36 build() { 34 build() {
1 import { ContentDTO, slideShows } from 'wdBean'; 1 import { ContentDTO, slideShows } from 'wdBean';
2 -import { CommonConstants } from 'wdConstant'  
3 -import { DateTimeUtils } from 'wdKit'; 2 +import { CommonConstants } from 'wdConstant';
4 import { ProcessUtils } from 'wdRouter'; 3 import { ProcessUtils } from 'wdRouter';
5 -import { CardSourceInfo } from '../cardCommon/CardSourceInfo'  
6 -import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 4 +import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
7 5
8 /** 6 /**
9 * 大专题卡--CompStyle: 10 7 * 大专题卡--CompStyle: 10
@@ -25,6 +23,9 @@ export struct Card10Component { @@ -25,6 +23,9 @@ export struct Card10Component {
25 .maxLines(2) 23 .maxLines(2)
26 .textOverflow({ overflow: TextOverflow.Ellipsis }) 24 .textOverflow({ overflow: TextOverflow.Ellipsis })
27 .margin({ bottom: 19 }) 25 .margin({ bottom: 19 })
  26 + .onClick((event: ClickEvent) => {
  27 + ProcessUtils.processPage(this.contentDTO)
  28 + })
28 } 29 }
29 // 大图 30 // 大图
30 Stack() { 31 Stack() {
@@ -180,7 +180,7 @@ struct CarouselLayout01CardView { @@ -180,7 +180,7 @@ struct CarouselLayout01CardView {
180 }) 180 })
181 Column() { 181 Column() {
182 // 这里用于展示轮播图右上角信息,这里只对直播类型的展示 182 // 这里用于展示轮播图右上角信息,这里只对直播类型的展示
183 - if (this.item.objectType === '2') { 183 + if (this.item.objectType === '2' || this.item.objectType ==='4') {
184 CardMediaInfo({ contentDTO: this.item }) 184 CardMediaInfo({ contentDTO: this.item })
185 .width(CommonConstants.FULL_PARENT) 185 .width(CommonConstants.FULL_PARENT)
186 } 186 }
  1 +import { EmitterUtils, EmitterEventId, Logger } from 'wdKit/Index'
1 import MinePageDatasModel from '../../../model/MinePageDatasModel' 2 import MinePageDatasModel from '../../../model/MinePageDatasModel'
2 import { FollowListItem } from '../../../viewmodel/FollowListItem' 3 import { FollowListItem } from '../../../viewmodel/FollowListItem'
3 import { CustomTitleUI } from '../../reusable/CustomTitleUI' 4 import { CustomTitleUI } from '../../reusable/CustomTitleUI'
@@ -20,17 +21,27 @@ export struct FollowFirstTabsComponent{ @@ -20,17 +21,27 @@ export struct FollowFirstTabsComponent{
20 }) 21 })
21 22
22 if(this.controller != null && this.data.length>1 && this.changeIndex === 1){ 23 if(this.controller != null && this.data.length>1 && this.changeIndex === 1){
  24 + this.jumpFollowNextPage()
  25 + }
  26 + }).catch((err:Error)=>{
  27 + console.log(TAG,JSON.stringify(err))
  28 + })
  29 +
  30 + EmitterUtils.receiveEvent(EmitterEventId.MY_FOLLOW_EMPTY, (() => {
  31 + if(this.controller != null && this.data.length>1 ){
  32 + this.jumpFollowNextPage()
  33 + }
  34 + }))
  35 + }
  36 +
  37 + jumpFollowNextPage(){
23 //个人主页 跳转 关注页 tab 2 38 //个人主页 跳转 关注页 tab 2
24 let intervalID = setInterval(() => { 39 let intervalID = setInterval(() => {
25 - this.currentIndex = this.changeIndex 40 + this.currentIndex = 1
26 this.controller.changeIndex(this.currentIndex) 41 this.controller.changeIndex(this.currentIndex)
27 clearInterval(intervalID); 42 clearInterval(intervalID);
28 }, 500); 43 }, 500);
29 } 44 }
30 - }).catch((err:Error)=>{  
31 - console.log(TAG,JSON.stringify(err))  
32 - })  
33 - }  
34 45
35 @Builder TabBuilder(index: number, item: FollowListItem) { 46 @Builder TabBuilder(index: number, item: FollowListItem) {
36 Stack(){ 47 Stack(){
1 -import { LazyDataSource, SPHelper, UserDataLocal } from 'wdKit'; 1 +import { EmitterEventId, EmitterUtils, LazyDataSource, SPHelper, UserDataLocal } from 'wdKit';
2 import MinePageDatasModel from '../../../model/MinePageDatasModel'; 2 import MinePageDatasModel from '../../../model/MinePageDatasModel';
3 import SearcherAboutDataModel from '../../../model/SearcherAboutDataModel'; 3 import SearcherAboutDataModel from '../../../model/SearcherAboutDataModel';
4 import { CreatorDetailRequestItem } from '../../../viewmodel/CreatorDetailRequestItem'; 4 import { CreatorDetailRequestItem } from '../../../viewmodel/CreatorDetailRequestItem';
@@ -156,10 +156,12 @@ export struct FollowListDetailUI { @@ -156,10 +156,12 @@ export struct FollowListDetailUI {
156 } 156 }
157 this.isLoading = false 157 this.isLoading = false
158 this.isGetRequest = true 158 this.isGetRequest = true
  159 + this.sendFollowMessage()
159 }).catch((err: Error) => { 160 }).catch((err: Error) => {
160 console.log(TAG, "请求失败") 161 console.log(TAG, "请求失败")
161 this.isGetRequest = true 162 this.isGetRequest = true
162 this.isLoading = false 163 this.isLoading = false
  164 + this.sendFollowMessage()
163 }) 165 })
164 } else { 166 } else {
165 this.isLoading = false 167 this.isLoading = false
@@ -167,6 +169,12 @@ export struct FollowListDetailUI { @@ -167,6 +169,12 @@ export struct FollowListDetailUI {
167 } 169 }
168 } 170 }
169 171
  172 + sendFollowMessage(){
  173 + if(this.count === 0){
  174 + EmitterUtils.sendEvent(EmitterEventId.MY_FOLLOW_EMPTY)
  175 + }
  176 + }
  177 +
170 getNewPageData() { 178 getNewPageData() {
171 //我的关注列表 179 //我的关注列表
172 if (this.creatorDirectoryId === -1) { 180 if (this.creatorDirectoryId === -1) {
@@ -284,6 +284,7 @@ export struct HomePageBottomComponent{ @@ -284,6 +284,7 @@ export struct HomePageBottomComponent{
284 if (!this.data_comment || value.list.length == 0){ 284 if (!this.data_comment || value.list.length == 0){
285 this.hasMore = false 285 this.hasMore = false
286 this.isLoading = false 286 this.isLoading = false
  287 + this.isGetRequest = true
287 }else{ 288 }else{
288 this.getCommentListStatus(value) 289 this.getCommentListStatus(value)
289 } 290 }
@@ -101,6 +101,7 @@ export struct OtherHomePageBottomCommentComponent { @@ -101,6 +101,7 @@ export struct OtherHomePageBottomCommentComponent {
101 if (!this.data_comment || value.list.length == 0) { 101 if (!this.data_comment || value.list.length == 0) {
102 this.hasMore = false 102 this.hasMore = false
103 this.isLoading = false 103 this.isLoading = false
  104 + this.isGetRequest = true
104 } else { 105 } else {
105 this.getCommentListStatus(value) 106 this.getCommentListStatus(value)
106 } 107 }
@@ -12,6 +12,7 @@ export default struct NoMoreLayout { @@ -12,6 +12,7 @@ export default struct NoMoreLayout {
12 Text($r('app.string.footer_text')) 12 Text($r('app.string.footer_text'))
13 .fontSize(RefreshConstants.NoMoreLayoutConstant_TITLE_FONT) 13 .fontSize(RefreshConstants.NoMoreLayoutConstant_TITLE_FONT)
14 .textAlign(TextAlign.Center) 14 .textAlign(TextAlign.Center)
  15 + .fontColor('#CCCCCC')
15 .margin({bottom:40}) 16 .margin({bottom:40})
16 } 17 }
17 .width(RefreshConstants.FULL_WIDTH) 18 .width(RefreshConstants.FULL_WIDTH)
@@ -246,6 +246,7 @@ export struct PageComponent { @@ -246,6 +246,7 @@ export struct PageComponent {
246 this.pageModel.groupId = this.pageId; 246 this.pageModel.groupId = this.pageId;
247 this.pageModel.channelId = this.channelId; 247 this.pageModel.channelId = this.channelId;
248 this.pageModel.currentPage = 1; 248 this.pageModel.currentPage = 1;
  249 + this.pageModel.pageTotalCompSize = 0;
249 PageHelper.getInitData(this.pageModel, this.pageAdvModel) 250 PageHelper.getInitData(this.pageModel, this.pageAdvModel)
250 } 251 }
251 } 252 }
@@ -99,8 +99,12 @@ struct PeopleShipHomePage { @@ -99,8 +99,12 @@ struct PeopleShipHomePage {
99 99
100 } 100 }
101 101
102 - async aboutToAppear() { 102 + aboutToAppear() {
103 103
  104 + this.getData()
  105 + }
  106 +
  107 + private async getData() {
104 try { 108 try {
105 // 获取页面信息 109 // 获取页面信息
106 this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '') 110 this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '')
@@ -117,8 +121,6 @@ struct PeopleShipHomePage { @@ -117,8 +121,6 @@ struct PeopleShipHomePage {
117 } catch (exception) { 121 } catch (exception) {
118 122
119 } 123 }
120 -  
121 -  
122 } 124 }
123 125
124 findFollowStata(followList: QueryListIsFollowedItem[]) { 126 findFollowStata(followList: QueryListIsFollowedItem[]) {
@@ -156,8 +158,10 @@ struct PeopleShipHomePage { @@ -156,8 +158,10 @@ struct PeopleShipHomePage {
156 PageRepository.postInteractAccentionOperate(params).then(res => { 158 PageRepository.postInteractAccentionOperate(params).then(res => {
157 if (this.isAttention == '1') { 159 if (this.isAttention == '1') {
158 this.isAttention = '0' 160 this.isAttention = '0'
  161 + this.detailModel.fansNum -= 1
159 } else { 162 } else {
160 this.isAttention = '1' 163 this.isAttention = '1'
  164 + this.detailModel.fansNum += 1
161 } 165 }
162 this.isLoadingAttention = false 166 this.isLoadingAttention = false
163 }) 167 })
@@ -339,8 +339,8 @@ export struct TopNavigationComponent { @@ -339,8 +339,8 @@ export struct TopNavigationComponent {
339 }else { 339 }else {
340 Row() { 340 Row() {
341 Image($r('app.media.icon_search')) 341 Image($r('app.media.icon_search'))
342 - .width(18)  
343 - .height(18) 342 + .width('24vp')
  343 + .height('24vp')
344 } 344 }
345 .height('40vp') 345 .height('40vp')
346 .width('40vp') 346 .width('40vp')
@@ -280,6 +280,7 @@ export struct PeopleShipMainComponent { @@ -280,6 +280,7 @@ export struct PeopleShipMainComponent {
280 //批量查询各类型内容动态数据接口 280 //批量查询各类型内容动态数据接口
281 this.checkContentInteractData(listData.list, resolve) 281 this.checkContentInteractData(listData.list, resolve)
282 } else { 282 } else {
  283 + this.hasMore = false;
283 this.resolveEnd(true, resolve) 284 this.resolveEnd(true, resolve)
284 } 285 }
285 286
@@ -25,12 +25,27 @@ export struct PeopleShipRecommendHeadComponent { @@ -25,12 +25,27 @@ export struct PeopleShipRecommendHeadComponent {
25 }) 25 })
26 }.margin({ top: 12, bottom: 8 }) 26 }.margin({ top: 12, bottom: 8 })
27 27
  28 + Row() {
28 Text(this.rmhInfo.userName) 29 Text(this.rmhInfo.userName)
29 .fontColor($r('app.color.color_222222')) 30 .fontColor($r('app.color.color_222222'))
30 .fontSize($r('app.float.vp_14')) 31 .fontSize($r('app.float.vp_14'))
31 .fontWeight(600) 32 .fontWeight(600)
32 .maxLines(1) 33 .maxLines(1)
33 .textOverflow({overflow: TextOverflow.Ellipsis}) 34 .textOverflow({overflow: TextOverflow.Ellipsis})
  35 + if (this.rmhInfo.authIcon) {
  36 + Image(this.rmhInfo.authIcon)
  37 + .width('12vp')
  38 + .height('12vp')
  39 + .borderRadius(6)
  40 + .objectFit(ImageFit.Cover)
  41 + .margin({
  42 + left: '2vp'
  43 + })
  44 + }
  45 + }
  46 + .alignItems(VerticalAlign.Center)
  47 + .justifyContent(FlexAlign.Center)
  48 +
34 49
35 Text(this.rmhInfo.introduction) 50 Text(this.rmhInfo.introduction)
36 .fontColor($r('app.color.color_B0B0B0')) 51 .fontColor($r('app.color.color_B0B0B0'))
@@ -24,7 +24,7 @@ export struct PeopleShipHomeListComponent { @@ -24,7 +24,7 @@ export struct PeopleShipHomeListComponent {
24 // 列表 24 // 列表
25 else if (this.publishCount == 0) { 25 else if (this.publishCount == 0) {
26 // 无数据展示 26 // 无数据展示
27 - EmptyComponent({emptyType: 13}).height(DisplayUtils.getDeviceHeight() - this.topHeight) 27 + EmptyComponent({emptyType: 12}).height(DisplayUtils.getDeviceHeight() - this.topHeight)
28 } else { 28 } else {
29 Column() { 29 Column() {
30 Column() { 30 Column() {
1 import router from '@ohos.router' 1 import router from '@ohos.router'
2 import { PeopleShipUserDetailData } from 'wdBean' 2 import { PeopleShipUserDetailData } from 'wdBean'
3 import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent' 3 import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent'
  4 +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
4 5
5 @Component 6 @Component
6 export struct PeopleShipHomePageNavComponent { 7 export struct PeopleShipHomePageNavComponent {
@@ -38,8 +39,13 @@ export struct PeopleShipHomePageNavComponent { @@ -38,8 +39,13 @@ export struct PeopleShipHomePageNavComponent {
38 iconDiameter: 10, 39 iconDiameter: 10,
39 headPhotoUrl: (this.detailModel.headPhotoUrl && this.detailModel.headPhotoUrl.length > 0 ) ? this.detailModel.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon'), 40 headPhotoUrl: (this.detailModel.headPhotoUrl && this.detailModel.headPhotoUrl.length > 0 ) ? this.detailModel.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon'),
40 authIcon: this.detailModel.authIcon 41 authIcon: this.detailModel.authIcon
41 - })  
42 - .margin({ 42 + }).onClick(()=>{
  43 + let params = {
  44 + 'headPhotoUrl': this.detailModel.headPhotoUrl,
  45 + 'headType': '1'
  46 + } as Record<string, string>;
  47 + WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
  48 + }).margin({
43 left: '10vp', 49 left: '10vp',
44 }) 50 })
45 .visibility((this.topOpacity > 0.5 ? Visibility.Visible : Visibility.Hidden)) 51 .visibility((this.topOpacity > 0.5 ? Visibility.Visible : Visibility.Hidden))
@@ -9,6 +9,7 @@ export struct PeopleShipHomePageHeadComponent { @@ -9,6 +9,7 @@ export struct PeopleShipHomePageHeadComponent {
9 Stack({ alignContent: Alignment.BottomEnd }) { 9 Stack({ alignContent: Alignment.BottomEnd }) {
10 // 头像 10 // 头像
11 Image( this.headPhotoUrl ) 11 Image( this.headPhotoUrl )
  12 + .alt($r('app.media.WDAccountOwnerHedaerDefaultIcon'))
12 .width(this.diameter) 13 .width(this.diameter)
13 .height(this.diameter) 14 .height(this.diameter)
14 .borderRadius(this.diameter/2) 15 .borderRadius(this.diameter/2)
@@ -7,6 +7,7 @@ import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageD @@ -7,6 +7,7 @@ import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageD
7 import { InfluenceData, PeopleShipUserDetailData } from 'wdBean' 7 import { InfluenceData, PeopleShipUserDetailData } from 'wdBean'
8 import { PeopleShipHomeAttentionComponent } from './PeopleShipHomeAttentionComponent' 8 import { PeopleShipHomeAttentionComponent } from './PeopleShipHomeAttentionComponent'
9 import { HWLocationUtils } from 'wdHwAbility' 9 import { HWLocationUtils } from 'wdHwAbility'
  10 +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
10 11
11 12
12 @Component 13 @Component
@@ -51,6 +52,12 @@ export struct PeopleShipHomePageTopComponent { @@ -51,6 +52,12 @@ export struct PeopleShipHomePageTopComponent {
51 }).margin({ 52 }).margin({
52 left: '10vp', 53 left: '10vp',
53 bottom: '20vp' 54 bottom: '20vp'
  55 + }).onClick(()=>{
  56 + let params = {
  57 + 'headPhotoUrl': this.detailModel.headPhotoUrl,
  58 + 'headType': '1'
  59 + } as Record<string, string>;
  60 + WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
54 }) 61 })
55 62
56 63
@@ -194,6 +194,7 @@ export struct SearchResultContentComponent{ @@ -194,6 +194,7 @@ export struct SearchResultContentComponent{
194 isSearch: true, 194 isSearch: true,
195 publishTimestamp:"", 195 publishTimestamp:"",
196 bottomNavId:'', 196 bottomNavId:'',
  197 + openType:''
197 } 198 }
198 199
199 this.data.push(contentDTO) 200 this.data.push(contentDTO)
@@ -76,7 +76,7 @@ export struct AccountAndSecurityLayout { @@ -76,7 +76,7 @@ export struct AccountAndSecurityLayout {
76 addEmitEvent(){ 76 addEmitEvent(){
77 // 定义一个eventId为1的事件 77 // 定义一个eventId为1的事件
78 let event: emitter.InnerEvent = { 78 let event: emitter.InnerEvent = {
79 - eventId: 10010 79 + eventId: EmitterEventId.PHONE_CHANGE_SUCCESS
80 }; 80 };
81 81
82 // 收到eventId为1的事件后执行该回调 82 // 收到eventId为1的事件后执行该回调
@@ -235,7 +235,7 @@ export struct EmptyComponent { @@ -235,7 +235,7 @@ export struct EmptyComponent {
235 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) { 235 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) {
236 imageString = $r('app.media.icon_no_content') 236 imageString = $r('app.media.icon_no_content')
237 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCreation) { 237 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCreation) {
238 - imageString = $r('app.media.icon_no_appointmentMade') 238 + imageString = $r('app.media.icon_no_works1')
239 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoBooking) { 239 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoBooking) {
240 imageString = $r('app.media.icon_no_appointmentMade') 240 imageString = $r('app.media.icon_no_appointmentMade')
241 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NetworkFailed) { 241 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NetworkFailed) {
@@ -4,16 +4,18 @@ import { router } from '@kit.ArkUI'; @@ -4,16 +4,18 @@ 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 = ''
7 @State params:Record<string, string> = router.getParams() as Record<string, string>; 8 @State params:Record<string, string> = router.getParams() as Record<string, string>;
8 9
9 onPageShow() { 10 onPageShow() {
10 this.headPhotoUrl = this.params?.['headPhotoUrl']; 11 this.headPhotoUrl = this.params?.['headPhotoUrl'];
  12 + this.headType = this.params?.['headType'] ?? '';
11 } 13 }
12 14
13 build() { 15 build() {
14 Row() { 16 Row() {
15 Image(this.headPhotoUrl) 17 Image(this.headPhotoUrl)
16 - .alt($r('app.media.default_head')) 18 + .alt(this.headType.length > 0 ? $r('app.media.WDAccountOwnerHedaerDefaultIcon') : $r('app.media.default_head'))
17 .width('720lpx') 19 .width('720lpx')
18 .height('720lpx') 20 .height('720lpx')
19 .objectFit(ImageFit.Auto) 21 .objectFit(ImageFit.Auto)
1 import { CompDTO, ContentDTO, PageDTO, PageInfoDTO } from 'wdBean'; 1 import { CompDTO, ContentDTO, PageDTO, PageInfoDTO } from 'wdBean';
2 import { CompStyle, ViewType } from 'wdConstant/Index'; 2 import { CompStyle, ViewType } from 'wdConstant/Index';
3 -import { CollectionUtils, DateTimeUtils, Logger, NetworkUtil } from 'wdKit'; 3 +import { CollectionUtils, DateTimeUtils, Logger, NetworkUtil, StringUtils } from 'wdKit';
4 import { closeRefresh } from '../utils/PullDownRefresh'; 4 import { closeRefresh } from '../utils/PullDownRefresh';
5 import PageModel from './PageModel'; 5 import PageModel from './PageModel';
6 import PageViewModel from './PageViewModel'; 6 import PageViewModel from './PageViewModel';
@@ -9,6 +9,7 @@ import { CompAdvBean } from 'wdBean/src/main/ets/bean/adv/AdvsRuleBean'; @@ -9,6 +9,7 @@ import { CompAdvBean } from 'wdBean/src/main/ets/bean/adv/AdvsRuleBean';
9 import PageAdModel from './PageAdvModel'; 9 import PageAdModel from './PageAdvModel';
10 import { ArrayList } from '@kit.ArkTS'; 10 import { ArrayList } from '@kit.ArkTS';
11 import { WDViewDefaultType } from '../components/view/EmptyComponent'; 11 import { WDViewDefaultType } from '../components/view/EmptyComponent';
  12 +import { CompAdvMatInfoBean } from 'wdBean/src/main/ets/bean/adv/CompAdvInfoBean';
12 13
13 const TAG = 'PageHelper'; 14 const TAG = 'PageHelper';
14 15
@@ -21,6 +22,7 @@ export class PageHelper { @@ -21,6 +22,7 @@ export class PageHelper {
21 */ 22 */
22 async refreshUI(pageModel: PageModel, pageAdvModel: PageAdModel) { 23 async refreshUI(pageModel: PageModel, pageAdvModel: PageAdModel) {
23 pageModel.loadStrategy = 2 24 pageModel.loadStrategy = 2
  25 + pageModel.pageTotalCompSize = 0;
24 this.getPageInfo(pageModel, pageAdvModel) 26 this.getPageInfo(pageModel, pageAdvModel)
25 } 27 }
26 28
@@ -147,7 +149,7 @@ export class PageHelper { @@ -147,7 +149,7 @@ export class PageHelper {
147 * 处理页面中的广告组件信息 149 * 处理页面中的广告组件信息
148 * @param pageDto 150 * @param pageDto
149 */ 151 */
150 - private handlePageCompAdvPostion(pageCompList: ArrayList<CompDTO>, pageDto: PageDTO) { 152 + private handlePageCompAdvPostion(pageCompList: ArrayList<CompDTO>, pageModel: PageModel, pageDto: PageDTO) {
151 153
152 let compAdvList = pageDto.compAdList 154 let compAdvList = pageDto.compAdList
153 155
@@ -159,17 +161,20 @@ export class PageHelper { @@ -159,17 +161,20 @@ export class PageHelper {
159 flag = false 161 flag = false
160 } 162 }
161 163
  164 +
162 let pageCompSize = pageCompList.length // 信息流组件业务数量 165 let pageCompSize = pageCompList.length // 信息流组件业务数量
163 - console.error("ZZZXXXXX", " start--->" + pageCompSize); 166 + // console.error("ZZZXXXXX", " start--->" + pageCompSize);
164 167
165 if (pageCompSize == 0) { 168 if (pageCompSize == 0) {
166 flag = false 169 flag = false
167 } 170 }
168 171
169 if (flag) { 172 if (flag) {
  173 + let bannerAdvIndex = 0; // banner组件展示数据投放
  174 + let layoutAdvIndex = 0; //稿件投放统计
170 // 升序排序 175 // 升序排序
171 compAdvList.sort((a: CompAdvBean, b: CompAdvBean) => a.slotInfo.position - b.slotInfo.position) 176 compAdvList.sort((a: CompAdvBean, b: CompAdvBean) => a.slotInfo.position - b.slotInfo.position)
172 - console.error("ZZZXXXXX", " 排序后的广告--->" + JSON.stringify(compAdvList)); 177 + // console.error("ZZZXXXXX", " 排序后的广告--->" + JSON.stringify(compAdvList));
173 //当前日期 178 //当前日期
174 let serverTimeLong: number = DateTimeUtils.getTimeStamp(); 179 let serverTimeLong: number = DateTimeUtils.getTimeStamp();
175 for (let advBean of compAdvList) { 180 for (let advBean of compAdvList) {
@@ -192,14 +197,91 @@ export class PageHelper { @@ -192,14 +197,91 @@ export class PageHelper {
192 // 插入轮播组件的广告 197 // 插入轮播组件的广告
193 if (4 == advSubType) { 198 if (4 == advSubType) {
194 199
  200 + let position = slotInfo.position - 1;
  201 + // 检测newCompList 集合中是否有轮播组件资源
  202 + let adCompId = slotInfo.compId;
  203 + if (!StringUtils.isEmpty(adCompId)) {
  204 + for (let compBean of pageCompList) {
  205 + if (StringUtils.isEmpty(compBean.id)) {
  206 + continue
  207 + }
  208 + let compId = compBean.id.toString();
  209 + //匹配组件
  210 + if (adCompId == compId) {
  211 + // 运营位数据
  212 + let dataList = compBean.operDataList;
  213 + if (dataList != null) {
  214 +
  215 + // 数组转成 ArrayList
  216 + let changeArrayList = (dataList: ContentDTO[]) => {
  217 + let compOperData: ArrayList<ContentDTO> = new ArrayList()
  218 + for (let dataListBean of dataList) {
  219 + compOperData.add(dataListBean)
  220 + }
  221 + return compOperData
  222 + }
  223 +
  224 + let compOperData = changeArrayList(dataList)
  225 +
  226 + // 轮播组件广告数据转 业务信息
  227 + let changeContentDTO = (matInfo: CompAdvMatInfoBean) => {
  228 + let advContentBean: ContentDTO = {} as ContentDTO;
  229 + advContentBean.newsTitle = matInfo.advTitle
  230 + advContentBean.objectType = matInfo.advType == "0" ? matInfo.advType : "4"
  231 + advContentBean.coverUrl = matInfo.matImageUrl[0]
  232 + advContentBean.linkUrl = matInfo.linkUrl
  233 + advContentBean.openType = matInfo.linkType
  234 + advContentBean.corner = ''
  235 + return advContentBean
  236 + }
  237 + let advContentBean = changeContentDTO(matInfo)
  238 +
  239 + let dataListSize = dataList.length;
  240 + if (position < dataListSize) {
  241 + //dataList.add(position + bannerAdvIndex, advContentBean);
  242 + compOperData.insert(advContentBean, position + bannerAdvIndex)
195 } else { 243 } else {
  244 + compOperData.add(advContentBean);
  245 + }
  246 + bannerAdvIndex = bannerAdvIndex + 1;
  247 +
  248 + // ArrayList转成 数组
  249 + compBean.operDataList = compOperData.convertToArray()
  250 + }
  251 + }
  252 + }
  253 + }
  254 +
  255 + } else {
  256 +
  257 +
196 let advPosition = slotInfo.position //广告位置,从1开始 258 let advPosition = slotInfo.position //广告位置,从1开始
  259 + // 页面的comp总数 - 这次请求的comp总数 = 剩余comp总数
197 advPosition = advPosition - 1 260 advPosition = advPosition - 1
  261 +
  262 + let a = pageModel.pageTotalCompSize - pageCompSize
  263 + if (advPosition <= pageModel.pageTotalCompSize && advPosition >= a) {
  264 +
  265 + let b = advPosition - a;
  266 + console.error('ZZZXXXXX', matInfo.advSubType + '-------------' + matInfo.advTitle + " " + advPosition + " " + a + " " + b)
  267 + if (b <= pageCompSize && b >= 0) {
  268 +
198 let advComp: CompDTO = { 269 let advComp: CompDTO = {
199 compStyle: CompStyle.Card_Comp_Adv, 270 compStyle: CompStyle.Card_Comp_Adv,
200 matInfo: matInfo 271 matInfo: matInfo
201 } as CompDTO; 272 } as CompDTO;
202 - pageCompList.insert(advComp, 0) 273 +
  274 + if (pageCompSize == slotInfo.position) {
  275 + pageCompList.add(advComp)
  276 + } else {
  277 + pageCompList.insert(advComp, b + layoutAdvIndex)
  278 + }
  279 +
  280 + layoutAdvIndex = layoutAdvIndex + 1;
  281 +
  282 + }
  283 + }
  284 +
203 } 285 }
204 } 286 }
205 } 287 }
@@ -207,7 +289,7 @@ export class PageHelper { @@ -207,7 +289,7 @@ export class PageHelper {
207 } 289 }
208 290
209 } 291 }
210 - console.error("ZZZXXXXX", " end--->" + pageCompList.length); 292 + // console.error("ZZZXXXXX", " end--->" + pageCompList.length);
211 } 293 }
212 294
213 295
@@ -228,19 +310,21 @@ export class PageHelper { @@ -228,19 +310,21 @@ export class PageHelper {
228 310
229 //移除音频 和 活动 311 //移除音频 和 活动
230 this.collectPageComp(pageModel, data) 312 this.collectPageComp(pageModel, data)
231 - // 313 +
232 // pageModel.compList.push(...data.compList) 314 // pageModel.compList.push(...data.compList)
233 - PageViewModel.getInteractData(data.compList).then((data: CompDTO[]) => {  
234 - // 刷新,替换所有数据  
235 - pageModel.compList.updateItems(sizeBefore, data)  
236 - pageModel.timestamp = DateTimeUtils.getTimeStamp().toString()  
237 - }) 315 + // TODO 暂时屏蔽,此处代码会造成 广告逻辑错乱,只有第一页有广告数据,随着加载更多,第二页也会出现广告数据
  316 + // PageViewModel.getInteractData(data.compList).then((data: CompDTO[]) => {
  317 + // // 刷新,替换所有数据
  318 + // pageModel.compList.updateItems(sizeBefore, data)
  319 + // pageModel.timestamp = DateTimeUtils.getTimeStamp().toString()
  320 + // })
238 } 321 }
239 }).catch((err: string | Resource) => { 322 }).catch((err: string | Resource) => {
240 promptAction.showToast({ message: err }); 323 promptAction.showToast({ message: err });
241 }) 324 })
242 } 325 }
243 326
  327 +
244 /** 328 /**
245 * 移除comp 329 * 移除comp
246 */ 330 */
@@ -256,11 +340,22 @@ export class PageHelper { @@ -256,11 +340,22 @@ export class PageHelper {
256 if (contentInfo && (contentInfo.objectType === '13' || contentInfo.objectType === '3')) { 340 if (contentInfo && (contentInfo.objectType === '13' || contentInfo.objectType === '3')) {
257 Logger.debug(TAG, 'getGroupData 移除音频 和 活动'); 341 Logger.debug(TAG, 'getGroupData 移除音频 和 活动');
258 } else { 342 } else {
  343 + // 暂时屏蔽活动和音频详情入口
  344 + if (element.operDataList[0]?.objectType === '3' || element.operDataList[0]?.objectType === '13') {
  345 + } else {
259 pageCompList.add(element) 346 pageCompList.add(element)
260 } 347 }
  348 +
261 } 349 }
  350 + }
  351 +
  352 + // 记录
  353 + pageModel.pageTotalCompSize = pageCompList.length + pageModel.pageTotalCompSize
  354 + // console.error("ZZZXXXXX", " collectPageComp--->" + pageModel.pageTotalCompSize);
  355 +
262 // 处理页面广告数据,投放到页面的位置 356 // 处理页面广告数据,投放到页面的位置
263 - //this.handlePageCompAdvPostion(pageCompList, pageDto); 357 + this.handlePageCompAdvPostion(pageCompList, pageModel, pageDto);
  358 +
264 359
265 //遍历所有组件和稿件数据 push到页面 360 //遍历所有组件和稿件数据 push到页面
266 for (let element of pageCompList) { 361 for (let element of pageCompList) {
@@ -54,6 +54,9 @@ export default class PageModel { @@ -54,6 +54,9 @@ export default class PageModel {
54 timestamp: String = '1'; 54 timestamp: String = '1';
55 55
56 56
  57 + // 记录已经展示的稿件和组件数量
  58 + pageTotalCompSize: number = 0;
  59 +
57 /** 60 /**
58 * 简单复制业务数据 61 * 简单复制业务数据
59 */ 62 */
@@ -7,7 +7,7 @@ import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/ @@ -7,7 +7,7 @@ import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/
7 import { WDRouterRule, WDRouterPage } from 'wdRouter'; 7 import { WDRouterRule, WDRouterPage } from 'wdRouter';
8 import { SettingPasswordParams } from './SettingPasswordLayout' 8 import { SettingPasswordParams } from './SettingPasswordLayout'
9 import { Router } from '@ohos.arkui.UIContext' 9 import { Router } from '@ohos.arkui.UIContext'
10 -import { SPHelper, ToastUtils } from 'wdKit/Index' 10 +import { EmitterEventId, EmitterUtils, SPHelper, ToastUtils } from 'wdKit/Index'
11 import { SpConstants } from 'wdConstant/Index' 11 import { SpConstants } from 'wdConstant/Index'
12 import { emitter } from '@kit.BasicServicesKit' 12 import { emitter } from '@kit.BasicServicesKit'
13 13
@@ -189,7 +189,7 @@ struct ForgetPasswordPage { @@ -189,7 +189,7 @@ struct ForgetPasswordPage {
189 sendEmitEvent(){ 189 sendEmitEvent(){
190 // 定义一个eventId为1的事件,事件优先级为Low 190 // 定义一个eventId为1的事件,事件优先级为Low
191 let event: emitter.InnerEvent = { 191 let event: emitter.InnerEvent = {
192 - eventId: 10010, 192 + eventId: EmitterEventId.PHONE_CHANGE_SUCCESS,
193 priority: emitter.EventPriority.LOW 193 priority: emitter.EventPriority.LOW
194 }; 194 };
195 195
1 import { Logger } from 'wdKit/src/main/ets/utils/Logger' 1 import { Logger } from 'wdKit/src/main/ets/utils/Logger'
2 import { LoginModel } from './LoginModel' 2 import { LoginModel } from './LoginModel'
3 import { LoginBean } from './LoginBean' 3 import { LoginBean } from './LoginBean'
4 -import { SPHelper, StringUtils, UserDataLocal } from 'wdKit' 4 +import { EmitterEventId, EmitterUtils, SPHelper, StringUtils, UserDataLocal } from 'wdKit'
5 import { CheckVerifyBean } from './CheckVerifyBean' 5 import { CheckVerifyBean } from './CheckVerifyBean'
6 import cryptoFramework from '@ohos.security.cryptoFramework' 6 import cryptoFramework from '@ohos.security.cryptoFramework'
7 import buffer from '@ohos.buffer' 7 import buffer from '@ohos.buffer'
@@ -55,6 +55,7 @@ export class LoginViewModel { @@ -55,6 +55,7 @@ export class LoginViewModel {
55 SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status) 55 SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status)
56 SPHelper.default.saveSync(SpConstants.USER_Type, data.userType) 56 SPHelper.default.saveSync(SpConstants.USER_Type, data.userType)
57 SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName) 57 SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)
  58 + EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS)
58 success(data) 59 success(data)
59 }).catch((error:string) => { 60 }).catch((error:string) => {
60 fail(error) 61 fail(error)
@@ -82,6 +83,7 @@ export class LoginViewModel { @@ -82,6 +83,7 @@ export class LoginViewModel {
82 SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status) 83 SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status)
83 SPHelper.default.saveSync(SpConstants.USER_Type, data.userType) 84 SPHelper.default.saveSync(SpConstants.USER_Type, data.userType)
84 SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName) 85 SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)
  86 + EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS)
85 success(data) 87 success(data)
86 }).catch((value: string) => { 88 }).catch((value: string) => {
87 fail(value) 89 fail(value)
@@ -181,12 +181,12 @@ struct LaunchAdvertisingPage { @@ -181,12 +181,12 @@ struct LaunchAdvertisingPage {
181 //端外打开 181 //端外打开
182 182
183 ProcessUtils.jumpExternalWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) 183 ProcessUtils.jumpExternalWebPage(this.model.launchAdInfo[0].matInfo.linkUrl)
184 - clearInterval(this.timer) 184 + //clearInterval(this.timer)
185 185
186 }else { 186 }else {
187 //端内打开 187 //端内打开
188 ProcessUtils.gotoDefaultWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) 188 ProcessUtils.gotoDefaultWebPage(this.model.launchAdInfo[0].matInfo.linkUrl)
189 - clearInterval(this.timer) 189 + //clearInterval(this.timer)
190 190
191 } 191 }
192 } 192 }
@@ -35,7 +35,7 @@ struct LaunchPage { @@ -35,7 +35,7 @@ struct LaunchPage {
35 alignment: DialogAlignment.Center, 35 alignment: DialogAlignment.Center,
36 offset: { dx: 0, dy: '-24' }, 36 offset: { dx: 0, dy: '-24' },
37 customStyle: true, 37 customStyle: true,
38 - autoCancel: false 38 + autoCancel: false,
39 }); 39 });
40 40
41 onCancel() { 41 onCancel() {
@@ -110,6 +110,9 @@ struct LaunchPage { @@ -110,6 +110,9 @@ struct LaunchPage {
110 if (dataModel.launchAdInfo.length) { 110 if (dataModel.launchAdInfo.length) {
111 //跳转广告页 111 //跳转广告页
112 this.jumpToAdvertisingPage(); 112 this.jumpToAdvertisingPage();
  113 +
  114 + //WDRouterRule.jumpWithReplacePage(WDRouterPage.privacyPage)
  115 +
113 }else { 116 }else {
114 //直接跳转首页 117 //直接跳转首页
115 WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) 118 WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
@@ -156,7 +159,7 @@ struct LaunchPage { @@ -156,7 +159,7 @@ struct LaunchPage {
156 build(){ 159 build(){
157 160
158 Stack({alignContent:Alignment.Bottom}){ 161 Stack({alignContent:Alignment.Bottom}){
159 - Image($r('app.media.app_icon')) 162 + Image($r('app.media.LaunchPage_logo'))
160 .width('278lpx') 163 .width('278lpx')
161 .height('154lpx') 164 .height('154lpx')
162 .margin({ 165 .margin({
@@ -3,59 +3,35 @@ import webview from '@ohos.web.webview'; @@ -3,59 +3,35 @@ import webview from '@ohos.web.webview';
3 import router from '@ohos.router'; 3 import router from '@ohos.router';
4 import { GlobalContext } from '../../utils/GlobalContext' 4 import { GlobalContext } from '../../utils/GlobalContext'
5 import { WDRouterRule } from 'wdRouter'; 5 import { WDRouterRule } from 'wdRouter';
  6 +import { LikeComponent } from 'wdComponent'
6 7
7 @Entry 8 @Entry
8 @Component 9 @Component
9 struct PrivacyPage { 10 struct PrivacyPage {
10 @State message: string = 'Hello World' 11 @State message: string = 'Hello World'
11 - webController: webview.WebviewController = new webview.WebviewController();  
12 - //@State params: object = router.getParams(); 12 + model: Record<string, string> = {}
  13 +
  14 + aboutToAppear(): void {
  15 +
  16 + this.model['contentId'] = '30044572938' //必须
  17 + this.model['userName'] = '人民日报网友5MbdHk'
  18 + this.model['contentType'] = '8' //必须
  19 + this.model['title'] = '“神器”还是“安慰剂”?中学生“体考神器”调查'
  20 + this.model['userHeaderUrl'] = ""
  21 + this.model['channelId'] = "2002" //必须
  22 + //this.model['status'] = "1" //必须
  23 +
  24 +
  25 +
  26 + }
  27 +
13 28
14 build() { 29 build() {
15 Row() { 30 Row() {
16 Column() { 31 Column() {
17 - // Web component loading H5.  
18 - Web({ src: 'https://www.baidu.com', controller: this.webController })  
19 - .zoomAccess(false)  
20 - .width('100%')  
21 - .height('100%')  
22 - .aspectRatio(1)  
23 - // .onConfirm((event) => {  
24 - // AlertDialog.show({  
25 - // message: Const.WEB_ALERT_DIALOG_TEXT_VALUE + event?.message,  
26 - // confirm: {  
27 - // value: $r('app.string.web_alert_dialog_button_value'),  
28 - // action: () => {  
29 - // event?.result.handleConfirm();  
30 - // }  
31 - // },  
32 - // cancel: () => {  
33 - // event?.result.handleCancel();  
34 - // }  
35 - // });  
36 - // return true;  
37 - // })  
38 - // .onErrorReceive((event) => {  
39 - // if (event?.error.getErrorInfo() === 'ERR_INTERNET_DISCONNECTED') {  
40 - // prompt.showToast({  
41 - // message: $r('app.string.internet_err'),  
42 - // duration: Const.WebConstant_DURATION  
43 - // })  
44 - // }  
45 - // if (event?.error.getErrorInfo() === 'ERR_CONNECTION_TIMED_OUT') {  
46 - // prompt.showToast({  
47 - // message: $r('app.string.internet_err'),  
48 - // duration: Const.WebConstant_DURATION  
49 - // })  
50 - // }  
51 - // })  
52 - // .onProgressChange((event) => {  
53 - // if (event?.newProgress === Const.WebConstant_PROGRESS_MAX) {  
54 - // this.isLoading = false;  
55 - // clearInterval(this.intervalLoading);  
56 - // this.intervalLoading = -1;  
57 - // }  
58 - // }) 32 +
  33 + LikeComponent({data: this.model,componentType:1})
  34 +
59 } 35 }
60 .width('100%') 36 .width('100%')
61 } 37 }
@@ -134,7 +134,7 @@ export default struct CustomDialogComponent { @@ -134,7 +134,7 @@ export default struct CustomDialogComponent {
134 Text($r('app.string.dialog_text_privacy_statement')) 134 Text($r('app.string.dialog_text_privacy_statement'))
135 .width('90%') 135 .width('90%')
136 .fontColor($r('app.color.dialog_text_color')) 136 .fontColor($r('app.color.dialog_text_color'))
137 - .fontSize(13).margin({top:20}) 137 + .fontSize(14).margin({top:20})
138 Row() { 138 Row() {
139 Text($r('app.string.dialog_button_disagree')) 139 Text($r('app.string.dialog_button_disagree'))
140 .fancy() 140 .fancy()