Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
张善主
2024-04-29 17:32:08 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
c676d19362a5c3f1b8ee8916513fdd187b80ec52
c676d193
2 parents
99d92f01
d8ac24cc
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
257 additions
and
109 deletions
sight_harmony/commons/wdConstant/src/main/ets/constants/ContentConstants.ets
sight_harmony/commons/wdKit/src/main/ets/utils/EmitterEventId.ts
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvBigImageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvGanMiComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvLongImageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvSmallImageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvThreeImageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvVideoComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvVideoExComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowFirstTabsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowListDetailUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/NoMoreLayout.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PeopleShipHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipMainComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipRecommendHeadComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeListComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeNavComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageHeadComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageTopComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/AccountAndSecurityLayout.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
sight_harmony/features/wdComponent/src/main/ets/pages/ShowUserHeaderPage.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageHelper.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageModel.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/ForgetPasswordPage.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginViewModel.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/PrivacyPage.ets
sight_harmony/products/phone/src/main/ets/pages/view/CustomDialogComponent.ets
sight_harmony/commons/wdConstant/src/main/ets/constants/ContentConstants.ets
View file @
c676d19
...
...
@@ -12,6 +12,8 @@ export class ContentConstants {
* 2:直播
*/
static readonly TYPE_LIVE: string = "2";
static readonly TYPE_FOUR: string = "4";
/**
* 5:专题详情
*/
...
...
sight_harmony/commons/wdKit/src/main/ets/utils/EmitterEventId.ts
View file @
c676d19
...
...
@@ -17,6 +17,14 @@ export enum EmitterEventId {
// 关注,取消关注
PEOPLE_SHIP_ATTENTION
=
7
,
// 我的关注 为null
MY_FOLLOW_EMPTY
=
8
,
// 登录成功
LOGIN_SUCCESS
=
8
,
// 换绑成功
PHONE_CHANGE_SUCCESS
=
9
,
// App回到前台
APP_ENTER_FOREGROUD
=
100
,
...
...
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
View file @
c676d19
...
...
@@ -100,6 +100,9 @@ export class ProcessUtils {
case ContentConstants.TYPE_LIVE:
ProcessUtils.gotoLive(content)
break
case ContentConstants.TYPE_FOUR:
ProcessUtils.gotoDefaultWeb(content);
break
case ContentConstants.TYPE_AUDIO:
ProcessUtils.gotoAudio(content)
break;
...
...
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
View file @
c676d19
...
...
@@ -80,4 +80,6 @@ export interface ContentDTO {
commentInfo?: commentInfo
//底部导航栏 id(用于频道跳转)
bottomNavId:string;
// 链接类型: 0:无链接;1:内链(文章);2:外链
openType:string
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
c676d19
...
...
@@ -44,7 +44,7 @@ export struct CompParser {
@Builder
componentBuilder(compDTO: CompDTO, compIndex: number) {
if (compDTO.operDataList[0]?.objectType !== '3' && compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口
//
if (compDTO.operDataList[0]?.objectType !== '3' && compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口
if (compDTO.compStyle === CompStyle.Label_03) {
LabelComponent({ compDTO: compDTO })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
...
...
@@ -119,6 +119,6 @@ export struct CompParser {
}
}
}
//
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
View file @
c676d19
...
...
@@ -21,7 +21,7 @@ export struct CardMediaInfo {
Row() {
Image($r('app.media.card_play'))
.mediaLogo()
if
(this.contentDTO.videoInfo!=null)
{
if
(this.contentDTO.videoInfo != null)
{
Text(DateTimeUtils.getFormattedDuration(this.contentDTO.videoInfo.videoDuration * 1000))
.mediaText()
}
...
...
@@ -30,7 +30,7 @@ export struct CardMediaInfo {
// liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停
// 显示直播信息
Row() {
if(this.contentDTO.liveInfo.liveState === 'wait') {
if
(this.contentDTO.liveInfo.liveState === 'wait') {
Image($r('app.media.card_wait'))
.mediaLogo()
Text('预约')
...
...
@@ -45,7 +45,7 @@ export struct CardMediaInfo {
.mediaLogo()
Text('回看')
.mediaText()
} else if(this.contentDTO.liveInfo.liveState === 'end' && this.contentDTO.liveInfo
} else if
(this.contentDTO.liveInfo.liveState === 'end' && this.contentDTO.liveInfo
.replayUri) {
// Image($r('app.media.card_live'))
// .mediaLogo()
...
...
@@ -69,6 +69,15 @@ export struct CardMediaInfo {
Text(DateTimeUtils.getFormattedDuration(this.contentDTO.voiceInfo.voiceDuration * 1000))
.mediaText()
}
} else if (this.contentDTO.objectType === '4') {//广告标签
Text($r('app.string.comp_advertisement'))
.fontSize('10fp')
.fontColor($r('app.color.white'))
.width(28)
.height(16)
.backgroundColor('#4D000000')
.borderRadius(3)
.textAlign(TextAlign.Center)
}
}
.margin(6)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvBigImageComponent.ets
View file @
c676d19
...
...
@@ -20,14 +20,12 @@ export struct CardAdvBigImageComponent {
aboutToAppear(): void {
console.error('ZZZXXXXX', '----大图卡----aboutToAppear-----')
}
aboutToDisappear(): void {
console.error('ZZZXXXXX', '---大图卡-----aboutToDisappear-----')
}
build() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvGanMiComponent.ets
View file @
c676d19
...
...
@@ -25,8 +25,6 @@ export struct CardAdvGanMiComponent {
aboutToAppear(): void {
console.error('ZZZXXXXX', '--冠名广告------aboutToAppear-----')
let extraData = this.compDTO.matInfo.extraData
let labelDTO = JSON.parse(extraData) as AdvExtraData
this.advExtraData = labelDTO
...
...
@@ -37,7 +35,6 @@ export struct CardAdvGanMiComponent {
aboutToDisappear(): void {
console.error('ZZZXXXXX', '--冠名广告------aboutToDisappear-----')
}
build() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvLongImageComponent.ets
View file @
c676d19
...
...
@@ -26,14 +26,12 @@ export struct CardAdvLongImageComponent {
aboutToAppear(): void {
console.error('ZZZXXXXX', '--长通栏广告 和 顶部长通栏广告------aboutToAppear-----')
this.haveTitle = this.compDTO.matInfo.advSubType === CompStyle.Card_Adv_7;
}
aboutToDisappear(): void {
console.error('ZZZXXXXX', '--长通栏广告 和 顶部长通栏广告------aboutToDisappear-----')
}
build() {
...
...
@@ -42,7 +40,7 @@ export struct CardAdvLongImageComponent {
//新闻标题
if(this.haveTitle ){
Text(this.compDTO.matInfo.advTitle).bottomTextStyle().margin({ bottom: 8, })
Text(this.compDTO.matInfo.advTitle).
width('100%').
bottomTextStyle().margin({ bottom: 8, })
}
//长图
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvSmallImageComponent.ets
View file @
c676d19
...
...
@@ -23,7 +23,6 @@ export struct CardAdvSmallImageComponent {
aboutToAppear(): void {
console.error('ZZZXXXXX', '----小图卡----aboutToAppear-----')
// 计算标题文本行数
let screenWith = DisplayUtils.getDeviceWidth();
screenWith = screenWith * 0.62
...
...
@@ -33,7 +32,6 @@ export struct CardAdvSmallImageComponent {
aboutToDisappear(): void {
console.error('ZZZXXXXX', '---小图卡-----aboutToDisappear-----')
}
build() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvThreeImageComponent.ets
View file @
c676d19
...
...
@@ -22,12 +22,10 @@ export struct CardAdvThreeImageComponent {
aboutToAppear(): void {
console.error('ZZZXXXXX', '---三图卡-----aboutToAppear-----')
}
aboutToDisappear(): void {
console.error('ZZZXXXXX', '----三图卡----aboutToDisappear-----')
}
build() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvVideoComponent.ets
View file @
c676d19
...
...
@@ -22,8 +22,6 @@ export struct CardAdvVideoComponent {
@State contentDTO: ContentDTO = {} as ContentDTO
aboutToAppear(): void {
console.error('ZZZXXXXX', '--视频广告------aboutToAppear-----')
// this.contentDTO.objectType = '1'
// this.contentDTO.videoInfo = { videoDuration: 1000 } as VideoInfoDTO
...
...
@@ -31,7 +29,6 @@ export struct CardAdvVideoComponent {
aboutToDisappear(): void {
console.error('ZZZXXXXX', '---视频广告-----aboutToDisappear-----')
}
build() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvVideoExComponent.ets
View file @
c676d19
...
...
@@ -21,7 +21,6 @@ export struct CardAdvVideoExComponent {
aboutToAppear(): void {
console.error('ZZZXXXXX', '--展会广告------aboutToAppear-----')
let extraData = this.compDTO.matInfo.extraData
let labelDTO = JSON.parse(extraData) as AdvExtraData
...
...
@@ -30,7 +29,6 @@ export struct CardAdvVideoExComponent {
aboutToDisappear(): void {
console.error('ZZZXXXXX', '----展会广告----aboutToDisappear-----')
}
build() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
View file @
c676d19
import { ContentDTO, slideShows } from 'wdBean';
import { CommonConstants } from 'wdConstant'
import { DateTimeUtils } from 'wdKit';
import { CommonConstants } from 'wdConstant';
import { ProcessUtils } from 'wdRouter';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
/**
* 大专题卡--CompStyle: 10
...
...
@@ -25,6 +23,9 @@ export struct Card10Component {
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ bottom: 19 })
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.contentDTO)
})
}
// 大图
Stack() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
View file @
c676d19
...
...
@@ -180,7 +180,7 @@ struct CarouselLayout01CardView {
})
Column() {
// 这里用于展示轮播图右上角信息,这里只对直播类型的展示
if (this.item.objectType === '2') {
if (this.item.objectType === '2'
|| this.item.objectType ==='4'
) {
CardMediaInfo({ contentDTO: this.item })
.width(CommonConstants.FULL_PARENT)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowFirstTabsComponent.ets
View file @
c676d19
import { EmitterUtils, EmitterEventId, Logger } from 'wdKit/Index'
import MinePageDatasModel from '../../../model/MinePageDatasModel'
import { FollowListItem } from '../../../viewmodel/FollowListItem'
import { CustomTitleUI } from '../../reusable/CustomTitleUI'
...
...
@@ -20,17 +21,27 @@ export struct FollowFirstTabsComponent{
})
if(this.controller != null && this.data.length>1 && this.changeIndex === 1){
this.jumpFollowNextPage()
}
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
})
EmitterUtils.receiveEvent(EmitterEventId.MY_FOLLOW_EMPTY, (() => {
if(this.controller != null && this.data.length>1 ){
this.jumpFollowNextPage()
}
}))
}
jumpFollowNextPage(){
//个人主页 跳转 关注页 tab 2
let intervalID = setInterval(() => {
this.currentIndex = this.changeIndex
this.currentIndex = 1
this.controller.changeIndex(this.currentIndex)
clearInterval(intervalID);
}, 500);
}
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
})
}
@Builder TabBuilder(index: number, item: FollowListItem) {
Stack(){
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowListDetailUI.ets
View file @
c676d19
import { LazyDataSource, SPHelper, UserDataLocal } from 'wdKit';
import {
EmitterEventId, EmitterUtils,
LazyDataSource, SPHelper, UserDataLocal } from 'wdKit';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import SearcherAboutDataModel from '../../../model/SearcherAboutDataModel';
import { CreatorDetailRequestItem } from '../../../viewmodel/CreatorDetailRequestItem';
...
...
@@ -156,10 +156,12 @@ export struct FollowListDetailUI {
}
this.isLoading = false
this.isGetRequest = true
this.sendFollowMessage()
}).catch((err: Error) => {
console.log(TAG, "请求失败")
this.isGetRequest = true
this.isLoading = false
this.sendFollowMessage()
})
} else {
this.isLoading = false
...
...
@@ -167,6 +169,12 @@ export struct FollowListDetailUI {
}
}
sendFollowMessage(){
if(this.count === 0){
EmitterUtils.sendEvent(EmitterEventId.MY_FOLLOW_EMPTY)
}
}
getNewPageData() {
//我的关注列表
if (this.creatorDirectoryId === -1) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomComponent.ets
View file @
c676d19
...
...
@@ -284,6 +284,7 @@ export struct HomePageBottomComponent{
if (!this.data_comment || value.list.length == 0){
this.hasMore = false
this.isLoading = false
this.isGetRequest = true
}else{
this.getCommentListStatus(value)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
View file @
c676d19
...
...
@@ -101,6 +101,7 @@ export struct OtherHomePageBottomCommentComponent {
if (!this.data_comment || value.list.length == 0) {
this.hasMore = false
this.isLoading = false
this.isGetRequest = true
} else {
this.getCommentListStatus(value)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/NoMoreLayout.ets
View file @
c676d19
...
...
@@ -12,6 +12,7 @@ export default struct NoMoreLayout {
Text($r('app.string.footer_text'))
.fontSize(RefreshConstants.NoMoreLayoutConstant_TITLE_FONT)
.textAlign(TextAlign.Center)
.fontColor('#CCCCCC')
.margin({bottom:40})
}
.width(RefreshConstants.FULL_WIDTH)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
View file @
c676d19
...
...
@@ -246,6 +246,7 @@ export struct PageComponent {
this.pageModel.groupId = this.pageId;
this.pageModel.channelId = this.channelId;
this.pageModel.currentPage = 1;
this.pageModel.pageTotalCompSize = 0;
PageHelper.getInitData(this.pageModel, this.pageAdvModel)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PeopleShipHomePage.ets
View file @
c676d19
...
...
@@ -99,8 +99,12 @@ struct PeopleShipHomePage {
}
async
aboutToAppear() {
aboutToAppear() {
this.getData()
}
private async getData() {
try {
// 获取页面信息
this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '')
...
...
@@ -117,8 +121,6 @@ struct PeopleShipHomePage {
} catch (exception) {
}
}
findFollowStata(followList: QueryListIsFollowedItem[]) {
...
...
@@ -156,8 +158,10 @@ struct PeopleShipHomePage {
PageRepository.postInteractAccentionOperate(params).then(res => {
if (this.isAttention == '1') {
this.isAttention = '0'
this.detailModel.fansNum -= 1
} else {
this.isAttention = '1'
this.detailModel.fansNum += 1
}
this.isLoadingAttention = false
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
View file @
c676d19
...
...
@@ -339,8 +339,8 @@ export struct TopNavigationComponent {
}else {
Row() {
Image($r('app.media.icon_search'))
.width(18)
.height(18)
.width('24vp')
.height('24vp')
}
.height('40vp')
.width('40vp')
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipMainComponent.ets
View file @
c676d19
...
...
@@ -280,6 +280,7 @@ export struct PeopleShipMainComponent {
//批量查询各类型内容动态数据接口
this.checkContentInteractData(listData.list, resolve)
} else {
this.hasMore = false;
this.resolveEnd(true, resolve)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipRecommendHeadComponent.ets
View file @
c676d19
...
...
@@ -25,12 +25,27 @@ export struct PeopleShipRecommendHeadComponent {
})
}.margin({ top: 12, bottom: 8 })
Row() {
Text(this.rmhInfo.userName)
.fontColor($r('app.color.color_222222'))
.fontSize($r('app.float.vp_14'))
.fontWeight(600)
.maxLines(1)
.textOverflow({overflow: TextOverflow.Ellipsis})
if (this.rmhInfo.authIcon) {
Image(this.rmhInfo.authIcon)
.width('12vp')
.height('12vp')
.borderRadius(6)
.objectFit(ImageFit.Cover)
.margin({
left: '2vp'
})
}
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
Text(this.rmhInfo.introduction)
.fontColor($r('app.color.color_B0B0B0'))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeListComponent.ets
View file @
c676d19
...
...
@@ -24,7 +24,7 @@ export struct PeopleShipHomeListComponent {
// 列表
else if (this.publishCount == 0) {
// 无数据展示
EmptyComponent({emptyType: 1
3
}).height(DisplayUtils.getDeviceHeight() - this.topHeight)
EmptyComponent({emptyType: 1
2
}).height(DisplayUtils.getDeviceHeight() - this.topHeight)
} else {
Column() {
Column() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeNavComponent.ets
View file @
c676d19
import router from '@ohos.router'
import { PeopleShipUserDetailData } from 'wdBean'
import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
@Component
export struct PeopleShipHomePageNavComponent {
...
...
@@ -38,8 +39,13 @@ export struct PeopleShipHomePageNavComponent {
iconDiameter: 10,
headPhotoUrl: (this.detailModel.headPhotoUrl && this.detailModel.headPhotoUrl.length > 0 ) ? this.detailModel.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon'),
authIcon: this.detailModel.authIcon
})
.margin({
}).onClick(()=>{
let params = {
'headPhotoUrl': this.detailModel.headPhotoUrl,
'headType': '1'
} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
}).margin({
left: '10vp',
})
.visibility((this.topOpacity > 0.5 ? Visibility.Visible : Visibility.Hidden))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageHeadComponent.ets
View file @
c676d19
...
...
@@ -9,6 +9,7 @@ export struct PeopleShipHomePageHeadComponent {
Stack({ alignContent: Alignment.BottomEnd }) {
// 头像
Image( this.headPhotoUrl )
.alt($r('app.media.WDAccountOwnerHedaerDefaultIcon'))
.width(this.diameter)
.height(this.diameter)
.borderRadius(this.diameter/2)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageTopComponent.ets
View file @
c676d19
...
...
@@ -7,6 +7,7 @@ import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageD
import { InfluenceData, PeopleShipUserDetailData } from 'wdBean'
import { PeopleShipHomeAttentionComponent } from './PeopleShipHomeAttentionComponent'
import { HWLocationUtils } from 'wdHwAbility'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
@Component
...
...
@@ -51,6 +52,12 @@ export struct PeopleShipHomePageTopComponent {
}).margin({
left: '10vp',
bottom: '20vp'
}).onClick(()=>{
let params = {
'headPhotoUrl': this.detailModel.headPhotoUrl,
'headType': '1'
} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
View file @
c676d19
...
...
@@ -194,6 +194,7 @@ export struct SearchResultContentComponent{
isSearch: true,
publishTimestamp:"",
bottomNavId:'',
openType:''
}
this.data.push(contentDTO)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/setting/AccountAndSecurityLayout.ets
View file @
c676d19
...
...
@@ -76,7 +76,7 @@ export struct AccountAndSecurityLayout {
addEmitEvent(){
// 定义一个eventId为1的事件
let event: emitter.InnerEvent = {
eventId:
10010
eventId:
EmitterEventId.PHONE_CHANGE_SUCCESS
};
// 收到eventId为1的事件后执行该回调
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
View file @
c676d19
...
...
@@ -235,7 +235,7 @@ export struct EmptyComponent {
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) {
imageString = $r('app.media.icon_no_content')
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCreation) {
imageString = $r('app.media.icon_no_
appointmentMade
')
imageString = $r('app.media.icon_no_
works1
')
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoBooking) {
imageString = $r('app.media.icon_no_appointmentMade')
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NetworkFailed) {
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/ShowUserHeaderPage.ets
View file @
c676d19
...
...
@@ -4,16 +4,18 @@ import { router } from '@kit.ArkUI';
@Component
struct ShowUserHeaderPage {
@State headPhotoUrl: string = '';
@State headType: string = ''
@State params:Record<string, string> = router.getParams() as Record<string, string>;
onPageShow() {
this.headPhotoUrl = this.params?.['headPhotoUrl'];
this.headType = this.params?.['headType'] ?? '';
}
build() {
Row() {
Image(this.headPhotoUrl)
.alt($r('app.media.default_head'))
.alt(
this.headType.length > 0 ? $r('app.media.WDAccountOwnerHedaerDefaultIcon') :
$r('app.media.default_head'))
.width('720lpx')
.height('720lpx')
.objectFit(ImageFit.Auto)
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageHelper.ets
View file @
c676d19
import { CompDTO, ContentDTO, PageDTO, PageInfoDTO } from 'wdBean';
import { CompStyle, ViewType } from 'wdConstant/Index';
import { CollectionUtils, DateTimeUtils, Logger, NetworkUtil } from 'wdKit';
import { CollectionUtils, DateTimeUtils, Logger, NetworkUtil
, StringUtils
} from 'wdKit';
import { closeRefresh } from '../utils/PullDownRefresh';
import PageModel from './PageModel';
import PageViewModel from './PageViewModel';
...
...
@@ -9,6 +9,7 @@ import { CompAdvBean } from 'wdBean/src/main/ets/bean/adv/AdvsRuleBean';
import PageAdModel from './PageAdvModel';
import { ArrayList } from '@kit.ArkTS';
import { WDViewDefaultType } from '../components/view/EmptyComponent';
import { CompAdvMatInfoBean } from 'wdBean/src/main/ets/bean/adv/CompAdvInfoBean';
const TAG = 'PageHelper';
...
...
@@ -21,6 +22,7 @@ export class PageHelper {
*/
async refreshUI(pageModel: PageModel, pageAdvModel: PageAdModel) {
pageModel.loadStrategy = 2
pageModel.pageTotalCompSize = 0;
this.getPageInfo(pageModel, pageAdvModel)
}
...
...
@@ -147,7 +149,7 @@ export class PageHelper {
* 处理页面中的广告组件信息
* @param pageDto
*/
private handlePageCompAdvPostion(pageCompList: ArrayList<CompDTO>, pageDto: PageDTO) {
private handlePageCompAdvPostion(pageCompList: ArrayList<CompDTO>, page
Model: PageModel, page
Dto: PageDTO) {
let compAdvList = pageDto.compAdList
...
...
@@ -159,17 +161,20 @@ export class PageHelper {
flag = false
}
let pageCompSize = pageCompList.length // 信息流组件业务数量
console.error("ZZZXXXXX", " start--->" + pageCompSize);
//
console.error("ZZZXXXXX", " start--->" + pageCompSize);
if (pageCompSize == 0) {
flag = false
}
if (flag) {
let bannerAdvIndex = 0; // banner组件展示数据投放
let layoutAdvIndex = 0; //稿件投放统计
// 升序排序
compAdvList.sort((a: CompAdvBean, b: CompAdvBean) => a.slotInfo.position - b.slotInfo.position)
console.error("ZZZXXXXX", " 排序后的广告--->" + JSON.stringify(compAdvList));
//
console.error("ZZZXXXXX", " 排序后的广告--->" + JSON.stringify(compAdvList));
//当前日期
let serverTimeLong: number = DateTimeUtils.getTimeStamp();
for (let advBean of compAdvList) {
...
...
@@ -192,14 +197,91 @@ export class PageHelper {
// 插入轮播组件的广告
if (4 == advSubType) {
let position = slotInfo.position - 1;
// 检测newCompList 集合中是否有轮播组件资源
let adCompId = slotInfo.compId;
if (!StringUtils.isEmpty(adCompId)) {
for (let compBean of pageCompList) {
if (StringUtils.isEmpty(compBean.id)) {
continue
}
let compId = compBean.id.toString();
//匹配组件
if (adCompId == compId) {
// 运营位数据
let dataList = compBean.operDataList;
if (dataList != null) {
// 数组转成 ArrayList
let changeArrayList = (dataList: ContentDTO[]) => {
let compOperData: ArrayList<ContentDTO> = new ArrayList()
for (let dataListBean of dataList) {
compOperData.add(dataListBean)
}
return compOperData
}
let compOperData = changeArrayList(dataList)
// 轮播组件广告数据转 业务信息
let changeContentDTO = (matInfo: CompAdvMatInfoBean) => {
let advContentBean: ContentDTO = {} as ContentDTO;
advContentBean.newsTitle = matInfo.advTitle
advContentBean.objectType = matInfo.advType == "0" ? matInfo.advType : "4"
advContentBean.coverUrl = matInfo.matImageUrl[0]
advContentBean.linkUrl = matInfo.linkUrl
advContentBean.openType = matInfo.linkType
advContentBean.corner = ''
return advContentBean
}
let advContentBean = changeContentDTO(matInfo)
let dataListSize = dataList.length;
if (position < dataListSize) {
//dataList.add(position + bannerAdvIndex, advContentBean);
compOperData.insert(advContentBean, position + bannerAdvIndex)
} else {
compOperData.add(advContentBean);
}
bannerAdvIndex = bannerAdvIndex + 1;
// ArrayList转成 数组
compBean.operDataList = compOperData.convertToArray()
}
}
}
}
} else {
let advPosition = slotInfo.position //广告位置,从1开始
// 页面的comp总数 - 这次请求的comp总数 = 剩余comp总数
advPosition = advPosition - 1
let a = pageModel.pageTotalCompSize - pageCompSize
if (advPosition <= pageModel.pageTotalCompSize && advPosition >= a) {
let b = advPosition - a;
console.error('ZZZXXXXX', matInfo.advSubType + '-------------' + matInfo.advTitle + " " + advPosition + " " + a + " " + b)
if (b <= pageCompSize && b >= 0) {
let advComp: CompDTO = {
compStyle: CompStyle.Card_Comp_Adv,
matInfo: matInfo
} as CompDTO;
pageCompList.insert(advComp, 0)
if (pageCompSize == slotInfo.position) {
pageCompList.add(advComp)
} else {
pageCompList.insert(advComp, b + layoutAdvIndex)
}
layoutAdvIndex = layoutAdvIndex + 1;
}
}
}
}
}
...
...
@@ -207,7 +289,7 @@ export class PageHelper {
}
}
console.error("ZZZXXXXX", " end--->" + pageCompList.length);
//
console.error("ZZZXXXXX", " end--->" + pageCompList.length);
}
...
...
@@ -228,19 +310,21 @@ export class PageHelper {
//移除音频 和 活动
this.collectPageComp(pageModel, data)
//
// pageModel.compList.push(...data.compList)
PageViewModel.getInteractData(data.compList).then((data: CompDTO[]) => {
// 刷新,替换所有数据
pageModel.compList.updateItems(sizeBefore, data)
pageModel.timestamp = DateTimeUtils.getTimeStamp().toString()
})
// TODO 暂时屏蔽,此处代码会造成 广告逻辑错乱,只有第一页有广告数据,随着加载更多,第二页也会出现广告数据
// PageViewModel.getInteractData(data.compList).then((data: CompDTO[]) => {
// // 刷新,替换所有数据
// pageModel.compList.updateItems(sizeBefore, data)
// pageModel.timestamp = DateTimeUtils.getTimeStamp().toString()
// })
}
}).catch((err: string | Resource) => {
promptAction.showToast({ message: err });
})
}
/**
* 移除comp
*/
...
...
@@ -256,11 +340,22 @@ export class PageHelper {
if (contentInfo && (contentInfo.objectType === '13' || contentInfo.objectType === '3')) {
Logger.debug(TAG, 'getGroupData 移除音频 和 活动');
} else {
// 暂时屏蔽活动和音频详情入口
if (element.operDataList[0]?.objectType === '3' || element.operDataList[0]?.objectType === '13') {
} else {
pageCompList.add(element)
}
}
}
// 记录
pageModel.pageTotalCompSize = pageCompList.length + pageModel.pageTotalCompSize
// console.error("ZZZXXXXX", " collectPageComp--->" + pageModel.pageTotalCompSize);
// 处理页面广告数据,投放到页面的位置
//this.handlePageCompAdvPostion(pageCompList, pageDto);
this.handlePageCompAdvPostion(pageCompList, pageModel, pageDto);
//遍历所有组件和稿件数据 push到页面
for (let element of pageCompList) {
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageModel.ets
View file @
c676d19
...
...
@@ -54,6 +54,9 @@ export default class PageModel {
timestamp: String = '1';
// 记录已经展示的稿件和组件数量
pageTotalCompSize: number = 0;
/**
* 简单复制业务数据
*/
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/ForgetPasswordPage.ets
View file @
c676d19
...
...
@@ -7,7 +7,7 @@ import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/
import { WDRouterRule, WDRouterPage } from 'wdRouter';
import { SettingPasswordParams } from './SettingPasswordLayout'
import { Router } from '@ohos.arkui.UIContext'
import { SPHelper, ToastUtils } from 'wdKit/Index'
import {
EmitterEventId, EmitterUtils,
SPHelper, ToastUtils } from 'wdKit/Index'
import { SpConstants } from 'wdConstant/Index'
import { emitter } from '@kit.BasicServicesKit'
...
...
@@ -189,7 +189,7 @@ struct ForgetPasswordPage {
sendEmitEvent(){
// 定义一个eventId为1的事件,事件优先级为Low
let event: emitter.InnerEvent = {
eventId:
10010
,
eventId:
EmitterEventId.PHONE_CHANGE_SUCCESS
,
priority: emitter.EventPriority.LOW
};
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginViewModel.ets
View file @
c676d19
import { Logger } from 'wdKit/src/main/ets/utils/Logger'
import { LoginModel } from './LoginModel'
import { LoginBean } from './LoginBean'
import { SPHelper, StringUtils, UserDataLocal } from 'wdKit'
import {
EmitterEventId, EmitterUtils,
SPHelper, StringUtils, UserDataLocal } from 'wdKit'
import { CheckVerifyBean } from './CheckVerifyBean'
import cryptoFramework from '@ohos.security.cryptoFramework'
import buffer from '@ohos.buffer'
...
...
@@ -55,6 +55,7 @@ export class LoginViewModel {
SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status)
SPHelper.default.saveSync(SpConstants.USER_Type, data.userType)
SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)
EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS)
success(data)
}).catch((error:string) => {
fail(error)
...
...
@@ -82,6 +83,7 @@ export class LoginViewModel {
SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status)
SPHelper.default.saveSync(SpConstants.USER_Type, data.userType)
SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)
EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS)
success(data)
}).catch((value: string) => {
fail(value)
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
View file @
c676d19
...
...
@@ -181,12 +181,12 @@ struct LaunchAdvertisingPage {
//端外打开
ProcessUtils.jumpExternalWebPage(this.model.launchAdInfo[0].matInfo.linkUrl)
clearInterval(this.timer)
//
clearInterval(this.timer)
}else {
//端内打开
ProcessUtils.gotoDefaultWebPage(this.model.launchAdInfo[0].matInfo.linkUrl)
clearInterval(this.timer)
//
clearInterval(this.timer)
}
}
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
View file @
c676d19
...
...
@@ -35,7 +35,7 @@ struct LaunchPage {
alignment: DialogAlignment.Center,
offset: { dx: 0, dy: '-24' },
customStyle: true,
autoCancel: false
autoCancel: false
,
});
onCancel() {
...
...
@@ -110,6 +110,9 @@ struct LaunchPage {
if (dataModel.launchAdInfo.length) {
//跳转广告页
this.jumpToAdvertisingPage();
//WDRouterRule.jumpWithReplacePage(WDRouterPage.privacyPage)
}else {
//直接跳转首页
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
...
...
@@ -156,7 +159,7 @@ struct LaunchPage {
build(){
Stack({alignContent:Alignment.Bottom}){
Image($r('app.media.
app_icon
'))
Image($r('app.media.
LaunchPage_logo
'))
.width('278lpx')
.height('154lpx')
.margin({
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/PrivacyPage.ets
View file @
c676d19
...
...
@@ -3,59 +3,35 @@ import webview from '@ohos.web.webview';
import router from '@ohos.router';
import { GlobalContext } from '../../utils/GlobalContext'
import { WDRouterRule } from 'wdRouter';
import { LikeComponent } from 'wdComponent'
@Entry
@Component
struct PrivacyPage {
@State message: string = 'Hello World'
webController: webview.WebviewController = new webview.WebviewController();
//@State params: object = router.getParams();
model: Record<string, string> = {}
aboutToAppear(): void {
this.model['contentId'] = '30044572938' //必须
this.model['userName'] = '人民日报网友5MbdHk'
this.model['contentType'] = '8' //必须
this.model['title'] = '“神器”还是“安慰剂”?中学生“体考神器”调查'
this.model['userHeaderUrl'] = ""
this.model['channelId'] = "2002" //必须
//this.model['status'] = "1" //必须
}
build() {
Row() {
Column() {
// Web component loading H5.
Web({ src: 'https://www.baidu.com', controller: this.webController })
.zoomAccess(false)
.width('100%')
.height('100%')
.aspectRatio(1)
// .onConfirm((event) => {
// AlertDialog.show({
// message: Const.WEB_ALERT_DIALOG_TEXT_VALUE + event?.message,
// confirm: {
// value: $r('app.string.web_alert_dialog_button_value'),
// action: () => {
// event?.result.handleConfirm();
// }
// },
// cancel: () => {
// event?.result.handleCancel();
// }
// });
// return true;
// })
// .onErrorReceive((event) => {
// if (event?.error.getErrorInfo() === 'ERR_INTERNET_DISCONNECTED') {
// prompt.showToast({
// message: $r('app.string.internet_err'),
// duration: Const.WebConstant_DURATION
// })
// }
// if (event?.error.getErrorInfo() === 'ERR_CONNECTION_TIMED_OUT') {
// prompt.showToast({
// message: $r('app.string.internet_err'),
// duration: Const.WebConstant_DURATION
// })
// }
// })
// .onProgressChange((event) => {
// if (event?.newProgress === Const.WebConstant_PROGRESS_MAX) {
// this.isLoading = false;
// clearInterval(this.intervalLoading);
// this.intervalLoading = -1;
// }
// })
LikeComponent({data: this.model,componentType:1})
}
.width('100%')
}
...
...
sight_harmony/products/phone/src/main/ets/pages/view/CustomDialogComponent.ets
View file @
c676d19
...
...
@@ -134,7 +134,7 @@ export default struct CustomDialogComponent {
Text($r('app.string.dialog_text_privacy_statement'))
.width('90%')
.fontColor($r('app.color.dialog_text_color'))
.fontSize(1
3
).margin({top:20})
.fontSize(1
4
).margin({top:20})
Row() {
Text($r('app.string.dialog_button_disagree'))
.fancy()
...
...
Please
register
or
login
to post a comment