wangliang_wd

feat:优化个人主页数量显示问题,优化动态详情页图片显示

... ... @@ -352,7 +352,6 @@ export struct DynamicDetailComponent {
}
.width(48)
.padding({ bottom: 9 })
}
}
... ... @@ -380,6 +379,7 @@ export struct DynamicDetailComponent {
GridCol({
span: this.onePicW > this.onePicH ? 12 : 8
}) {
Stack({alignContent: Alignment.BottomEnd}) {
Image(item.picPath)
.backgroundColor(0xf5f5f5)
.width('100%')
... ... @@ -396,23 +396,6 @@ export struct DynamicDetailComponent {
this.onePicW = event?.width || 0;
this.onePicH = event?.height || 0;
})
}
.onClick(async (event: ClickEvent) => {
let retvalue = await FastClickUtil.isMinDelayTime()
if(retvalue){
return
}
ProcessUtils.gotoMultiPictureListPage(this.contentDetailData.photoList, index)
})
}
} else if (this.contentDetailData.photoList.length === 4) {
GridCol({
span: { xs: 4 }
}) {
Stack({alignContent: Alignment.BottomEnd}) {
Image(item.picPath)
.aspectRatio(1)
.borderRadius(this.caclImageRadius(index))
if(this.getPicType(item) !== 3){
Flex({ direction: FlexDirection.Row }) {
Image($r('app.media.icon_long_pic'))
... ... @@ -444,7 +427,49 @@ export struct DynamicDetailComponent {
}
ProcessUtils.gotoMultiPictureListPage(this.contentDetailData.photoList, index)
})
} else {
}
}
// else if (this.contentDetailData.photoList.length === 4) {
// GridCol({
// span: { xs: 4 }
// }) {
// Stack({alignContent: Alignment.BottomEnd}) {
// Image(item.picPath)
// .aspectRatio(1)
// .borderRadius(this.caclImageRadius(index))
// if(this.getPicType(item) !== 3){
// Flex({ direction: FlexDirection.Row }) {
// Image($r('app.media.icon_long_pic'))
// .width(12)
// .height(12)
// .margin({ right: 4 })
// Text('长图')
// .fontSize(10)
// .fontWeight(400)
// .textShadow({
// radius: 1,
// color: `rgba(0,0,0,0.5)`,
// offsetY:1,
// offsetX:1
// })
// .fontColor(0xffffff)
// .fontFamily('PingFang SC')
// }
// .width(48)
// .align(Alignment.BottomEnd)
// .padding({ bottom: 3 })
// }
// }
// }
// .onClick(async (event: ClickEvent) => {
// let retvalue = await FastClickUtil.isMinDelayTime()
// if(retvalue){
// return
// }
// ProcessUtils.gotoMultiPictureListPage(this.contentDetailData.photoList, index)
// })
// }
else {
GridCol({
span: { sm: 4, lg: 3 }
}) {
... ...
... ... @@ -50,7 +50,7 @@ export struct FollowThirdTabsComponent{
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight(18)
.backgroundImage($r('app.media.ic_collect_mid'))
.backgroundImageSize(ImageSize.Cover)
.backgroundImageSize(ImageSize.FILL)
.padding({top:7,bottom:7})
Image(index === 0?$r("app.media.ic_collect_left_right"):(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?$r('app.media.ic_collect_right_right'):$r('app.media.ic_collect_mid_right')))
... ...
... ... @@ -16,7 +16,7 @@ struct EditUserIntroductionPage {
CustomTitleUI({titleName:'修改简介'})
Row(){
TextInput({placeholder:'请输入简介',text:this.params.editContent})
TextArea({placeholder:'请输入简介',text:this.params.editContent})
.maxLength(60)
.width('100%')
.height(80)
... ...
... ... @@ -318,13 +318,13 @@ export struct PeopleShipHomePageTopComponent {
this.content = this.subTxt
}
}
// if (this.detailModel) {
if (this.detailModel) {
// this.topFixedHeight = 160
// if (this.detailModel.region && this.detailModel.region.length > 0) {
// this.provinceName = this.detailModel.region
// } else {
// this.provinceName = await this.computeIPRegion(this.detailModel.province)
// }
if (this.detailModel.region && this.detailModel.region.length > 0) {
this.provinceName = this.detailModel.region
} else {
this.provinceName = await this.computeIPRegion(this.detailModel.province)
}
// if (this.detailModel.authId == 1 && this.detailModel.categoryAuth.length > 0) {
// this.topFixedHeight += this.getTextLineNum(this.detailModel.categoryAuth, DisplayUtils.getDeviceWidth() - 90, 22, $r('app.float.vp_12')) * 18
// this.topFixedHeight += 12
... ... @@ -362,7 +362,7 @@ export struct PeopleShipHomePageTopComponent {
// }
//
// this.topHeight = this.topFixedHeight
// }
}
}
private computeShowNum(count: number) {
... ...
... ... @@ -107,6 +107,7 @@ export class SubscribeMessageModel{
export class Remark{
relationType:string = ""
coverImageUrl:string = ""
planStartTimeLong:string = ""
relationId:string = ""
status:string = ""
userName:string = ""
... ...
... ... @@ -154,7 +154,7 @@ struct MineHomePage {
Row() {
Row() {
Text(`${this.browseNum}`)
Text(this.handlerNum(this.browseNum.toString()))
.textStyle()
Text("阅读")
.textStyle2()
... ... @@ -168,7 +168,7 @@ struct MineHomePage {
.vertical(true)
.opacity(0.4)
Row() {
Text(`${this.commentNum}`)
Text(this.handlerNum(this.commentNum.toString()))
.textStyle()
Text("评论")
.textStyle2()
... ... @@ -182,7 +182,7 @@ struct MineHomePage {
.vertical(true)
.opacity(0.4)
Row() {
Text(`${this.attentionNum}`)
Text(this.handlerNum(this.attentionNum.toString()))
.textStyle()
Text("关注")
.textStyle2()
... ... @@ -401,7 +401,8 @@ struct MineHomePage {
})
.margin({ left: 10 })
.onClick(() => {
router.back()
let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
})
Text(`${this.userName}`)
... ... @@ -518,6 +519,24 @@ struct MineHomePage {
console.log(TAG,JSON.stringify(err))
})
}
handlerNum(number: string) {
const num = number??'0';
if (Number.parseInt(num) <= 9999) {
return Number.parseInt(num).toString()
} else if (Number.parseInt(num) > 9999 && Number.parseInt(num) <= 99999999) {
const num1: string = num.slice(0, -4); // 万
const num2: string = num.slice(-4, -3); // 千
return num2 === '0' ? num1 +'万' : num1 + '.' + num2 + '万'
} else if (Number.parseInt(num) > 99999999) {
const num1: string = num.slice(0, -8); // 亿
const num2: string = num.slice(-8, -7);
return num2 === '0' ? num1 +'亿' : num1 + '.' + num2 + '亿'
}
return num
}
getUserLevel(){
MinePageDatasModel.getUserLevelData(getContext(this)).then((value)=>{
if(value!=null){
... ...
... ... @@ -126,7 +126,7 @@ struct LaunchAdvertisingPage {
.fontColor(Color.White)
.margin({left:14,right:14})
}
.width(74)
.width(84)
.height(28)
.margin({top:5,right:10})
.backgroundColor('#80000000')
... ...