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-07-01 15:32:10 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
9fe38afba33728f6b56b2daa86f1b1dc66807585
9fe38afb
2 parents
ca8f53d8
7322e1dd
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
10 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card20Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/viewmodel/CommentViewModel.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card20Component.ets
View file @
9fe38af
...
...
@@ -9,6 +9,7 @@ import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
import { InfomationCardClick } from '../../utils/infomationCardClick'
import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed';
import router from '@ohos.router'
import { Notes } from './notes';
const TAG = 'Card20Component';
...
...
@@ -51,8 +52,22 @@ export struct Card20Component {
}
) // 标题
if (this.contentDTO.newsTitle) {
Text() {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).height(29).align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).height(29).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(29).align(Alignment.Center)
}
if (this.contentDTO.top === 1) {
Notes({ newTags: '置顶' }).height(29).align(Alignment.Center)
}
}
Text() {
if (this.titleMarked) {
ForEach(this.textArr, (textItem: textItem) => {
if (textItem.isRed) {
...
...
@@ -66,12 +81,18 @@ export struct Card20Component {
Span(this.contentDTO.newsTitle)
}
}
.fontSize($r('app.float.font_size_18'))
.fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
.width(CommonConstants.FULL_WIDTH)
.textOverflowStyle(3)
.margin({ bottom: 8 })
.lineHeight(22)
.fontSize($r('app.float.font_size_18'))
.fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
.maxLines(3)
.lineHeight(27)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.align(Alignment.Start)
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
(this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 :
0 )
.width('100%')
}.alignContent(Alignment.TopStart)
}
if (this.contentDTO.fullColumnImgUrls[0]) {
createImg({ contentDTO: this.contentDTO })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/viewmodel/CommentViewModel.ets
View file @
9fe38af
...
...
@@ -496,7 +496,7 @@ class CommentViewModel {
}
HttpBizUtil.post<ResponseDTO<MasterDetailRes>>(url, item).then((result) => {
if (!result.data || result.data.mainControl != 1) {
ToastUtils.longToast("暂时无法查看该创作者主页")
//
ToastUtils.longToast("暂时无法查看该创作者主页")
return
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
View file @
9fe38af
...
...
@@ -25,7 +25,11 @@ export default struct MinePageUserSimpleInfoUI {
///已登录状态,先获取本地数据
this.userName = SPHelper.default.getSync(SpConstants.USER_NAME,"") as string
this.headPhotoUrl = SPHelper.default.getSync(SpConstants.USER_HEAD_PHOTO_URL,"") as string
this.userType = SPHelper.default.getSync(SpConstants.USER_Type,"") as string
let userType = SPHelper.default.getSync(SpConstants.USER_Type,"") as string
if (userType && userType.length > 0) {
this.userType = userType
}
this.getUserInfo()
}else{
this.headPhotoUrl = ""
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
View file @
9fe38af
...
...
@@ -101,7 +101,7 @@ struct MineHomePage {
//用户信息区域
Row() {
Stack(){
Image(this.headPhotoUrl)
Image(this.headPhotoUrl
?this.headPhotoUrl:this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon')
)
.alt($r('app.media.default_head'))
.width('115lpx')
.height('115lpx')
...
...
Please
register
or
login
to post a comment