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-09-23 18:51:42 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
1103e58c7191449ebc610a244e6aacdca22f5a07
1103e58c
2 parents
157118bb
1caa93f7
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
74 additions
and
29 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/PaperTitleComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/LiveFollowComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/RmhTitle.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageTopComponent.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerProgressView.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/PaperTitleComponent.ets
View file @
1103e58
import router from '@ohos.router';
import { ContentDetailDTO, TopicInfo } from 'wdBean/Index';
import { ToastUtils } from 'wdKit';
import {
DisplayUtils,
ToastUtils } from 'wdKit';
import { WDShare } from 'wdShare/Index';
import { TrackConstants } from 'wdTracking/Index';
import font from '@ohos.font';
...
...
@@ -130,11 +130,11 @@ export struct PaperTitleComponent {
@Builder
rightDecorateBuilder() {
Row()
.width(
'80vp'
)
.width(
DisplayUtils.getDeviceWidth() - 265
)
.height('18vp')
.clip(new Path({
commands: `M${vp2px(9)} 0 H${vp2px(91)} V${vp2px(18)} L0 ${vp2px(18)} Z`
}))
// .clip(new Path({
// commands: `M${vp2px(9)} 0 H${vp2px(91)} V${vp2px(18)} L0 ${vp2px(18)} Z`
// }))
.linearGradient({
direction: GradientDirection.Right, // 渐变方向
repeating: false, // 渐变颜色是否重复
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/LiveFollowComponent.ets
View file @
1103e58
...
...
@@ -145,7 +145,7 @@ export struct LiveFollowComponent {
ContentDetailRequest.postPointLevelOperate({ operateType: 6 }).then((res) => {
console.log('关注号主获取积分==', JSON.stringify(res.data))
if (res.data?.showToast) {
ToastUtils.showToast(res.data.ruleName + '+' + res.data.rulePoint + '积分', 1000);
//
ToastUtils.showToast(res.data.ruleName + '+' + res.data.rulePoint + '积分', 1000);
}
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/RmhTitle.ets
View file @
1103e58
...
...
@@ -16,6 +16,7 @@ import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailV
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { InfomationCardClick } from '../../utils/infomationCardClick'
import measure from '@ohos.measure'
import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel'
@Component
export struct RmhTitle {
@State compDTO: CompDTO = new CompDTO()
...
...
@@ -74,7 +75,7 @@ export struct RmhTitle {
ContentDetailRequest.postPointLevelOperate({ operateType: 6 }).then((res) => {
console.log('关注号主获取积分==', JSON.stringify(res.data))
if (res.data?.showToast) {
ToastUtils.showToast(res.data.ruleName + '+' + res.data.rulePoint + '积分', 1000);
//
ToastUtils.showToast(res.data.ruleName + '+' + res.data.rulePoint + '积分', 1000);
}
})
}
...
...
@@ -236,13 +237,24 @@ export struct RmhTitle {
.height(36)
.margin({ bottom: 10 })
.onClick(()=>{
this.gotoPeopleShipHomePage()
})
}
async gotoPeopleShipHomePage(){
///个人主页 动态头像不能跳转
if (this.isPeopleShipHome) return
try {
let detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.rmhInfo?.rmhId, '', '')
if (detailModel) {
// 跳转号主
ProcessUtils.gotoPeopleShipHomePage( this.rmhInfo?.rmhId,this.rmhInfo?.banControl,this.rmhInfo?.cnMainControl,this.rmhInfo?.userId,this.rmhInfo?.userType)
})
ProcessUtils.gotoPeopleShipHomePage(this.rmhInfo?.rmhId,this.rmhInfo?.banControl,this.rmhInfo?.cnMainControl,this.rmhInfo?.userId,this.rmhInfo?.userType)
}else {
ToastUtils.showToast('暂时无法查看该创作者主页',1000);
}
}catch {
ToastUtils.showToast('暂时无法查看该创作者主页',1000);
}
}
// 获取文本宽度
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
View file @
1103e58
...
...
@@ -56,17 +56,17 @@ export default struct MinePageUserSimpleInfoUI {
Image(this.isLogin?(this.headPhotoUrl?this.headPhotoUrl:this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon')):$r('app.media.default_head_userPage'))
.alt(this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon'))
.width(63.21)
.height(63.21)
.objectFit(ImageFit.Cover)
.borderRadius(50)
.width(64)
.height(64)
.objectFit(ImageFit.Fill)
.borderRadius(32)
if(StringUtils.isNotEmpty(this.levelHead)){
Image(this.levelHead)
.width(75.86)
.height(75.86)
.width(90)
.height(90)
.objectFit(ImageFit.Cover)
.borderRadius(50)
//
.borderRadius(50)
}
}
.width(86)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
View file @
1103e58
...
...
@@ -172,7 +172,7 @@ export struct HomePageBottomCommentComponent {
parentCommentUserName))
})
this.bottomCompH = DisplayUtils.getDeviceHeight() - data.length*160
this.bottomCompH = DisplayUtils.getDeviceHeight() - data.length*160
- 140
if (status.commentIdList.length === 0) {
if (this.curPageNum === 1) this.data_comment.clear()
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
View file @
1103e58
...
...
@@ -184,7 +184,7 @@ export struct OtherHomePageBottomCommentComponent {
this.data_comment.notifyDataReload()
this.count = this.data_comment.totalCount()
this.commentNum = value.totalCount
//
this.commentNum = value.totalCount
if (value.hasNext === 1) {
this.curPageNum++
} else {
...
...
@@ -214,7 +214,7 @@ export struct OtherHomePageBottomCommentComponent {
this.data_comment.notifyDataReload()
this.count = this.data_comment.totalCount()
this.commentNum = value.totalCount
//
this.commentNum = value.totalCount
if (value.hasNext === 1) {
this.curPageNum++
} else {
...
...
@@ -236,7 +236,7 @@ export struct OtherHomePageBottomCommentComponent {
this.data_comment.notifyDataReload()
this.count = this.data_comment.totalCount()
this.commentNum = value.totalCount
//
this.commentNum = value.totalCount
if (value.hasNext === 1) {
this.curPageNum++
} else {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
View file @
1103e58
import { CommonConstants, ViewType } from 'wdConstant';
import { Logger } from 'wdKit';
import { Logger
, NetworkUtil
} from 'wdKit';
import { EmptyComponent } from '../view/EmptyComponent';
import PageModel from '../../viewmodel/PageModel';
import { autoRefresh, onActionEnd, onActionStart, onActionUpdate } from '../../utils/PullDownRefresh';
...
...
@@ -41,6 +41,7 @@ export struct PageComponent {
private pageTrackBean: PageTrackBean = new PageTrackBean()
// 国殇灰度管理
GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage')
@State netStatus: number | undefined = undefined // 存储网络状态
build() {
Column() {
...
...
@@ -278,19 +279,26 @@ export struct PageComponent {
if (this.navIndex === this.currentTopNavSelectedIndex) {
this.getData();
this.needload = false;
// console.log(TAG, 'aboutToAppear onAutoRefresh111 ' + this.needload)
}
}
onChange() {
Logger.info(TAG,
`onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`);
// console.log(TAG, `onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`);
// 注册监听网络连接
this.netStatus = undefined
let netStatus = NetworkUtil.isNetConnected()
if (netStatus) {
if (this.navIndex === this.currentTopNavSelectedIndex) {
Logger.debu
g(TAG, 'page onAutoRefresh111 ' + this.needload)
// console.lo
g(TAG, 'page onAutoRefresh111 ' + this.needload)
if (this.needload) {
this.getData();
}
this.needload = false;
}
} else {
this.pageModel.viewType = ViewType.EMPTY;
}
}
onAutoRefresh() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageTopComponent.ets
View file @
1103e58
...
...
@@ -46,7 +46,7 @@ export struct PeopleShipHomePageTopComponent {
authIcon: this.detailModel.authIcon
}).margin({
left: '10vp',
bottom: '
20
vp'
bottom: '
15
vp'
}).onClick(() => {
let params = {
'headPhotoUrl': this.detailModel.headPhotoUrl,
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
1103e58
...
...
@@ -8,7 +8,7 @@ import {
postInteractBrowsOperateParams
} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
import { HttpUtils } from 'wdNetwork/Index';
import { DateTimeUtils, EmitterEventId, EmitterUtils, Logger, WindowModel } from 'wdKit/Index';
import { DateTimeUtils, EmitterEventId, EmitterUtils, Logger,
NetworkType,
WindowModel } from 'wdKit/Index';
import { PlayerBottomView } from '../view/PlayerBottomView';
import { PlayerRightView } from '../view/PlayerRightView';
import { DisplayDirection } from 'wdConstant/Index';
...
...
@@ -61,6 +61,7 @@ export struct DetailPlayShortVideoPage {
@Consume toastTextVisible: boolean
@StorageProp('currentBreakpoint') @Watch("currentChanged") currentBreakpoint: string = 'sm';
@State isPad: boolean = this.currentBreakpoint == "md" || this.currentBreakpoint == "lg" ? true : false
@State timer: number = -1
currentChanged() {
if (this.currentBreakpoint == "md" || this.currentBreakpoint == "lg") {
...
...
@@ -230,6 +231,24 @@ export struct DetailPlayShortVideoPage {
///解决初始化竖屏视频时 this.ratio未更新导致显示错误
this.calculatePlayerRect()
// 注册监听网络连接
EmitterUtils.receiveEvent(EmitterEventId.NETWORK_CONNECTED, (async (str?: string) => {
if (this.timer) {
clearTimeout(this.timer)
}
this.timer = setTimeout(() => {
let type: NetworkType | null = null
if (str) {
type = JSON.parse(str) as NetworkType
}
// 注册监听网络连接
if (this.currentIndex === this.index && type != NetworkType.TYPE_UNKNOWN) {
console.log(TAG, '网络连接状态变化', type, 'this.currentIndex', this.currentIndex, 'this.index', this.index)
this.currentIndexChange()
}
}, 1000)
}))
}
contentTrackingDict() {
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerProgressView.ets
View file @
1103e58
import { ContentDetailDTO } from 'wdBean/Index';
import { DateTimeUtils, ToastUtils } from 'wdKit/Index';
import { DateTimeUtils,
EmitterEventId, EmitterUtils,
ToastUtils } from 'wdKit/Index';
import { PlayerConstants, WDPlayerController } from 'wdPlayer/Index';
@Reusable
...
...
@@ -49,6 +49,12 @@ export struct PlayerProgressView {
this.playerController?.play()
}
}
// 注册监听网络连接
EmitterUtils.receiveEvent(EmitterEventId.NETWORK_CONNECTED, (async (str?: string) => {
if (this.timer) {
clearTimeout(this.timer)
}
}))
}
/**
...
...
Please
register
or
login
to post a comment