陈剑华

Merge remote-tracking branch 'origin/main'

... ... @@ -15,6 +15,7 @@ export struct CommentCustomDialog {
@State private emojiSwitch: boolean = false
textInputController: TextAreaController = new TextAreaController()
@State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 }
@State publishButtonOpacity: number = 0.5
aboutToAppear(): void {
}
... ... @@ -55,8 +56,15 @@ export struct CommentCustomDialog {
.height('100%')
.width('100%')
.backgroundColor($r('app.color.color_transparent'))
.caretColor("#ED2800")
.onChange(value => {
this.publishCommentModel.commentContent = value;
if (value.length > 0) {
this.publishButtonOpacity = 1.0
} else {
this.publishButtonOpacity = 0.5
}
})
.onFocus(() => {
if (this.emojiSwitch) {
... ... @@ -98,13 +106,14 @@ export struct CommentCustomDialog {
Row() {
Text('发布')
.backgroundColor('#F89381')
.backgroundColor("#ED2800")
.width(80)
.height(30)
.fontSize(15)
.fontColor(Color.White)
.textAlign(TextAlign.Center)
.borderRadius(4)
.opacity(this.publishButtonOpacity)
.onClick(() => {
if (this.publishCommentModel.commentContent.length > 0) {
//请求评论接口
... ...
... ... @@ -257,6 +257,7 @@ export struct QualityCommentsComponent {
.height("100%")
.width("100%")
.edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果
.scrollBar(BarState.Off)
.nestedScroll({
scrollForward: NestedScrollMode.PARENT_FIRST,
scrollBackward: NestedScrollMode.SELF_FIRST
... ... @@ -405,7 +406,7 @@ struct QualityCommentItem {
if (this.item.api_authIcon && this.item.api_authIcon.length > 0) {
Image(this.item.api_authIcon) // 加v
.width(12).height(12)
.width(14).height(14)
.objectFit(ImageFit.Cover)
}
}.width(50).height(50)
... ...
import { ContentDTO } from 'wdBean/Index'
import { StringUtils, UserDataLocal } from 'wdKit/Index'
import { ProcessUtils } from 'wdRouter/Index'
import MinePageDatasModel from '../../../model/MinePageDatasModel'
import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem'
import { CommentListItem } from '../../../viewmodel/CommentListItem'
import measure from '@ohos.measure'
import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index'
@Component
export struct ChildCommentComponent {
... ... @@ -16,8 +14,6 @@ export struct ChildCommentComponent {
@State isExpandParent: boolean = false;
@State isOverLines: boolean = false
@State isOverLinesParent: boolean = false
testText:string = "1,因为读书的人\n是低着头向上看的人\n身处一隅,却能放眼世界\n2,因为读书的人\n总是比不读书的人\n活得有趣一点\n3,因为读书的人\n即使平凡,绝不平庸"
@Link fromPage:number
build() {
Column() {
... ... @@ -196,15 +192,6 @@ export struct ChildCommentComponent {
}.height('69lpx')
.justifyContent(FlexAlign.Center)
.onClick(() => {
let content = getParams(this.data)
if(this.fromPage === 0 ){
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal,TrackParamConvert.program(content))
}else{
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content))
}
ProcessUtils.processPage(content)
})
}
.margin({ top: '19lpx', bottom: '31lpx', left: '31lpx', right: '31lpx' })
.padding({ left: '23lpx' })
... ...
... ... @@ -10,6 +10,7 @@ import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherU
import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
import { ContentDTO } from 'wdBean/Index';
import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index';
import { ProcessUtils } from 'wdRouter/Index';
const TAG = "HomePageBottomCommentComponent"
... ... @@ -85,10 +86,15 @@ export struct HomePageBottomCommentComponent {
ChildCommentComponent({
data: item,
levelHead: UserDataLocal.getUserLevelHeaderUrl(),
isLastItem: index === this.data_comment.totalCount() - 1,
fromPage:0
isLastItem: index === this.data_comment.totalCount() - 1
})
}.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
}
.onClick(()=>{
let content = getParams(item)
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal,TrackParamConvert.program(content))
ProcessUtils.processPage(content)
})
.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
if (isVisible) {
let contentDTO = getParams(item)
TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal, TrackParamConvert.program(contentDTO))
... ...
... ... @@ -10,6 +10,7 @@ import { EmptyComponent } from '../../view/EmptyComponent';
import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
import { ContentDTO } from 'wdBean/Index';
import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index';
import { ProcessUtils } from 'wdRouter/Index';
const TAG = "HomePageBottomComponent"
/**
... ... @@ -87,9 +88,13 @@ export struct OtherHomePageBottomCommentComponent {
data: item,
levelHead: this.levelHead,
isLastItem: index === this.data_comment.totalCount() - 1,
fromPage:1
})
}.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
}
.onClick(()=>{
let content = getParams(item)
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content))
ProcessUtils.processPage(content)
}).onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
if (isVisible) {
let contentDTO = getParams(item)
TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal, TrackParamConvert.program(contentDTO))
... ...
... ... @@ -9,6 +9,14 @@ import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment
const TAG = 'DetailPlayLiveCommon'
/**
* @Description: 沉浸式和非沉浸式直播页面
* @Author:
* @Email:
* @CreateDate:
* @UpdateRemark: 更新说明
* @Version: 1.0
*/
@Entry
@Component
export struct DetailPlayLiveCommon {
... ... @@ -41,8 +49,10 @@ export struct DetailPlayLiveCommon {
Column() {
// 直播预约或横屏直播统一进横屏直播
if (this.liveState === 'wait' || this.liveStyle === 0) {
// 非沉浸式
DetailPlayLivePage({ contentId: this.contentId, relId: this.relId, relType: this.relType })
} else if (this.liveStyle === 1) {
// 沉浸式
DetailPlayVLivePage()
}
}
... ... @@ -61,6 +71,7 @@ export struct DetailPlayLiveCommon {
console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data))
if (data) {
this.contentDetailData = data[0];
// if (this.contentDetailData.openComment === 1) {
console.log(TAG, '查询视频详情用于评论展示 openComment:', this.contentDetailData.openComment)
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
... ... @@ -105,7 +116,7 @@ export struct DetailPlayLiveCommon {
this.playUrl = data[0].liveInfo.vlive[0].replayUri
}
// console.log(TAG, 'getLiveDetails:', JSON.stringify((this.liveDetailsBean)))
// console.log(TAG, 'getLiveDetails:', JSON.stringify((this.liveDetailsBean)))
}
},
() => {
... ...
... ... @@ -15,6 +15,9 @@ import { ResponseDTO } from 'wdNetwork/Index';
let TAG: string = 'DetailPlayLivePage';
/**
* 非沉浸式房间直播组件
*/
@Component
export struct DetailPlayLivePage {
//横竖屏,默认竖屏
... ... @@ -63,7 +66,7 @@ export struct DetailPlayLivePage {
build() {
Column() {
TopPlayComponent({ playerController: this.playerController })
.height(211)
.height(this.displayDirection == DisplayDirection.VERTICAL ?211:'100%')
TabComponent({ tabs: this.tabs, changeToTab: this.changeToTab })
.layoutWeight(1)
.visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
... ...
... ... @@ -12,6 +12,9 @@ import { PlayerEndView } from '../widgets/vertical/PlayerEndView';
const storage = LocalStorage.getShared();
const TAG = 'DetailPlayVLivePage'
/**
* 沉浸式房间直播组件
*/
@Entry(storage)
@Component
export struct DetailPlayVLivePage {
... ...
... ... @@ -2,6 +2,9 @@ import { TabChatComponent } from './TabChatComponent'
import { TabInfoComponent } from './TabInfoComponent'
import { TabLiveComponent } from './TabLiveComponent'
/**
* 非沉浸式直播 tab 组件
*/
@Component
export struct TabComponent {
@Prop @Watch('changeToChart') changeToTab: number
... ...
import { LiveDetailsBean } from 'wdBean/Index';
import { StringUtils } from 'wdKit/Index';
import { PlayerConstants, WDAliPlayerController, WDPlayerController, WDPlayerRenderLiveView } from 'wdPlayer/Index';
import { Logger, StringUtils } from 'wdKit/Index';
import { PlayerConstants, WDAliPlayerController, WDPlayerRenderLiveView } from 'wdPlayer/Index';
import { PlayUIComponent } from './PlayUIComponent';
import { Logger } from 'wdKit/Index';
import { PictureLoading } from '../../vertical/PictureLoading';
const TAG: string = 'TopPlayComponent'
... ... @@ -23,6 +22,7 @@ export struct TopPlayComponent {
@State isLoading: boolean = false
// 获取播放资源能播放了
@State isCanPlay: boolean = false
private playUrl: string = ""
private xComponentIsLoaded: boolean = false
... ... @@ -99,6 +99,7 @@ export struct TopPlayComponent {
build() {
Stack() {
// 视频资源播放
WDPlayerRenderLiveView({
playerController: this.playerController,
onLoad: async () => {
... ... @@ -112,17 +113,20 @@ export struct TopPlayComponent {
.width('100%')
.visibility(this.isWait ? Visibility.None : Visibility.Visible)
// 直播房间图
Image(this.imgUrl)
.objectFit(ImageFit.Cover)
.visibility(this.isWait || this.isEnd ? Visibility.Visible : Visibility.None)
.contrast(this.isEnd ? 0.2 : 1)
.width('100%')
// loading
PictureLoading().visibility(this.isLoading ? Visibility.None : Visibility.Visible)
// 视频播放器上的控制面板和信息
PlayUIComponent({ playerController: this.playerController, isShowBottom: this.isCanPlay })
// 直播结束
Text('直播已结束')
.fontSize('20fp')
.fontWeight(500)
... ... @@ -131,6 +135,7 @@ export struct TopPlayComponent {
Visibility.None)
// 直播资源加载失败
Column() {
Text('直播加载中,请稍候重试')
... ...
... ... @@ -22,6 +22,7 @@ export struct PlayerInfoComponent {
}
.cachedCount(2)
.indicator(false)
.effectMode(EdgeEffect.None)
.loop(false)
.width('100%')
.height('100%')
... ...
... ... @@ -4,10 +4,7 @@ import { LoginViewModel } from './LoginViewModel'
import router from '@ohos.router'
import { WDRouterRule, WDRouterPage } from 'wdRouter';
import { SettingPasswordParams } from './SettingPasswordPage'
import { Router } from '@ohos.arkui.UIContext'
import { CustomToast, EmitterEventId, EmitterUtils, NetworkUtil, SPHelper, StringUtils, ToastUtils } from 'wdKit/Index'
import { SpConstants } from 'wdConstant/Index'
import { emitter } from '@kit.BasicServicesKit'
import { CustomToast, NetworkUtil,StringUtils } from 'wdKit/Index'
const TAG = 'ForgetPasswordPage'
... ... @@ -24,6 +21,7 @@ struct ForgetPasswordPage {
@State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件
@State params:Record<string, number> = router.getParams() as Record<string, number>;//登录 密码登录 填写手机号 点击忘记密码 带过来手机号
@State pageTitle:string = '找回密码';
@State isForgetPassword: number = 0 //是否是登录页忘记密码过来的,标题不一样
@State codeStateSuccess:boolean=false
onCodeSend() {
if (this.isCodeSend) {
... ... @@ -31,10 +29,6 @@ struct ForgetPasswordPage {
}
}
@State toastText:string = ""
dialogToast: CustomDialogController = new CustomDialogController({
builder: CustomToast({
... ... @@ -87,6 +81,7 @@ struct ForgetPasswordPage {
let phone = ""
if(this.params){
phone = this.params['phone']+ ""
this.isForgetPassword = this.params['isForgetPassword']
}
if(StringUtils.isNotEmpty(phone) && phone.indexOf("****") === -1){
this.phoneContent = phone
... ... @@ -157,7 +152,8 @@ struct ForgetPasswordPage {
pageID:'1',
phoneContent:this.phoneContent,
codeContent:this.codeContent,
pageType:1
pageType:1,
isForgetPassword:this.isForgetPassword
}
WDRouterRule.jumpWithPage(WDRouterPage.settingPasswordPage, params)
}).catch((message: string)=>{
... ... @@ -171,7 +167,8 @@ struct ForgetPasswordPage {
pageID:'1',
phoneContent:this.phoneContent,
codeContent:this.codeContent,
pageType:0
pageType:0,
isForgetPassword:this.isForgetPassword
}
WDRouterRule.jumpWithReplacePage(WDRouterPage.settingPasswordPage, params)
... ...
... ... @@ -177,10 +177,11 @@ struct LoginPage {
.onClick(() => {
TrackingButton.click("loginPageForgotPassword",TrackConstants.PageName.Login_Page,TrackConstants.PageName.Login_Page)
if(StringUtils.isNotEmpty(this.accountContent) && StringUtils.photoMatch(this.accountContent)){
let pageType = { 'phone': Number(this.accountContent) } as Record<string, number>;
let pageType = { 'phone': Number(this.accountContent),'isForgetPassword':1 } as Record<string, number>;
WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType)
}else{
WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage)
let pageType = {'isForgetPassword':1 } as Record<string, number>;
WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage,pageType)
}
})
}
... ...
... ... @@ -18,6 +18,7 @@ export interface SettingPasswordParams {
codeContent?: string;
tempToken?:string;
pageType?:number; //0、登录->忘记密码 1、设置->重置密码
isForgetPassword?:number
}
export default class AccoutPageDataModel {
... ... @@ -107,6 +108,17 @@ export struct SettingPasswordPage {
let params:SettingPasswordParams = router.getParams() as SettingPasswordParams;
this.pageId = parseInt(params.pageID);
this.getPageListData(this.pageId)
if(params){
if(params.isForgetPassword === 1){
this.listData.forEach((item) => {
if (item.compType === 0) {
item.compTitle = "重置密码"
}
})
}
}
this.phoneContent = params.phoneContent!;
this.codeContent = params.codeContent!;
... ... @@ -151,8 +163,6 @@ export struct SettingPasswordPage {
this.getTitleCell(item, HorizontalAlign.Start)
} else if (item.compType == 1) {
this.getPasswordCell(item)
} else if (item.compType == 2) {
this.getCodeCell(item)
} else if (item.compType == 3) {
if (index == this.listData.length - 1) {
this.getDescCell(item, HorizontalAlign.Center)
... ... @@ -161,18 +171,12 @@ export struct SettingPasswordPage {
}
} else if (item.compType == 4) {
this.getButtonCell(item)
} else if (item.compType == 5) {
this.getLogoCell(item)
} else if (item.compType == 7) {
this.getPhoneCell(item)
} else {
Text('' + item.compType)
}
}
})
}
}.width('100%')
.padding('30lpx')
.padding({ left:"31lpx",right:"31lpx",top:"131lpx" })
.height('100%')
}
... ...
import componentUtils from '@ohos.arkui.componentUtils';
import { WDPlayerController } from '../controller/WDPlayerController'
import { WindowModel } from 'wdKit';
import { Logger } from '../utils/Logger';
import { enableAliPlayer } from '../utils/GlobalSetting';
... ...