xugenyuan

ref |> 处理精选评论页点击用户头像进入对应主页

Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
... ... @@ -167,3 +167,5 @@ export {
export { GoldenPositionExtraBean } from './src/main/ets/bean/content/GoldenPositionExtraBean';
export { ClassBean } from './src/main/ets/bean/content/ClassBean';
export { CreatorsBean } from './src/main/ets/bean/content/CreatorsBean';
export { MasterDetailRes } from './src/main/ets/bean/user/MasterDetailRes';
\ No newline at end of file
... ...
export class MasterDetailRes {
shareUrl = "";
contentPublish = 0;
authId = 0;
cnLiveCommentControl = 0;
liveGiftControl = 0;
livePublish = 0;
province = "";
fansNum = 0;
articleCreation = 0;
cnIsComment = 0;
cnIsLike = 0;
creatorId = "";
browseNum = 0;
cnLiveLikeControl = 0;
cnLiveShareControl = 0;
banControl = 0;
userId = "";
videoCreation = 0;
avatarFrame = "";
headPhotoUrl = "";
subjectType = 0;
liveLikeControl = 0;
region = "";
isAttention = 0;
cnContentPublish = 0;
authIcon = "";
honoraryTitle = "";
videoCollectionCreation = 0;
pictureCollectionCreation = 0;
liveSwitch = 0;
shareControl = 0;
isComment = 0;
district = "";
originUserId = "";
liveCommentControl = 0;
posterShareControl = 0;
honoraryIcon = "";
isLike = 0;
registTime: number = 0;
dynamicCreation = 0;
userName = "";
attentionNum = 0;
cnShareControl = 0;
cnLivePublish = 0;
categoryAuth = "";
cnLiveGiftControl = 0;
city = "";
dynamicControl = 0;
userType = "";
authTitle = "";
introduction = "";
liveShareControl = 0;
authPersonal = "";
mainControl: number = -1;
}
\ No newline at end of file
... ...
import { ViewType } from 'wdConstant/Index'
import { DateTimeUtils, LazyDataSource, WindowModel } from 'wdKit/Index'
import { DateTimeUtils, LazyDataSource, ToastUtils, WindowModel } from 'wdKit/Index'
import { commentItemModel } from '../model/CommentModel'
import commentViewModel from '../viewmodel/CommentViewModel'
import { router, window } from '@kit.ArkUI'
import { HttpUtils } from 'wdNetwork/Index'
import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork/Index'
import { ErrorComponent } from '../../view/ErrorComponent'
import { EmptyComponent, WDViewDefaultType } from '../../view/EmptyComponent'
import NoMoreLayout from '../../page/NoMoreLayout'
import { CommentCustomDialog } from './CommentCustomDialog'
import { publishCommentModel } from '../model/PublishCommentModel'
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import { ContentDTO } from 'wdBean/Index'
import { ContentDTO, MasterDetailRes } from 'wdBean/Index'
const TAG = 'QualityCommentsComponent';
... ... @@ -303,6 +303,9 @@ struct QualityCommentItem {
y: -16
}
)
.onClick(() => {
this.jumpToAccountOwner()
})
Text(this.item.fromUserName)
.fontSize(14)
.fontColor('#222222')
... ... @@ -423,6 +426,37 @@ struct QualityCommentItem {
}
jumpToAccountOwner() {
let url = HttpUrlUtils.getOtherUserDetailDataUrl()
let item : Record<string, string >= {
"creatorId": this.item.fromCreatorId || "",
"userType": `${this.item.fromUserType}`,
"userId": this.item.fromUserId || "-1",
}
HttpBizUtil.post<ResponseDTO<MasterDetailRes>>(url, item).then((result) => {
if (!result.data || result.data.mainControl != 1) {
ToastUtils.longToast("暂时无法查看该创作者主页")
return
}
if (result.data.banControl == 1) {
ToastUtils.longToast("该账号已封禁,不予访问")
return
}
if (result.data.userType === "1") { // 普通用户
let params: Record<string, string> = {'userId': result.data.userId};
WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params)
} else { // 非普通用户
ProcessUtils.gotoPeopleShipHomePage(result.data.creatorId)
}
}).catch(() => {
ToastUtils.longToast("暂时无法查看该创作者主页")
})
}
jumpToDetail() {
// programInfoModel.api_isCommentAction = YES;
... ...