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-04-29 17:58:54 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
c9b345ebe8039f49ebbc642de801b9d5c83e4010
c9b345eb
2 parents
caf33c0d
5a1c885d
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
248 additions
and
58 deletions
sight_harmony/commons/wdWebComponent/src/main/ets/pages/JsBridgeBiz.ets
sight_harmony/features/wdBean/src/main/ets/bean/detail/RmhInfoDTO.ts
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/model/PublishCommentModel.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentCustomDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PeopleShipHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipMainComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipRecommendHeadComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeListComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeNavComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageHeadComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageTopComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/skeleton/DefaultPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
sight_harmony/features/wdComponent/src/main/ets/pages/ShowUserHeaderPage.ets
sight_harmony/products/phone/src/main/ets/pages/SpacialTopicPage.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/JsBridgeBiz.ets
View file @
c9b345e
...
...
@@ -9,13 +9,17 @@ import router from '@ohos.router';
import Url from '@ohos.url'
import { ContentDTO, PhotoListBean } from 'wdBean';
import { handleJsCallAppService } from './JsCallAppService'
import { HttpUtils } from 'wdNetwork/Index';
const TAG = 'JsBridgeBiz'
class AppInfo {
plat: string = ''
system: string = ''
networkStatus: number = 1
screenStatusBarHeight: number = 40 // TODO 这里需要动态获取
screenTabbarSafeHeight: number = 42 // TODO 这里需要动态获取
imei: string = HttpUtils.getImei()
device_id: string = HttpUtils.getDeviceId()
// TODO 完善
}
...
...
sight_harmony/features/wdBean/src/main/ets/bean/detail/RmhInfoDTO.ts
View file @
c9b345e
...
...
@@ -18,4 +18,5 @@ export interface RmhInfoDTO {
rmhName
:
string
;
userId
:
string
;
userType
:
string
;
honoraryIcon
:
string
;
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
View file @
c9b345e
...
...
@@ -97,15 +97,29 @@ export struct DynamicDetailComponent {
.height($r('app.float.margin_32'))
.objectFit(ImageFit.Cover)
.borderRadius($r('app.float.margin_16'))
Image(
$r('app.media.icon_border_test')
)
Image(
this.contentDetailData.rmhInfo?.honoraryIcon
)
.width($r('app.float.margin_48'))
.height($r('app.float.margin_48'))
.objectFit(ImageFit.Cover)
.borderRadius($r('app.float.margin_24'))
if(!StringUtils.isEmpty(this.contentDetailData.rmhInfo?.authIcon)){
Stack() {
Image(this.contentDetailData.rmhInfo?.authIcon)
.width($r('app.float.vp_12'))
.height($r('app.float.vp_12'))
.objectFit(ImageFit.Cover)
}
.width($r('app.float.margin_48'))
.height($r('app.float.margin_48'))
.alignContent(Alignment.BottomEnd)
}
}
.width($r('app.float.margin_48'))
.height($r('app.float.margin_48'))
.alignContent(Alignment.Center)
.onClick(() => {
ProcessUtils.gotoPeopleShipHomePage(this.contentDetailData.rmhInfo == null ?"":this.contentDetailData.rmhInfo.rmhId)
})
Column(){
//昵称
Text(this.contentDetailData.rmhInfo?.rmhName)
...
...
@@ -128,7 +142,7 @@ export struct DynamicDetailComponent {
.margin({right: $r('app.float.margin_6')})
if(!StringUtils.isEmpty(this.followStatus)){
if (this.followStatus == '0') {
Text('关注')
Text('
+
关注')
.width($r('app.float.margin_54'))
.height($r('app.float.margin_24'))
.textAlign(TextAlign.Center)
...
...
@@ -300,7 +314,7 @@ export struct DynamicDetailComponent {
}
}
}
.padding({ left: this.contentDetailData.videoInfo[0].videoLandScape === 1?0:
16
,top: $r('app.float.margin_8')})
.padding({ left: this.contentDetailData.videoInfo[0].videoLandScape === 1?0:
25
,top: $r('app.float.margin_8')})
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.mJumpInfo)
})
...
...
@@ -312,8 +326,8 @@ export struct DynamicDetailComponent {
.fontSize($r('app.float.font_size_12'))
.lineHeight($r('app.float.margin_16'))
.margin({ top: $r('app.float.margin_16')
,left: $r('app.float.margin_16')
,right: $r('app.float.margin_16') })
,left: $r('app.float.vp_12')
,right: $r('app.float.vp_12') })
//微信/朋友圈/微博
Row(){
Image($r('app.media.xxhdpi_pic_wechat'))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
View file @
c9b345e
...
...
@@ -2,6 +2,7 @@ import { ContentDTO, slideShows } from 'wdBean';
import { CommonConstants } from 'wdConstant';
import { ProcessUtils } from 'wdRouter';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
import { CardMediaInfo } from '../cardCommon/CardMediaInfo';
/**
* 大专题卡--CompStyle: 10
...
...
@@ -23,9 +24,6 @@ export struct Card10Component {
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ bottom: 19 })
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.contentDTO)
})
}
// 大图
Stack() {
...
...
@@ -111,12 +109,23 @@ export struct Card10Component {
// 右侧图片
if (item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) {
Image(item.fullColumnImgUrls[0].url)
.width(117)
.height(78)
.objectFit(ImageFit.Cover)
.borderRadius($r('app.float.image_border_radius'))
.margin({ left: 12 })
Stack() {
Image(item.fullColumnImgUrls[0].url)
.width(117)
.height(78)
.objectFit(ImageFit.Cover)
.borderRadius($r('app.float.image_border_radius'))
.margin({ left: 12 })
CardMediaInfo({
contentDTO: {
objectType: String(item.objectType),
videoInfo: { videoDuration: Number(item.videoDuration) as number },
photoNum: Number(item.photoNum),
voiceInfo: { voiceDuration: Number(item.voiceDuration) as number }
} as ContentDTO
})
}
.alignContent(Alignment.BottomEnd)
}
}
.padding({ top: 10, bottom: 10 })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/model/PublishCommentModel.ets
View file @
c9b345e
...
...
@@ -15,7 +15,7 @@ export class publishCommentModel {
/*【迭代二新增】关联的频道id/专题id; 页面必传*/
targetRelObjectId: string = ""
/*【迭代二新增】是否是重点稿件 1是 0否 页面必传*/
keyArticle: string = ''
keyArticle: string = '
0
'
/*内容类别, 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,14:动态(13和14为中文版新增) 页面必传*/
targetType: string = ''
/*评论总数*/
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
View file @
c9b345e
...
...
@@ -9,8 +9,9 @@ import measure from '@ohos.measure'
import { CommentCustomDialog } from './CommentCustomDialog'
import { publishCommentModel } from '../model/PublishCommentModel';
import { ifaa } from '@kit.OnlineAuthenticationKit';
import { HttpUrlUtils } from 'wdNetwork/Index';
import { HttpUrlUtils
, HttpUtils
} from 'wdNetwork/Index';
import NoMoreLayout from '../../page/NoMoreLayout';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
const TAG = 'CommentComponent';
...
...
@@ -559,6 +560,12 @@ struct commentFooterView {
}
.onClick(() => {
// 未登录,跳转登录
const user_id = HttpUtils.getUserId()
if (!user_id) {
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
return
}
commentLikeChange(this.item)
commentViewModel.commentLike(this.item).then(() => {
}).catch(() => {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentCustomDialog.ets
View file @
c9b345e
...
...
@@ -7,17 +7,17 @@ import commentViewModel from '../viewmodel/CommentViewModel'
@Preview
@CustomDialog
export struct CommentCustomDialog {
@ObjectLink publishCommentModel: publishCommentModel
controller?: CustomDialogController
confirm: (value: Record<string, string>) => void = () => {
}
@State private emojiSwitch: boolean = false
textInputController: TextAreaController = new TextAreaController()
@State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 }
aboutToAppear(): void {
// this.textInputController.caretPosition(0)
}
publishCommentRequest() {
...
...
@@ -25,7 +25,7 @@ export struct CommentCustomDialog {
// this.publishCommentModel.commentContent = this.commentText
//TODO 判断类型
this.publishCommentModel.commentType = '2'
commentViewModel.publishComment(this.publishCommentModel).then((model:commentItemModel) => {
commentViewModel.publishComment(this.publishCommentModel).then((model:
commentItemModel) => {
this.publishCommentModel.commentContent = ''
//
...
...
@@ -74,12 +74,13 @@ export struct CommentCustomDialog {
.height(30)
.onClick(() => {
// this.commentText = this.commentText + '神鼎'
this.positionInfo = this.textInputController.getCaretOffset()
this.emojiSwitch = !this.emojiSwitch
if (this.emojiSwitch) {
this.textInputController.stopEditing()
} else {
this.textInputController.caretPosition(this.textInputController.getTextContentRect().x)
//
this.textInputController.caretPosition(this.textInputController.getTextContentRect().x)
}
})
...
...
@@ -116,7 +117,7 @@ export struct CommentCustomDialog {
//表情view
if (this.emojiSwitch) {
emojiView()
emojiView(
{ publishCommentModel: this.publishCommentModel }).height(150
)
}
}.backgroundColor(Color.White)
...
...
@@ -129,8 +130,88 @@ export struct CommentCustomDialog {
@Component
struct emojiView {
@ObjectLink publishCommentModel: publishCommentModel
/*没找到获取系统emoji的方案*/
private emojiString = '😀,😁,😂,😃,😄,😅,😆,😇,😈,😉,😊,😋,😌,😍,😎,😏,😐,😑,😒,😓,😔,😕,😖,😗,😘,😙,😚,😛,😜,😝,😞,😟,😠,😡,😢,😣,😤,😥,😦,😧,😨,😩,😪,😫,😬,😭,😮,😯,😰,😱,😲,😳,😴,😵,😶,😷,😸,😹,😺,😻,😼,😽,😾,😿,🙀,🙅,🙆,🙇,🙈,🙉,🙊,🙋,🙌,🙍,🙎,🙏'
private displayArray: string[][] = []
private swiperController: SwiperController = new SwiperController()
aboutToAppear(): void {
this.displayArray = chunk(this.emojiString.split(','), 20)
//补上删除按钮以及空白占位
let lastElement = this.displayArray.slice(-1)[0];
if (lastElement.length < 20) {
let needLength = (20 - lastElement.length)
for (let index = 0; index < needLength; index++) {
lastElement.push('')
}
}
this.displayArray.forEach(element => {
element.push('删除')
});
}
build() {
// String.fromCodePoint()
Swiper(this.swiperController) {
ForEach(this.displayArray, (array: [], index) => {
Column() {
Grid() {
ForEach(array, (emoji: string, subIndex: number) => {
GridItem() {
Text() {
if (emoji == '删除') {
ImageSpan($r('app.media.wdInput_delete'))
} else {
Span(emoji)
}
}.textAlign(TextAlign.Center).width(30).height(30)
// .backgroundColor(Color.Orange)
}.onClick(() => {
if (emoji == '删除') {
this.publishCommentModel.commentContent = this.publishCommentModel.commentContent.substring(0, this.publishCommentModel.commentContent.length -1)
} else if (emoji == '') {
} else {
this.publishCommentModel.commentContent = this.publishCommentModel.commentContent + emoji
}
})
})
}
.maxCount(6)
.columnsTemplate('1fr 1fr 1fr 1fr 1fr 1fr 1fr')
.rowsGap(10)
.layoutDirection(GridDirection.Row)
Row().height(40)
}
})
}
.indicator(true)
.vertical(false)
.height(140)
}
}
function chunk<T>(array: T[], size: number): T[][] {
const result: T[][] = [];
for (let i = 0; i < array.length; i += size) {
result.push(array.slice(i, i + size));
}
return result;
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
View file @
c9b345e
...
...
@@ -5,12 +5,16 @@ import commentViewModel from '../viewmodel/CommentViewModel'
import { router, window } from '@kit.ArkUI'
import { CustomTitleUI } from '../../reusable/CustomTitleUI'
import { MyCommentDataSource } from '../model/MyCommentDataSource'
import { HttpUrlUtils } from 'wdNetwork/Index'
import { HttpUrlUtils
, HttpUtils
} from 'wdNetwork/Index'
import PageModel from '../../../viewmodel/PageModel'
import { ErrorComponent } from '../../view/ErrorComponent'
import { EmptyComponent , WDViewDefaultType} from '../../view/EmptyComponent'
import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'
import NoMoreLayout from '../../page/NoMoreLayout'
import { CommentCustomDialog } from './CommentCustomDialog'
import { publishCommentModel } from '../model/PublishCommentModel'
import { ifaa } from '@kit.OnlineAuthenticationKit'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
const TAG = 'QualityCommentsComponent';
...
...
@@ -24,9 +28,6 @@ export struct QualityCommentsComponent {
@State hasMore: boolean = true;
@State currentPage: number = 1;
private scroller: Scroller = new Scroller();
@State tileOpacity: number = 0;
firstPositionY: number = 0;
bottomSafeHeight: string = AppStorage.get<number>('bottomSafeHeight') + 'px';
...
...
@@ -34,6 +35,11 @@ export struct QualityCommentsComponent {
lastWindowColor: string = '#ffffff'
currentWindowColor: string = '#FF4202'
@State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource();
@State dialogController: CustomDialogController | null = null;
/*必传*/
@State publishCommentModel: publishCommentModel = new publishCommentModel()
aboutToDisappear(): void {
...
...
@@ -43,13 +49,33 @@ export struct QualityCommentsComponent {
windowClass.setWindowLayoutFullScreen(false)
// windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' })
this.dialogController = null // 将dialogController置空
}
aboutToAppear(): void {
this.fullScreen();
this.getData();
this.showAlert()
}
showAlert(){
this.dialogController = new CustomDialogController({
builder: CommentCustomDialog({
confirm: (value: Record<string, string>) => {
},
publishCommentModel: this.publishCommentModel
}),
autoCancel: true,
alignment: DialogAlignment.Bottom,
customStyle: true,
offset: {
dx: 0,
dy: -20
},
})
}
getData(resolve?: (value: string | PromiseLike<string>) => void){
...
...
@@ -217,7 +243,7 @@ export struct QualityCommentsComponent {
// ListItemGroup({ header: this.titleHeader() })
LazyForEach(this.allDatas, (item: commentItemModel, index: number) => {
ListItem() {
QualityCommentItem({ item: item, index: index }).margin({ left: 12, right: 12 })
QualityCommentItem({ item: item, index: index
, dialogController:this.dialogController, publishCommentModel:this.publishCommentModel
}).margin({ left: 12, right: 12 })
}
})
// 加载更多
...
...
@@ -243,16 +269,6 @@ export struct QualityCommentsComponent {
}
@Builder
testLayout(){
List({ space: 12, scroller:this.scroller }){
LazyForEach(this.allDatas, (item: commentItemModel, index: number) => {
ListItem() {
QualityCommentItem({ item: item, index: index }).margin({ left: 12, right: 12 })
}
})
}
}
}
...
...
@@ -261,6 +277,8 @@ export struct QualityCommentsComponent {
@Component
struct QualityCommentItem {
@ObjectLink publishCommentModel: publishCommentModel
dialogController: CustomDialogController | null = null;
@ObjectLink item: commentItemModel
index: number = 0
...
...
@@ -360,7 +378,20 @@ struct QualityCommentItem {
Row({ space: 16 }) {
Row() {
Image($r('app.media.comment_icon_pinglun')).width(16).height(16)
}
}.onClick(()=>{
this.publishCommentModel.targetId = this.item.targetId
this.publishCommentModel.targetRelId = this.item.targetRelId
this.publishCommentModel.targetTitle = this.item.targetTitle
this.publishCommentModel.targetRelType = this.item.targetRelType
this.publishCommentModel.targetRelObjectId = this.item.targetRelObjectId
this.publishCommentModel.targetType = this.item.targetType
// this.publishCommentModel.keyArticle = this.item.keyArticle
this.publishCommentModel.rootCommentId = this.item.rootCommentId
this.publishCommentModel.parentId = this.item.id
this.dialogController?.open()
})
Row() {
Image($r(this.item.api_status ? 'app.media.comment_like_select' : 'app.media.comment_like_normal'))
...
...
@@ -373,6 +404,12 @@ struct QualityCommentItem {
.margin({ left: 3 })
}
}.onClick(() => {
// 未登录,跳转登录
const user_id = HttpUtils.getUserId()
if (!user_id) {
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
return
}
commentLikeChange(this.item)
commentViewModel.commentLike(this.item).then(() => {
}).catch(() => {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PeopleShipHomePage.ets
View file @
c9b345e
...
...
@@ -99,8 +99,12 @@ struct PeopleShipHomePage {
}
async
aboutToAppear() {
aboutToAppear() {
this.getData()
}
private async getData() {
try {
// 获取页面信息
this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '')
...
...
@@ -117,8 +121,6 @@ struct PeopleShipHomePage {
} catch (exception) {
}
}
findFollowStata(followList: QueryListIsFollowedItem[]) {
...
...
@@ -156,8 +158,10 @@ struct PeopleShipHomePage {
PageRepository.postInteractAccentionOperate(params).then(res => {
if (this.isAttention == '1') {
this.isAttention = '0'
this.detailModel.fansNum -= 1
} else {
this.isAttention = '1'
this.detailModel.fansNum += 1
}
this.isLoadingAttention = false
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
View file @
c9b345e
...
...
@@ -339,8 +339,8 @@ export struct TopNavigationComponent {
}else {
Row() {
Image($r('app.media.icon_search'))
.width(18)
.height(18)
.width('24vp')
.height('24vp')
}
.height('40vp')
.width('40vp')
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipMainComponent.ets
View file @
c9b345e
...
...
@@ -280,6 +280,7 @@ export struct PeopleShipMainComponent {
//批量查询各类型内容动态数据接口
this.checkContentInteractData(listData.list, resolve)
} else {
this.hasMore = false;
this.resolveEnd(true, resolve)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipRecommendHeadComponent.ets
View file @
c9b345e
...
...
@@ -25,12 +25,27 @@ export struct PeopleShipRecommendHeadComponent {
})
}.margin({ top: 12, bottom: 8 })
Text(this.rmhInfo.userName)
.fontColor($r('app.color.color_222222'))
.fontSize($r('app.float.vp_14'))
.fontWeight(600)
.maxLines(1)
.textOverflow({overflow: TextOverflow.Ellipsis})
Row() {
Text(this.rmhInfo.userName)
.fontColor($r('app.color.color_222222'))
.fontSize($r('app.float.vp_14'))
.fontWeight(600)
.maxLines(1)
.textOverflow({overflow: TextOverflow.Ellipsis})
if (this.rmhInfo.authIcon) {
Image(this.rmhInfo.authIcon)
.width('12vp')
.height('12vp')
.borderRadius(6)
.objectFit(ImageFit.Cover)
.margin({
left: '2vp'
})
}
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
Text(this.rmhInfo.introduction)
.fontColor($r('app.color.color_B0B0B0'))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeListComponent.ets
View file @
c9b345e
...
...
@@ -24,7 +24,7 @@ export struct PeopleShipHomeListComponent {
// 列表
else if (this.publishCount == 0) {
// 无数据展示
EmptyComponent({emptyType: 1
3
}).height(DisplayUtils.getDeviceHeight() - this.topHeight)
EmptyComponent({emptyType: 1
2
}).height(DisplayUtils.getDeviceHeight() - this.topHeight)
} else {
Column() {
Column() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeNavComponent.ets
View file @
c9b345e
import router from '@ohos.router'
import { PeopleShipUserDetailData } from 'wdBean'
import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
@Component
export struct PeopleShipHomePageNavComponent {
...
...
@@ -38,8 +39,13 @@ export struct PeopleShipHomePageNavComponent {
iconDiameter: 10,
headPhotoUrl: (this.detailModel.headPhotoUrl && this.detailModel.headPhotoUrl.length > 0 ) ? this.detailModel.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon'),
authIcon: this.detailModel.authIcon
})
.margin({
}).onClick(()=>{
let params = {
'headPhotoUrl': this.detailModel.headPhotoUrl,
'headType': '1'
} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
}).margin({
left: '10vp',
})
.visibility((this.topOpacity > 0.5 ? Visibility.Visible : Visibility.Hidden))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageHeadComponent.ets
View file @
c9b345e
...
...
@@ -9,6 +9,7 @@ export struct PeopleShipHomePageHeadComponent {
Stack({ alignContent: Alignment.BottomEnd }) {
// 头像
Image( this.headPhotoUrl )
.alt($r('app.media.WDAccountOwnerHedaerDefaultIcon'))
.width(this.diameter)
.height(this.diameter)
.borderRadius(this.diameter/2)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageTopComponent.ets
View file @
c9b345e
...
...
@@ -7,6 +7,7 @@ import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageD
import { InfluenceData, PeopleShipUserDetailData } from 'wdBean'
import { PeopleShipHomeAttentionComponent } from './PeopleShipHomeAttentionComponent'
import { HWLocationUtils } from 'wdHwAbility'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
@Component
...
...
@@ -51,6 +52,12 @@ export struct PeopleShipHomePageTopComponent {
}).margin({
left: '10vp',
bottom: '20vp'
}).onClick(()=>{
let params = {
'headPhotoUrl': this.detailModel.headPhotoUrl,
'headType': '1'
} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/skeleton/DefaultPage.ets
View file @
c9b345e
...
...
@@ -3,7 +3,7 @@ import { EmptyComponent } from '../view/EmptyComponent'
@Entry
@Component
export struct DefaultPage {
@State type: number = 1
@State type: number = 1
5
retry() {
console.log('daj点击了重试')
...
...
@@ -13,7 +13,6 @@ export struct DefaultPage {
Row() {
EmptyComponent({
emptyType: this.type,
emptyButton: true,
retry: () => {
this.retry()
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
View file @
c9b345e
...
...
@@ -235,7 +235,7 @@ export struct EmptyComponent {
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) {
imageString = $r('app.media.icon_no_content')
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCreation) {
imageString = $r('app.media.icon_no_
appointmentMade
')
imageString = $r('app.media.icon_no_
works1
')
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoBooking) {
imageString = $r('app.media.icon_no_appointmentMade')
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NetworkFailed) {
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/ShowUserHeaderPage.ets
View file @
c9b345e
...
...
@@ -4,16 +4,18 @@ import { router } from '@kit.ArkUI';
@Component
struct ShowUserHeaderPage {
@State headPhotoUrl: string = '';
@State headType: string = ''
@State params:Record<string, string> = router.getParams() as Record<string, string>;
onPageShow() {
this.headPhotoUrl = this.params?.['headPhotoUrl'];
this.headType = this.params?.['headType'] ?? '';
}
build() {
Row() {
Image(this.headPhotoUrl)
.alt($r('app.media.default_head'))
.alt(
this.headType.length > 0 ? $r('app.media.WDAccountOwnerHedaerDefaultIcon') :
$r('app.media.default_head'))
.width('720lpx')
.height('720lpx')
.objectFit(ImageFit.Auto)
...
...
sight_harmony/products/phone/src/main/ets/pages/SpacialTopicPage.ets
View file @
c9b345e
import { Action } from 'wdBean';
import { SpacialTopicPageComponent } from 'wdComponent'
import { CommonConstants } from 'wdConstant'
import { Logger } from 'wdKit'
import { Logger
, WindowModel
} from 'wdKit'
import router from '@ohos.router';
const TAG = 'SpacialTopicPage';
...
...
@@ -27,6 +27,7 @@ struct SpacialTopicPage {
}
aboutToAppear() {
WindowModel.shared.setWindowLayoutFullScreen(true)
Logger.info(TAG, 'aboutToAppear');
let action: Action = router.getParams() as Action
this.action = action
...
...
@@ -34,6 +35,7 @@ struct SpacialTopicPage {
aboutToDisappear() {
Logger.info(TAG, 'aboutToDisappear');
WindowModel.shared.setWindowLayoutFullScreen(false)
}
onPageShow() {
...
...
Please
register
or
login
to post a comment