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
yumaochao
2024-05-28 16:39:21 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
7b6b273333f8db5e61cba81e554c85122277cdd2
7b6b2733
2 parents
bd6bba87
f5cff143
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
374 additions
and
109 deletions
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
sight_harmony/features/wdBean/src/main/ets/bean/detail/ShareInfoDTO.ts
sight_harmony/features/wdBean/src/main/ets/bean/detail/SharePosterItemBean.ts
sight_harmony/features/wdBean/src/main/ets/bean/morningevening/TopicInfo.ets
sight_harmony/features/wdBean/src/main/ets/bean/newspaper/NewspaperShareBean.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/PaperTitleComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentListDialog.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/HomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomFollowComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomFollowComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PeopleShipHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/AreaPickerDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/DateCustomComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/EditUserInfoCustomDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/FirstLevelComponent.ets
sight_harmony/features/wdComponent/src/main/ets/model/MinePageDatasModel.ets
sight_harmony/features/wdComponent/src/main/ets/pages/SearchCreatorPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/CommentDialogView.ets
sight_harmony/features/wdShare/src/main/ets/WDShare.ets
sight_harmony/features/wdTracking/src/main/ets/common/TrackingUtils.ets
sight_harmony/products/phone/src/main/ets/pages/ENewspaper.ets
sight_harmony/products/phone/src/main/ets/pages/view/MultiPictureDetailPageComponent.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
View file @
7b6b273
...
...
@@ -100,6 +100,8 @@ export class ContentDTO implements BaseDTO {
本地辅助字段
*/
liveRoomDataBean : LiveRoomDataBean = {} as LiveRoomDataBean// 批查获取到的直播观看人数
//本地字段:时间轴专题页节点组件时间;【如果开启模糊则显示时间->左右;0:否,1:是】
timeBlurred:number = 0
static clone(old: ContentDTO): ContentDTO {
let content = new ContentDTO();
...
...
sight_harmony/features/wdBean/src/main/ets/bean/detail/ShareInfoDTO.ts
View file @
7b6b273
import
{
ArrayList
}
from
'@kit.ArkTS'
;
import
{
SharePosterItemBean
}
from
'./SharePosterItemBean'
;
export
interface
ShareInfoDTO
{
shareCoverUrl
:
string
;
shareOpen
:
number
;
//海报图片地址
sharePosterCoverUrl
:
string
;
//海报报分享开关 0:关闭,1:开启
sharePosterOpen
:
number
;
shareSummary
:
string
;
//标题
shareTitle
:
string
;
//分享链接
shareUrl
:
string
;
//首发时间
publishTime
:
string
;
//图片
imageUrl
:
string
;
//直播和内容的举报,仅针对人民号发布的才能举报,cms创建的没有举报按钮
showReport
:
boolean
;
//点赞按钮显示 -1:不展示 0:未点赞 1:已点赞
showLike
:
number
;
//0 分享海报关闭,1 分享海报开启
posterShareControl
:
string
;
//是否展示海报 -1-不展示图标
showPoster
:
number
;
//海报展示类型 1:专题、文章、图文、视频、直播 2:人民号 3:评论 4:电子报海报 5:音频专题海报 6:早晚报专题海报 7:榜单H5 8:H5普通文章专题,包含时间链
showPosterType
:
number
;
//接口返回: 内容id、内容类型
contentId
:
string
;
//内容类型,分享的类型 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,14动态图文,15动态视频
contentType
:
string
;
//关系id
targetRelId
:
string
;
//关系类型,1.频道关系;2.专题关系
targetRelType
:
string
;
//21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题
topicType
:
string
;
//早晚报;1-早报;2-午报;3-晚报
topicPattern
:
number
;
//是否有头版
isFrontDaily
:
boolean
;
//分享海报简介
posterSummary
:
string
;
sharePosterItemList
:
SharePosterItemBean
[]
//分享海报标题
posterTitle
:
string
;
}
...
...
sight_harmony/features/wdBean/src/main/ets/bean/detail/SharePosterItemBean.ts
0 → 100644
View file @
7b6b273
export
interface
SharePosterItemBean
{
title
:
string
;
duration
:
number
;
imageUrl
:
string
;
timeNode
:
string
;
/**
* 是否显示时间左右
*/
timeBlurred
:
number
;
}
...
...
sight_harmony/features/wdBean/src/main/ets/bean/morningevening/TopicInfo.ets
View file @
7b6b273
import { FrontLinkObject } from '../component/FrontLinkObject';
import { ArrayList } from '@kit.ArkTS';
import { ContentDTO } from '../content/ContentDTO';
export interface TopicInfo {
axisColor: string;
...
...
@@ -28,8 +30,17 @@ export interface TopicInfo {
topicId: string;
topicPattern: number;
// topicTemplate?: any;
//21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题,26:时间链
topicType: number;
transluceImgUrl: string;
visitorComment: number;
// voteInfo?: any;
//频道、专题页关系id;
relId:string;
//关系类型:1.频道关系;2.专题关系;
relType:string;
//本地字段 --》分享页面需要展示的数据
shareContentList: ContentDTO[]
//专题背景图
backgroundImgUrl: string
}
\ No newline at end of file
...
...
sight_harmony/features/wdBean/src/main/ets/bean/newspaper/NewspaperShareBean.ets
View file @
7b6b273
export interface NewspaperShareBean {
shareUrl:string;
sharePosterOpen:number;
sharePosterCoverUrl:string;
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
View file @
7b6b273
import { NewspaperListBean, NewspaperListItemBean } from 'wdBean';
import {
ContentDetailDTO,
NewspaperListBean, NewspaperListItemBean } from 'wdBean';
import { NewspaperViewModel } from '../viewmodel/NewspaperViewModel';
import router from '@ohos.router';
import { ENewspaperItemComponent } from './ENewspaperItemComponent';
...
...
@@ -11,7 +11,8 @@ import { RMCalendarBean } from './calendar/RMCalendarBean';
import { newsSkeleton } from './skeleton/newsSkeleton';
import { Logger, ToastUtils, NetworkUtil } from 'wdKit/Index';
import { TrackingContent,TrackConstants, TrackingButton } from 'wdTracking/Index';
import { WDShare } from 'wdShare/Index';
//电子报UI
@Component
export struct ENewspaperPageComponent {
private displayTool = display.getDefaultDisplaySync()
...
...
@@ -179,7 +180,7 @@ export struct ENewspaperPageComponent {
})
.id('e_newspaper_share')
.onClick(() => {
ToastUtils.showToast('分享为公共方法,待开发', 1000);
this.share()
})
}
}
...
...
@@ -392,4 +393,24 @@ export struct ENewspaperPageComponent {
}
}
share() {
let contentDetailData: ContentDetailDTO = {
shareInfo:{
shareTitle:this.newspaperListBean?.list[this.swiperIndex].pageName,
publishTime:this.newspaperListBean?.list[this.swiperIndex].periodNum,
imageUrl:this.newspaperListBean?.list[this.swiperIndex].pagePic,
shareUrl:this.newspaperListBean?.list[this.swiperIndex].sharePagePic.shareUrl,
sharePosterCoverUrl:this.newspaperListBean?.list[this.swiperIndex].sharePagePic.sharePosterCoverUrl,
showReport:false,
showLike:-1,
shareOpen:1,
sharePosterOpen:1,
posterShareControl:'-1',
showPoster:-1,
showPosterType:4,
}
} as ContentDetailDTO
WDShare.shareContent(contentDetailData,TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage)
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
7b6b273
...
...
@@ -294,7 +294,7 @@ export struct MorningEveningPaperComponent {
@Builder
topPaperTitle(){
Column(){
PaperTitleComponent().margin({top:this.topSafeHeight})
PaperTitleComponent(
{topicInfo:this.pageInfoBean?.topicInfo}
).margin({top:this.topSafeHeight})
}.height(44+this.topSafeHeight).backgroundColor(this.isHasTopView?(this.scrollOffset > 100?this.mixedBgColor:''):this.mixedBgColor)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/PaperTitleComponent.ets
View file @
7b6b273
import router from '@ohos.router';
import { ContentDetailDTO, TopicInfo } from 'wdBean/Index';
import { ToastUtils } from 'wdKit';
import { WDShare } from 'wdShare/Index';
import { TrackConstants } from 'wdTracking/Index';
/**
* 早晚报页面标题bar
...
...
@@ -9,7 +12,7 @@ import { ToastUtils } from 'wdKit';
export struct PaperTitleComponent {
@Consume title?: string
@Consume subTitle?: string
topicInfo: TopicInfo = {} as TopicInfo
aboutToAppear() {
}
...
...
@@ -105,7 +108,7 @@ export struct PaperTitleComponent {
.id('img_share')
.margin({ right: 16 })
.onClick(() => {
ToastUtils.showToast('分享为公共方法,待开发', 1000
)
this.share(
)
})
}
// .margin({ left: 14, right: 14 })
...
...
@@ -149,4 +152,28 @@ export struct PaperTitleComponent {
// }
// .margin({ left: 6 })
}
share() {
let contentDetailData: ContentDetailDTO = {
newsId:Number.parseInt(this.topicInfo.topicId),
shareInfo:{
contentId:this.topicInfo.topicId,
contentType:this.topicInfo.topicType+'',
shareTitle:this.topicInfo.shareTitle,
shareSummary:this.topicInfo.shareSummary,
imageUrl:this.topicInfo.shareCoverUrl,
sharePosterCoverUrl:this.topicInfo.sharePosterCoverUrl,
shareUrl:this.topicInfo.shareUrl,
targetRelId:this.topicInfo.relId,
targetRelType:this.topicInfo.relType,
showReport:false,
showLike:-1,
shareOpen:1,
sharePosterOpen:this.topicInfo.posterFlag,
showPoster:this.topicInfo.posterFlag>0?1:-1,
}
} as ContentDetailDTO
WDShare.setTopicBeanToShareBean(contentDetailData.shareInfo,this.topicInfo)
WDShare.shareContent(contentDetailData,TrackConstants.PageName.Eletronic_Paper,TrackConstants.PageName.Eletronic_Paper)
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
View file @
7b6b273
...
...
@@ -256,12 +256,14 @@ export struct CommentComponent {
//获取数据
async getData() {
commentViewModel.fetchContentCommentList(this.currentPage + '', this.publishCommentModel.targetId,
let pageIndex = this.currentPage
commentViewModel.fetchContentCommentList(pageIndex + '', this.publishCommentModel.targetId,
this.publishCommentModel.targetType)
.then(commentListModel => {
console.log('评论:', JSON.stringify(commentListModel.list))
this.currentPage++
// 这里需要先赋值,否则下次UI刷新可能重复进入第1页两次
this.currentPage = pageIndex + 1
if (Number.parseInt(commentListModel.totalCommentNum) >
Number.parseInt(this.publishCommentModel.totalCommentNumer)) {
this.publishCommentModel.totalCommentNumer = commentListModel.totalCommentNum + ''
...
...
@@ -279,7 +281,9 @@ export struct CommentComponent {
if (commentListModel && commentListModel.list && commentListModel.list.length > 0) {
if (pageIndex == 1) {
this.allDatas.clearAllData() // 防止数据重复问题
}
commentListModel.list.forEach(element => {
element.hasMore = Number.parseInt(element.childCommentNum) ? true : false
let newModel = commentViewModel.deepCopyCommentItemModel(element)
...
...
@@ -289,7 +293,6 @@ export struct CommentComponent {
this.allDatas.push(newModel)
});
} else {
this.hasMore = false
}
...
...
@@ -327,7 +330,7 @@ struct ChildCommentItem {
}
}
.maxLines(1)
.
layoutWeight
(1)
.
flexShrink
(1)
.fontSize(14)
.fontColor($r('app.color.color_222222'))
.fontWeight(FontWeight.Medium)
...
...
@@ -338,7 +341,7 @@ struct ChildCommentItem {
/// 人民号>置顶>作者
//人民号
if (this.item.fromUserType
!== 1
) {
if (this.item.fromUserType
== 2
) {
Image($r('app.media.comment_rmh_tag')).width(20).height(20).margin({ left: 5 });
}
//置顶
...
...
@@ -541,6 +544,8 @@ struct commentHeaderView {
//昵称
Text(this.item.fromUserName)
.fontSize(14)
.maxLines(1)
.flexShrink(1)
.fontColor($r('app.color.color_222222'))
.fontWeight(FontWeight.Medium)
.margin({ left: 5 })
...
...
@@ -550,7 +555,7 @@ struct commentHeaderView {
/// 人民号>置顶>作者
//人民号
if (this.item.fromUserType
!== 1
) {
if (this.item.fromUserType
== 2
) {
Image($r('app.media.comment_rmh_tag')).width(20).height(20).margin({ left: 5 });
}
//置顶
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentListDialog.ets
View file @
7b6b273
...
...
@@ -11,6 +11,7 @@ export struct CommentListDialogView {
@Link @Watch('showCommentListChange') showCommentList: boolean
@Link contentDetailData: ContentDetailDTO // 详情页传
@Link pageInfo: PageInfoDTO // 专题页传
@Link publishCommentModel: publishCommentModel
onClose?: () => void
// @Consume pageId: TrackConstants.PageName
...
...
@@ -19,6 +20,7 @@ export struct CommentListDialogView {
private dialogController: CustomDialogController = new CustomDialogController({
builder: CommentListDialog({
contentDetailData: this.contentDetailData,
publishCommentModel:this.publishCommentModel,
pageInfo: this.pageInfo,
onClose: this.onClose
}),
...
...
@@ -47,7 +49,7 @@ export struct CommentListDialogView {
struct CommentListDialog {
/// 内部使用
@
State private publishCommentModel: publishCommentModel = new publishCommentModel()
@
Link publishCommentModel: publishCommentModel
@State private operationButtonList: string[] = []
controller?: CustomDialogController
@State windowWidth: number = AppStorage.get<number>('windowWidth') || 0
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowFirstTabsComponent.ets
View file @
7b6b273
...
...
@@ -86,7 +86,7 @@ export struct FollowFirstTabsComponent{
if(!this.isConnectNetwork){
EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {
this.reloadNetWork()
}
,
})
}})
.layoutWeight(1)
.width('100%')
}else{
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowListDetailUI.ets
View file @
7b6b273
...
...
@@ -102,7 +102,8 @@ export struct FollowListDetailUI {
}
}
}
.cachedCount(10)
.edgeEffect(EdgeEffect.None)
.cachedCount(5)
.padding({ left: '31lpx', right: '31lpx' })
.layoutWeight(1)
.scrollBar(BarState.Off)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
View file @
7b6b273
...
...
@@ -109,7 +109,7 @@ export struct HomePageBottomCommentComponent {
}
}
}
.cachedCount(
1
5)
.cachedCount(5)
.layoutWeight(1)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomFollowComponent.ets
View file @
7b6b273
...
...
@@ -177,7 +177,7 @@ export struct HomePageBottomFollowComponent {
}
}
}
.cachedCount(
1
5)
.cachedCount(5)
.padding({ left: '31lpx', right: '31lpx' })
.layoutWeight(1)
.scrollBar(BarState.Off)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
View file @
7b6b273
...
...
@@ -109,7 +109,7 @@ export struct OtherHomePageBottomCommentComponent {
}
}
}
.cachedCount(
1
5)
.cachedCount(5)
.layoutWeight(1)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomFollowComponent.ets
View file @
7b6b273
...
...
@@ -138,7 +138,7 @@ export struct OtherHomePageBottomFollowComponent{
ListHasNoMoreDataUI()
}
}
}.cachedCount(
1
5)
}.cachedCount(5)
.padding({left:'31lpx',right:'31lpx'})
.layoutWeight(1)
.scrollBar(BarState.Off)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
View file @
7b6b273
...
...
@@ -4,10 +4,12 @@ import { EditListInfo, editModel, editModelParams, WDEditDataModelType } from '.
import EditInfoViewModel from '../../viewmodel/EditInfoViewModel';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import {AreaPickerDialog} from '../view/areaPickerDialog/AreaPickerDialog'
import {EditUserInfoCustomDialog} from '../view/areaPickerDialog/EditUserInfoCustomDialog'
import { AreaListModel } from '../../model/AreaListModel';
import router from '@ohos.router';
import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils'
import { TrackConstants } from 'wdTracking/Index';
import { window } from '@kit.ArkUI';
@Entry
@Component
...
...
@@ -16,6 +18,7 @@ struct EditUserInfoPage {
@State headerImg: string = ''
@State dataSource: AreaListModel[] = []
@State currentUserInfo: editModel = new editModel()
@State bottomSafeHeight: number = 0;
dialogController: CustomDialogController = new CustomDialogController({
builder: AreaPickerDialog({dataSource:this.dataSource,
...
...
@@ -29,10 +32,35 @@ struct EditUserInfoPage {
}
}),
alignment: DialogAlignment.Bottom,
offset:{dx:0,dy:0},
customStyle: true,
offset: {
dx: 0,
dy: -this.bottomSafeHeight
},
})
aboutToAppear() {
dateDialogController: CustomDialogController = new CustomDialogController({
builder: EditUserInfoCustomDialog({
confirmCallback:(selectDate:Date)=>{
let mon = selectDate.getUTCMonth() as number + 1
let monStr = mon < 10? '0'+mon.toString():mon.toString();
let dayStr = selectDate.getUTCDate() as number < 10? '0'+selectDate.getUTCDate():selectDate.getUTCDate();
this.currentUserInfo.userExtend.birthday = selectDate.getUTCFullYear()+'-'+monStr+'-'+dayStr;
this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_birthday
this.updateEditModel()
}
}),
alignment: DialogAlignment.Bottom,
customStyle: true,
offset: {
dx: 0,
dy: -this.bottomSafeHeight
},
})
async aboutToAppear() {
let windowHight: window.Window = await window.getLastWindow(getContext(this));
this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
this.getAccountOwnerInfo()
this.getAreaList()
}
...
...
@@ -145,20 +173,22 @@ struct EditUserInfoPage {
}else if (i === 3){
this.dialogController.open()
} else if (i === 4) {
DatePickerDialog.show({
start:new Date('1900-1-1'),
end:new Date(),
selected:new Date,
lunar:false,
onAccept:(value:DatePickerResult) => {
let mon = value.month as number + 1
let monStr = mon < 10? '0'+mon.toString():mon.toString();
let dayStr = value.day as number < 10? '0'+value.day:value.day;
this.currentUserInfo.userExtend.birthday = value.year+'-'+monStr+'-'+dayStr;
this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_birthday
this.updateEditModel()
}
})
this.dateDialogController.open()
// DatePickerDialog.show({
// start:new Date('1900-1-1'),
// end:new Date(),
// selected:new Date,
// lunar:false,
// onAccept:(value:DatePickerResult) => {
// let mon = value.month as number + 1
// let monStr = mon < 10? '0'+mon.toString():mon.toString();
// let dayStr = value.day as number < 10? '0'+value.day:value.day;
// this.currentUserInfo.userExtend.birthday = value.year+'-'+monStr+'-'+dayStr;
// this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_birthday
// this.updateEditModel()
// }
// })
}else if(i === 5){
TextPickerDialog.show({
range:['男','女'],
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PeopleShipHomePage.ets
View file @
7b6b273
import router from '@ohos.router'
import { PeopleShipHomePageNavComponent } from '../peopleShipHomePage/PeopleShipHomeNavComponent'
import { PeopleShipHomePageTopComponent } from '../peopleShipHomePage/PeopleShipHomePageTopComponent'
import { Logger, WindowModel } from 'wdKit'
import { Logger,
NetworkUtil,
WindowModel } from 'wdKit'
import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel'
import { PeopleShipHomeListComponent } from '../peopleShipHomePage/PeopleShipHomeListComponent'
import { QueryListIsFollowedItem } from '../../viewmodel/QueryListIsFollowedItem'
...
...
@@ -14,6 +14,7 @@ import {
ArticleCountData
} from 'wdBean'
import { EmptyComponent } from '../view/EmptyComponent'
import { CustomTitleUI } from '../reusable/CustomTitleUI'
@Entry
@Component
...
...
@@ -39,8 +40,10 @@ struct PeopleShipHomePage {
@Provide topHeight: number = 214
@State isLoading: boolean = true
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
build() {
if(this.isConnectNetwork){
Stack({ alignContent: Alignment.TopStart }) {
Stack({ alignContent: Alignment.Top }){
// 顶部图片
...
...
@@ -61,8 +64,6 @@ struct PeopleShipHomePage {
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
}
Column(){
// 头部返回
PeopleShipHomePageNavComponent({
...
...
@@ -122,7 +123,6 @@ struct PeopleShipHomePage {
})
}
}
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
.alignItems(HorizontalAlign.Start)
...
...
@@ -130,7 +130,21 @@ struct PeopleShipHomePage {
.width('100%')
}
.width('100%')
}else{
Column(){
CustomTitleUI({ titleName: "" })
EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {
this.isConnectNetwork = NetworkUtil.isNetConnected()
if(this.isConnectNetwork){
this.detailModel = {} as PeopleShipUserDetailData
this.getData()
}
}})
.height('calc(100% - 84lpx)')
.width('100%')
}.width("100%")
.height("100%")
}
}
aboutToAppear() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchComponent.ets
View file @
7b6b273
...
...
@@ -181,6 +181,11 @@ export struct SearchComponent {
trackSearchClick(this.fromTabName,content)
//赋值
this.searchText = content
if(StringUtils.isNotEmpty(this.searchText)){
this.hasInputContent = true
}
//保存搜索记录
SearcherAboutDataModel.putSearchHistoryData(this.searchText)
//获取搜索记录
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
View file @
7b6b273
...
...
@@ -289,7 +289,7 @@ export struct SearchResultContentComponent {
ListHasNoMoreDataUI()
}
}
}.cachedCount(
10
)
}.cachedCount(
5
)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.onReachEnd(() => {
...
...
@@ -305,57 +305,6 @@ export struct SearchResultContentComponent {
}
@Builder
multiCreatorUI() {
Column() {
List() {
ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
ListItem() {
SearchCreatorComponent({ item: item })
}
.width('150lpx')
.height('100%')
})
ListItem() {
Column() {
Text("查看更多")
.width('19lpx')
.fontSize('19lpx')
.fontWeight('400lpx')
.lineHeight('27lpx')
.fontColor($r('app.color.color_9E9E9E'))
}
.borderRadius({ topLeft: '4lpx', bottomLeft: '4lpx' })
.height('180lpx')
.width('77lpx')
.backgroundColor($r('app.color.color_EDEDED'))
.justifyContent(FlexAlign.Center)
}.height('100%')
.margin({ left: '23lpx' })
.onClick(() => {
let params: Params = {
pageID: this.keywords
}
WDRouterRule.jumpWithPage(WDRouterPage.searchCreatorPage, params)
})
}
.cachedCount(6)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.listDirection(Axis.Horizontal)
.width('100%')
.height('219lpx')
Divider()
.width('100%')
.height('12lpx')
.color($r('app.color.color_F5F5F5'))
.strokeWidth('12lpx')
}
}
@Builder
SearchListUI() {
List({space:'8lpx'}) {
ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
...
...
@@ -464,7 +413,7 @@ export struct SearchResultContentComponent {
contentDTO.tagWord = -1
contentDTO.isSelect = true
contentDTO.rmhInfo = {} as RmhInfoDTO
contentDTO.photoNum =
-1
contentDTO.photoNum =
StringUtils.isEmpty(value.data.picCount) ? 0 : Number(value.data.picCount)
contentDTO.liveInfo = {} as LiveInfoDTO;
contentDTO.videoInfo = {
videoDuration: Number.parseInt(value.data.duration)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
View file @
7b6b273
...
...
@@ -505,7 +505,7 @@ export struct OperRowListView {
// 评论组件需要数据
if (Number.parseInt(this.interactData.commentNum) >
Number.parseInt(this.publishCommentModel.totalCommentNumer)) {
this.publishCommentModel.totalCommentNumer = this.interactData.commentNum + ''
|| '0'
this.publishCommentModel.totalCommentNumer = this.interactData.commentNum + ''
}
}
// console.log(TAG, '获取互动点赞等数据===', JSON.stringify(res))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/AreaPickerDialog.ets
View file @
7b6b273
...
...
@@ -13,6 +13,7 @@ export struct AreaPickerDialog {
@Provide dataSource: AreaListModel[] = []
result: JSON[] = [];
confirmCallback: (province:string,city:string,county:string,address:string) => void = () => {
}
build() {
...
...
@@ -22,27 +23,33 @@ export struct AreaPickerDialog {
.onClick(()=> {
this.controller.close()
})
.width(60)
.backgroundColor(0xffffff)
.fontColor(Color.Black)
.layoutWeight(1)
Blank()
Blank()
.width(80)
Text(this.title)
.fontSize(18).textAlign(TextAlign.Center).margin({top:10,bottom:10})
Blank()
Blank()
.width(80)
Button('提交',{type:ButtonType.Normal})
.onClick(()=> {
this.controller.close()
this.confirmCallback(this.currentFirst.label,this.currentSecondBean.label,this.currentThirdBean.label,this.currentFirst.label+this.currentSecondBean.label+this.currentThirdBean.label);
})
.width(60)
.backgroundColor(0xffffff)
.fontColor('#ED2800')
.layoutWeight(1)
}
.margin({top:0,bottom:10})
}.backgroundColor(0xffffff)
Divider()
.color('#f5f5f5')
.width('100%')
.strokeWidth(1)
Row(){
FirstLevelComponent().width('33%')
...
...
@@ -50,7 +57,8 @@ export struct AreaPickerDialog {
ThirdLevelComponent().width('33%')
}
}
.height('40%')
.backgroundColor(0xffffff)
.height('35%')
.width('100%')
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/DateCustomComponent.ets
0 → 100644
View file @
7b6b273
@Component
export struct DateCustomComponent {
@Consume selectDate: Date
build() {
Column(){
Column(){
DatePicker({
start:new Date('1900-1-1'),
end:new Date(),
selected:new Date,
}).selectedTextStyle({color:'#666666'})
.textStyle({color:'#999999'})
.onDateChange((value) => {
this.selectDate = value as Date
})
// .onDateChange:(value:DatePickerResult) => {
// let mon = value.month as number + 1
// let monStr = mon < 10? '0'+mon.toString():mon.toString();
// let dayStr = value.day as number < 10? '0'+value.day:value.day;
// this.currentUserInfo.userExtend.birthday = value.year+'-'+monStr+'-'+dayStr;
// this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_birthday
// this.updateEditModel()
// }
}.justifyContent(FlexAlign.Center)
}.height('100%')
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/EditUserInfoCustomDialog.ets
0 → 100644
View file @
7b6b273
import { DateCustomComponent } from './DateCustomComponent'
@CustomDialog
export struct EditUserInfoCustomDialog{
@Provide selectDate: Date = new Date
controller: CustomDialogController
confirmCallback: (selectDate:Date) => void = () => {
}
build() {
Column(){
Row(){
Button('取消',{type:ButtonType.Normal})
.onClick(()=> {
this.controller.close()
})
.width(60)
.backgroundColor(0xffffff)
.fontColor(Color.Black)
.layoutWeight(1)
Blank().width(80)
Text('修改生日')
.fontSize(18).textAlign(TextAlign.Center).margin({top:10,bottom:10})
Blank().width(80)
Button('提交',{type:ButtonType.Normal})
.onClick(()=> {
this.controller.close()
this.confirmCallback(this.selectDate);
})
.width(60)
.backgroundColor(0xffffff)
.fontColor('#ED2800')
.layoutWeight(1)
}.backgroundColor(0xffffff)
Divider()
.color('#f5f5f5')
.width('100%')
.strokeWidth(1)
DateCustomComponent().width('70%')
}
.backgroundColor(0xffffff)
.height('35%')
.width('100%')
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/areaPickerDialog/FirstLevelComponent.ets
View file @
7b6b273
...
...
@@ -28,7 +28,6 @@ export struct FirstLevelComponent {
this.currentFirst = EditInfoViewModel.getAreaListManageModel(this.dataSource[index as number])
})
.backgroundColor(Color.White)
// .border({color:'#e2e2e2',width:{right:0.5}})
.width('100%')
.layoutWeight(1)
.selectedTextStyle({color:'#666666'})
...
...
@@ -38,6 +37,5 @@ export struct FirstLevelComponent {
.justifyContent(FlexAlign.Center)
}
.height('100%')
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/model/MinePageDatasModel.ets
View file @
7b6b273
...
...
@@ -830,7 +830,7 @@ class MinePageDatasModel{
contentDTO.tagWord = -1
contentDTO.isSelect = true
contentDTO.rmhInfo = {} as RmhInfoDTO
contentDTO.photoNum =
-1
contentDTO.photoNum =
StringUtils.isEmpty(value.picCount) ? 0 : Number(value.picCount)
contentDTO.liveInfo = {} as LiveInfoDTO;
contentDTO.videoInfo = {
videoDuration: Number.parseInt(value.duration)
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/SearchCreatorPage.ets
View file @
7b6b273
...
...
@@ -182,7 +182,7 @@ struct SearchCreatorPage {
ListHasNoMoreDataUI()
}
}
}.cachedCount(
10
)
}.cachedCount(
5
)
.padding({left:'31lpx',right:'31lpx'})
.layoutWeight(1)
.scrollBar(BarState.Off)
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
7b6b273
...
...
@@ -182,7 +182,7 @@ export struct DetailPlayShortVideoPage {
index: $index,
currentIndex: $currentIndex,
showCommentList: $showCommentList,
//
publishCommentModel: $publishCommentModel
publishCommentModel: $publishCommentModel
})
this.playerViewBuilder()
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/CommentDialogView.ets
View file @
7b6b273
import { ContentDetailDTO, PageInfoDTO } from 'wdBean/Index'
import { CommentListDialogView } from 'wdComponent/Index'
import { CommentListDialogView
, publishCommentModel
} from 'wdComponent/Index'
@Component
export struct CommentDialogView {
@Link @Watch('showCommentListChange') showCommentList: boolean
@Link index: number
@Link currentIndex: number
@Link publishCommentModel: publishCommentModel
@Consume contentDetailData: ContentDetailDTO
@State fakePageInfo: PageInfoDTO = {} as PageInfoDTO
@State dialogOffsetY: number = 0 // (this.windowHeight - this.windowWidth * 9 / 16)
...
...
@@ -29,6 +30,7 @@ export struct CommentDialogView {
CommentListDialogView({
showCommentList: this.innerShowComment,
contentDetailData: this.contentDetailData,
publishCommentModel: this.publishCommentModel,
pageInfo: this.fakePageInfo,
onClose: () => {
this.showCommentList = false
...
...
sight_harmony/features/wdShare/src/main/ets/WDShare.ets
View file @
7b6b273
import { ContentDetailDTO, ContentDTO, PageInfoDTO } from 'wdBean/Index';
import { ContentDetailDTO, ContentDTO, PageInfoDTO, ShareInfoDTO, TopicInfo } from 'wdBean/Index';
import { SharePosterItemBean } from 'wdBean/src/main/ets/bean/detail/SharePosterItemBean';
import { ShareScene, ShareType, WDShareBase } from 'wdShareBase/Index';
import { ShareContentType } from 'wdShareBase/src/main/ets/Constant';
...
...
@@ -29,4 +30,58 @@ export class WDShare {
}
//专题分享数据转换
static setTopicBeanToShareBean(shareBean: ShareInfoDTO, topicInfoBean: TopicInfo){
shareBean.topicType = topicInfoBean.topicType+''
//21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题,26:时间链
if(25 == topicInfoBean.topicType){
shareBean.showPosterType = 6
shareBean.topicPattern = topicInfoBean.topicPattern
shareBean.publishTime = topicInfoBean.topicDate
if(topicInfoBean.frontLinkObject == null){
shareBean.isFrontDaily = false
if(topicInfoBean.shareContentList != null && topicInfoBean.shareContentList.length>0){
shareBean.sharePosterItemList = [] as SharePosterItemBean[]
shareBean.sharePosterItemList.length = topicInfoBean.shareContentList.length
for (let index = 0; index < topicInfoBean.shareContentList.length; index++) {
let element = topicInfoBean.shareContentList[index]
if(element != null){
shareBean.sharePosterItemList[index] = {
title:topicInfoBean.shareContentList[index].newsTitle,
imageUrl:topicInfoBean.shareContentList[index].coverUrl,
} as SharePosterItemBean
}
}
}
}else{
shareBean.isFrontDaily = true
shareBean.sharePosterCoverUrl = topicInfoBean.frontLinkObject.coverUrl
shareBean.posterSummary = topicInfoBean.frontLinkObject.summary
}
}else{
//文章/直播/话题专题(H5普通文章专题,包含时间链)
shareBean.showPosterType = 8
//海报的头图
shareBean.sharePosterCoverUrl = topicInfoBean.backgroundImgUrl
shareBean.isFrontDaily = false
shareBean.posterTitle = topicInfoBean.title
shareBean.posterSummary = topicInfoBean.summary
if(topicInfoBean.shareContentList != null && topicInfoBean.shareContentList.length>0){
shareBean.sharePosterItemList = [] as SharePosterItemBean[]
shareBean.sharePosterItemList.length = topicInfoBean.shareContentList.length
for (let index = 0; index < topicInfoBean.shareContentList.length; index++) {
let element = topicInfoBean.shareContentList[index]
if(element != null){
shareBean.sharePosterItemList[index] = {
title:topicInfoBean.shareContentList[index].newsTitle,
imageUrl:topicInfoBean.shareContentList[index].coverUrl,
timeNode:topicInfoBean.shareContentList[index].publishTime,
timeBlurred:topicInfoBean.shareContentList[index].timeBlurred
} as SharePosterItemBean
}
}
}
}
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdTracking/src/main/ets/common/TrackingUtils.ets
View file @
7b6b273
...
...
@@ -17,7 +17,7 @@ export class TrackingUtils {
static fillPositionWith(attr: ParamType) {
let pageName = attr["pageName"] as string
let action = attr["action"] as string
if (action.length > 0) {
if (action
!= null && action
.length > 0) {
attr["saPosition"] = pageName + "_" + action
return
}
...
...
sight_harmony/products/phone/src/main/ets/pages/ENewspaper.ets
View file @
7b6b273
...
...
@@ -5,7 +5,7 @@ import window from '@ohos.window';
import { TrackingPageBrowse ,TrackConstants} from 'wdTracking/Index';
const TAG = 'ENewspaper';
//电子报主页面
@Entry
@Component
struct ENewspaper {
...
...
sight_harmony/products/phone/src/main/ets/pages/view/MultiPictureDetailPageComponent.ets
View file @
7b6b273
...
...
@@ -116,7 +116,7 @@ export struct MultiPictureDetailPageComponent {
index: $index,
currentIndex: $currentIndex,
showCommentList: $showCommentList,
//
publishCommentModel: $publishCommentModel
publishCommentModel: $publishCommentModel
})
}
...
...
Please
register
or
login
to post a comment