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-25 18:04:48 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
c60bc255345ef051fdeb6c770c318f1d1716d738
c60bc255
2 parents
79aaecf3
c84b376a
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
83 additions
and
32 deletions
sight_harmony/commons/wdConstant/src/main/ets/constants/SpConstants.ets
sight_harmony/commons/wdRouter/src/main/ets/utils/AppLinkingManager.ets
sight_harmony/features/wdComponent/src/main/ets/components/CardParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperItemComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/MoreComponent.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/peopleShipHomePage/PeopleShipHomeListComponent.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/OtherNormalUserHomePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerUIComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerVideoControlComponent.ets
sight_harmony/products/phone/src/main/ets/entryability/EntryAbility.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
sight_harmony/products/phone/src/main/ets/pages/view/BottomNavigationComponent.ets
sight_harmony/products/phone/src/main/ets/startupmanager/StartupManager.ets
sight_harmony/commons/wdConstant/src/main/ets/constants/SpConstants.ets
View file @
c60bc25
...
...
@@ -64,4 +64,6 @@ export class SpConstants{
// 个推推送
static GETUI_PUSH_CID = "cid"
static GETUI_PUSH_DEVICE_TOKEN = "deviceToken"
//link
static HAS_LINK="has_link"
}
\ No newline at end of file
...
...
sight_harmony/commons/wdRouter/src/main/ets/utils/AppLinkingManager.ets
View file @
c60bc25
import { Logger } from 'wdKit'
import { Logger
, SPHelper, StringUtils
} from 'wdKit'
import { Want } from '@kit.AbilityKit'
import { url } from '@kit.ArkTS'
import { AppInnerLinkGenerator } from './AppInnerLinkGenerator'
...
...
@@ -6,6 +6,7 @@ import { ContentType } from '../common/ContentType'
import { AppInnerLink } from './AppInnerLink'
import { HttpBizUtil, HttpUrlUtils, ResponseDTO } from 'wdNetwork'
import { ContentDetailDTO } from 'wdBean'
import { SpConstants } from 'wdConstant'
const TAG = "AppLinkingManager"
...
...
@@ -16,6 +17,7 @@ export class AppLinkingManager {
private hasEnterMain = false
private lastUrlObj?: url.URL
private isJumpInnerLink:boolean = true
private static manager: AppLinkingManager
private constructor() {
...
...
@@ -58,13 +60,19 @@ export class AppLinkingManager {
this.comsumeLastUriContent()
}
comsumeLastUriContent() {
comsumeLastUriContent(isJump:boolean = true) {
this.isJumpInnerLink = isJump
Logger.debug(TAG, "尝试消费拉起链接: " + this.lastUrlObj?.toString())
if (!this.lastUrlObj) {
return
}
let path = this.lastUrlObj?.pathname ?? ""
if(!this.isJumpInnerLink && StringUtils.isNotEmpty(path)){
SPHelper.default.save(SpConstants.HAS_LINK, true)
return
}
if (this.dealWithRMHArticle()
|| this.dealWithNormalArticle()
|| this.dealWithCreator()
...
...
@@ -187,7 +195,9 @@ export class AppLinkingManager {
}
jumpInnerLink(innerLink: string) {
if(this.isJumpInnerLink){
Logger.debug(TAG, "即将跳转链接: " + innerLink)
AppInnerLink.jumpWithLink(innerLink)
}
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CardParser.ets
View file @
c60bc25
...
...
@@ -189,7 +189,8 @@ export struct CardParser {
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName,
isPeopleShipHome:this.isPeopleShipHome
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_20) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperItemComponent.ets
View file @
c60bc25
...
...
@@ -46,11 +46,17 @@ export struct ENewspaperItemComponent {
this.contentHeight = event?.contentHeight
}
//
this.isShowSkeleton = false
this.isShowSkeleton = false
})
.objectFit(ImageFit.Contain)
.zIndex(10)
newsSkeleton({showBottom: this.isShowSkeleton})
.visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None)
.width('100%')
.zIndex(1)
if (this.contentWidth !== 0) {
Canvas(this.context)
.width(px2vp(this.contentWidth))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
View file @
c60bc25
...
...
@@ -25,7 +25,6 @@ export struct ENewspaperPageComponent {
@State picHeight: number = 0
@Provide itemPicWidth: number = 0
@Provide itemPicHeight: number = 0
@State isShowSkeleton:boolean = false
@Provide topMargin: number = DisplayUtils.getDeviceHeight()
...
...
@@ -84,7 +83,6 @@ export struct ENewspaperPageComponent {
builder: ENewspaperCalendarDialog({
selectDate: this.selectDate,
onDateChange: (date: RMCalendarBean) => {
this.isShowSkeleton = true
console.log("onDateChange-日历选择弹框", "date:", JSON.stringify(date))
if (date.fullYear && date.month && date.date) {
let month: number = date.month + 1
...
...
@@ -256,7 +254,7 @@ export struct ENewspaperPageComponent {
})
.id('e_newspaper_top')
if (!this.newspaperListBean || !this.newspaperListBean.list || this.newspaperListBean.list.length == 0
|| this.isShowSkeleton
) {
if (!this.newspaperListBean || !this.newspaperListBean.list || this.newspaperListBean.list.length == 0) {
newsSkeleton()
.alignRules({
top: { anchor: "e_newspaper_top", align: VerticalAlign.Bottom },
...
...
@@ -478,7 +476,6 @@ export struct ENewspaperPageComponent {
let listBean =
await NewspaperViewModel.getNewspaperList(this.calendarDate, this.itemPicWidth + 'x' + this.itemPicHeight)
this.newspaperListBean = listBean;
this.isShowSkeleton = false
} else {
this.showToastTip('网络出小差了,请检查网络后重试')
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
View file @
c60bc25
...
...
@@ -23,6 +23,7 @@ export struct Card19Component {
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
isPeopleShipHome: boolean = false;
async aboutToAppear(): Promise<void> {
this.titleInit();
...
...
@@ -47,7 +48,8 @@ export struct Card19Component {
contentDTO: this.contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName,
isPeopleShipHome:this.isPeopleShipHome
}
) // 标题
if (this.contentDTO.newsTitle) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/MoreComponent.ets
View file @
c60bc25
...
...
@@ -118,7 +118,6 @@ export struct MoreComponent {
let contentDTO = MinePageDatasModel.dataTransform(rem,value, photos);
if(value.type != "13"){
this.contentDTO.sameContentList.push(contentDTO)
console.log("ycg","123")
}
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
View file @
c60bc25
...
...
@@ -58,14 +58,14 @@ export default struct MinePageUserSimpleInfoUI {
.alt(this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon'))
.width(64)
.height(64)
.objectFit(ImageFit.Fill)
.borderRadius(32)
.objectFit(ImageFit.Auto)
.clip(new Circle({ width: 64, height: 64 }))
if(StringUtils.isNotEmpty(this.levelHead)){
Image(this.levelHead)
.width(90)
.height(90)
.objectFit(ImageFit.
Cover
)
.objectFit(ImageFit.
Auto
)
// .borderRadius(50)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
View file @
c60bc25
...
...
@@ -9,6 +9,7 @@ import { TrackConstants,
import { WDShare } from 'wdShare/Index';
import { hasClicked, persistentStorage } from '../../utils/persistentStorage';
import { LottieView } from '../lottie/LottieView';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
const TAG: string = 'CardView';
...
...
@@ -398,6 +399,7 @@ export struct PaperSingleColumn999CardView {
@State isRead: boolean = false;//已读状态
@State interactData: InteractDataDTO = new InteractDataDTO
@Consume @Watch('onChangeCommentList') commentList: InteractDataDTO[]
@State loadImg: boolean = false;
getPublishTime(): string {
const publishTimestamp = parseInt(this.item?.publishTime)
...
...
@@ -441,7 +443,7 @@ export struct PaperSingleColumn999CardView {
.margin({ left: 16, right: 16, top: 16 })
if (this.item?.coverUrl) {
Stack({ alignContent: Alignment.BottomEnd }) {
Image(this.
item?.coverUrl
)
Image(this.
loadImg?this.item?.coverUrl:''
)
.borderRadius(5)
.objectFit(ImageFit.Fill)
.aspectRatio(319 / 179) ///图片设计比例
...
...
@@ -624,7 +626,8 @@ export struct PaperSingleColumn999CardView {
})
}
aboutToAppear(): void {
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
this.onChangeCommentList()
this.isRead = hasClicked(this.item.objectId, '')
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeListComponent.ets
View file @
c60bc25
...
...
@@ -96,8 +96,8 @@ export struct PeopleShipHomeListComponent {
startMargin: 0,
endMargin: 0
})
.onChange((index: number) => {
this.currentIndex = index
.onAnimationStart((index: number,targetindex:number) => {
this.currentIndex = targetindex
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
View file @
c60bc25
...
...
@@ -272,9 +272,9 @@ struct MineHomePage {
}
.backgroundColor($r('app.color.white'))
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
trackTabFirstClick(index === 0 ? "评论":"关注")
.onAnimationStart((index: number,targetindex:number) => {
this.currentIndex = targetindex
trackTabFirstClick(targetindex === 0 ? "评论":"关注")
})
.vertical(false)
.barHeight(44)
...
...
@@ -412,11 +412,13 @@ struct MineHomePage {
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight(16)
.textOverflow({overflow:TextOverflow.Ellipsis})
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "head_icon", align: HorizontalAlign.End }
left: { anchor: "head_icon", align: HorizontalAlign.End },
right: { anchor: "rightText", align: HorizontalAlign.Start },
})
.margin({ left: 6 })
.margin({ left: 6
,right:6
})
Text("编辑资料")
.height(22)
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/OtherNormalUserHomePage.ets
View file @
c60bc25
...
...
@@ -221,9 +221,9 @@ struct OtherNormalUserHomePage {
}
.backgroundColor($r('app.color.white'))
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
trackTabFirstClick(index === 0 ? "评论":"关注")
.onAnimationStart((index: number,targetindex:number) => {
this.currentIndex = targetindex
trackTabFirstClick(targetindex === 0 ? "评论":"关注")
})
.vertical(false)
.barHeight('77lpx')
...
...
@@ -341,11 +341,13 @@ struct OtherNormalUserHomePage {
.fontWeight('400lpx')
.fontColor($r('app.color.color_222222'))
.lineHeight('42lpx')
.textOverflow({overflow:TextOverflow.Ellipsis})
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "head_icon", align: HorizontalAlign.End }
left: { anchor: "head_icon", align: HorizontalAlign.End },
right: { anchor: "__container__", align: HorizontalAlign.End },
})
.margin({ left:
'12lpx'
})
.margin({ left:
6,right:6
})
}
.visibility(this.tileOpacity > 0 ? 0 : 1)
.height('84lpx')
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerUIComponent.ets
View file @
c60bc25
...
...
@@ -13,9 +13,26 @@ import { DisplayDirection } from 'wdConstant';
export struct PlayerUIComponent {
private playerController?: WDAliPlayerController
@Provide isSmall:boolean = false
@Consume isShowControl: boolean
@Consume
@Watch('onChangeMenuVisible')
isShowControl: boolean
@Consume isFullScreen: boolean
@Consume displayDirection: DisplayDirection
@State isPlayStatus: boolean = true;
onChangeMenuVisible() {
if (this.displayDirection == DisplayDirection.VERTICAL
|| !this.isShowControl
|| !this.isPlayStatus) {
return
}
let time: number = 0
if (this.isShowControl) {
setTimeout(() => {
this.isShowControl = false
}, 5 * 1000)
} else {
clearTimeout(time)
}
}
aboutToAppear() {
if (!this.playerController) {
return
...
...
@@ -76,7 +93,7 @@ export struct PlayerUIComponent {
.position({ y: '100%' })
.markAnchor({ y: '100%' })
PlayerVideoControlComponent({ playerController: this.playerController
})
PlayerVideoControlComponent({ playerController: this.playerController
,isPlayStatus: $isPlayStatus
})
.visibility(this.isShowControl ? Visibility.Visible : Visibility.Hidden)
.animation({ duration: 500 })
.position({ y: '100%' })
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerVideoControlComponent.ets
View file @
c60bc25
...
...
@@ -13,7 +13,7 @@ export struct PlayerVideoControlComponent {
@State totalTime: string = ''
@State progressVal: number = 0;
//是否处于播放状态中
@
State isPlayStatus: boolean = true
@
Link isPlayStatus?: boolean
@Consume displayDirection: DisplayDirection
@Consume contentDetailData: ContentDetailDTO
@Consume isSmall:boolean
...
...
sight_harmony/products/phone/src/main/ets/entryability/EntryAbility.ets
View file @
c60bc25
...
...
@@ -7,6 +7,7 @@ import { BusinessError } from '@ohos.base';
import { DeviceUtil, EmitterEventId, EmitterUtils, Logger, SPHelper, WindowModel } from 'wdKit';
import { ConfigurationConstant } from '@kit.AbilityKit';
import { StartupManager } from '../startupmanager/StartupManager';
import { AppLinkingManager } from 'wdRouter';
let floatWindowClass: window.Window | null = null;
const TAG = 'EntryAbility'
...
...
@@ -19,7 +20,8 @@ export default class EntryAbility extends UIAbility {
StartupManager.sharedInstance().appAgreedProtocol()
}
Logger.info(TAG, 'Ability onCreate');
//只判断不跳转
AppLinkingManager.sharedInstance().comsumeLastUriContent(false)
// 还没深色模式需求,暂直接不跟随系统。
this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT);
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
View file @
c60bc25
...
...
@@ -59,7 +59,14 @@ struct LaunchPage {
this.timerId = setTimeout(() => {
this.isJumpToAdvertising = true;
let hasLink = SPHelper.default.getSync(SpConstants.HAS_LINK,false)
if(hasLink){
SPHelper.default.deleteSync(SpConstants.HAS_LINK)
WDRouterRule.jumpWithPage(WDRouterPage.mainPage)
}else{
WDRouterRule.jumpWithPage(WDRouterPage.launchAdvertisingPage)
}
// router.pushUrl({
// url: 'pages/LaunchAdvertisingPage'
...
...
sight_harmony/products/phone/src/main/ets/pages/view/BottomNavigationComponent.ets
View file @
c60bc25
...
...
@@ -214,7 +214,7 @@ export struct BottomNavigationComponent {
},
onLoadListener:{
onLoadFailed:(err)=>{
console.error("
ycg","
Load Failed Reason: " + err + " cost " + (new Date().getTime() ) + " milliseconds");
console.error("Load Failed Reason: " + err + " cost " + (new Date().getTime() ) + " milliseconds");
}
}
};
...
...
sight_harmony/products/phone/src/main/ets/startupmanager/StartupManager.ets
View file @
c60bc25
...
...
@@ -108,6 +108,7 @@ export class StartupManager {
appOnDestory() {
Logger.debug(TAG, "App onDestory")
NetworkManager.getInstance().release()
SPHelper.default.deleteSync(SpConstants.HAS_LINK)
}
// 同意隐私协议之后,立即执行必要初始化
...
...
Please
register
or
login
to post a comment