陈剑华

Merge remote-tracking branch 'origin/main'

... ... @@ -5,7 +5,8 @@ import {
PhotoListBean,
postInteractBrowsOperateParams,
postBatchAttentionStatusParams,
postInteractAccentionOperateParams
postInteractAccentionOperateParams,
Params
} from 'wdBean';
import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel';
import display from '@ohos.display';
... ... @@ -44,6 +45,7 @@ export struct MultiPictureDetailPageComponent {
@State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图
@State showDownload: Boolean = false // 控制是否显示下载默认隐藏
@State publishCommentModel: publishCommentModel = new publishCommentModel()
@State operationButtonList: string[] = ['comment', 'like', 'collect', 'share']
//watch监听页码回调
onCurrentPageNumUpdated(): void {
... ... @@ -98,19 +100,31 @@ export struct MultiPictureDetailPageComponent {
if (this.contentDetailData.rmhPlatform == 1) {
Row() {
Row({ space: 8 }) {
if (this.getImgUrl()){
Row() {
Image(this.contentDetailData?.rmhInfo?.rmhHeadUrl)
Image(this.getImgUrl())
.borderRadius(24)
.aspectRatio(1)
.border({ width: 1, color: Color.White, style: BorderStyle.Solid })
.alt($r('app.media.picture_loading'))
.width(36)
.height(36)
.objectFit(ImageFit.Fill)
.interpolation(ImageInterpolation.High)
.onClick(() => {
if (this.contentDetailData.rmhInfo?.cnMainControl === 1) {
// 号主页
const params: Params = {
creatorId: this.contentDetailData.rmhInfo.rmhId,
pageID: ''
}
WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params)
}
})
}
.width('13%')
.height('100%')
}
Row() {
Flex({
... ... @@ -190,6 +204,7 @@ export struct MultiPictureDetailPageComponent {
middle: { anchor: "__container__", align: HorizontalAlign.Center }
})
.id('e_attention')
.visibility(!this.showDownload ? Visibility.Visible : Visibility.None)
}
if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length > 0) {
Swiper(this.swiperController) {
... ... @@ -305,10 +320,8 @@ export struct MultiPictureDetailPageComponent {
OperRowListView({
contentDetailData: this.contentDetailData,
publishCommentModel: this.publishCommentModel,
operationButtonList: this.operationButtonList,
})
.width('100%')
.height(56)
.border({ width: { top: 0.5 }, color: '#FFFFFF' })
}
.visibility(!this.showDownload ? Visibility.Visible : Visibility.None)
Column(){
... ... @@ -385,6 +398,7 @@ export struct MultiPictureDetailPageComponent {
if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length === 0) {
// 暂无内容
this.netStatus = 0
this.operationButtonList = []
Logger.info(TAG, `this.netStatus:${JSON.stringify(this.netStatus)}`)
}
Logger.info(TAG, `contentDetailData:${JSON.stringify(this.contentDetailData)}`)
... ... @@ -399,12 +413,17 @@ export struct MultiPictureDetailPageComponent {
Logger.info(TAG, `fetchDetailData then,err: ${JSON.stringify(err)}`);
// 内容获取失败
this.netStatus = 9
this.operationButtonList = []
})
} catch (exception) {
}
}
getImgUrl() {
return this.contentDetailData?.rmhInfo?.rmhHeadUrl || this.contentDetailData?.userInfo?.userHeadUrl
}
// 记录浏览历史
private getInteractBrowsOperate() {
try {
... ...
... ... @@ -11,7 +11,7 @@ export struct SearchCreatorComponent{
Stack({alignContent: Alignment.Bottom}){
Image(this.item.headerPhotoUrl)
.width('92lpx')
.alt($r('app.media.default_head'))
.alt($r('app.media.icon_default_head_mater'))
.height('92lpx')
.margin({bottom:'15lpx'})
.borderRadius(50)
... ...
... ... @@ -81,9 +81,9 @@ export struct AccountAndSecurityLayout {
// 收到eventId为1的事件后执行该回调
let callback = (eventData: emitter.EventData): void => {
promptAction.showToast({
message: JSON.stringify(eventData)
});
// promptAction.showToast({
// message: JSON.stringify(eventData)
// });
if(eventData&&eventData.data){
this.listData[0].subTitle = eventData.data['content']
}
... ...
... ... @@ -184,6 +184,10 @@ struct ForgetPasswordPage {
this.loginViewModel.changeBindPhone(this.phoneContent,this.codeContent).then(()=>{
ToastUtils.shortToast('绑定成功')
this.querySecurity()
}).catch((message: string) => {
if (message != '') {
ToastUtils.shortToast(message)
}
})
}
... ...
... ... @@ -171,8 +171,8 @@ export class LoginViewModel {
return new Promise<object>((success, fail) => {
this.loginModel.changeBindPhone(phone, verificationCode).then((data: object) => {
success(data)
}).catch(() => {
fail()
}).catch((message: string) => {
fail(message)
})
})
}
... ...