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
wangliang_wd
2024-05-16 16:48:38 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bc2d4468f0a0baf116b59fc48b305546f71e1583
bc2d4468
1 parent
1ea0fff1
feat:优化UI
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
13 deletions
sight_harmony/features/wdComponent/src/main/ets/components/InteractMessage/InteractMComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/InteractMessagePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/EditInfoViewModel.ets
sight_harmony/features/wdComponent/src/main/ets/components/InteractMessage/InteractMComponent.ets
View file @
bc2d446
...
...
@@ -42,7 +42,7 @@ export struct InteractMComponent {
.constraintSize({maxHeight:500})
}
if(this.messageModel.contentType != '211'
&& this.messageModel.contentType != '210'
){
if(this.messageModel.contentType != '211'){
Column(){
if (this.messageModel.contentType === '207' || this.messageModel.contentType === '209'){
Text('[你的评论]'+this.buildCommentContent()).fontSize('14fp').fontColor('#666666').constraintSize({maxHeight:500})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
View file @
bc2d446
...
...
@@ -27,7 +27,7 @@ struct EditUserInfoPage {
}
}),
alignment: DialogAlignment.Bottom,
offset:{dx:0,dy:
-2
0},
offset:{dx:0,dy:0},
})
aboutToAppear() {
...
...
@@ -104,7 +104,7 @@ struct EditUserInfoPage {
.textOverflow({overflow:TextOverflow.Ellipsis})
.maxLines(1)
.fontSize(14)
.fontColor(r.subTitle === '待完善'?'#
999999
':'#666666')
.fontColor(r.subTitle === '待完善'?'#
cccccc
':'#666666')
.padding({right:10})
.width('70%')
.textAlign(TextAlign.End)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/InteractMessagePage.ets
View file @
bc2d446
...
...
@@ -8,6 +8,7 @@ import { CustomTitleUI } from '../reusable/CustomTitleUI';
import { InteractMComponent } from '../InteractMessage/InteractMComponent';
import { InteractMessageModel, WDMessageCenterMessageType } from '../../model/InteractMessageModel';
import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';
import { NetworkUtil } from 'wdKit/Index';
@Entry
@Component
...
...
@@ -28,10 +29,9 @@ struct InteractMessagePage {
build() {
Column(){
CustomTitleUI({titleName:'互动消息'})
if(this.browSingModel.viewType == ViewType.ERROR){
EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NetworkFailed})
}else if(this.browSingModel.viewType == ViewType.EMPTY){
EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoMessage})
if(this.browSingModel.viewType == ViewType.EMPTY){
EmptyComponent({emptyType:this.browSingModel.emptyType})
}else {
CustomPullToRefresh({
alldata:this.allDatas,
...
...
@@ -114,6 +114,9 @@ struct InteractMessagePage {
}
async getData(resolve?: (value: string | PromiseLike<string>) => void){
let netStatus = NetworkUtil.isNetConnected()
if (netStatus) {
InteractMessageViewModel.fetchMessageList(WDMessageCenterMessageType.WDMessageCenterMessageType_Interact,this.currentPage).then(InteractMessageMItem => {
if(resolve) resolve('刷新成功')
if (InteractMessageMItem && InteractMessageMItem.list && InteractMessageMItem.list.length > 0) {
...
...
@@ -137,9 +140,14 @@ struct InteractMessagePage {
} else {
if (this.currentPage === 1) {
this.browSingModel.viewType = ViewType.EMPTY;
this.browSingModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoMessage;
}
}
})
}else {
this.browSingModel.viewType = ViewType.EMPTY;
this.browSingModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoNetwork;
}
}
async getMessageLikeCount(){
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
View file @
bc2d446
...
...
@@ -12,6 +12,7 @@ import { BigPicCardComponent } from '../view/BigPicCardComponent';
import { contentListItemParams } from '../../model/MyCollectionModel';
import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';
import { MyCustomDialog } from '../reusable/MyCustomDialog'
import { NetworkUtil } from 'wdKit/Index';
@Entry
@Component
...
...
@@ -26,6 +27,7 @@ struct MyCollectionListPage {
@State currentPage: number = 1;
private scroller: Scroller = new Scroller();
emptyType: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_Default
dialogController: CustomDialogController = new CustomDialogController({
builder: MyCustomDialog({
...
...
@@ -53,10 +55,8 @@ struct MyCollectionListPage {
this.deleteNum = 0
}})
if(this.browSingModel.viewType == ViewType.ERROR){
ErrorComponent()
}else if(this.browSingModel.viewType == ViewType.EMPTY){
EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoCollection})
if(this.browSingModel.viewType == ViewType.EMPTY){
EmptyComponent({emptyType:this.browSingModel.emptyType})
}else {
CustomPullToRefresh({
alldata:this.allDatas,
...
...
@@ -137,7 +137,10 @@ struct MyCollectionListPage {
}
}
async getData(resolve?: (value: string | PromiseLike<string>) => void) {
let netStatus = NetworkUtil.isNetConnected()
if (netStatus) {
MyCollectionViewModel.fetchMyCollectList(1,'1',this.currentPage,getContext(this)).then(collectionItem => {
if(resolve) resolve('刷新成功')
if (collectionItem && collectionItem.list && collectionItem.list.length > 0) {
...
...
@@ -159,9 +162,14 @@ struct MyCollectionListPage {
} else {
if (this.currentPage === 1) {
this.browSingModel.viewType = ViewType.EMPTY;
this.browSingModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoCollection
}
}
})
} else {
this.browSingModel.viewType = ViewType.EMPTY;
this.browSingModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoNetwork;
}
}
//数据处理
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/EditInfoViewModel.ets
View file @
bc2d446
...
...
@@ -52,11 +52,11 @@ class EditInfoViewModel {
if (editDTO.code == 0) {
success(editDTO.data)
}else {
success(this.GetqueryAccountOwnerLocal(context))
//
success(this.GetqueryAccountOwnerLocal(context))
}
}).catch((error: Error) => {
Logger.info(TAG,'queryAccountOwnerInfo','EditInfoViewModel')
success(this.GetqueryAccountOwnerLocal(context))
//
success(this.GetqueryAccountOwnerLocal(context))
})
}))
}
...
...
Please
register
or
login
to post a comment