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-05-28 17:19:55 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
4ca4d35a577a5603704cb048ebf6247853c04efa
4ca4d35a
2 parents
c183324f
046409b0
Merge branches 'main' and 'main' of
http://192.168.1.42/developOne/harmonyPool
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
42 additions
and
25 deletions
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentListDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponentNew.ets
sight_harmony/features/wdComponent/src/main/ets/model/MinePageDatasModel.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/CommentDialogView.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerRightView.ets
sight_harmony/products/phone/src/main/ets/pages/view/BottomNavigationComponent.ets
sight_harmony/products/phone/src/main/ets/pages/view/MultiPictureDetailPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentListDialog.ets
View file @
4ca4d35
...
...
@@ -38,8 +38,12 @@ export struct CommentListDialogView {
}
closeAction() {
if (this.onClose) {
this.onClose()
} else {
this.showCommentList = false
}
}
build() {
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
View file @
4ca4d35
...
...
@@ -20,12 +20,10 @@ struct ChannelSubscriptionLayout {
//当前选中的频道
@Link currentTopNavSelectedIndex: number;
@Prop homeChannelList: TopNavDTO []
@Prop indexSettingChannelId: number
@Link myChannelList: TopNavDTO []
@Link moreChannelList: TopNavDTO []
@Link localChannelList: TopNavDTO []
@Link channelIds: number []
@StorageLink('channelIds') storeChannelIds: string = ''
@State isShow: boolean = false
@State dragItem: number = -1
private dragRefOffsetX: number = 0
...
...
@@ -34,7 +32,7 @@ struct ChannelSubscriptionLayout {
@State offsetY: number = 0
private FIX_VP_X: number = 80
private FIX_VP_Y: number = 48
@State indexSetting
TabIndex: number = 0
@State indexSetting
ChannelId: number = AppStorage.get<number>('indexSettingChannelId') || 2002
@State isEditIng: boolean = false
@State currentTopNavSelectedItem: TopNavDTO = {} as TopNavDTO
changeTab: (index: number) => void = () => {
...
...
@@ -50,13 +48,13 @@ struct ChannelSubscriptionLayout {
let channelIdTmp = this.channelIds.splice(index1, 1)
this.myChannelList.splice(index2, 0, tmp[0])
this.channelIds.splice(index2, 0, channelIdTmp[0])
this.storeChannelIds = this.channelIds.join(','
)
AppStorage.setOrCreate('channelIds', this.channelIds.join(',')
)
}
//删除频道
delChannelItem(index: number){
let item = this.myChannelList.splice(index, 1)[0]
this.channelIds.splice(index, 1)
this.storeChannelIds = this.channelIds.join(','
)
AppStorage.setOrCreate('channelIds', this.channelIds.join(',')
)
if (item.moreChannel === '1') {
this.moreChannelList.unshift(item)
}
...
...
@@ -68,7 +66,7 @@ struct ChannelSubscriptionLayout {
addChannelItem(item: TopNavDTO){
this.channelIds.push(item.channelId)
this.myChannelList.push(item)
this.storeChannelIds = this.channelIds.join(','
)
AppStorage.setOrCreate('channelIds', this.channelIds.join(',')
)
}
itemMove(index: number, newIndex: number): void {
...
...
@@ -265,6 +263,7 @@ struct ChannelSubscriptionLayout {
.alignContent(Alignment.Start)
.height(36)
.onClick(() => {
this.indexSettingChannelId = item.channelId
AppStorage.set('indexSettingChannelId', item.channelId)
})
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponentNew.ets
View file @
4ca4d35
...
...
@@ -13,9 +13,6 @@ import DailyPaperTopicModel from '../../model/DailyPaperTopicModel'
const TAG = 'TopNavigationComponent';
PersistentStorage.persistProp('channelIds', '');
PersistentStorage.persistProp('indexSettingChannelId', 2002);
const storage = LocalStorage.getShared();
/**
...
...
@@ -48,11 +45,11 @@ export struct TopNavigationComponentNew {
@State currentTopNavSelectedIndex: number = 0;
// 顶导数据
@State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = []
@St
orageProp('indexSettingChannelId') indexSettingChannelId: number =
2002
@St
ate indexSettingChannelId: number = AppStorage.get<number>('indexSettingChannelId') ||
2002
//我的频道id列表
@State channelIds: number[] = []
//本地缓存频道id列表
@St
orageProp('channelIds') storageChannelIds: string =
''
@St
ate storageChannelIds: string = AppStorage.get<string>('channelIds') ||
''
@State homeChannelList: TopNavDTO[] = []
// 我的频道列表
@State myChannelList: TopNavDTO[] = []
...
...
@@ -191,7 +188,6 @@ export struct TopNavigationComponentNew {
this.topBar()
ChannelSubscriptionLayout({
currentTopNavSelectedIndex: $currentTopNavSelectedIndex,
indexSettingChannelId: this.indexSettingChannelId,
homeChannelList: this.homeChannelList,
myChannelList: $myChannelList,
moreChannelList: $moreChannelList,
...
...
@@ -406,18 +402,29 @@ export struct TopNavigationComponentNew {
//频道分类
if (item.name !== '播报') { //暂时隐藏播报
if (item.myChannel === '1') {
if (item.myChannel === '1'
&& !this.storageChannelIds
) {
_myChannelList.push(item)
_channelIds.push(item.channelId)
} else if (item.moreChannel === '1') {
}
if (item.moreChannel === '1') {
this.moreChannelList.push(item)
} else if (item.localChannel === '1' && item.myChannel !== '1') {
}
if (item.localChannel === '1' && item.myChannel !== '1') {
this.localChannelList.push(item)
}
}
})
if(this.storageChannelIds){
_storageChannelIds.forEach((_item:string)=>{
let index = defaultList.findIndex(ele => Number(_item) === ele.channelId)
if(index > -1){
_myChannelList.push(defaultList[index])
_channelIds.push(defaultList[index].channelId)
}
})
}
if (cityName) {
let index = _myChannelList.findIndex(ele => cityName.includes(ele.name))
const localChannelitem = _myChannelList.splice(index, 1)[0];
...
...
@@ -466,10 +473,6 @@ export struct TopNavigationComponentNew {
this.changePage(this.currentTopNavSelectedIndex)
}
aboutToDisappear() {
AppStorage.set('channelIds', this.channelIds.join(','))
}
onTopNavigationDataUpdated() {
Logger.info(TAG,
`onTopNavigationDataUpdated currentTopNavIndex: ${this.currentTopNavSelectedIndex},topNavList.length:${this.topNavList.length}`);
...
...
sight_harmony/features/wdComponent/src/main/ets/model/MinePageDatasModel.ets
View file @
4ca4d35
...
...
@@ -73,9 +73,9 @@ class MinePageDatasModel{
this.personalData.push(new MinePagePersonalFunctionsItem("关注",$r('app.media.mine_follow_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("收藏",$r('app.media.mine_collect_icon')))
// this.personalData.push(new MinePagePersonalFunctionsItem("历史",$r('app.media.mine_history_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("消息",$r('app.media.mine_msg_icon')))
// this.personalData.push(new MinePagePersonalFunctionsItem("留言板",$r('app.media.mine_msgboard_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("预约",$r('app.media.mine_order_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("消息",$r('app.media.mine_msg_icon')))
return this.personalData
}
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
4ca4d35
...
...
@@ -182,7 +182,8 @@ export struct DetailPlayShortVideoPage {
index: $index,
currentIndex: $currentIndex,
showCommentList: $showCommentList,
publishCommentModel: $publishCommentModel
publishCommentModel: $publishCommentModel,
interactData: $interactData,
})
this.playerViewBuilder()
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/CommentDialogView.ets
View file @
4ca4d35
import { ContentDetailDTO, PageInfoDTO } from 'wdBean/Index'
import { ContentDetailDTO,
InteractDataDTO,
PageInfoDTO } from 'wdBean/Index'
import { CommentListDialogView, publishCommentModel } from 'wdComponent/Index'
...
...
@@ -9,6 +9,7 @@ export struct CommentDialogView {
@Link currentIndex: number
@Link publishCommentModel: publishCommentModel
@Consume contentDetailData: ContentDetailDTO
@Link interactData: InteractDataDTO
@State fakePageInfo: PageInfoDTO = {} as PageInfoDTO
@State dialogOffsetY: number = 0 // (this.windowHeight - this.windowWidth * 9 / 16)
...
...
@@ -34,6 +35,9 @@ export struct CommentDialogView {
pageInfo: this.fakePageInfo,
onClose: () => {
this.showCommentList = false
if (Number.parseInt(this.publishCommentModel.totalCommentNumer) > Number.parseInt(this.interactData.commentNum + "")) {
this.interactData.commentNum = Number.parseInt(this.publishCommentModel.totalCommentNumer)
}
}
})
}
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerRightView.ets
View file @
4ca4d35
...
...
@@ -387,7 +387,7 @@ export struct PlayerRightView {
.width(32)
.aspectRatio(1)
Text(this.
transNum2String('commentNum') ||
'抢首评')
Text(this.
interactData.commentNum > 0 ? this.transNum2String('commentNum') :
'抢首评')
.width('100%')
.fontWeight(500)
.textAlign(TextAlign.Center)
...
...
sight_harmony/products/phone/src/main/ets/pages/view/BottomNavigationComponent.ets
View file @
4ca4d35
...
...
@@ -9,6 +9,9 @@ import { VideoChannelPage } from './VideoChannelPage';
import ChannelViewModel from 'wdComponent/src/main/ets/viewmodel/ChannelViewModel';
const TAG = 'BottomNavigationComponent';
PersistentStorage.persistProp('channelIds', '');
PersistentStorage.persistProp('indexSettingChannelId', 2002);
let storage = LocalStorage.getShared();
/**
...
...
sight_harmony/products/phone/src/main/ets/pages/view/MultiPictureDetailPageComponent.ets
View file @
4ca4d35
...
...
@@ -6,7 +6,8 @@ import {
postInteractBrowsOperateParams,
postBatchAttentionStatusParams,
postInteractAccentionOperateParams,
Params
Params,
InteractDataDTO
} from 'wdBean';
import display from '@ohos.display';
import { DateTimeUtils } from 'wdKit/Index';
...
...
@@ -59,6 +60,7 @@ export struct MultiPictureDetailPageComponent {
@State operationButtonList: string[] = ['comment', 'like', 'collect', 'share']
@State currentOffset: number = 0
@State duration: number = 0
@Provide interactData: InteractDataDTO = {} as InteractDataDTO
pageParam: ParamType = {}
followUserId: string = ''
followUserName: string = ''
...
...
@@ -116,7 +118,8 @@ export struct MultiPictureDetailPageComponent {
index: $index,
currentIndex: $currentIndex,
showCommentList: $showCommentList,
publishCommentModel: $publishCommentModel
publishCommentModel: $publishCommentModel,
interactData:$interactData
})
}
...
...
Please
register
or
login
to post a comment