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
zhenghy
2024-04-22 19:10:08 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
e64d7c8c0b72ec0fd0566fdb5cf870478edc22a1
e64d7c8c
2 parents
a1122c62
54b9d608
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
240 additions
and
132 deletions
sight_harmony/commons/wdConstant/Index.ets
sight_harmony/commons/wdConstant/src/main/ets/constants/ContentConstants.ets
sight_harmony/commons/wdRouter/Index.ets
sight_harmony/commons/wdRouter/oh-package.json5
sight_harmony/features/wdComponent/src/main/ets/utils/ProcessUtils.ets → sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/JsBridgeBiz.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebComponent.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/broadcast/RecommendLists.ets
sight_harmony/features/wdComponent/src/main/ets/components/broadcast/SelectedColumns.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card12Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card14Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card15Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card16Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card17Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card20Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card21Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card4Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout02.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout03.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleColumn04.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow04.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageMoreFunctionUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePagePersonFunctionUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserIntroductionPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserNikeNamePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/LiveMorePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/ReserveMorePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/BigPicCardComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalReservationComponent.ets
sight_harmony/features/wdComponent/src/main/ets/model/MinePageDatasModel.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/LiveModel.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/MyCollectionViewModel.ets
sight_harmony/commons/wdConstant/Index.ets
View file @
e64d7c8
...
...
@@ -22,3 +22,6 @@ export { ScreenType } from './src/main/ets/enum/ScreenType';
export { SpConstants } from './src/main/ets/constants/SpConstants';
export { DisplayDirection } from './src/main/ets/constants/VideoConstants';
export { ContentConstants } from './src/main/ets/constants/ContentConstants';
...
...
sight_harmony/commons/wdConstant/src/main/ets/constants/ContentConstants.ets
0 → 100644
View file @
e64d7c8
export class ContentConstants {
/* content#objectType,跳转类型:0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,14动态图文,15动态视频 */
/**
* 0:不跳转
*/
static readonly TYPE_NONE: string = "0";
/**
* 1:点播
*/
static readonly TYPE_VOD: string = "1";
/**
* 2:直播
*/
static readonly TYPE_LIVE: string = "2";
/**
* 5:专题详情
*/
static readonly TYPE_SPECIAL_TOPIC: string = "5";
/**
* 6:链接
*/
static readonly TYPE_LINK: string = "6";
/**
* 8:图文详情,这里是h5页面
*/
static readonly TYPE_TELETEXT: string = "8";
/**
* 9:图集
*/
static readonly TYPE_NINE: string = "9";
/**
* 13:音频详情
*/
static readonly TYPE_AUDIO: string = "13";
/**
* 14:动态图文
*/
static readonly TYPE_FOURTEEN: string = "14";
/**
* 15:动态视频
*/
static readonly TYPE_FIFTEEN: string = "15";
}
\ No newline at end of file
...
...
sight_harmony/commons/wdRouter/Index.ets
View file @
e64d7c8
...
...
@@ -2,4 +2,6 @@ export { WDRouterRule } from './src/main/ets/router/WDRouterRule'
export { WDRouterPage } from './src/main/ets/router/WDRouterPage'
export { registerRouter } from './src/main/ets/router/Action2Page'
\ No newline at end of file
export { registerRouter } from './src/main/ets/router/Action2Page'
export { ProcessUtils } from './src/main/ets/utils/ProcessUtils'
...
...
sight_harmony/commons/wdRouter/oh-package.json5
View file @
e64d7c8
...
...
@@ -9,6 +9,7 @@
"dependencies"
:
{
"wdKit"
:
"file:../wdKit"
,
"wdBean"
:
"file:../../features/wdBean"
,
"wdNetwork"
:
"file:../../commons/wdNetwork"
"wdNetwork"
:
"file:../../commons/wdNetwork"
,
"wdConstant"
:
"file:../../commons/wdConstant"
}
}
\ No newline at end of file
...
...
sight_harmony/
features/wdComponent
/src/main/ets/utils/ProcessUtils.ets → sight_harmony/
commons/wdRouter
/src/main/ets/utils/ProcessUtils.ets
View file @
e64d7c8
...
...
@@ -2,9 +2,9 @@ import { Action, ContentDTO, Params } from 'wdBean';
import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO';
import { Logger } from 'wdKit';
import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
import { WDRouterRule } from 'wdRouter';
import { ContentConstants } from '../constants/ContentConstants';
import { LiveModel } from '../viewmodel/LiveModel';
import { WDRouterRule } from '../router/WDRouterRule';
import { ContentConstants } from 'wdConstant';
// import { LiveModel } from '../viewmodel/LiveModel';
const TAG = 'ProcessUtils';
...
...
@@ -57,9 +57,10 @@ export class ProcessUtils {
break;
//动态详情页(动态图文)
case ContentConstants.TYPE_FOURTEEN:
break;
//动态详情页(动态视频)
case ContentConstants.TYPE_FIFTEEN:
ProcessUtils.goto
DynamicDetailPage
(content);
ProcessUtils.goto
Web
(content);
break;
default:
break;
...
...
@@ -74,7 +75,7 @@ export class ProcessUtils {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType:
Number.parseInt(content.objectType)
,
detailPageType:
14
,
contentID: content?.objectId,
extra: {
relType: content?.relType,
...
...
@@ -129,15 +130,6 @@ export class ProcessUtils {
}
private static gotoWeb(content: ContentDTO) {
// // topicId
// content.channelId;
// content.linkUrl;
// content.objectId;
// // CompId
// content.relId;
// content.relType;
// // ScrollToBottom
// // FromPage
let taskAction: Action = {
type: 'JUMP_INNER_NEW_PAGE',
params: {
...
...
@@ -172,20 +164,15 @@ export class ProcessUtils {
}
private static async gotoLive(content: ContentDTO) {
const liveDetail = await LiveModel.getLiveDetails(content?.objectId || '', content?.relId || '', content?.relType || '')
const liveStyle = liveDetail[0].liveInfo.liveStyle
const liveState = liveDetail[0].liveInfo.liveState
console.error('liveDetail===', liveDetail)
// const liveDetail = await LiveModel.getLiveDetails(content?.objectId || '', content?.relId || '', content?.relType || '')
// const liveStyle = liveDetail[0].liveInfo.liveStyle
// const liveState = liveDetail[0].liveInfo.liveState
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 2,
contentID: content?.objectId,
liveStyle: liveState === 'wait' ? 0 : liveStyle,
//
liveStyle: liveState === 'wait' ? 0 : liveStyle,
extra: {
relType: content?.relType,
relId: content?.relId,
...
...
sight_harmony/commons/wdWebComponent/src/main/ets/pages/JsBridgeBiz.ets
View file @
e64d7c8
...
...
@@ -3,8 +3,7 @@ import { Message } from 'wdJsBridge/src/main/ets/bean/Message';
import { Logger } from 'wdKit';
import { H5CallNativeType } from './H5CallNativeType';
import { ContentDTO } from 'wdBean';
//TODO 这里引用了 features模块,是否考虑将跳转抽到公共模块
import { ProcessUtils } from '../../../../../../features/wdComponent/src/main/ets/utils/ProcessUtils';
import { ProcessUtils } from 'wdRouter/src/main/ets/utils/ProcessUtils';
const TAG = 'JsBridgeBiz'
...
...
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebComponent.ets
View file @
e64d7c8
...
...
@@ -7,7 +7,7 @@ import { performJSCallNative } from './JsBridgeBiz';
import { H5CallNativeType } from './H5CallNativeType';
import { Message } from 'wdJsBridge/src/main/ets/bean/Message';
const TAG = 'WdWeb
Local
Component';
const TAG = 'WdWebComponent';
@Component
export struct WdWebComponent {
...
...
@@ -85,9 +85,10 @@ export struct WdWebComponent {
onPageBegin: (url?: string) => void = () => {
Logger.debug(TAG, 'onPageBegin');
this.registerHandlers();
// setTimeout(() => {
BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)
// }, 100)
//有时序问题 必须延时执行
setTimeout(() => {
BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)
}, 200)
}
onPageEnd: (url?: string) => void = () => {
Logger.debug(TAG, 'onPageEnd');
...
...
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
View file @
e64d7c8
...
...
@@ -102,9 +102,10 @@ export struct WdWebLocalComponent {
onPageBegin: (url?: string) => void = () => {
Logger.debug(TAG, 'onPageBegin');
this.registerHandlers();
// setTimeout(() => {
BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)
// }, 100)
//有时序问题 必须延时执行
setTimeout(() => {
BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)
}, 200)
}
onPageEnd: (url?: string) => void = () => {
Logger.debug(TAG, 'onPageEnd');
...
...
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
View file @
e64d7c8
...
...
@@ -8,7 +8,7 @@ import media from '@ohos.multimedia.media';
import { OperRowListView } from './view/OperRowListView';
import { WDPlayerController } from 'wdPlayer/Index';
import { ContentConstants } from '../constants/ContentConstants';
import { ProcessUtils } from '
../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
const TAG = 'DynamicDetailComponent'
...
...
sight_harmony/features/wdComponent/src/main/ets/components/broadcast/RecommendLists.ets
View file @
e64d7c8
import { CompInfoBean, CompDTO, CompList } from 'wdBean'
import { CommonConstants } from 'wdConstant';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
/**
* 播报--今日推荐列表
*/
...
...
sight_harmony/features/wdComponent/src/main/ets/components/broadcast/SelectedColumns.ets
View file @
e64d7c8
import { CompInfoBean, CompDTO } from 'wdBean'
import { DateTimeUtils } from 'wdKit/Index'
import { CommonConstants } from 'wdConstant';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
/**
* 精选栏目
*/
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
View file @
e64d7c8
import { ContentDTO, slideShows } from 'wdBean';
import { CommonConstants } from 'wdConstant'
import { DateTimeUtils } from 'wdKit';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
View file @
e64d7c8
...
...
@@ -2,7 +2,7 @@
import { CommonConstants } from 'wdConstant'
import { ContentDTO } from 'wdBean'
import { DateTimeUtils } from 'wdKit'
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
const TAG = 'Card11Component';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card12Component.ets
View file @
e64d7c8
...
...
@@ -2,7 +2,7 @@ import { ContentDTO } from 'wdBean';
import { RmhTitle } from '../cardCommon/RmhTitle'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
import { CommonConstants } from 'wdConstant/Index';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
const TAG = 'Card12Component';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card14Component.ets
View file @
e64d7c8
...
...
@@ -2,7 +2,7 @@ import { ContentDTO } from 'wdBean';
import { RmhTitle } from '../cardCommon/RmhTitle'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
import { CommonConstants } from 'wdConstant/Index';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
const TAG = 'Card14Component';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card15Component.ets
View file @
e64d7c8
import { ContentDTO } from 'wdBean';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import { RmhTitle } from '../cardCommon/RmhTitle'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
import { CommonConstants } from 'wdConstant/Index';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card16Component.ets
View file @
e64d7c8
...
...
@@ -2,7 +2,7 @@ import { ContentDTO } from 'wdBean';
import { RmhTitle } from '../cardCommon/RmhTitle'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
import { CommonConstants } from 'wdConstant/Index';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
const TAG = 'Card16Component';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card17Component.ets
View file @
e64d7c8
...
...
@@ -29,7 +29,8 @@ export struct Card17Component {
// 三个图,
GridRow({ gutter: 2 }) {
GridCol({ span: { xs: 8 } }) {
Image(this.contentDTO.fullColumnImgUrls[0].url)
Image(this.contentDTO.fullColumnImgUrls.length > 0 ?this.contentDTO.fullColumnImgUrls[0].url:'')
.backgroundColor('#f5f5f5')
.width(CommonConstants.FULL_WIDTH)
.aspectRatio(16 / 9)
.borderRadius({
...
...
@@ -39,7 +40,8 @@ export struct Card17Component {
}
GridCol({ span: { xs: 4 } }) {
Image(this.contentDTO.fullColumnImgUrls[1].url)
Image(this.contentDTO.fullColumnImgUrls.length > 1? this.contentDTO.fullColumnImgUrls[1].url:'')
.backgroundColor('#f5f5f5')
.width(CommonConstants.FULL_WIDTH)
.aspectRatio(16 / 9)
.margin({ bottom: 1 })
...
...
@@ -54,7 +56,8 @@ export struct Card17Component {
}
GridCol({ span: { xs: 4 } }) {
Image(this.contentDTO.fullColumnImgUrls[2].url)
Image(this.contentDTO.fullColumnImgUrls.length > 2? this.contentDTO.fullColumnImgUrls[2].url:'')
.backgroundColor('#f5f5f5')
.width(CommonConstants.FULL_WIDTH)
.aspectRatio(16 / 9)
.margin({ top: 1 })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
View file @
e64d7c8
import { ContentDTO, FullColumnImgUrlDTO } from 'wdBean';
import { RmhTitle } from '../cardCommon/RmhTitle'
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import { CommonConstants } from 'wdConstant/Index';
const TAG = 'Card19Component';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card20Component.ets
View file @
e64d7c8
...
...
@@ -2,7 +2,7 @@ import { ContentDTO } from 'wdBean';
import { RmhTitle } from '../cardCommon/RmhTitle'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
import { CommonConstants } from 'wdConstant/Index';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
const TAG = 'Card20Component';
/**
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card21Component.ets
View file @
e64d7c8
import { ContentDTO } from 'wdBean';
import { CommonConstants, CompStyle } from 'wdConstant';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import { RmhTitle } from '../cardCommon/RmhTitle'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
View file @
e64d7c8
//全标题 "appStyle":"2",
import { ContentDTO } from 'wdBean';
import { CommonConstants } from 'wdConstant/Index';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
const TAG: string = 'Card2Component';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
View file @
e64d7c8
import { ContentDTO } from 'wdBean';
import { CommonConstants } from 'wdConstant'
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
/**
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card4Component.ets
View file @
e64d7c8
import { ContentDTO, FullColumnImgUrlDTO } from 'wdBean';
import { CommonConstants } from 'wdConstant/Index';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
const TAG: string = 'Card4Component';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
View file @
e64d7c8
import { ContentDTO } from 'wdBean';
import { CommonConstants } from 'wdConstant';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
const TAG: string = 'Card5Component';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
View file @
e64d7c8
import { ContentDTO } from 'wdBean';
import { CommonConstants, CompStyle } from 'wdConstant';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
const TAG: string = 'Card6Component-Card13Component';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
View file @
e64d7c8
import { ContentDTO, slideShows } from 'wdBean';
import { CommonConstants } from 'wdConstant'
import { DateTimeUtils } from 'wdKit';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
/**
* 时间链卡--CompStyle: 09
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
View file @
e64d7c8
...
...
@@ -2,7 +2,7 @@ import { CompDTO, ContentDTO, } from 'wdBean';
import { BreakpointConstants, CommonConstants, DurationEnum } from 'wdConstant';
import { BreakPointType, Logger } from 'wdKit';
import { CompUtils } from '../../utils/CompUtils';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import { EmptyComponent } from '../view/EmptyComponent';
const TAG = 'Zh_Carousel_Layout-01';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout02.ets
View file @
e64d7c8
import { CompDTO, ContentDTO } from 'wdBean';
import { CommonConstants } from 'wdConstant/Index';
import { Logger } from 'wdKit/Index';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import PageViewModel from '../../viewmodel/PageViewModel';
const TAG = 'Zh_Grid_Layout-02';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout03.ets
View file @
e64d7c8
...
...
@@ -2,7 +2,7 @@ import { Action, CompDTO, ContentDTO, Params } from 'wdBean';
import { CompStyle } from 'wdConstant';
import { Logger } from 'wdKit';
import { WDRouterRule } from 'wdRouter';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
const TAG = 'Zh_Grid_Layout-03';
const FULL_PARENT: string = '100%';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleColumn04.ets
View file @
e64d7c8
import { CompDTO, ContentDTO } from 'wdBean';
import { CommonConstants } from 'wdConstant';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
const TAG = 'Zh_Single_Column-04';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
View file @
e64d7c8
...
...
@@ -4,7 +4,7 @@ import { HttpUrlUtils } from 'wdNetwork/Index';
import { postInteractAccentionOperateParams } from 'wdBean';
import { PageRepository } from '../../repository/PageRepository';
import { CommonConstants } from 'wdConstant/Index';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
/**
* 小视频横划卡
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow04.ets
View file @
e64d7c8
import { CompDTO, ContentDTO } from 'wdBean';
import { CommonConstants } from 'wdConstant';
import { DateTimeUtils } from 'wdKit';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
/**
* 本地精选卡
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
View file @
e64d7c8
...
...
@@ -5,7 +5,7 @@ import { postInteractAccentionOperateParams } from 'wdBean';
import { PageRepository } from '../../repository/PageRepository';
import { DateTimeUtils } from 'wdKit/Index';
import { CommonConstants } from 'wdConstant/Index';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
/**
* 精选评论卡
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageMoreFunctionUI.ets
View file @
e64d7c8
import MinePageMoreFunctionModel from '../../viewmodel/MinePageMoreFunctionModel'
import { WDRouterRule, WDRouterPage } from 'wdRouter'
import { Action, Params } from 'wdBean';
import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO';
import { Params } from 'wdBean';
@Component
export default struct MinePageMoreFunctionUI {
...
...
@@ -70,18 +69,12 @@ export default struct MinePageMoreFunctionUI {
}
.onClick(() => {
console.log(index + "")
if (index == 0) {
// WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
} else if (index == 1) {
// WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
} else if (index == 2) {
} else if (index == 3) { //设置
if (item.msg == "设置") { //设置
let params: Params = {
pageID: 'mainSetting'
}
WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params)
}else if (i
ndex == 4
) { // 关于
}else if (i
tem.msg == "关于"
) { // 关于
WDRouterRule.jumpWithPage(WDRouterPage.aboutPage)
}
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePagePersonFunctionUI.ets
View file @
e64d7c8
...
...
@@ -83,9 +83,11 @@ export default struct MinePagePersonFunctionUI {
.height('117lpx')
})
}
.rowsTemplate('1fr 1fr')
// .rowsTemplate('1fr 1fr')
.rowsTemplate('1fr')
.columnsTemplate('1fr 1fr 1fr 1fr')
.height('234lpx')
// .height('234lpx')
.height('167lpx')
.margin({top:'31lpx',left:'23lpx',right:'23lpx' })
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
View file @
e64d7c8
...
...
@@ -119,6 +119,7 @@ export default struct MinePageUserSimpleInfoUI {
.width('50lpx')
.height('50lpx')
}.width('131lpx')
.visibility(Visibility.Hidden)
}.backgroundColor($r('app.color.white'))
.setFullWidth()
.padding({top:'31lpx',left:'46lpx'})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
View file @
e64d7c8
...
...
@@ -3,7 +3,7 @@ import { CommonConstants, ConfigConstants, ScreenType } from 'wdConstant';
import { Logger } from 'wdKit';
import { CompUtils } from '../../utils/CompUtils';
import { WDRouterRule } from 'wdRouter';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
const TAG: string = 'CardView';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserIntroductionPage.ets
View file @
e64d7c8
...
...
@@ -51,11 +51,7 @@ struct EditUserIntroductionPage {
.borderRadius(5)
.margin(30)
.onClick(()=>{
let currentUserInfo:editModel = new editModel()
currentUserInfo.userExtend.introduction = this.introduction
currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_intro
this.updateEditModel(currentUserInfo)
this.updateEditModel()
let params: editModelParams = {
introduction: this.introduction
}
...
...
@@ -68,7 +64,10 @@ struct EditUserIntroductionPage {
}
updateEditModel(Info:editModel){
EditInfoViewModel.updateUserInfo(Info)
updateEditModel(){
let currentUserInfo:editModel = new editModel()
currentUserInfo.userExtend.introduction = this.introduction
currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_intro
EditInfoViewModel.updateUserInfo(currentUserInfo)
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserNikeNamePage.ets
View file @
e64d7c8
...
...
@@ -2,6 +2,8 @@ import { CustomTitleUI } from '../reusable/CustomTitleUI'
import router from '@ohos.router'
import { editModel, editModelParams, WDEditDataModelType } from '../../model/EditInfoModel'
import EditInfoViewModel from '../../viewmodel/EditInfoViewModel';
// import { encryptMessage } from '../../../utils/cryptoUtil'
import { encryptMessage } from 'wdLogin/src/main/ets/utils/cryptoUtil'
@Entry
@Component
struct EditUserNikeNamePage {
...
...
@@ -51,25 +53,24 @@ struct EditUserNikeNamePage {
.borderRadius(5)
.margin(30)
.onClick(()=>{
///内部更新
let currentUserInfo:editModel = new editModel()
currentUserInfo.userExtend.introduction = this.nikeName
currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_nickname
this.updateEditModel(currentUserInfo)
let params: editModelParams = {
userName: this.nikeName
}
router.back({
url:'',
params:params
})
this.updateEditModel()
})
}
}
updateEditModel(Info:editModel){
EditInfoViewModel.updateUserInfo(Info)
async updateEditModel(){
let currentUserInfo:editModel = new editModel()
currentUserInfo.userName = await encryptMessage(this.nikeName);
currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_nickname
EditInfoViewModel.updateUserInfo(currentUserInfo).then(()=>{
let params: editModelParams = {
userName: this.nikeName
}
router.back({
url:'',
params:params
})
})
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/LiveMorePage.ets
View file @
e64d7c8
import { ContentDTO } from 'wdBean';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import { CommonConstants } from 'wdConstant/Index';
import PageViewModel from '../../viewmodel/PageViewModel';
import RefreshLayout from '../page/RefreshLayout';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/ReserveMorePage.ets
View file @
e64d7c8
import { ContentDTO } from 'wdBean';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import { CommonConstants } from 'wdConstant/Index';
import PageViewModel from '../../viewmodel/PageViewModel';
import RefreshLayout from '../page/RefreshLayout';
...
...
@@ -7,6 +7,7 @@ import { RefreshLayoutBean } from '../page/RefreshLayoutBean';
import PageModel from '../../viewmodel/PageModel';
import { LazyDataSource } from 'wdKit/Index';
import { router } from '@kit.ArkUI';
import { LiveModel } from '../../viewmodel/LiveModel';
const TAG: string = 'ReserveMorePage';
...
...
@@ -29,6 +30,8 @@ struct ReserveMorePage {
pageSize: number = 20;
operDataList: ContentDTO[] = [];
title: string = '预约列表'
//是否预约过直播
@State isAppointmentLive: boolean = false
@State contentDTO: ContentDTO = {
// appStyle: '15',
// coverType: 1,
...
...
@@ -86,9 +89,8 @@ struct ReserveMorePage {
// .title('直播列表')
Column() {
this.TabbarNormal()
Column() {
this.TabbarNormal()
this.ListLayout()
}
.padding({
...
...
@@ -200,7 +202,7 @@ struct ReserveMorePage {
.margin(12)
Flex({ justifyContent: FlexAlign.Center }) {
Text('预约')
Text(
this.isAppointmentLive ? '已预约' :
'预约')
.fontSize(12)
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
...
...
@@ -208,6 +210,9 @@ struct ReserveMorePage {
.height(24)
.fontColor(Color.White)
.textAlign(TextAlign.Center)
.onClick(() => {
this.liveAppointment(item)
})
}
.width(52)
.backgroundColor('#ED2800')
...
...
@@ -255,6 +260,22 @@ struct ReserveMorePage {
}
}
async liveAppointment(item: ContentDTO) {
// this.liveViewModel.liveAppointment(
// this.liveDetailsBean.reLInfo ? this.liveDetailsBean.reLInfo.relId : '',
// this.liveDetailsBean.newsId,
// !this.isAppointmentLive).then(
// (data) => {
// if (data.success) {
// this.isAppointmentLive = !this.isAppointmentLive
// }
// },
// () => {
//
// })
const liveDetail = await LiveModel.liveAppointment(item?.relId || '', item?.objectId || '', this.isAppointmentLive || false)
}
/*导航栏*/
@Builder
TabbarNormal() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/BigPicCardComponent.ets
View file @
e64d7c8
import { CompDTO, ContentDTO } from 'wdBean';
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
import { CardParser } from '../CardParser';
const TAG: string = 'BigPicCardComponent';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
View file @
e64d7c8
import { CommonConstants } from 'wdConstant'
import { ContentDTO, CompDTO } from 'wdBean'
import { ProcessUtils } from '
../../utils/ProcessUtils
';
import { ProcessUtils } from '
wdRouter
';
@Component
export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
View file @
e64d7c8
...
...
@@ -6,6 +6,8 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'
import { LiveModel } from '../../viewmodel/LiveModel'
import { ContentConstants } from '../../constants/ContentConstants'
import { ProcessUtils } from 'wdRouter';
@Component
export struct LiveHorizontalCardComponent {
...
...
@@ -25,7 +27,7 @@ export struct LiveHorizontalCardComponent {
.fontWeight(600)
}
if (this.compDTO.
operDataList.length > 2
) {
if (this.compDTO.
dataSourceType === 'LIVE_HORIZONTAL_CARD' || this.compDTO.dataSourceType === 'LIVE_MONTHLY_RANKING'
) {
Row() {
Text("更多")
.fontSize($r("app.float.font_size_14"))
...
...
@@ -118,26 +120,34 @@ export struct LiveHorizontalCardComponent {
async gotoLive(content: ContentDTO) {
const liveDetail = await LiveModel.getLiveDetails(content?.objectId || '', content?.relId || '', content?.relType || '')
const liveStyle = liveDetail[0].liveInfo.liveStyle
const liveState = liveDetail[0].liveInfo.liveState
if (content && content.objectType) {
if (content.objectType === ContentConstants.TYPE_LIVE) {
if (liveDetail && liveDetail[0] && liveDetail[0].liveInfo) {
const liveStyle = liveDetail[0].liveInfo.liveStyle
const liveState = liveDetail[0].liveInfo.liveState
console.error('liveDetail===', liveDetail)
console.error('liveDetail===', liveDetail)
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 2,
contentID: content?.objectId,
liveStyle: liveState === 'wait' ? 0 : liveStyle,
extra: {
relType: content?.relType,
relId: content?.relId,
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
// Logger.debug(TAG, `gotoLive, ${content.objectId}`);
}
} else if (content.objectType === ContentConstants.TYPE_TELETEXT) {
ProcessUtils.processPage(content)
}
}
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 2,
contentID: content?.objectId,
liveStyle: liveState === 'wait' ? 0 : liveStyle,
extra: {
relType: content?.relType,
relId: content?.relId,
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
// Logger.debug(TAG, `gotoLive, ${content.objectId}`);
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalReservationComponent.ets
View file @
e64d7c8
...
...
@@ -26,7 +26,7 @@ export struct LiveHorizontalReservationComponent {
.fontWeight(600)
}
if (this.compDTO.
operDataList.length > 2
) {
if (this.compDTO.
dataSourceType === 'LIVE_RESERVATION'
) {
Row() {
Text("更多")
.fontSize($r("app.float.font_size_14"))
...
...
sight_harmony/features/wdComponent/src/main/ets/model/MinePageDatasModel.ets
View file @
e64d7c8
...
...
@@ -62,10 +62,10 @@ class MinePageDatasModel{
this.personalData.push(new MinePagePersonalFunctionsItem("评论",$r('app.media.mine_comment_icon')))
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_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')))
return this.personalData
}
...
...
@@ -93,9 +93,9 @@ class MinePageDatasModel{
if(this.moreData.length === 5){
return this.moreData
}
this.moreData.push(new MinePageMoreFunctionModel("扫一扫",$r('app.media.mine_scan')))
this.moreData.push(new MinePageMoreFunctionModel("我的奖品",$r('app.media.mine_mygift')))
this.moreData.push(new MinePageMoreFunctionModel("意见反馈",$r('app.media.mine_suggest')))
// this.moreData.push(new MinePageMoreFunctionModel("扫一扫",$r('app.media.mine_scan')))
// this.moreData.push(new MinePageMoreFunctionModel("我的奖品",$r('app.media.mine_mygift')))
// this.moreData.push(new MinePageMoreFunctionModel("意见反馈",$r('app.media.mine_suggest')))
this.moreData.push(new MinePageMoreFunctionModel("设置",$r('app.media.mine_setting')))
this.moreData.push(new MinePageMoreFunctionModel("关于",$r('app.media.mine_about')))
return this.moreData
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/LiveModel.ets
View file @
e64d7c8
import HashMap from '@ohos.util.HashMap';
import { HttpUrlUtils, ResponseDTO } from 'wdNetwork';
import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest';
import { Logger } from 'wdKit';
import { Logger
, ToastUtils
} from 'wdKit';
import { LiveDetailsBean } from 'wdBean/Index';
const TAG = 'LiveModel'
...
...
@@ -35,5 +35,36 @@ export class LiveModel {
})
})
}
/**
* 直播预约/取消预约
* @param relationId
* @param mLiveId
* @param isSubscribe
* @returns
*/
static liveAppointment(relationId: string, liveId: string, isSubscribe: boolean) {
let params: Record<string, string> = {};
params['relationId'] = relationId
params['liveId'] = liveId
params['isSubscribe'] = `${isSubscribe}`
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return new Promise<ResponseDTO<string>>((success, fail) => {
HttpRequest.post<ResponseDTO<string>>(
HttpUrlUtils.getLiveAppointmentUrl(),
params,
headers).then((data: ResponseDTO<string>) => {
if (data.code != 0) {
fail(data.message)
ToastUtils.shortToast(data.message)
return
}
success(data)
}, (error: Error) => {
fail(error.message)
Logger.debug(TAG + ":error ", error.toString())
})
})
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/MyCollectionViewModel.ets
View file @
e64d7c8
...
...
@@ -53,7 +53,11 @@ class MyCollectionViewModel {
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders()
WDHttp.post<ResponseDTO>(HttpUrlUtils.getExecuteCollcetUrl(),params,headers).then((navResDTO: ResponseDTO) => {
if (navResDTO.code == 0) {
promptAction.showToast({ message: '删除成功' })
if(params.status === 1){
promptAction.showToast({ message: '收藏成功' })
} else {
promptAction.showToast({ message: '删除成功' })
}
}
})
.catch((error: Error) => {
...
...
Please
register
or
login
to post a comment