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-24 15:22:56 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
e0649496a651ca149c2b0e7f36d9b6a40f832b5b
e0649496
2 parents
b1797b00
9ef9e654
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
60 additions
and
17 deletions
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowListDetailUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
sight_harmony/features/wdComponent/src/main/ets/pages/OtherNormalUserHomePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayVLivePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerInfoComponent.ets
sight_harmony/features/wdLogin/src/main/ets/LoginModule.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
View file @
e064949
...
...
@@ -350,12 +350,14 @@ export struct WdWebLocalComponent {
this.controller.pause()
this.cancelProgressTimer()
}
})
}).margin({right:16})
Row() {
Text(DateTimeUtils.getFormattedDuration(this.currentTime * 1000))
.fontSize(12)
.fontColor(Color.White)
.fontWeight(600)
Slider({
value: this.currentTime,
min: 0,
...
...
@@ -385,8 +387,8 @@ export struct WdWebLocalComponent {
.fontSize(12)
.fontColor(Color.White)
.fontWeight(600)
}
.justifyContent(FlexAlign.Center)
}.alignItems(VerticalAlign.Center)
.height(48)
// Image($r('app.media.icon_full_screen'))
// .width(24)
...
...
@@ -401,7 +403,9 @@ export struct WdWebLocalComponent {
colors: [[0x20000000, 0.0], [Color.Transparent, 1.0]] // [0x80000000, 0.5],
})
.width("100%")
.justifyContent(FlexAlign.SpaceAround)
.height(48)
.padding({left:16})
.alignItems(VerticalAlign.Center)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
e064949
...
...
@@ -5,7 +5,8 @@ import {
EmitterUtils,
EmitterEventId,
NetworkUtil,
DisplayUtils
DisplayUtils,
ToastUtils
} from 'wdKit';
import {
Action,
...
...
@@ -185,8 +186,10 @@ export struct ImageAndTextPageComponent {
.justifyContent(FlexAlign.Center)
}
if (this.recommendList.length > 0) {
Column(){
Divider().strokeWidth(8).color('#f5f5f5')
RecommendList({ recommendList: this.recommendList })
}.padding({bottom:this.contentDetailData?.openComment ? 0 : 44 })
}
// 评论
if (this.contentDetailData?.openComment) {
...
...
@@ -447,6 +450,9 @@ export struct ImageAndTextPageComponent {
PageRepository.postExecuteLike(params).then(res => {
// console.log(TAG, '点赞、res', JSON.stringify(res))
// console.log(TAG, '点赞、取消点赞 this.newsStatusOfUser', JSON.stringify(this.newsStatusOfUser))
if (res.code != 0){
ToastUtils.showToast(res.message, 1000);
}else {
if (this.newsStatusOfUser) {
//内容点赞、取消点赞Tracking 1点赞 0取消点赞
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1'
...
...
@@ -462,7 +468,7 @@ export struct ImageAndTextPageComponent {
// 初次进入详情页偶现获取失败,重新获取newsStatusOfUser对象
this.getInteractDataStatus()
}
}
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowListDetailUI.ets
View file @
e064949
...
...
@@ -34,7 +34,9 @@ export struct FollowListDetailUI {
if (arr[1] == "0") {
this.data.getDataArray().forEach((element, index) => {
if (element.creatorId === arr[0]) {
this.data.deleteItem(index)
animateTo({}, () => {
this.data.deleteItem(index);
});
this.count = this.data.size()
}
});
...
...
@@ -92,6 +94,7 @@ export struct FollowListDetailUI {
ListItem() {
FollowChildComponent({ data: item, type: this.type })
}
.transition(TransitionEffect.OPACITY)
}, (item: FollowListDetailItem) => item.creatorId)
//没有更多数据 显示提示
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
View file @
e064949
import { NumberFormatterUtils, SPHelper } from 'wdKit';
import { NumberFormatterUtils, SPHelper
, ToastUtils
} from 'wdKit';
import promptAction from '@ohos.promptAction';
import {
batchLikeAndCollectParams,
...
...
@@ -526,6 +526,9 @@ export struct OperRowListView {
console.log(TAG, '收藏点击', JSON.stringify(params))
PageRepository.postExecuteCollectRecord(params).then(res => {
if (res.code != 0){
ToastUtils.showToast(res.message, 1000);
}else {
if (this.newsStatusOfUser) {
this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1
if (this.newsStatusOfUser.collectStatus === 1) {
...
...
@@ -536,6 +539,7 @@ export struct OperRowListView {
}
this.queryContentInteractCount()
}
}
console.log(TAG, '收藏点击 this.newsStatusOfUser', JSON.stringify(this.newsStatusOfUser))
})
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/OtherNormalUserHomePage.ets
View file @
e064949
...
...
@@ -48,6 +48,7 @@ struct OtherNormalUserHomePage {
@State userName:string = ""
@State headPhotoUrl:string = ""
@State levelHead:string = ""
@State listLevelHead:string = ""
@State levelId:number = 0
@State browseNum:number = 0//阅读数
@State commentNum:number = 0//评论数
...
...
@@ -208,7 +209,7 @@ struct OtherNormalUserHomePage {
Stack({ alignContent: Alignment.Top }){
Tabs({controller: this.controller}) {
TabContent() {
OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead,commentNum:$commentNum})
OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.l
istL
evelHead,commentNum:$commentNum})
}
TabContent() {
OtherHomePageBottomFollowComponent({curUserId:this.curUserId})
...
...
@@ -422,6 +423,7 @@ struct OtherNormalUserHomePage {
this.levelHead = value[0].levelHead
}
}
this.listLevelHead = value[0].levelHead
this.levelId = value[0].level
}
}).catch((err:Error)=>{
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayVLivePage.ets
View file @
e064949
...
...
@@ -41,6 +41,8 @@ export struct DetailPlayVLivePage {
@Consume @Watch('closeFullScreen') pageHide: number
@Consume contentId: string
@State swiperIndex: number = 1
///是否展示清屏按钮
@State showClearButton: boolean = false
@Consume liveDetailPageLogic: LiveDetailPageLogic
@Provide lastInputedComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的消息
//播放错误
...
...
@@ -198,6 +200,7 @@ export struct DetailPlayVLivePage {
playerController: this.playerController,
swiperController: this.swiperController,
swiperIndex: $swiperIndex,
showClearButton: $showClearButton
})
// 直播资源加载失败
...
...
@@ -241,7 +244,7 @@ export struct DetailPlayVLivePage {
Image($r('app.media.icon_live_more'))
.width(40)
.aspectRatio(1)
.visibility(this.s
wiperIndex === 0
? Visibility.Visible : Visibility.Hidden)
.visibility(this.s
howClearButton
? Visibility.Visible : Visibility.Hidden)
.position({ x: '100%', y: '100%' })
.markAnchor({ x: 56, y: this.bottomSafeHeight })
.onClick(() => {
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
View file @
e064949
...
...
@@ -130,13 +130,14 @@ export struct PlayUIComponent {
})
if (this.contentDetailData.liveInfo?.liveState != 'wait') {
//标题
Text(this.contentDetailData.newsTitle)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.MARQUEE })
Marquee({
start:true,
loop: 1,
src:this.contentDetailData.newsTitle
})
.fontSize(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '18vp' : '16vp')
.fontWeight(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 600 : 500)
.fontColor(Color.White)
.textAlign(TextAlign.Start)
.layoutWeight(1)
} else {
Blank()
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerInfoComponent.ets
View file @
e064949
...
...
@@ -10,9 +10,9 @@ export struct PlayerInfoComponent {
@Consume liveState: string
@Consume isShowControl: boolean
@Link swiperIndex: number
@Link showClearButton: boolean
@Provide isFullScreen: boolean = false // 判断是否全屏,全屏状态下swiper禁止切换
build() {
Column() {
Swiper(this.swiperController) {
...
...
@@ -35,12 +35,23 @@ export struct PlayerInfoComponent {
this.isShowControl = !this.isShowControl
}
})
.onChange((index) => {
this.swiperIndex = index
.onGestureSwipe((index: number, extraInfo: SwiperAnimationEvent) => {
this.dealShowClearButton(index,extraInfo.currentOffset)
})
.onAnimationEnd((index: number, extraInfo: SwiperAnimationEvent) => {
this.dealShowClearButton(index,extraInfo.currentOffset)
})
.disableSwipe(this.isFullScreen)
}
.height('100%')
.width('100%')
}
dealShowClearButton(index:number, currentOffset: number) {
this.swiperIndex = index
if (index == 0) {
this.showClearButton = currentOffset >= 0;
}else if (index == 1) {
this.showClearButton = false
}
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdLogin/src/main/ets/LoginModule.ets
View file @
e064949
...
...
@@ -10,14 +10,23 @@ import { common } from '@kit.AbilityKit'
class LoginJumpHandler implements JumpInterceptorAction {
private logining = false
/// 说明是调用了跳转 WDRouterPage.loginPage 页面的行为
on(params?: object | undefined, singleMode?: boolean | undefined): boolean {
if (this.logining) {
return true
}
this.logining = true
HuaweiAuth.sharedInstance().fetchAnonymousPhone().then((anonymousPhone) => {
router.pushUrl({url: WDRouterPage.oneKeyLoginPage.url()})
this.logining = false
}).catch((error: string) => {
router.pushUrl({url: WDRouterPage.loginPage.url()})
this.logining = false
})
return true
}
...
...
Please
register
or
login
to post a comment