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
liyubing
2024-06-06 15:57:09 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
da1ba84c7ad6367c6c1b0598fafc319c1404655b
da1ba84c
2 parents
b1228d0c
354138e2
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
205 additions
and
173 deletions
sight_harmony/commons/wdConstant/src/main/module.json5
sight_harmony/commons/wdJsBridge/src/main/module.json5
sight_harmony/commons/wdKit/src/main/module.json5
sight_harmony/commons/wdNetwork/src/main/module.json5
sight_harmony/commons/wdRouter/src/main/module.json5
sight_harmony/commons/wdShareBase/src/main/module.json5
sight_harmony/commons/wdWebComponent/src/main/module.json5
sight_harmony/features/wdBean/src/main/module.json5
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow03.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.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/pages/OtherNormalUserHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/SearchCreatorPage.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/MineCommentListDetailItem.ets
sight_harmony/features/wdComponent/src/main/module.json5
sight_harmony/features/wdDetailPlayApi/src/main/module.json5
sight_harmony/features/wdDetailPlayLive/src/main/module.json5
sight_harmony/features/wdDetailPlayShortVideo/src/main/module.json5
sight_harmony/features/wdDetailPlayVod/src/main/module.json5
sight_harmony/features/wdHwAbility/src/main/module.json5
sight_harmony/features/wdLayout/src/main/module.json5
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginProtocolWebview.ets
sight_harmony/features/wdLogin/src/main/module.json5
sight_harmony/features/wdPlayer/src/main/module.json5
sight_harmony/features/wdShare/src/main/module.json5
sight_harmony/features/wdTracking/src/main/module.json5
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchInterestsHobbiesPage.ets
sight_harmony/products/phone/src/main/ets/pages/view/CustomDialogComponent.ets
sight_harmony/products/phone/src/main/ets/pages/view/MultiPictureDetailPageComponent.ets
sight_harmony/products/phone/src/main/module.json5
sight_harmony/commons/wdConstant/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
...
...
sight_harmony/commons/wdJsBridge/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
]
}
}
\ No newline at end of file
...
...
sight_harmony/commons/wdKit/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
...
...
sight_harmony/commons/wdNetwork/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
...
...
sight_harmony/commons/wdRouter/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
...
...
sight_harmony/commons/wdShareBase/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
...
...
sight_harmony/commons/wdWebComponent/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
...
...
sight_harmony/features/wdBean/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
View file @
da1ba84
...
...
@@ -233,7 +233,8 @@ struct createImg {
})
}
}
} else if (this.fullColumnImgUrls.length === 4) {
} else if (this.fullColumnImgUrls.length === 5) {
// 四图卡里面塞了一张补位卡
GridCol({
span: { xs: 4 }
}) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
View file @
da1ba84
...
...
@@ -53,7 +53,7 @@ export struct Card5Component {
}
)
.aspectRatio(343 / 225)
if (!!this.titleShowPolicy) {
if (!!this.titleShowPolicy
|| this.titleShowPolicy === null
) {
Row()
.borderRadius(
{
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
View file @
da1ba84
...
...
@@ -273,14 +273,14 @@ struct indicatorAnimations {
if (this.isAutoPlay) {
setTimeout(() => {
this.leftW = '100%'
this.centerFontSize = 1
1
this.centerFontSize = 1
0
}, 0)
setTimeout(() => {
this.rightW = '100%'
}, 1500)
} else {
this.leftW = '100%'
this.centerFontSize = 1
1
this.centerFontSize = 1
0
this.rightW = '100%'
}
...
...
@@ -307,7 +307,7 @@ struct indicatorAnimations {
Text(this.index + 1 < 10 ? `0${this.index + 1}` : `${this.index + 1}`)
.fontSize(this.centerFontSize)
.fontColor($r('app.color.white'))
.width(1
6
)
.width(1
1
)
.textAlign(TextAlign.Center)
.margin({
bottom: -2
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
View file @
da1ba84
...
...
@@ -153,8 +153,8 @@ export struct ZhSingleRow02 {
.padding({
left: $r('app.float.card_comp_pagePadding_lf'),
// right: $r('app.float.card_comp_pagePadding_lf'),
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
top: 8,
bottom: 8
})
.backgroundColor($r('app.color.white'))
.margin({ bottom: 8 })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow03.ets
View file @
da1ba84
...
...
@@ -244,6 +244,7 @@ export struct ZhSingleRow03 {
.width(154)
.height(60)
.maxLines(3)
.fontSize(15)
.textOverflow({overflow: TextOverflow.Ellipsis})
}
.margin({bottom: 16})
...
...
@@ -254,8 +255,10 @@ export struct ZhSingleRow03 {
Text(this.format(new Date(item.liveInfo.liveStartTime).getTime()))
.margin({right: 6})
.fontColor(0x000000)
.fontSize(1
3
)
.fontSize(1
2
)
.textAlign(TextAlign.Start)
.fontFamily('PingFang SC-Semibold')
.fontWeight(600)
Image($r('app.media.timeline_rect'))
.width(4)
.height(3)
...
...
@@ -263,10 +266,13 @@ export struct ZhSingleRow03 {
Text(item.liveInfo.liveStartTime.split(' ')[1].slice(0, 5))
.margin({right: 6})
.fontColor(0x000000)
.fontSize(13)
.fontSize(12)
.fontFamily('PingFang SC-Semibold')
.fontWeight(600)
Text('开始直播')
.fontColor(0xC8C8C8)
.fontSize(13)
.fontSize(12)
.fontFamily('PingFang SC-Semibold')
}
Row() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
View file @
da1ba84
...
...
@@ -57,7 +57,6 @@ export struct OtherHomePageBottomCommentComponent {
this.curPageNum = 1;
this.hasMore = true
this.isGetRequest = false
this.data_comment.clear()
if (!this.isLoading){
this.getNewPageData()
...
...
@@ -134,6 +133,8 @@ export struct OtherHomePageBottomCommentComponent {
let object = new OtherUserCommentListRequestItem("", 20, this.curPageNum, time, "1", this.curUserId)
MinePageDatasModel.getOtherCommentListData(object, getContext(this)).then((value) => {
if (this.curPageNum === 1) this.data_comment.clear()
if (!this.data_comment || value.list.length == 0) {
this.hasMore = false
this.isLoading = false
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
View file @
da1ba84
...
...
@@ -142,11 +142,11 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.textAlign(TextAlign.Start)
.margin({ top: 8 })
.width(150)
.width(
this.compDTO.operDataList.length == 2 ? 210 :
150)
.lineHeight(19)
.height(42)
.lineHeight(21)
}
.height(134)
.padding({ right: 16 })
// .offset({x:16})
.onClick(() => {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
View file @
da1ba84
...
...
@@ -146,16 +146,18 @@ export struct LiveHorizontalCardComponent {
Column() {
Stack({ alignContent: Alignment.BottomEnd }) {
Image(this.loadImg ? item.coverUrl : '')
.backgroundColor(0xf5f5f5)
.backgroundColor(
this.loadImg ? 0xffffff :
0xf5f5f5)
.aspectRatio(16 / 9)
.width(this.compDTO.operDataList.length == 2 ? 210 : 150)
.borderRadius(4)
.objectFit(ImageFit.Cover)
// .borderRadius(4)
.objectFit(ImageFit.Contain)
CardMediaInfo({
livePeopleNum:false,
contentDTO: item
})
}
.borderRadius(4)
.border({width: 1, color: 0xf5f5f5})
Text(item.newsTitle)
.fontSize($r("app.float.font_size_14"))
...
...
@@ -166,9 +168,9 @@ export struct LiveHorizontalCardComponent {
.textAlign(TextAlign.Start)
.margin({ top: 8 })
.width(this.compDTO.operDataList.length == 2 ? 210 : 150)
.height(42)
.lineHeight(21)
}
.height(134)
.padding({ right: 16 })
.onClick(() => {
InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/OtherNormalUserHomePage.ets
View file @
da1ba84
...
...
@@ -16,10 +16,10 @@ const TAG = "OtherNormalUserHomePage"
struct OtherNormalUserHomePage {
@State params:Record<string, string> = router.getParams() as Record<string, string>;
@Watch('change') @State curUserId: string = '-1';
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
pageShowTime:number = 0;
pageHideTime:number = 0;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
onPageShow() {
this.curUserId = this.params?.['userId'];
...
...
@@ -68,7 +68,7 @@ struct OtherNormalUserHomePage {
Stack({ alignContent: Alignment.Top }){
Image($r('app.media.title_bg'))
.width('100%')
.height(
'355lpx'
)
.height(
`calc(${295 + this.topSafeHeight + 'lpx'})`
)
.objectFit(ImageFit.Cover)
Row()
...
...
@@ -83,7 +83,7 @@ struct OtherNormalUserHomePage {
Stack({ alignContent: Alignment.Top }){
this.MineHomeTitleTransparent()
this.MineHomeTitleWhite()
}
}
.margin({top:px2vp(this.topSafeHeight)})
Scroll() {
Column() {
...
...
@@ -175,7 +175,7 @@ struct OtherNormalUserHomePage {
this.tileOpacity = persent
}
})
.backgroundColor($r('app.color.color_transparent'))
//
.backgroundColor($r('app.color.color_transparent'))
.height('184lpx')
.width('100%')
.padding({ left: '6lpx' })
...
...
@@ -184,7 +184,7 @@ struct OtherNormalUserHomePage {
if(StringUtils.isNotEmpty(this.desc)){
Column() {
Row() {
Text(this.desc)
Text(
'简介:'+
this.desc)
.fontSize('27lpx')
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/SearchCreatorPage.ets
View file @
da1ba84
...
...
@@ -26,6 +26,8 @@ struct SearchCreatorPage {
@State isLoading: boolean = false
@State hasMore: boolean = true
curPageNum: number = 1;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
onPageShow() {
this.keyword = this.params?.pageID;
...
...
@@ -154,51 +156,57 @@ struct SearchCreatorPage {
}
build() {
Column() {
CustomTitleUI({ titleName: "全部结果" })
Divider()
.width('100%')
.height('1lpx')
.color($r('app.color.color_F5F5F5'))
.strokeWidth('1lpx')
Column(){
if(this.count === 0){
ListHasNoMoreDataUI({style:2})
.height('100%')
}else{
List({ space: 3 }) {
LazyForEach(this.data, (item: FollowListDetailItem, index: number = 0) => {
ListItem() {
FollowChildComponent({data: item,type:1})
}
.onClick(() => {
})
}, (item: FollowListDetailItem, index: number) => index.toString())
Column(){
Column() {
CustomTitleUI({ titleName: "全部结果" })
Divider()
.width('100%')
.height('1lpx')
.color($r('app.color.color_F5F5F5'))
.strokeWidth('1lpx')
Column(){
if(this.count === 0){
ListHasNoMoreDataUI({style:2})
.height('100%')
}else{
List({ space: 3 }) {
LazyForEach(this.data, (item: FollowListDetailItem, index: number = 0) => {
ListItem() {
FollowChildComponent({data: item,type:1})
}
.onClick(() => {
})
}, (item: FollowListDetailItem, index: number) => index.toString())
//没有更多数据 显示提示
if(!this.hasMore){
ListItem(){
ListHasNoMoreDataUI()
//没有更多数据 显示提示
if(!this.hasMore){
ListItem(){
ListHasNoMoreDataUI()
}
}
}
}.cachedCount(5)
.padding({left:'31lpx',right:'31lpx'})
.layoutWeight(1)
.scrollBar(BarState.Off)
.onReachEnd(()=>{
console.log(TAG,"触底了");
if(!this.isLoading){
this.isLoading = true
//加载分页数据
this.getNewPageData()
}
})
}
}.layoutWeight(1)
}.cachedCount(5)
.padding({left:'31lpx',right:'31lpx'})
.layoutWeight(1)
.scrollBar(BarState.Off)
.onReachEnd(()=>{
console.log(TAG,"触底了");
if(!this.isLoading){
this.isLoading = true
//加载分页数据
this.getNewPageData()
}
})
}
}.layoutWeight(1)
.width('100%')
}
.width('100%')
}
.width('100%')
.height('100%')
.height('100%')
}.width("100%")
.height("100%")
.backgroundColor($r('app.color.color_transparent'))
.padding({top:px2vp(this.topSafeHeight)})
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/MineCommentListDetailItem.ets
View file @
da1ba84
...
...
@@ -2,12 +2,12 @@ import { CommentListItem } from './CommentListItem'
export class MineCommentListDetailItem{
list:CommentListItem[] = []
hasNext: number = 1
pageNum: number = 0
pageSize: number = 20
totalCount: number = 0
constructor(list?:CommentListItem[],pageNum?: number,pageSize?: number,totalCount?: number) {
constructor(list?:CommentListItem[],
hasNext?: number,
pageNum?: number,pageSize?: number,totalCount?: number) {
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
...
...
sight_harmony/features/wdDetailPlayApi/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
...
...
sight_harmony/features/wdDetailPlayLive/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
...
...
sight_harmony/features/wdDetailPlayVod/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
...
...
sight_harmony/features/wdHwAbility/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
...
...
sight_harmony/features/wdLayout/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginProtocolWebview.ets
View file @
da1ba84
...
...
@@ -59,9 +59,12 @@ struct LoginProtocolWebview {
.width(24)
.aspectRatio(1)
.onClick(() => {
if(this.webviewController.accessBackward()){
this.webviewController.backward()
return
if (this.isConnectNetwork){
///无网络状态下 执行webviewController.accessBackward方法 会crash
if(this.webviewController.accessBackward()){
this.webviewController.backward()
return
}
}
router.back();
}).margin({ left: 16 })
...
...
sight_harmony/features/wdLogin/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
...
...
sight_harmony/features/wdPlayer/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
...
...
sight_harmony/features/wdShare/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
...
...
sight_harmony/features/wdTracking/src/main/module.json5
View file @
da1ba84
...
...
@@ -5,8 +5,8 @@
"description"
:
"$string:shared_desc"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchInterestsHobbiesPage.ets
View file @
da1ba84
import {InterestsHobbiesModel, InterestsList} from '../viewModel/InterestsHobbiesModel'
import { WDRouterRule } from 'wdRouter';
import { WDRouterPage } from 'wdRouter';
import { SPHelper } from 'wdKit/Index';
import { SpConstants } from 'wdConstant/Index';
import { NetworkUtil, SPHelper } from 'wdKit/Index';
import { SpConstants, ViewType } from 'wdConstant/Index';
import { CustomToast} from 'wdKit'
import { ButtonOptions, promptAction, window } from '@kit.ArkUI';
import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index';
import { ImageKnifeComponent,ScaleType } from '@ohos/imageknife';
import { EmptyComponent, WDViewDefaultType } from 'wdComponent/Index';
@Entry
@Component
...
...
@@ -16,7 +17,7 @@ struct LaunchInterestsHobbiesPage {
@State interestsArray: InterestsList[] = []
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
dialogToast: CustomDialogController = new CustomDialogController({
builder: CustomToast({
msg: '请先选择您感兴趣的内容哦',
...
...
@@ -72,71 +73,81 @@ struct LaunchInterestsHobbiesPage {
.height('35lpx')
.margin({top:'12lpx'})
Grid( ){
ForEach(this.interestsArray,(item:InterestsList,index:number)=>{
GridItem(){
Stack({alignContent:Alignment.TopStart}){
ImageKnifeComponent({imageKnifeOption:{loadSrc:item.pic?item.pic:'',mainScaleType:ScaleType.FIT_XY}})
.width('100%')
.height('100%')
.backgroundColor(Color.White)
.borderRadius(5)
// Image(item.pic)
// .width('100%')
// .height('100%')
// .backgroundColor(Color.White)
// .borderRadius(5)
Stack(){
Image('')
if(!this.isConnectNetwork){
EmptyComponent({ emptyType: 1,emptyHeight:"60%" ,retry: () => {
this.isConnectNetwork = NetworkUtil.isNetConnected()
}})
.layoutWeight(1)
.width('100%')
}else{
Grid( ){
ForEach(this.interestsArray,(item:InterestsList,index:number)=>{
GridItem(){
Stack({alignContent:Alignment.TopStart}){
ImageKnifeComponent({imageKnifeOption:{loadSrc:item.pic?item.pic:'',mainScaleType:ScaleType.FIT_XY}})
.width('100%')
.height('100%')
.backgroundColor(Color.Black)
.opacity(item.choose?0.5:0)
.backgroundColor(Color.White)
.borderRadius(5)
}
Stack(){
Column({}){
Text(item.name)
.fontSize(18)
.fontColor('#FFFFFF')
.margin({top:'21lpx',left:'19lpx'})
.width('100%')
.height('46lpx')
.fontWeight(FontWeight.Bold)
Text(item.title)
.fontSize('23lpx')
.fontColor('#FFFFFF')
.margin({top:'2lpx',left:'19lpx'})
// Image(item.pic)
// .width('100%')
// .height('100%')
// .backgroundColor(Color.White)
// .borderRadius(5)
Stack(){
Image('')
.width('100%')
.height('31lpx')
Image(item.choose ? $r('app.media.interestsSelected') : $r('app.media.interestsSelectNot'))
.height('32lpx')
.width('32lpx')
.margin({top:'80lpx',left:'120lpx'})
.height('100%')
.backgroundColor(Color.Black)
.opacity(item.choose?0.5:0)
.borderRadius(5)
}
Stack(){
Column({}){
Text(item.name)
.fontSize(18)
.fontColor('#FFFFFF')
.margin({top:'21lpx',left:'19lpx'})
.width('100%')
.height('46lpx')
.fontWeight(FontWeight.Bold)
Text(item.title)
.fontSize('23lpx')
.fontColor('#FFFFFF')
.margin({top:'2lpx',left:'19lpx'})
.width('100%')
.height('31lpx')
Image(item.choose ? $r('app.media.interestsSelected') : $r('app.media.interestsSelectNot'))
.height('32lpx')
.width('32lpx')
.margin({top:'80lpx',left:'120lpx'})
}.justifyContent(FlexAlign.Start)
}
}.justifyContent(FlexAlign.Start)
}
}
}
.width('192lpx')
.height('230lpx')
.borderRadius('8lpx')
.onClick(()=>{
//选择后改变已选择属性
item.choose = !item.choose
this.interestsArray.splice(index,1,item)
this.selectCount = this.interestsArray.filter(item => item.choose).length
})
.width('192lpx')
.height('230lpx')
.borderRadius('8lpx')
.onClick(()=>{
//选择后改变已选择属性
item.choose = !item.choose
this.interestsArray.splice(index,1,item)
this.selectCount = this.interestsArray.filter(item => item.choose).length
})
})
})
}
.width('90%')
.margin({top:'61lpx',bottom:'300lpx'})
.columnsTemplate('1fr 1fr 1fr')
.columnsGap('23lpx')
.rowsGap('23lpx')
.scrollBar(BarState.Off)
}
.width('90%')
.margin({top:'61lpx',bottom:'300lpx'})
.columnsTemplate('1fr 1fr 1fr')
.columnsGap('23lpx')
.rowsGap('23lpx')
.scrollBar(BarState.Off)
}
.width('100%')
.height('100%')
...
...
sight_harmony/products/phone/src/main/ets/pages/view/CustomDialogComponent.ets
View file @
da1ba84
...
...
@@ -110,7 +110,7 @@ export default struct CustomDialogComponent {
.margin({top: 1})
}
.width('528lpx')
.borderRadius('1
5
')
.borderRadius('1
0
')
.backgroundColor(Color.White)
.clip(true)
...
...
sight_harmony/products/phone/src/main/ets/pages/view/MultiPictureDetailPageComponent.ets
View file @
da1ba84
...
...
@@ -321,8 +321,8 @@ export struct MultiPictureDetailPageComponent {
middle: { anchor: "__container__", align: HorizontalAlign.Center }
})
.zIndex(1)
.onChange((index: number) => {
this.swiperIndex = index
.onAnimationStart((index: number, targetIndex: number, extraInfo: SwiperAnimationEvent) => {
this.swiperIndex = targetIndex
})
.onClick(() => {
this.showDownload = !this.showDownload
...
...
sight_harmony/products/phone/src/main/module.json5
View file @
da1ba84
...
...
@@ -6,8 +6,8 @@
"mainElement"
:
"EntryAbility"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
,
"2in1"
//
"tablet"
,
//
"2in1"
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
...
...
Please
register
or
login
to post a comment