张善主

Merge remote-tracking branch 'origin/main'

Showing 147 changed files with 1909 additions and 600 deletions
... ... @@ -47,4 +47,5 @@ export class SpConstants{
//游客状态下首次评论时间
static FIRSTCOMMENTTIME = 'firstCommentTime'
static TOURIST_NICK_NAME = 'touristNickName'
}
\ No newline at end of file
... ...
... ... @@ -135,6 +135,14 @@ export class HttpUrlUtils {
*/
static readonly APPOINTMENT_ExecuteCollcet_PATH: string = "/api/rmrb-interact/interact/zh/c/collect/executeCollcetRecord";
/**
* 个人中心 - 消息
*/
static readonly APPOINTMENT_MessageList_PATH: string = "/api/rmrb-inside-mail/zh/c/inside-mail/private";
/**
* 个人中心 - 消息 点赞数
*/
static readonly APPOINTMENT_getMessageLikeCount_PATH: string = "/api/rmrb-inside-mail/zh/c/inside-mail/private/getLikeCount";
/**
* 个人中心 我的评论列表
*/
static readonly MINE_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/myCommentList";
... ... @@ -316,6 +324,10 @@ export class HttpUrlUtils {
*/
static readonly FEEDBACK_TYPE_PATH: string = "/api/rmrb-interact/interact/c/user/optionClassify/list";
/**
* 查询点赞、回复我的、系统消息的未读数量以及回复/评论人
*/
static readonly MESSAGE_UN_READ_DATA_PATH: string = "/api/rmrb-inside-mail/zh/c/inside-mail/private/polymerizationInfo?createTime=";
static getHost(): string {
return HostManager.getHost();
... ... @@ -478,6 +490,16 @@ export class HttpUrlUtils {
return url
}
static getMessageListDataUrl() {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.APPOINTMENT_MessageList_PATH
return url
}
static getMessageLikeCount() {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.APPOINTMENT_getMessageLikeCount_PATH
return url
}
static getExecuteCollcetUrl() {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.APPOINTMENT_ExecuteCollcet_PATH
return url
... ... @@ -714,4 +736,14 @@ export class HttpUrlUtils {
return url;
}
//获取消息未读接口
static getMessageUnReadDataUrl() {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.MESSAGE_UN_READ_DATA_PATH
return url
}
static reportDeviceInfo() {
let url = HttpUrlUtils.getHost() + "/api/rmrb-user-center/common/user/c/device/push";
return url;
}
}
... ...
... ... @@ -136,4 +136,9 @@ export class WDRouterPage {
//意见反馈
static feedBackActivity = new WDRouterPage("wdComponent", "ets/components/FeedBackActivity");
// 人民号主页头像显示
static showHomePageHeaderPage = new WDRouterPage("wdComponent", "ets/pages/ShowHomePageHeaderPage");
}
... ...
... ... @@ -108,7 +108,11 @@ export class ProcessUtils {
break;
case ContentConstants.TYPE_TELETEXT:
// 图文详情,跳转h5
if(content?.linkUrl){ //有 linkUrl 走专题页展示逻辑
ProcessUtils.gotoSpecialTopic(content)
}else{
ProcessUtils.gotoWeb(content);
}
break;
case ContentConstants.TYPE_LINK:
ProcessUtils.gotoDefaultWeb(content);
... ... @@ -452,7 +456,15 @@ export class ProcessUtils {
pageID: 'FeedBackActivity'
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
}
/**
* 跳转到登录页
*/
public static gotoLoginPage() {
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
}
}
... ...
... ... @@ -55,7 +55,7 @@ export struct WdWebLocalComponent {
.mixedMode(MixedMode.All)
.onlineImageAccess(true)
.enableNativeEmbedMode(true)
.layoutMode(WebLayoutMode.FIT_CONTENT)
// .layoutMode(WebLayoutMode.FIT_CONTENT)
// .nestedScroll({ scrollForward: NestedScrollMode.SELF_FIRST, scrollBackward: NestedScrollMode.PARENT_FIRST })
.height(this.webHeight)
.onPageBegin((event) => {
... ...
... ... @@ -84,7 +84,7 @@ export class ContentDTO implements BaseDTO {
openType: string = '';
extra: string = ''
static clone(old:ContentDTO): ContentDTO {
static clone(old: ContentDTO): ContentDTO {
let content = new ContentDTO();
content.appStyle = old.appStyle;
content.cityCode = old.cityCode;
... ...
export interface commentInfo {
commentTitle: string,
newsTitle: string,
userName: string,
userHeaderUrl: string,
userId?: string,
userName?: string,
userHeaderUrl?: string,
publishTime: number,
commentId: string,
newsId: string,
relId: string;
relType: string;
userId: string;
newsType?: string
newsType?: string,
objectType?: string,
}
\ No newline at end of file
... ...
... ... @@ -67,7 +67,7 @@ export { FirstTabTopSearchComponent } from "./src/main/ets/components/search/Fir
export { ListHasNoMoreDataUI } from "./src/main/ets/components/reusable/ListHasNoMoreDataUI"
export { LottieView } from './src/main/ets/lottie/LottieView'
export { LottieView } from './src/main/ets/components/lottie/LottieView'
export { SpacialTopicPageComponent } from './src/main/ets/components/SpacialTopicPageComponent'
... ...
import { CommonConstants, CompStyle } from 'wdConstant';
import { ContentDTO } from 'wdBean';
import { CompStyle } from 'wdConstant';
import { CompDTO, ContentDTO } from 'wdBean';
import { Card2Component } from './cardview/Card2Component';
import { Card3Component } from './cardview/Card3Component';
import { Card4Component } from './cardview/Card4Component';
... ... @@ -24,13 +24,14 @@ import { Card21Component } from './cardview/Card21Component';
@Component
export struct CardParser {
@State contentDTO: ContentDTO = new ContentDTO();
@State compDTO: CompDTO = {} as CompDTO
build() {
this.contentBuilder(this.contentDTO);
this.contentBuilder(this.contentDTO, this.compDTO);
}
@Builder
contentBuilder(contentDTO: ContentDTO) {
contentBuilder(contentDTO: ContentDTO, compDTO: CompDTO) {
if (contentDTO.appStyle === CompStyle.Card_02) {
Card2Component({ contentDTO })
} else if (contentDTO.appStyle === CompStyle.Card_03) {
... ... @@ -38,7 +39,7 @@ export struct CardParser {
} else if (contentDTO.appStyle === CompStyle.Card_04) {
Card4Component({ contentDTO })
} else if (contentDTO.appStyle === CompStyle.Card_05) {
Card5Component({ contentDTO })
Card5Component({ contentDTO, titleShowPolicy: compDTO.titleShowPolicy })
} else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle
.Card_13) {
Card6Component({ contentDTO })
... ... @@ -64,8 +65,7 @@ export struct CardParser {
Card20Component({ contentDTO })
} else if (contentDTO.appStyle === CompStyle.Card_21) {
Card21Component({ contentDTO })
}
else {
} else {
// todo:组件未实现 / Component Not Implemented
// Text(contentDTO.appStyle)
// .width(CommonConstants.FULL_PARENT)
... ...
... ... @@ -32,12 +32,12 @@ import { LiveHorizontalCardComponent } from './view/LiveHorizontalCardComponent'
@Component
export struct CompParser {
@State compDTO: CompDTO = {} as CompDTO
@State private pageModel: PageModel = new PageModel();
@State compIndex: number = 0;
@State private pageModel: PageModel = new PageModel();
build() {
Column() {
if (this.compDTO.name !="月度排行卡") {
if (this.compDTO.name != "月度排行卡") {
this.componentBuilder(this.compDTO, this.compIndex);
}
... ... @@ -53,7 +53,8 @@ export struct CompParser {
} else if (compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
ZhCarouselLayout01({ compDTO: compDTO })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Row_01 && compDTO.imageScale === 2) {// && compDTO.name ==="横划卡"
} else if (compDTO.compStyle === CompStyle.Zh_Single_Row_01 &&
compDTO.imageScale === 2) { // && compDTO.name ==="横划卡"
LiveHorizontalCardComponent({ compDTO: compDTO })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
... ... @@ -87,7 +88,7 @@ export struct CompParser {
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
//头图卡 和comStyle 2相同,
Card5Component({ contentDTO: compDTO.operDataList[0] })
Card5Component({ contentDTO: compDTO.operDataList[0], titleShowPolicy: compDTO.titleShowPolicy })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
// 大图卡
... ... @@ -107,10 +108,9 @@ export struct CompParser {
//Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 16, right: 16 })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (!Number.isNaN(Number(compDTO.compStyle))) {
CardParser({ contentDTO: compDTO.operDataList[0] });
CardParser({ contentDTO: compDTO.operDataList[0], compDTO });
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
}
else {
} else {
Text(compDTO.compStyle)
.width(CommonConstants.FULL_PARENT)
.padding(10)
... ...
... ... @@ -69,6 +69,7 @@ export struct DynamicDetailComponent {
@State isNetConnected: boolean = true
@State isPageEnd: boolean = false
@State publishCommentModel: publishCommentModel = new publishCommentModel()
@State reachEndIncreament: number = 0
async aboutToAppear() {
await this.getContentDetailData()
... ...
... ... @@ -148,7 +148,7 @@ export struct ENewspaperPageComponent {
this.calendarDialogController.close()
}
})
if (this.newspaperListBean && this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
Image($r('app.media.icon_share'))
.height($r('app.float.top_arrow_size'))
.width($r('app.float.top_arrow_size'))
... ... @@ -161,6 +161,7 @@ export struct ENewspaperPageComponent {
ToastUtils.showToast('分享为公共方法,待开发', 1000);
})
}
}
.margin({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') })
.height($r('app.float.top_bar_height'))
.alignRules({
... ... @@ -311,6 +312,7 @@ export struct ENewspaperPageComponent {
.width('100%')
.height('100%')
.backgroundColor($r('app.color.color_80000000'))
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
.id('e_newspaper_container')
if (this.isOpenListDialog) {
... ...
... ... @@ -52,6 +52,7 @@ export struct ImageAndTextPageComponent {
@State isNetConnected: boolean = true
@State info: Area | null = null
@State likeNum: number = 0
@State reachEndIncreament : number = 0
build() {
Column() {
... ... @@ -141,7 +142,12 @@ export struct ImageAndTextPageComponent {
if (this.contentDetailData?.openComment) {
Divider().strokeWidth(6).color('#f5f5f5')
CommentComponent({
publishCommentModel: this.publishCommentModel
publishCommentModel: this.publishCommentModel,
fixedHeightMode: false,
reachEndIncreament: this.reachEndIncreament,
reachEndLoadMoreFinish: () => {
}
}).onAreaChange((oldValue: Area, newValue: Area) => {
this.info = newValue
})
... ... @@ -157,6 +163,9 @@ export struct ImageAndTextPageComponent {
.padding({ bottom: 76 })
.scrollBar(BarState.Off)
.align(Alignment.Top)
.onReachEnd(() => {
this.reachEndIncreament += 1
})
if (!this.isNetConnected) {
EmptyComponent({
... ... @@ -228,6 +237,7 @@ export struct ImageAndTextPageComponent {
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
}
if (this.contentDetailData?.openAudio && this.contentDetailData?.audioList?.length &&
this.contentDetailData?.audioList[0].audioUrl) {
... ...
import { ContentDTO } from 'wdBean/Index';
import { ProcessUtils } from 'wdRouter/Index';
import { InteractMessageModel } from '../../model/InteractMessageModel'
@Component
export struct InteractMComponent {
messageModel:InteractMessageModel = new InteractMessageModel;
///"remark": "{"beReply":"乐事薯片,大家的最爱!!",
// "headUrl":"https: //uatjdcdnphoto.aikan.pdnews.cn//zhbj/img/user/2023122211/2A59F725E69849A38CEE8823B0D9D141.jpg",
// "contentId":"30035774121","contentRelObjectid":"2012","contentTitle":"乐事推出华夏风光限定罐七款城市地标包装让出游“有滋有味”",
// "commentContent":"大家都爱吃!!","userName":"人民日报网友a8dKCV","userId":"504964178466309","contentRelId":"500002866426",
// "shareUrl":"https: //pd-people-uat.pdnews.cn/column/30035774121-500002866426","userType":"1",
// "contentRelType":"1","visitor":"0","contentType":"8"}",
build() {
Row(){
Image('')
.backgroundColor(Color.Red)
Image(this.messageModel.InteractMsubM.headUrl)
.width(36)
.height(36)
.borderRadius(18)
Column(){
Row(){
Text('用户名')
Text(this.messageModel.InteractMsubM.userName)
.fontSize('14fp').fontColor('#222222')
Text('回复了你的评论')
Text(this.buildContentString())
.fontSize('14fp').fontColor('#999999')
.margin({left:5})
}.width('100%')
Text('两天前')
Text(this.messageModel.time)
.margin({top:2})
.fontSize('12fp').fontColor('#B0B0B0')
.fontSize('12fp').fontColor('#B0B0B0').margin({top:10,bottom:10})
Text('评论内容')
.margin({top:8,bottom:10})
if (this.messageModel.contentType === '208' || this.messageModel.contentType === '209'){
Text(this.messageModel.message)
.margin({bottom:10})
.fontSize('16fp').fontColor('#222222')
.width('100%')
.constraintSize({maxHeight:500})
}
Column(){
Text('[你的评论]乐事薯片,大家的最爱').fontSize('14fp').fontColor('#666666').constraintSize({maxHeight:500})
.margin({top:5,bottom:5})
if (this.messageModel.contentType === '207' || this.messageModel.contentType === '209'){
Text('[你的评论]'+this.buildCommentContent()).fontSize('14fp').fontColor('#666666').constraintSize({maxHeight:500})
.margin({top:15,bottom:10})
.width('100%')
Divider()
.color('#f5f5f5')
.backgroundColor('#f5f5f5')
.color('#EDEDED')
.backgroundColor('#EDEDED')
.width('100%')
.height(1)
}
Row(){
Text('乐事薯片,大家的最爱!!!!').fontSize('12fp').fontColor('#666666').constraintSize({maxHeight:500})
Image($r('app.media.MessageOriginTextIcon'))
.width('12')
.height('12')
Text(this.messageModel.InteractMsubM.contentTitle)
.fontSize('12fp')
.fontColor('#666666')
.maxLines(1)
.width('90%')
.textOverflow({overflow:TextOverflow.Ellipsis})
Blank()
Image($r('app.media.mine_user_edit'))
.width('12')
.height('12')
}.margin({top:5,bottom:5}).width('100%')
}.alignItems(HorizontalAlign.Start).backgroundColor('#f5f5f5').borderRadius(5)
}.padding({left:5}).alignItems(HorizontalAlign.Start)
}.padding({top:5,left:16,right:16}).width('100%').height(160).alignItems(VerticalAlign.Top).backgroundColor(Color.Red)
}.margin({top:10,bottom:15})
}.padding({left:10,right:10}).alignItems(HorizontalAlign.Start).backgroundColor('#f5f5f5').borderRadius(5)
.onClick(()=>{
let contentDTO :ContentDTO = new ContentDTO();
contentDTO.objectType = this.messageModel.InteractMsubM.contentType
contentDTO.objectId = this.messageModel.InteractMsubM.contentId
ProcessUtils.processPage(contentDTO)
})
}.padding({left:5,right:5}).alignItems(HorizontalAlign.Start).width('90%')
}.padding({top:10,left:16,right:16}).width('100%').alignItems(VerticalAlign.Top)
}
buildContentString(): string {
let contentString: string = ''
if (this.messageModel.contentType === '206') {
contentString = '赞了你的作品'
}else if(this.messageModel.contentType === '207'){
contentString = '赞了你的评论'
}else if(this.messageModel.contentType === '208'){
contentString = '评论了你的作品'
}else if(this.messageModel.contentType === '209'){
contentString = '回复了你的评论'
}else if(this.messageModel.contentType === '210'){
contentString = '转发了您的作品'
}else if(this.messageModel.contentType === '211'){
contentString = '关注了你'
}
return contentString;
}
buildCommentContent(): string {
let contentString : string = this.messageModel.contentType === '207'?this.messageModel.message:this.messageModel.InteractMsubM.beReply;
return contentString;
}
}
\ No newline at end of file
... ...
... ... @@ -61,6 +61,8 @@ export struct MorningEveningPaperComponent {
@State mixedBgColor: string = ''
// 顶部安全高度赋值
@State topSafeHeight: number = 0;
@State bottomSafeHeight: number = 0;
private audioDataList: AudioDataList[] = []
private playerController: WDPlayerController = new WDPlayerController();
simpleAudioDialog: CustomDialogController = new CustomDialogController({
... ... @@ -112,6 +114,7 @@ export struct MorningEveningPaperComponent {
// await windowHight.setWindowLayoutFullScreen(true);
// WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)
this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String
console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId)
... ... @@ -248,14 +251,15 @@ export struct MorningEveningPaperComponent {
})
}
}
.height('100%')
.height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`)
PaperTitleComponent()
}
.width('100%')
.height('100%')
.padding({
top: this.topSafeHeight
top: this.topSafeHeight,
bottom: this.bottomSafeHeight
})
// .backgroundColor(Color.Black)
// .backgroundColor(this.pageInfoBean?.backgroundColor ?? Color.Black)
... ...
... ... @@ -449,6 +449,7 @@ export struct MultiPictureDetailPageComponent {
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
}
// this.contentDetailData.photoList = []
if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length === 0) {
... ...
... ... @@ -72,6 +72,7 @@ export struct SpacialTopicPageComponent {
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
// }
this.trySendData2H5()
}
... ...
... ... @@ -25,7 +25,7 @@ export struct RmhTitle {
/**
* 默认未关注 点击去关注
*/
@State followStatus: String = '0';
@State followStatus: string = '0';
/**
* 关注号主
... ... @@ -45,7 +45,7 @@ export struct RmhTitle {
status: this.followStatus == '0' ? 1 : 0,
}
ContentDetailRequest.postInteractAccentionOperate(params2).then(res => {
console.log('关注号主==', JSON.stringify(res.data))
console.log('rmhTitle-data', JSON.stringify(res.data))
if (this.followStatus == '1') {
this.followStatus = '0'
} else {
... ... @@ -63,7 +63,7 @@ export struct RmhTitle {
/**
* 查询当前登录用户是否关注作品号主
* */
private async getBatchAttentionStatus() {
async getBatchAttentionStatus() {
try {
const params: postBatchAttentionStatusParams = {
creatorIds: [{ creatorId: this.rmhInfo?.rmhId ?? '' }]
... ... @@ -72,17 +72,17 @@ export struct RmhTitle {
this.followStatus = data[0]?.status;
Logger.info(`rmhTitle-followStatus:${JSON.stringify(this.followStatus)}`)
} catch (exception) {
Logger.info(`rmhTitle-followStatus:${JSON.stringify(exception)}`)
}
}
aboutToAppear(): void {
this.getBatchAttentionStatus()
let page = router.getState();
if (page.path.includes('/page/PeopleShipHomePage') || page.path.includes('/pages/MainPage')) {
this.hideTime = true;
}
this.getBatchAttentionStatus()
}
getDaysBetweenDates(date: number) {
... ... @@ -143,13 +143,13 @@ export struct RmhTitle {
Blank()
if (this.rmhInfo.cnIsAttention) {
Row() {
if (this.followStatus === '0') {
if (Number(this.followStatus) === 0) {
Image($r('app.media.rmh_follow'))
.width(16)
.height(16)
}
Text(this.followStatus === '0' ? '关注' : '已关注')
Text(Number(this.followStatus) === 0 ? '关注' : '已关注')
.fontSize($r('app.float.font_size_13'))
.fontColor($r('app.color.color_ED2800'))
}
... ...
import { CompDTO } from 'wdBean/Index';
import { Logger } from 'wdKit/Index';
import { DateTimeUtils, Logger } from 'wdKit/Index';
import PageModel from '../../viewmodel/PageModel';
/**
... ... @@ -59,9 +59,9 @@ export struct CardAdvBottom {
break;
}
}
Logger.error("ZZZXXXXX","currentIndex====>"+currentIndex);
if (currentIndex >= 0) {
this.pageModel.compList.deleteItem(currentIndex)
this.pageModel.timestamp = DateTimeUtils.getTimeStamp().toString()
}
}
}
... ...
import { CompDTO } from 'wdBean/Index';
import { Logger } from 'wdKit/Index';
import { DateTimeUtils, Logger } from 'wdKit/Index';
import PageModel from '../../viewmodel/PageModel';
/**
... ... @@ -71,10 +71,9 @@ export struct CardAdvTop {
break;
}
}
Logger.error("ZZZXXXXX","currentIndex====>"+currentIndex);
if (currentIndex >= 0) {
this.pageModel.compList.deleteItem(currentIndex)
this.pageModel.timestamp = DateTimeUtils.getTimeStamp().toString()
}
}
}
... ...
... ... @@ -48,8 +48,9 @@ export struct Card10Component {
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.contentDTO)
})
if (this.contentDTO.objectType == '5') {
Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 })
}
}.alignContent(Alignment.BottomStart)
// 专题列表--后端返回三个,
... ... @@ -106,7 +107,7 @@ export struct Card10Component {
.fontColor($r('app.color.color_222222'))
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.textIndent(item.objectType == '5' ? 40 : 0)
.textIndent(item.objectType == '5' ? 38 : 0)
}.alignContent(Alignment.TopStart)
CardSourceInfo(
... ...
... ... @@ -102,6 +102,9 @@ struct createImg {
CardMediaInfo({ contentDTO: this.contentDTO })
}
.align(Alignment.BottomEnd)
.onClick((event: ClickEvent) => {
ProcessUtils.gotoVod(this.contentDTO)
})
}
}
}
... ...
... ... @@ -40,7 +40,7 @@ export struct Card2Component {
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.align(Alignment.Start)
.textIndent(this.contentDTO.objectType == '5' ? 40 : 0)
.textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
}
.alignContent(Alignment.TopStart)
... ...
... ... @@ -12,7 +12,7 @@ const TAG: string = 'Card5Component';
@Component
export struct Card5Component {
@State contentDTO: ContentDTO = new ContentDTO();
@State titleShowPolicy: number | string = 1
@Prop titleShowPolicy: number | string
@State loadImg: boolean = false;
@State clicked: boolean = false;
... ... @@ -22,12 +22,13 @@ export struct Card5Component {
build() {
Stack() {
Image(this.loadImg ? this.contentDTO.coverUrl : '')
.backgroundColor(0xf5f5f5)
.width(CommonConstants.FULL_WIDTH)
.autoResize(true)
.borderRadius($r('app.float.image_border_radius'))
// if ((this.titleShowPolicy === 1 || this.contentDTO.titleShow === 1) && this.contentDTO.newsTitle) {
if (this.titleShowPolicy === 1) {
Row()
.width(CommonConstants.FULL_WIDTH)
.height(59)
... ... @@ -41,20 +42,21 @@ export struct Card5Component {
if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
}
Text(this.contentDTO.newsTitle)
.width(CommonConstants.FULL_WIDTH)// .height(CommonConstants.FULL_HEIGHT)
.width(CommonConstants.FULL_WIDTH)
.fontColor(Color.White)
.fontSize($r('app.float.normal_text_size'))
.fontWeight(FontWeight.Bold)
.maxLines(2)
.align(Alignment.TopStart)
.textIndent(this.contentDTO.objectType == '5' ? 40 : 0)
.textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
}.alignContent(Alignment.TopStart)
}
.justifyContent(FlexAlign.Start)
// .height(40)
.margin({ left: 12, bottom: 10, right: 12 })
// }
}
}
.alignContent(Alignment.Bottom)
.width(CommonConstants.FULL_WIDTH)
... ...
... ... @@ -49,7 +49,7 @@ export struct Card6Component {
.maxLines(3)
.alignSelf(ItemAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 60 :
.textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
(this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
this.contentDTO.objectType == '5' ? 30 : 0)
}.alignContent(Alignment.TopStart)
... ...
... ... @@ -43,8 +43,11 @@ export struct Card9Component {
topRight: $r('app.float.image_border_radius')
})
if (this.contentDTO.objectType == '5') {
Notes({ objectType: 5 })
.margin({ left: 5, bottom: 5 })
}
}.alignContent(Alignment.BottomStart)
// 时间线--后端返回三个,
... ...
... ... @@ -13,10 +13,10 @@ export struct Notes {
build() {
if (this.returnTypeTitleFn()) {
Text(this.returnTypeTitleFn())
.fontSize($r('app.float.font_size_12'))
.fontSize($r('app.float.font_size_11'))
.padding({
left: 5,
right: 5,
left: 4,
right: 4,
top: 3,
bottom: 3
})
... ...
... ... @@ -20,6 +20,8 @@ export class publishCommentModel {
targetType: string = ''
/*评论总数*/
totalCommentNumer: string = '0'
/// 游客评论开关:visitorComment 1:打开;0:关闭
visitorComment: string = "0"
//评论传参
/*评论图片url,多个逗号隔开*/
... ...
... ... @@ -8,9 +8,11 @@ import { HttpUtils } from 'wdNetwork/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import NoMoreLayout from '../../page/NoMoreLayout';
import { EmptyComponent } from '../../view/EmptyComponent';
import { ContentDetailDTO, Params } from 'wdBean/Index';
const TAG = 'CommentComponent';
const testString = '因为读书的人\n是低着头向上看的人\n身处一隅,却能放眼世界\n2,因为读书的人\n总是比不读书的人\n活得有趣一点\n3,因为读书的人\n即使平凡,绝不平庸'
// @Entry
... ... @@ -22,14 +24,20 @@ export struct CommentComponent {
@State isComments: boolean = true
/*必传*/
@ObjectLink publishCommentModel: publishCommentModel
@Consume contentDetailData: ContentDetailDTO
listScroller: ListScroller = new ListScroller(); // scroller控制器
historyOffset: number = 0; // 上次浏览到列表距离顶端的偏移量offset
isloading: boolean = false
@State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource();
@State dialogController: CustomDialogController | null = null;
// @State private browSingModel: commentListModel = new commentListModel()
// 是否为固定高度模式。true时,里面上拉加载更多生效,外层不能包Scroll。
// false时,外层实现加载更多,并通过reachEndIncreament通知开发加载更多,reachEndLoadMoreFinish 通知上层加载更多完成
fixedHeightMode: boolean = false
@Prop @Watch("parentOnReachEnd") reachEndIncreament : number = 0
reachEndLoadMoreFinish?: () => void
// 在自定义组件即将析构销毁时将dialogControlle置空
aboutToDisappear() {
this.dialogController = null // 将dialogController置空
... ... @@ -183,28 +191,49 @@ export struct CommentComponent {
// 加载更多
ListItem() {
if (this.hasMore === false) {
if (this.hasMore == false) {
NoMoreLayout()
}
}
}
}
.margin({bottom: 10})
.onReachEnd(() => {
if (!this.fixedHeightMode) {
return
}
if (this.hasMore) {
this.getData()
}
})
.enableScrollInteraction(false)
.enableScrollInteraction(this.fixedHeightMode ? true: false)
// .nestedScroll({
// scrollForward: NestedScrollMode.PARENT_FIRST,
// scrollBackward: NestedScrollMode.SELF_FIRST
// })
}
}
parentOnReachEnd() {
if (this.fixedHeightMode) {
return
}
if (this.hasMore) {
this.getData()
} else {
if (this.reachEndLoadMoreFinish) {
this.reachEndLoadMoreFinish()
}
}
}
//获取数据
async getData() {
commentViewModel.fetchContentCommentList(this.currentPage + '', this.publishCommentModel.targetId,
this.publishCommentModel.targetType)
.then(commentListModel => {
console.log('评论:', JSON.stringify(commentListModel.list))
this.currentPage++
if (Number.parseInt(commentListModel.totalCommentNum) >
... ... @@ -237,6 +266,9 @@ export struct CommentComponent {
} else {
this.hasMore = false
}
if (!this.fixedHeightMode && this.reachEndLoadMoreFinish) {
this.reachEndLoadMoreFinish()
}
})
}
}
... ... @@ -247,6 +279,7 @@ struct ChildCommentItem {
@Link publishCommentModel: publishCommentModel
@Link dialogController: CustomDialogController | null
@ObjectLink item: commentItemModel
@Consume contentDetailData: ContentDetailDTO
build() {
Column() {
... ... @@ -271,6 +304,14 @@ struct ChildCommentItem {
.alignContent(Alignment.Center)
.onClick(() => {
// TODO 跳转个人详情
// 跳转到号主页
if (this.contentDetailData.rmhInfo?.cnMainControl === 1) {
const params: Params = {
creatorId: this.contentDetailData.rmhInfo.rmhId,
pageID: ''
}
WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params)
}
})
//昵称
... ... @@ -455,7 +496,7 @@ struct commentHeaderView {
.margin({ left: 8 })
.alignContent(Alignment.Center)
.onClick(() => {
// TODO 跳转个人详情
commentViewModel.jumpToAccountPage(this.item)
})
//昵称
... ...
import { ContentDetailDTO, PageInfoDTO } from 'wdBean/Index'
import { publishCommentModel } from '../model/PublishCommentModel'
@CustomDialog
export struct CommentListDialog {
/// 内部使用
private publishCommentModel: publishCommentModel = new publishCommentModel()
controller?: CustomDialogController
/// 外部初始化
contentDetail?: ContentDetailDTO
pageInfo?: PageInfoDTO
build() {
}
}
\ No newline at end of file
... ...
... ... @@ -11,11 +11,12 @@ export struct CommentTabComponent {
}
@ObjectLink publishCommentModel: publishCommentModel
@Prop contentDetail: ContentDetailDTO
@Prop pageComponentType: number = -1 //1:视频详情页
/*展示类型*/
@State type: number = 1
@State placeHolder: string = '说两句...'
@State dialogController: CustomDialogController | null = null;
styleType : number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏)
styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏)
/*回调方法*/
dialogControllerConfirm: () => void = () => {
}
... ... @@ -46,9 +47,36 @@ export struct CommentTabComponent {
Row() {
Stack({ alignContent: Alignment.Start }) {
RelativeContainer() {
if (this.pageComponentType === 1) {
Row() {
}
.width('100%')
.height(30)
.borderRadius(2)
.backgroundColor(this.pageComponentType === 1 ? '#1a1a1a' : Color.Transparent)
.margin({
right: 16,
})
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start },
right: { anchor: "__container__", align: HorizontalAlign.End },
bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
})
.id("RowBg")
} else {
Image($r('app.media.comment_img_input_hui'))
.objectFit(ImageFit.Fill)
.resizable({ slice: { top: 1, left: 1, right: 20, bottom: 1 } })
.resizable({
slice: {
top: 1,
left: 1,
right: 20,
bottom: 1
}
})
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start },
... ... @@ -56,6 +84,7 @@ export struct CommentTabComponent {
bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
})
.id("Image")
}
Text(this.placeHolder)
.fontSize(12)
.fontColor('#999999')
... ... @@ -91,7 +120,7 @@ export struct CommentIconComponent {
@ObjectLink publishCommentModel: publishCommentModel
/*展示类型*/
@State type: number = 1
styleType : number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏)
styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏)
// aboutToAppear(): void {
// setTimeout(() => {
// this.publishCommentModel.totalCommentNumer = '444'
... ...
... ... @@ -412,33 +412,7 @@ 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("暂时无法查看该创作者主页")
})
commentViewModel.jumpToAccountPage(this.item)
}
jumpToDetail() {
... ...
import { MasterDetailRes } from 'wdBean/Index';
import { SpConstants } from 'wdConstant/Index';
import { DateTimeUtils, Logger, SPHelper, ToastUtils, UserDataLocal } from 'wdKit/Index';
import {
AccountManagerUtils,
DateTimeUtils, DeviceUtil, Logger, SPHelper, ToastUtils, UserDataLocal } from 'wdKit/Index';
import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO } from 'wdNetwork/Index';
import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest';
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import {
commentItemModel,
commentListModel,
... ... @@ -160,7 +164,9 @@ class CommentViewModel {
publishComment(model: publishCommentModel) {
return new Promise<commentItemModel>((success, fail) => {
let url = HttpUrlUtils.getPublishCommentUrl()
const visitorMode = model.visitorComment == "1" && AccountManagerUtils.isLoginSync() == false
let url = visitorMode ? HttpUrlUtils.getNoUserPublishCommentUrl() : HttpUrlUtils.getPublishCommentUrl()
let bean: Record<string, string> = {};
bean['targetId'] = model.targetId;
... ... @@ -176,6 +182,11 @@ class CommentViewModel {
bean['targetType'] = model.targetType
bean['parentId'] = model.parentId
if (visitorMode) {
bean['deviceId'] = DeviceUtil.clientId()
bean['userName'] = SPHelper.default.getSync(SpConstants.TOURIST_NICK_NAME, "") as string
}
HttpRequest.post<ResponseDTO<commentItemModel>>(url, bean).then((data: ResponseDTO<commentItemModel>) => {
if (data.code != 0) {
ToastUtils.showToast(data.message, 1000);
... ... @@ -185,10 +196,9 @@ class CommentViewModel {
ToastUtils.showToast(data.message, 1000);
let model = data.data as commentItemModel
let userId = HttpUtils.getUserId()
let FIRSTCOMMENTTIME = SPHelper.default.getSync(SpConstants.FIRSTCOMMENTTIME, '')
let firstCommentTime = SPHelper.default.getSync(SpConstants.FIRSTCOMMENTTIME, '') as string
if (!userId && !FIRSTCOMMENTTIME) {
if (visitorMode && firstCommentTime.length == 0) {
//保存首次评论时间
SPHelper.default.saveSync(SpConstants.FIRSTCOMMENTTIME, DateTimeUtils.formatDate(data.timestamp, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
}
... ... @@ -472,6 +482,36 @@ class CommentViewModel {
}
return false
}
jumpToAccountPage(commentItem: commentItemModel) {
let url = HttpUrlUtils.getOtherUserDetailDataUrl()
let item : Record<string, string >= {
"creatorId": commentItem.fromCreatorId || "",
"userType": `${commentItem.fromUserType}`,
"userId": commentItem.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("暂时无法查看该创作者主页")
})
}
}
... ...
... ... @@ -214,7 +214,7 @@ struct CarouselLayout01CardView {
.align(Alignment.Bottom)
.maxLines(CompUtils.MAX_LINES_2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.textIndent(this.item.objectType == '5' ? 40 : 0)
.textIndent(this.item.objectType == '5' ? 35 : 0)
}
// .height(39)
.padding({
... ...
... ... @@ -40,6 +40,7 @@ export struct ZhSingleRow03 {
// 请求所有预约状态
async getReserveState() {
this.reservedIds = []
const reserveBean: reserveReqItem[] = this.compDTO.operDataList.map((item: ContentDTO) => {
const reqItem: reserveReqItem = {
liveId: item.objectId.toString(),
... ...
... ... @@ -5,13 +5,10 @@ import { ProcessUtils } from 'wdRouter';
import { SpConstants } from 'wdConstant/Index'
import {
batchLikeAndCollectParams,
ContentDetailRequest,
contentListParams,
postExecuteCollectRecordParams,
postExecuteLikeParams,
postInteractAccentionOperateParams
} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel';
import commentViewModel from '../../components/comment/viewmodel/CommentViewModel';
import { commentItemModel } from '../../components/comment/model/CommentModel'
/**
* 精选评论卡
... ... @@ -22,7 +19,9 @@ const TAG = 'Zh_Single_Row-06'
@Component
export struct ZhSingleRow06 {
@State compDTO: CompDTO = {} as CompDTO
@State newsStatusOfUser: batchLikeAndCollectResult = {} as batchLikeAndCollectResult // 点赞、收藏状态
@State newsStatusOfUser: batchLikeAndCollectResult = {
likeStatus: '0'
} as batchLikeAndCollectResult // 点赞、收藏状态
aboutToAppear(): void {
this.getInteractDataStatus()
... ... @@ -38,18 +37,24 @@ export struct ZhSingleRow06 {
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
return
}
const params: postExecuteLikeParams = {
status: this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1',
contentId: this.compDTO.operDataList[0]?.commentInfo?.newsId + '',
contentType: this.compDTO.operDataList[0]?.commentInfo?.newsType + '',
}
ContentDetailRequest.postExecuteLike(params).then(res => {
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1'
const commentInfo = this.compDTO.operDataList[0]?.commentInfo as commentInfo;
// commentLikeChange(this.item)
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser.likeStatus === '1' ? '0' : '1';
const commentLikeParam = {
targetId: commentInfo.newsId || '',
id: commentInfo.commentId,
targetType: commentInfo?.objectType || '',
api_status: this.newsStatusOfUser?.likeStatus == '1' ? false : true
} as commentItemModel;
commentViewModel.commentLike(commentLikeParam).then(() => {
}).catch(() => {
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser.likeStatus === '1' ? '0' : '1';
})
}
// 已登录->查询用户对作品点赞、收藏状态
private async getInteractDataStatus() {
async getInteractDataStatus() {
// 未登录,跳转登录
const user_id = await SPHelper.default.get(SpConstants.USER_ID, '')
if (!user_id) {
... ... @@ -65,7 +70,7 @@ export struct ZhSingleRow06 {
]
}
let data = await MultiPictureDetailViewModel.getInteractDataStatus(params)
console.error(TAG, 'ZhSingleRow06-data', JSON.stringify(data))
Logger.info(TAG, 'ZhSingleRow06-data', JSON.stringify(data))
this.newsStatusOfUser = data[0];
Logger.info(TAG, `ZhSingleRow06-newsStatusOfUser:${JSON.stringify(this.newsStatusOfUser)}`)
} catch (exception) {
... ... @@ -124,7 +129,7 @@ export struct ZhSingleRow06 {
.fontColor(0x999999)
Row(){
Image(this.newsStatusOfUser?.likeStatus == '1' ? $r('app.media.icon_like_select') : $r('app.media.icon_like'))
Image(Number(this.newsStatusOfUser?.likeStatus) == 1 ? $r('app.media.icon_like_select') : $r('app.media.icon_like'))
.width(16)
.height(16)
.margin({right: 3})
... ...
/**
* 直播页面点赞动画
*/
interface animationItem {
x: string | number;
y: string | number;
opacity: number;
name: string;
key: string;
url: Resource
}
@Component
export struct LikeAnimationView {
@State @Watch('countChange') count: number = 0
@State imgList: Resource[] =
[$r('app.media.like_animation_1'), $r('app.media.like_animation_2'), $r('app.media.like_animation_3')]
@State animationList: animationItem[] = []
countChange() {
this.animationList.push({
name: 'xxxx',
x: 0,
y: 0,
opacity: 1,
key: Math.random() + '',
url: this.getRandomUrl()
})
}
getRandomUrl(): Resource {
if (Math.random() >= 0 && Math.random() >= 0.33) {
return this.imgList[0]
} else if (Math.random() >= 0.33 && Math.random() >= 0.66) {
return this.imgList[1]
} else {
return this.imgList[2]
}
}
startAnimation() {
}
stopAnimation() {
}
aboutToAppear(): void {
}
aboutToDisappear(): void {
}
build() {
Stack() {
ForEach(this.animationList, (item: animationItem) => {
Image(item.url)
.width(48)
.height(48)
}, (item: animationItem) => item.key)
}
}
}
\ No newline at end of file
... ...
import lottie, { AnimationSegment } from '@ohos/lottie';
import lottie, { AnimationItem, AnimationSegment } from '@ohos/lottie';
@Component
export struct LottieView {
@Prop name: string = ''
@Prop path: string = ''
@Prop lottieWidth?: number = 30
@Prop lottieHeight?: number = 30
@Prop autoplay?: boolean = false
@Prop loop?: boolean = false
@Prop name: string
@Prop path: string
@Prop lottieWidth: number = 30
@Prop lottieHeight: number = 30
@Prop autoplay: boolean = false
@Prop loop: boolean = false
@Prop initialSegment?: AnimationSegment = [0, 120] // 动画起始帧
@Prop onReady: (animateItem: ESObject) => void // 动画初始化完成事件
@Prop onReady: (animateItem: AnimationItem | null) => void // 动画初始化完成事件
@Prop onComplete?: () => void // 动画完成事件
private politeChickyController: CanvasRenderingContext2D = new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象
private animateItem: ESObject = null; // 初始化loadAnimation接口的返回对象
private politeChickyController: CanvasRenderingContext2D =
new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象
private animateItem: AnimationItem | null = null; // 初始化loadAnimation接口的返回对象
// 页面隐藏销毁动画
onPageHide(): void {
this.animateItem.destroy()
this.animateItem?.destroy()
if (this.onComplete) {
this.animateItem.removeEventListener('complete', this.onComplete)
this.animateItem?.removeEventListener('complete', this.onComplete)
}
}
... ... @@ -44,7 +45,7 @@ export struct LottieView {
// initialSegment: this.initialSegment
})
if (this.initialSegment) {
this.animateItem.initialSegment = this.initialSegment
this.animateItem.segments = this.initialSegment
}
if (this.onComplete) {
... ... @@ -57,7 +58,7 @@ export struct LottieView {
Stack({ alignContent: Alignment.TopStart }) {
Canvas(this.politeChickyController)
.width(this.lottieWidth)
.height(this.lottieHeight)
.height(this.lottieHeight)// .backgroundColor(Color.Black)
.onReady(() => {
this.loadAnimation();
if (this.onReady) {
... ... @@ -65,7 +66,7 @@ export struct LottieView {
}
})
.onClick(() => {
this.animateItem.play()
this.animateItem?.play()
})
}
}
... ...
import { WDRouterRule, WDRouterPage } from 'wdRouter'
import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem'
import { PagePersonFunction } from './PagePersonFunction'
@Component
export default struct MinePagePersonFunctionUI {
... ... @@ -10,30 +11,7 @@ export default struct MinePagePersonFunctionUI {
Grid(){
ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{
GridItem(){
Row(){
Column(){
Image(item.imgSrc)
.width('46lpx')
.height('46lpx')
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
Text(`${item.msg}`)
.margin({top:'8lpx'})
.height('23lpx')
.fontColor($r('app.color.color_222222'))
.fontSize('23lpx')
}
.alignItems(HorizontalAlign.Center)
.width('100%')
Blank()
.layoutWeight(1)
if(index % 4 < 3 && index != this.personalData.length-1){
Text().backgroundColor($r('app.color.color_222222'))
.opacity(0.1)
.width('2lpx')
.height('29lpx')
}
}
PagePersonFunction({ item: item, noDivider : (index % 4 < 3 && index != this.personalData.length-1) ? false : true})
}.onClick(()=>{
console.log(index+"")
switch (item.msg){
... ... @@ -98,3 +76,4 @@ export default struct MinePagePersonFunctionUI {
.margin({top:'31lpx',left:'23lpx',right:'23lpx' })
}
}
... ...
import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem'
@Component
export struct PagePersonFunction{
@ObjectLink item: MinePagePersonalFunctionsItem
@State noDivider:boolean = false
build() {
Row(){
Column(){
Stack({ alignContent: Alignment.TopEnd }){
Image(this.item.imgSrc)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
if (this.item.isShowRedPoint) {
Button()
.type(ButtonType.Circle)
.width("12lpx")
.height("12lpx")
.backgroundColor($r('app.color.color_ED2800'))
}
}.width('46lpx')
.height('46lpx')
Text(`${this.item.msg}`)
.margin({top:'8lpx'})
.height('23lpx')
.fontColor($r('app.color.color_222222'))
.fontSize('23lpx')
}
.alignItems(HorizontalAlign.Center)
.width('100%')
Blank()
.layoutWeight(1)
if(!this.noDivider){
Text().backgroundColor($r('app.color.color_222222'))
.opacity(0.1)
.width('2lpx')
.height('29lpx')
}
}
}
}
\ No newline at end of file
... ...
import { SpConstants } from 'wdConstant/Index'
import { DateTimeUtils, SPHelper, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index'
import { SPHelper, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index'
import { HttpUtils } from 'wdNetwork/Index'
import { WDRouterRule, WDRouterPage } from 'wdRouter/Index'
import MinePageDatasModel from '../../../model/MinePageDatasModel'
... ... @@ -116,9 +116,14 @@ export struct FollowChildComponent{
}.height('202lpx')
.justifyContent(FlexAlign.Start)
Text().backgroundColor($r('app.color.color_EDEDED'))
// Text().backgroundColor($r('app.color.color_EDEDED'))
// .width('100%')
// .height('2lpx')
Divider()
.width('100%')
.height('2lpx')
.color($r('app.color.color_F5F5F5'))
.strokeWidth('1lpx')
}.width('100%')
}else {
... ... @@ -230,9 +235,15 @@ export struct FollowChildComponent{
}.height('146lpx')
.justifyContent(FlexAlign.Center)
Text().backgroundColor($r('app.color.color_EDEDED'))
// Text().backgroundColor($r('app.color.color_EDEDED'))
// .width('100%')
// .height('2lpx')
Divider()
.width('100%')
.height('2lpx')
.color($r('app.color.color_F5F5F5'))
.strokeWidth('1lpx')
}.width('100%')
}
... ... @@ -255,12 +266,6 @@ export struct FollowChildComponent{
this.data.status = this.data.status ==="0"?"1":"0"
UserDataLocal.setUserFollowOperation(this.data.creatorId+","+this.data.status)
// if(this.data.status === "1"){
// UserDataLocal.setUserFollowOperation(DateTimeUtils.getTimeStamp()+"")
// }else{
// UserDataLocal.setUserFollowOperation(DateTimeUtils.getTimeStamp()+","+this.data.creatorId)
// }
}
}
})
... ...
import { StringUtils, ToastUtils } from 'wdKit/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import MinePageDatasModel from '../../../model/MinePageDatasModel'
import { MessageItem } from '../../../viewmodel/MessageItem'
import { CustomTitleUI } from '../../reusable/CustomTitleUI'
... ... @@ -86,6 +87,7 @@ export struct MessageListUI {
ToastUtils.shortToast(index+"")
switch (index) {
case 0: //互动消息
WDRouterRule.jumpWithPage(WDRouterPage.interactMessagePage)
break;
case 1: //预约消息
break;
... ...
... ... @@ -85,6 +85,7 @@ export struct BottomNavigationComponent {
VideoChannelPage({
topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),
_currentNavIndex: $currentNavIndex,
autoRefresh: this.autoRefresh
})
} else {
TopNavigationComponent({
... ...
import MyCollectionViewModel from '../../viewmodel/MyCollectionViewModel';
import InteractMessageViewModel from '../../viewmodel/InteractMessageViewModel';
import PageModel from '../../viewmodel/PageModel';
import { CommonConstants, ViewType } from 'wdConstant'
import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'
import { ContentDTO } from 'wdBean'
import NoMoreLayout from './NoMoreLayout'
import CustomRefreshLoadLayout from './CustomRefreshLoadLayout';
import { CustomSelectUI } from '../view/CustomSelectUI';
import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI';
import { BigPicCardComponent } from '../view/BigPicCardComponent';
import { CustomTitleUI } from '../reusable/CustomTitleUI';
import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';
import { InteractMComponent } from '../InteractMessage/InteractMComponent';
import { InteractMessageModel, WDMessageCenterMessageType } from '../../model/InteractMessageModel';
import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';
@Entry
@Component
... ... @@ -20,39 +16,40 @@ struct InteractMessagePage {
@State private browSingModel: PageModel = new PageModel()
isloading : boolean = false
@Provide isEditState:boolean = false
@State allDatas :ContentDTO[] = [];
@State allDatas :InteractMessageModel[] = [];
private scroller: Scroller = new Scroller();
@State likeNum: number = 20
@State likeNum: number = 0
@State currentPage: number = 1;
aboutToAppear(){
this.getData()
this.getMessageLikeCount()
}
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_NoHistory})
}else {
CustomPullToRefresh({
alldata:this.allDatas,
scroller:this.scroller,
customList:()=>{
this.ListLayout()
// if(this.browSingModel.viewType == ViewType.ERROR){
// EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NetworkFailed})
// }else if(this.browSingModel.viewType == ViewType.EMPTY){
// EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoHistory})
// }else {
// CustomPullToRefresh({
// alldata:this.allDatas,
// scroller:this.scroller,
// customList:()=>{
// this.ListLayout()
// },
// onRefresh:(resolve)=>{
// this.browSingModel.currentPage = 0
// this.getData(resolve)
// },
// onLoadMore:(resolve)=> {
// this.browSingModel.currentPage++
// this.getData()
// }
// })
// }
},
onRefresh:(resolve)=>{
this.browSingModel.currentPage = 0
this.getData(resolve)
},
onLoadMore:(resolve)=> {
this.browSingModel.currentPage++
this.getData()
}
})
}
}
.width(CommonConstants.FULL_WIDTH)
... ... @@ -66,9 +63,9 @@ struct InteractMessagePage {
}
// 下拉刷新
ForEach(this.allDatas, (compDTO: ContentDTO, compIndex: number) => {
ForEach(this.allDatas, (InteractM: InteractMessageModel, compIndex: number) => {
ListItem() {
InteractMComponent()
InteractMComponent({messageModel:InteractM})
}
})
// 加载更多
... ... @@ -112,12 +109,22 @@ struct InteractMessagePage {
}
async getData(resolve?: (value: string | PromiseLike<string>) => void){
MyCollectionViewModel.fetchMyCollectList(2,'1',this.browSingModel.currentPage,getContext(this)).then(collectionItem => {
InteractMessageViewModel.fetchMessageList(WDMessageCenterMessageType.WDMessageCenterMessageType_Interact,this.currentPage).then(InteractMessageMItem => {
if(resolve) resolve('刷新成功')
if (collectionItem && collectionItem.list && collectionItem.list.length > 0) {
if (InteractMessageMItem && InteractMessageMItem.list && InteractMessageMItem.list.length > 0) {
this.browSingModel.viewType = ViewType.LOADED;
this.allDatas.push(...collectionItem.list)
if (collectionItem.list.length === this.browSingModel.pageSize) {
if (this.currentPage === 1) {
this.allDatas = []
}
for (let index = 0; index < InteractMessageMItem.list.length; index++) {
const element = InteractMessageMItem.list[index];
element.InteractMsubM = JSON.parse(element.remark)
}
this.allDatas.push(...InteractMessageMItem.list)
if (InteractMessageMItem.list.length === this.browSingModel.pageSize) {
this.browSingModel.currentPage++;
this.browSingModel.hasMore = true;
} else {
... ... @@ -129,4 +136,11 @@ struct InteractMessagePage {
})
}
async getMessageLikeCount(){
InteractMessageViewModel.getMessageLikeCount().then(num => {
this.likeNum = num
})
}
}
... ...
... ... @@ -53,8 +53,25 @@ export struct MinePageComponent {
this.getUserLogin()
this.getFunctionData()
this.addLoginStatusObserver()
this.getMessageData()
}
getMessageData(){
MinePageDatasModel.getMessageUnReadData().then((value) => {
if(value !=null) {
if(value.activeCount >0 ||value.subscribeCount > 0 || value.systemCount > 0){
this.personalData.forEach((value) => {
if(value.msg == "消息")
value.isShowRedPoint = true
})
}
}
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
})
}
async addLoginStatusObserver(){
this.preferences = await SPHelper.default.getPreferences();
this.preferences.on('change', this.observer);
... ...
... ... @@ -21,6 +21,7 @@ const TAG = 'PageComponent';
export struct PageComponent {
@State private pageModel: PageModel = new PageModel();
@State private pageAdvModel: PageAdModel = new PageAdModel();
@State timer: number = -1
navIndex: number = 0;
pageId: string = "";
channelId: string = "";
... ... @@ -29,6 +30,7 @@ export struct PageComponent {
@Prop @Watch('onAutoRefresh') autoRefresh: number = 0
private listScroller: Scroller = new Scroller();
needload: boolean = true;
build() {
Column() {
if (this.pageModel.viewType == ViewType.LOADING) {
... ... @@ -222,9 +224,10 @@ export struct PageComponent {
}
onChange() {
Logger.info(TAG, `onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`);
Logger.info(TAG,
`onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`);
if (this.navIndex === this.currentTopNavSelectedIndex) {
if(this.needload){
if (this.needload) {
this.getData();
}
this.needload = false;
... ... @@ -242,6 +245,10 @@ export struct PageComponent {
}
async getData() {
if (this.timer) {
clearTimeout(this.timer)
}
this.timer = setTimeout(() => {
Logger.info(TAG, `getData id: ${this.pageId} , ${this.channelId} , navIndex: ${this.currentTopNavSelectedIndex}`);
this.pageModel.pageId = this.pageId;
this.pageModel.groupId = this.pageId;
... ... @@ -249,6 +256,8 @@ export struct PageComponent {
this.pageModel.currentPage = 1;
this.pageModel.pageTotalCompSize = 0;
PageHelper.getInitData(this.pageModel, this.pageAdvModel)
}, 100)
}
}
... ...
... ... @@ -13,6 +13,7 @@ import {
PeopleShipUserDetailData,
ArticleCountData
} from 'wdBean'
import { EmptyComponent } from '../view/EmptyComponent'
@Entry
@Component
... ... @@ -35,11 +36,20 @@ struct PeopleShipHomePage {
@Provide @Watch('handleChangeAttentionStata') isLoadingAttention: boolean = false
//关注显示
@State attentionOpacity: boolean = false
@Provide topHeight: number = 400
@Provide topHeight: number = 286
@State isLoading: boolean = true
build() {
Stack({ alignContent: Alignment.TopStart }) {
// 顶部图片
Image($r('app.media.home_page_bg'))
.width('100%')
.height('120vp')
.objectFit(ImageFit.Fill)
.backgroundColor(Color.White)
.visibility(this.isLoading ? Visibility.None : Visibility.Visible)
Column(){
// 头部返回
PeopleShipHomePageNavComponent({
attentionOpacity: this.attentionOpacity,
... ... @@ -47,9 +57,7 @@ struct PeopleShipHomePage {
detailModel: this.detailModel
})
.height($r('app.float.top_bar_height'))
.zIndex(100)
.backgroundColor(Color.Transparent)
if (this.detailModel && this.detailModel.userName) {
Scroll(this.scroller) {
Column() {
... ... @@ -62,24 +70,32 @@ struct PeopleShipHomePage {
})
.width("100%")
.height(this.topHeight)
// 列表
Column(){
PeopleShipHomeListComponent({
publishCount: this.publishCount,
creatorId: this.creatorId
})
}.height('100%')
}
.width("100%")
.justifyContent(FlexAlign.Start)
.alignItems(HorizontalAlign.Start)
// .height('100%')
// .height(this.publishCount == 0 ? '100%' : '')
}
.scrollable(ScrollDirection.Vertical)
// .alignSelf(ItemAlign.Start)
// .align(Alignment.Start)
.edgeEffect(EdgeEffect.None)
.friction(0.6)
.friction(0.7)
.backgroundColor(Color.White)
.scrollBar(BarState.Off)
.width('100%')
.height('100%')
.height('calc(100% - 44vp)')
// .layoutWeight(1)
.onDidScroll(() => {
// this.topOpacity = yOffset / (this.getDeviceHeight() * 0.2)
this.topOpacity = this.scroller.currentOffset().yOffset / 100
... ... @@ -94,6 +110,13 @@ struct PeopleShipHomePage {
}
}
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Start)
.width('100%')
// .height('100%')
}
// .height('100%')
.width('100%')
}
... ... @@ -104,9 +127,11 @@ struct PeopleShipHomePage {
private async getData() {
try {
this.isLoading = true
// 获取页面信息
this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '')
Logger.debug('PeopleShipHomePage', '获取页面信息' + `${JSON.stringify(this.detailModel)}`)
this.isLoading = false
// 获取关注
// 登录后获取,是否关注
... ... @@ -117,7 +142,7 @@ struct PeopleShipHomePage {
}
} catch (exception) {
this.isLoading = false
}
}
... ...
import { insightIntent } from '@kit.IntentsKit';
import { BottomNavDTO, CompDTO, TopNavDTO } from 'wdBean';
import { SpConstants } from 'wdConstant';
import { DisplayUtils, LazyDataSource, Logger, SPHelper, NetworkUtil, ToastUtils } from 'wdKit';
import { DisplayUtils, LazyDataSource, Logger, NetworkUtil, SPHelper, ToastUtils } from 'wdKit';
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter';
import { PageComponent } from './PageComponent';
import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout';
... ... @@ -8,6 +9,7 @@ import { FirstTabTopSearchComponent } from '../search/FirstTabTopSearchComponent
import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils';
import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent';
import { channelSkeleton } from '../skeleton/channelSkeleton';
import { common } from '@kit.AbilityKit';
const TAG = 'TopNavigationComponent';
... ... @@ -37,6 +39,7 @@ export struct TopNavigationComponent {
// 顶导当前选中/焦点下标
@State currentTopNavSelectedIndex: number = 0;
@State currentTopNavName: string = '';
@State currentTopNavItem: TopNavDTO = {} as TopNavDTO
// 顶导数据
@State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = []
@State compList: LazyDataSource<CompDTO> = new LazyDataSource();
... ... @@ -58,6 +61,8 @@ export struct TopNavigationComponent {
@Prop @Watch('onAutoRefresh') autoRefresh: number = 0
// 传递给page的自动刷新通知
@State autoRefresh2Page: number = 0
//保存当前导航选中时的时间戳 意图开始时间
@State executedStartTime: number = new Date().getTime()
// 当前底导index
@State navIndex: number = 0
@State animationDuration: number = 0
... ... @@ -167,6 +172,7 @@ export struct TopNavigationComponent {
this.currentTopNavSelectedIndex = index
this.currentTopNavName = this.myChannelList[index].name
}
this.currentTopNavItem = this.myChannelList[this.currentTopNavSelectedIndex]
}
isBroadcast(item: TopNavDTO) {
... ... @@ -184,6 +190,49 @@ export struct TopNavigationComponent {
return item.channelType === 3
}
//意图共享
topNavInsightIntentShare(item: TopNavDTO){
let tapNavIntent: insightIntent.InsightIntent = {
intentName: 'ViewColumn',
intentVersion: '1.0.1',
identifier: '52dac3b0-6520-4974-81e5-25f0879449b5',
intentActionInfo: {
actionMode: 'EXPECTED',
currentPercentage: 50,
executedTimeSlots: {
executedEndTime: new Date().getTime(),
executedStartTime: this.executedStartTime
}
},
intentEntityInfo: {
entityName: 'ViewColumn',
entityId: String(item.pageId) || '',
displayName: item.name,
logoURL: 'https://www-file.huawei.com/-/media/corporate/images/home/logo/huawei_logo.png',
rankingHint: 99,
isPublicData: true
}
}
try {
let context = getContext(this) as common.UIAbilityContext;
// 共享数据
insightIntent.shareIntent(context, [tapNavIntent], (error) => {
if (error?.code) {
// 处理业务逻辑错误
console.error(`shareIntent failed, error.code: ${error?.code}, error.message: ${error?.message}`);
return;
}
// 执行正常业务
console.log('shareIntent succeed');
});
} catch (error) {
// 处理异常
console.error(`error.code: ${error?.code}, error.message: ${error?.message}`);
}
}
build() {
Column() {
// 顶部搜索、日报logo、早晚报
... ... @@ -278,7 +327,11 @@ export struct TopNavigationComponent {
if (!this.isBroadcast(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index]) &&
!this.isLayout(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index])
) {
//在 tab 切换之前意图共享
// this.topNavInsightIntentShare(this.currentTopNavItem)
this.currentTopNavSelectedIndex = index;
this.currentTopNavItem = this.myChannelList[index]
}
if (this.isBroadcast(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index])) {
// 跳转到播报页面
... ... @@ -416,9 +469,11 @@ export struct TopNavigationComponent {
this.changeByClick = true
this.tabsController.changeIndex(index)
}
})
}
aboutToAppear() {
//处理新闻tab顶导频道数据
this.topNavListHandle()
... ...
... ... @@ -13,6 +13,8 @@ export struct VideoChannelPage {
readonly MAX_LINE: number = 1;
private groupId: number = 0
private swiperController: SwiperController = new SwiperController()
// 自动刷新触发(双击tab自动刷新)
@Prop autoRefresh: number = 0
@Prop topNavList: TopNavDTO[]
@Link _currentNavIndex?: number;
@Consume barBackgroundColor: Color
... ... @@ -91,8 +93,12 @@ export struct VideoChannelPage {
right: $r('app.float.top_tab_item_padding_horizontal'),
})
.onClick(() => {
if (this.currentTopNavSelectedIndex === index) {
this.autoRefresh++
}
this.currentTopNavSelectedIndex = index
this.swiperController.changeIndex(index, true)
})
}, (item: TopNavDTO) => item.channelId + '')
}
... ... @@ -113,6 +119,7 @@ export struct VideoChannelPage {
groupId: this.groupId + '',
pageId: item.pageId + '',
channelId: item.channelId + '',
autoRefresh: this.autoRefresh,
})
} else {
// 直播
... ... @@ -121,7 +128,7 @@ export struct VideoChannelPage {
navIndex: index,
pageId: item.pageId + '',
channelId: item.channelId + '',
autoRefresh: this.autoRefresh2Page
autoRefresh: this.autoRefresh
}).margin({ top: 40 })
}
}, (item: TopNavDTO) => item.channelId + '')
... ...
import { Logger, DisplayUtils} from 'wdKit'
import { Logger} from 'wdKit'
import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel'
import {
ContentDTO,
... ... @@ -16,11 +16,11 @@ import {
} from 'wdBean'
import { CardParser } from '../CardParser'
import { PageRepository } from '../../repository/PageRepository'
import { RefreshLayoutBean } from '../page/RefreshLayoutBean'
import CustomRefreshLoadLayout from '../page/CustomRefreshLoadLayout'
import { ErrorComponent } from '../view/ErrorComponent'
import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh'
import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'
import LoadMoreLayout from '../page/LoadMoreLayout'
const TAG = 'PeopleShipHomeArticleListComponent';
... ... @@ -47,45 +47,29 @@ export struct PeopleShipHomeArticleListComponent {
} else if (this.viewType == 2) {
ErrorComponent()
} else {
CustomPullToRefresh({
alldata:this.arr,
scroller:this.scroller,
hasMore: this.hasMore,
customList:()=>{
this.ListLayout()
},
onRefresh:(resolve)=>{
this.currentPage = 1
this.getPeopleShipPageArticleList(resolve)
},
onLoadMore:(resolve)=> {
if (this.hasMore === false) {
if(resolve) {
resolve('')
}
return
}
if(!this.isLoading && this.hasMore){
//加载分页数据
this.currentPage++;
this.getPeopleShipPageArticleList(resolve)
}else {
if(resolve) {
resolve('')
}
}
},
})
// CustomPullToRefresh({
// alldata:this.arr,
// scroller:this.scroller,
// hasMore: false,
// customList:()=>{
// this.ListLayout()
// },
// onRefresh:(resolve)=>{
// this.currentPage = 1
// this.getPeopleShipPageArticleList(resolve)
// },
// })
}
}
@Builder
LoadingLayout() {
CustomRefreshLoadLayout({
refreshBean: new RefreshLayoutBean(true,
$r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), 20)
}).height(DisplayUtils.getDeviceHeight() - this.topHeight)
// CustomRefreshLoadLayout({
// refreshBean: new RefreshLayoutBean(true,
// $r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), 20)
// }).height(DisplayUtils.getDeviceHeight() - this.topHeight)
}
@Builder
... ... @@ -93,7 +77,6 @@ export struct PeopleShipHomeArticleListComponent {
List({scroller: this.scroller}) {
// 下拉刷新
ForEach(this.arr, (item: ContentDTO) => {
ListItem() {
CardParser({ contentDTO: item })
... ... @@ -103,11 +86,14 @@ export struct PeopleShipHomeArticleListComponent {
// 加载更多
ListItem() {
if (!this.hasMore && !this.isLoading) {
if (this.hasMore && this.arr && this.arr.length > 0) {
LoadMoreLayout({ isVisible: this.hasMore })
} else if (!this.hasMore && !this.isLoading) {
PeopleShipNoMoreData()
}
}
}
.backgroundColor(Color.Transparent)
.width("100%")
.height("100%")
.edgeEffect(EdgeEffect.None)
... ... @@ -115,13 +101,13 @@ export struct PeopleShipHomeArticleListComponent {
scrollForward: NestedScrollMode.PARENT_FIRST,
scrollBackward: NestedScrollMode.SELF_FIRST
})
// .onReachEnd(() => {
// if(!this.isLoading && this.hasMore){
// //加载分页数据
// this.getPeopleShipPageArticleList()
// }
// })
.onReachEnd(() => {
if(!this.isLoading && this.hasMore){
//加载分页数据
this.currentPage++;
this.getPeopleShipPageArticleList()
}
})
}
aboutToAppear() {
... ... @@ -313,7 +299,6 @@ export struct PeopleShipHomeArticleListComponent {
}
}
// this.arr = listData.list
}
... ...
... ... @@ -24,10 +24,10 @@ export struct PeopleShipHomeListComponent {
// 列表
else if (this.publishCount == 0) {
// 无数据展示
EmptyComponent({emptyType: 12}).height(DisplayUtils.getDeviceHeight() - this.topHeight)
EmptyComponent({emptyType: 12}).height('100%')
} else {
Column() {
Column() {
Stack({ alignContent: Alignment.Top }){
// 页签
Row() {
Scroll() {
... ... @@ -44,13 +44,10 @@ export struct PeopleShipHomeListComponent {
.scrollBar(BarState.Off)
.width('100%')
}
.zIndex(10)
.backgroundColor(Color.White)
.alignItems(VerticalAlign.Bottom)
.width('100%')
}
.justifyContent(FlexAlign.Start)
.height('44vp')
.alignItems(HorizontalAlign.Start)
.alignItems(VerticalAlign.Bottom)
.width('100%')
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
... ... @@ -63,15 +60,15 @@ export struct PeopleShipHomeListComponent {
currentIndex: index
})
}
// }.tabBar(this.tabBuilder(index, item.name ?? ''))
// .tabBar(this.Tab(index, item.name ?? ''))
})
}
.backgroundColor(Color.White)
.barWidth('100%')
.barHeight(0)
.vertical(false)
.height(DisplayUtils.getDeviceHeight() - 144)
.barHeight('44vp')
.height('100% ')
.animationDuration(0)
.divider({
strokeWidth: '0.5vp',
... ... @@ -82,16 +79,19 @@ export struct PeopleShipHomeListComponent {
.onChange((index: number) => {
this.currentIndex = index
})
}
}
}
}
@Builder
LoadingLayout() {
CustomRefreshLoadLayout({
refreshBean: new RefreshLayoutBean(true,
$r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), DisplayUtils.getDeviceHeight() - this.topHeight)
}).height(DisplayUtils.getDeviceHeight() - this.topHeight)
// CustomRefreshLoadLayout({
// refreshBean: new RefreshLayoutBean(true,
// $r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), DisplayUtils.getDeviceHeight() - this.topHeight)
// }).height('100%')
}
// 单独的页签
... ...
... ... @@ -43,9 +43,8 @@ export struct PeopleShipHomePageNavComponent {
}).onClick(()=>{
let params = {
'headPhotoUrl': this.detailModel.headPhotoUrl,
'headType': '1'
} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
WDRouterRule.jumpWithPage(WDRouterPage.showHomePageHeaderPage,params)
}).margin({
left: '10vp',
})
... ...
... ... @@ -56,9 +56,8 @@ export struct PeopleShipHomePageTopComponent {
}).onClick(() => {
let params = {
'headPhotoUrl': this.detailModel.headPhotoUrl,
'headType': '1'
} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage, params)
WDRouterRule.jumpWithPage(WDRouterPage.showHomePageHeaderPage, params)
})
... ... @@ -369,7 +368,11 @@ export struct PeopleShipHomePageTopComponent {
private computeShowNum(count: number) {
if (count >= 10000) {
return `${(count / 10000).toFixed(1)}万`
let num = ( count / 10000).toFixed(1)
if (Number(num.substring(num.length-1)) == 0) {
num = num.substring(0, num.length-2)
}
return num + '万'
}
return `${count}`
}
... ...
... ... @@ -12,6 +12,7 @@ import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData';
import { HttpUtils } from 'wdNetwork/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter'
import { LazyDataSource } from 'wdKit/Index';
import LoadMoreLayout from '../page/LoadMoreLayout'
const TAG: string = 'ReserveMorePage';
... ... @@ -95,7 +96,9 @@ struct ReserveMorePage {
)
// 加载更多
ListItem() {
if (!this.hasMore && !this.isLoading) {
if (this.hasMore && this.data && this.data.totalCount() > 0) {
LoadMoreLayout({ isVisible: this.hasMore })
} else if (!this.hasMore && !this.isLoading) {
PeopleShipNoMoreData()
}
}
... ... @@ -124,7 +127,7 @@ struct ReserveMorePage {
buildItem(item: ContentDTO, index: number) {
Column() {
Stack() {
Image(item.fullColumnImgUrls[0].url)
Image(item.fullColumnImgUrls[0]?.url)
.width('100%')
.height(196)
.borderRadius(4)
... ... @@ -136,8 +139,9 @@ struct ReserveMorePage {
Text(item.newsTitle)
.fontSize(17)
.maxLines(2)
.lineHeight(25)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ top: 16, left: 12, right: 12 })
.margin({ top: 4, left: 12, right: 12 })
.alignSelf(ItemAlign.Start)
Row() {
Row() {
... ... @@ -145,6 +149,7 @@ struct ReserveMorePage {
.width(20)
.height(20)
.margin({ left: 10, top: 2, bottom: 2, right: 6 })
// Text(DateTimeUtils.formatDate(item.liveInfo.liveStartTime, "MM月dd日 HH:mm"))
Text(this.getReserveDate(item.liveInfo.liveStartTime, 1))
.fontSize(12)
... ... @@ -201,7 +206,7 @@ struct ReserveMorePage {
.color(!this.isReserved(item) ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC'))
.visibility((this.isLoadingAttention && this.liveId == item.objectId) ? Visibility.Visible : Visibility.None)
Text(!this.isReserved(item) ? '关注' : '已关注')
Text(!this.isReserved(item) ? '预约' : '已预约')
.fontSize($r('app.float.vp_12'))
.fontWeight(500)
.fontColor(!this.isReserved(item) ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC'))
... ... @@ -253,6 +258,9 @@ struct ReserveMorePage {
.height(24)
.objectFit(ImageFit.Auto)
.id("back_icon")
.margin({
left: '16vp'
})
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "__container__", align: HorizontalAlign.Start }
... ... @@ -264,10 +272,10 @@ struct ReserveMorePage {
Text(this.title)// .height('42lpx')
.maxLines(1)
.id("title")
.fontSize('35lpx')
.fontSize('18vp')
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight('42lpx')
.lineHeight('22vp')
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
middle: { anchor: "__container__", align: HorizontalAlign.Center }
... ... @@ -281,11 +289,14 @@ struct ReserveMorePage {
@Builder
LiveImage() {
Row() {
Image($r('app.media.reserve_icon'))
.width(22)
.height(18)
Image($r('app.media.reserve_new_icon'))
.width(14)
.height(14)
.margin({
right: 3
})
Text('预约')
.fontSize('11fp')
.fontSize('12vp')
.fontWeight(400)
.fontColor(Color.White)
}
... ...
... ... @@ -131,10 +131,8 @@ export struct SearchResultComponent {
.barWidth('100%')
.barHeight('84lpx')
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
})
.width('100%')
.scrollable(false)
.layoutWeight(1)
}
}.width('100%')
... ...
import { ContentDTO,
import {
ContentDTO,
contentListParams,
FullColumnImgUrlDTO, InteractDataDTO,
FullColumnImgUrlDTO,
InteractDataDTO,
Params,
RmhInfoDTO, VideoInfoDTO } from 'wdBean/Index'
RmhInfoDTO,
VideoInfoDTO
} from 'wdBean/Index'
import { LiveInfoDTO } from 'wdBean/src/main/ets/bean/detail/LiveInfoDTO'
import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO'
import { LazyDataSource, Logger, StringUtils, ToastUtils } from 'wdKit/Index'
import { LazyDataSource, Logger, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import MinePageDatasModel from '../../model/MinePageDatasModel'
import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
import { CreatorDetailRequestItem } from '../../viewmodel/CreatorDetailRequestItem'
import { FollowListDetailItem } from '../../viewmodel/FollowListDetailItem'
import { FollowListStatusRequestItem } from '../../viewmodel/FollowListStatusRequestItem'
import { QueryListIsFollowedItem } from '../../viewmodel/QueryListIsFollowedItem'
import { SearchResultContentData } from '../../viewmodel/SearchResultContentData'
import { SearchResultContentItem, SearchRmhDescription } from '../../viewmodel/SearchResultContentItem'
import { CardParser } from '../CardParser'
import { FollowChildComponent } from '../mine/follow/FollowChildComponent'
import { ListHasNoMoreDataUI } from '../reusable/ListHasNoMoreDataUI'
import { ActivityItemComponent } from './ActivityItemComponent'
import { SearchCreatorComponent } from './SearchCreatorComponent'
... ... @@ -19,27 +28,28 @@ import { SearchCreatorComponent } from './SearchCreatorComponent'
const TAG = "SearchResultContentComponent"
@Component
export struct SearchResultContentComponent{
@State keywords:string = ""
@State searchType:string = ""
export struct SearchResultContentComponent {
@State keywords: string = ""
@State searchType: string = ""
@State data: LazyDataSource<ContentDTO> = new LazyDataSource();
@State data_rmh: SearchRmhDescription[] = []
@State count:number = -1;
@State isLoading:boolean = false
@State hasMore:boolean = true
curPageNum:number = 1;
@State count: number = -1;
@State isLoading: boolean = false
@State hasMore: boolean = true
curPageNum: number = 1;
@State bean: FollowListDetailItem = new FollowListDetailItem("", "", "", "", "", "", "", "", "", -1, -1, "")
scroller: Scroller = new Scroller()
aboutToAppear(): void {
if(this.searchType == "全部"){
if (this.searchType == "全部") {
this.searchType = "all"
}else if(this.searchType == "精选"){
} else if (this.searchType == "精选") {
this.searchType = "cms"
}else if(this.searchType == "人民号"){
} else if (this.searchType == "人民号") {
this.searchType = "rmh"
}else if(this.searchType == "视频"){
} else if (this.searchType == "视频") {
this.searchType = "video"
}else if(this.searchType == "活动"){
} else if (this.searchType == "活动") {
this.searchType = "activity"
}
... ... @@ -47,93 +57,135 @@ export struct SearchResultContentComponent{
this.getNewSearchResultData()
}
getNewSearchResultData(){
getNewSearchResultData() {
this.isLoading = true
if(this.hasMore){
SearcherAboutDataModel.getSearchResultListData("10",`${this.curPageNum}`,this.searchType,this.keywords,getContext(this)).then((value)=>{
if (!this.data || value.list.length == 0){
if (this.hasMore) {
SearcherAboutDataModel.getSearchResultListData("15", `${this.curPageNum}`, this.searchType, this.keywords,
getContext(this)).then((value) => {
if (!this.data || value.list.length == 0) {
this.hasMore = false
this.isLoading = false
this.count = this.count===-1?0:this.count
}else{
if(value.list[0].dataList!=null){
this.count = this.count === -1 ? 0 : this.count
} else {
if (value.list[0].dataList != null) {
let data_temp: SearchRmhDescription[] = []
data_temp = value.list[0].dataList
//TODO 查询创作者详情接口
let request = new CreatorDetailRequestItem()
data_temp.forEach((data)=>{
data_temp.forEach((data) => {
request.creatorIdList.push(data.creatorId)
})
SearcherAboutDataModel.getCreatorDetailListData(request).then((value)=>{
if(value!=null && value.length>0){
data_temp.forEach((data)=>{
value.forEach((item)=>{
if(data.creatorId == item.creatorId){
SearcherAboutDataModel.getCreatorDetailListData(request).then((value) => {
if (value != null && value.length > 0) {
data_temp.forEach((data) => {
value.forEach((item) => {
if (data.creatorId == item.creatorId) {
data.headerPhotoUrl = item.headPhotoUrl.split("?")[0]
data.mainControl = item.mainControl+""
data.mainControl = item.mainControl + ""
if(data_temp.length === 1){
this.bean.headPhotoUrl = item.headPhotoUrl.split("?")[0]
this.bean.cnUserName = item.userName
this.bean.creatorId = item.creatorId
this.bean.authIcon = item.authIcon
if (value[0].fansNum > 10000) {
let temp = (value[0].fansNum / 10000) + ""
let index = temp.indexOf('.')
if (index != -1) {
temp = temp.substring(0, index + 2)
} else {
temp = temp
}
this.bean.cnFansNum = temp + "万"
} else {
this.bean.cnFansNum = item.fansNum + ""
}
this.bean.introduction = item.introduction
this.bean.mainControl = item.mainControl
this.bean.banControl = item.banControl
this.bean.cnUserType = item.userType
this.bean.cnUserId = item.userId
}
}
})
})
}
data_temp.forEach((data)=>{
data_temp.forEach((data) => {
this.data_rmh.push(data)
})
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
//只有一条创作者,获取 创作者信息
if (this.data_rmh.length === 1) {
if(StringUtils.isNotEmpty(UserDataLocal.getUserId())){
//查询是否被关注
let status = new FollowListStatusRequestItem()
status.creatorIds.push(new QueryListIsFollowedItem(this.data_rmh[0].creatorId))
MinePageDatasModel.getFollowListStatusData(status, getContext(this)).then((newValue) => {
this.bean.status = newValue[0].status
}).catch((err: Error) => {
console.log(TAG, "请求失败")
})
}else{
this.bean.status = ""
}
}
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
})
}
this.getInteractData(value)
}
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
this.isLoading = false
this.count = this.count===-1?0:this.count
this.count = this.count === -1 ? 0 : this.count
})
}
}
getInteractData(resultData:SearchResultContentData){
if(resultData.list[0].dataList!=null){
resultData.list.splice(0,1)
getInteractData(resultData: SearchResultContentData) {
if (resultData.list[0].dataList != null) {
resultData.list.splice(0, 1)
}
let data : contentListParams = {
let data: contentListParams = {
contentList: []
}
resultData.list.forEach((item)=>{
resultData.list.forEach((item) => {
data.contentList.push({
contentId: item.data.id + '',
contentType: Number.parseInt(item.data.type)
})
})
SearcherAboutDataModel.getInteractListData(data,getContext(this)).then((newValue)=>{
newValue.forEach((item)=>{
resultData.list.forEach((data)=>{
SearcherAboutDataModel.getInteractListData(data, getContext(this)).then((newValue) => {
newValue.forEach((item) => {
resultData.list.forEach((data) => {
if (item.contentId == data.data.id) {
data.data.collectNum = item.collectNum+""
data.data.commentNum = item.commentNum+""
data.data.likeNum = item.likeNum+""
data.data.readNum = item.readNum+""
data.data.shareNum = item.shareNum+""
data.data.collectNum = item.collectNum + ""
data.data.commentNum = item.commentNum + ""
data.data.likeNum = item.likeNum + ""
data.data.readNum = item.readNum + ""
data.data.shareNum = item.shareNum + ""
}
})
})
resultData.list.forEach((value)=>{
let photos:FullColumnImgUrlDTO[] = []
if(value.data.appStyle === 4){
value.data.appStyleImages.split("&&").forEach((value)=>{
photos.push({url:value} as FullColumnImgUrlDTO)
resultData.list.forEach((value) => {
let photos: FullColumnImgUrlDTO[] = []
if (value.data.appStyle === 4) {
value.data.appStyleImages.split("&&").forEach((value) => {
photos.push({ url: value } as FullColumnImgUrlDTO)
})
}
let contentDTO = this.dataTransform(value,photos);
if(contentDTO.appStyle != "13"){
let contentDTO = this.dataTransform(value, photos);
if (contentDTO.appStyle != "13") {
this.data.push(contentDTO)
}
... ... @@ -142,74 +194,128 @@ export struct SearchResultContentComponent{
this.count = this.data.totalCount()
if (this.data.totalCount() < resultData.totalCount) {
this.curPageNum++
}else {
} else {
this.hasMore = false
}
this.isLoading = false
if(this.count === 0 && resultData.list.length > 0){
if (this.count === 0 && resultData.list.length > 0) {
this.count = -1
if(!this.isLoading){
if (!this.isLoading) {
//加载分页数据
this.getNewSearchResultData()
}
}else if(this.count <= 20 && resultData.list.length > 0){
if(!this.isLoading){
} else if (this.count <= 10 && resultData.list.length > 0) {
if (!this.isLoading) {
//加载分页数据
this.getNewSearchResultData()
}
}
}).catch((err:Error)=>{
console.log(TAG,"请求失败")
}).catch((err: Error) => {
console.log(TAG, "请求失败")
this.isLoading = false
this.count = this.count===-1?0:this.count
this.count = this.count === -1 ? 0 : this.count
})
}
build() {
Column() {
if(this.count == 0){
ListHasNoMoreDataUI({style:2})
if (this.count == 0) {
ListHasNoMoreDataUI({ style: 2 })
} else {
List() {
if (this.data_rmh != null && this.data_rmh.length > 0){
if (this.data_rmh.length === 1){
ListItem(){
FollowChildComponent({ data: this.bean, type: 1 })
}.padding({left:"31lpx",right:"31lpx"})
}else{
ListItem(){
Column(){
if (this.data_rmh!=null && this.data_rmh.length > 0) {
//List
List({space:'8lpx'}) {
ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
this.SearchListUI()
}
}
}
}
LazyForEach(this.data, (item: ContentDTO, index: number) => {
ListItem() {
SearchCreatorComponent({item:item})
}.onClick(()=>{
//TODO 跳转
Column() {
if (this.searchType == "activity") {
ActivityItemComponent({ contentDTO: item })
} else {
CardParser({ contentDTO: item })
}
if (index != this.data.totalCount() - 1) {
Divider()
.width('100%')
.height('1lpx')
.color($r('app.color.color_F5F5F5'))
.strokeWidth('1lpx')
}
}
}
}, (item: ContentDTO, index: number) => index.toString())
//没有更多数据 显示提示
if (!this.hasMore && this.data.totalCount() > 0) {
ListItem() {
ListHasNoMoreDataUI()
}
}
}.cachedCount(10)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.onReachEnd(() => {
console.log(TAG, "触底了");
if (!this.isLoading) {
//加载分页数据
this.getNewSearchResultData()
}
})
}
}
.backgroundColor($r('app.color.white'))
.width('100%')
}
@Builder
multiCreatorUI() {
Column() {
List() {
ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
ListItem() {
SearchCreatorComponent({ item: item })
}
.width('150lpx')
.height('100%')
})
ListItem(){
Column(){
ListItem() {
Column() {
Text("查看更多")
.width('19lpx')
.fontSize('19lpx')
.fontWeight('400lpx')
.lineHeight('27lpx')
.fontColor($r('app.color.color_9E9E9E'))
}.borderRadius({topLeft:'4lpx',bottomLeft:'4lpx'})
}
.borderRadius({ topLeft: '4lpx', bottomLeft: '4lpx' })
.height('180lpx')
.width('77lpx')
.backgroundColor($r('app.color.color_EDEDED'))
.justifyContent(FlexAlign.Center)
}.height('100%')
.margin({left:'23lpx'})
.onClick(()=>{
.margin({ left: '23lpx' })
.onClick(() => {
let params: Params = {
pageID: this.keywords
}
WDRouterRule.jumpWithPage(WDRouterPage.searchCreatorPage,params)
WDRouterRule.jumpWithPage(WDRouterPage.searchCreatorPage, params)
})
}
.cachedCount(6)
.edgeEffect(EdgeEffect.Spring)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.listDirection(Axis.Horizontal)
.width('100%')
... ... @@ -221,50 +327,54 @@ export struct SearchResultContentComponent{
.color($r('app.color.color_F5F5F5'))
.strokeWidth('12lpx')
}
//List
List({ space: '6lpx' }) {
LazyForEach(this.data, (item: ContentDTO, index: number) => {
ListItem() {
Column(){
if(this.searchType == "activity"){
ActivityItemComponent({contentDTO:item})
}else{
CardParser({contentDTO:item})
}
if(index != this.data.totalCount()-1 ){
Divider()
.width('100%')
.height('1lpx')
.color($r('app.color.color_F5F5F5'))
.strokeWidth('1lpx')
}
}
@Builder
SearchListUI() {
List({space:'8lpx'}) {
ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
ListItem() {
SearchCreatorComponent({item:item})
}
}, (item: ContentDTO, index: number) => index.toString())
.width('150lpx')
.height('100%')
})
//没有更多数据 显示提示
if(!this.hasMore && this.data.totalCount() > 0){
ListItem(){
ListHasNoMoreDataUI()
Column(){
Text("查看更多")
.width('19lpx')
.fontSize('19lpx')
.fontWeight('400lpx')
.lineHeight('27lpx')
.fontColor($r('app.color.color_9E9E9E'))
}.borderRadius({topLeft:'4lpx',bottomLeft:'4lpx'})
.height('180lpx')
.width('77lpx')
.backgroundColor($r('app.color.color_EDEDED'))
.justifyContent(FlexAlign.Center)
}.height('100%')
.margin({left:'23lpx'})
.onClick(()=>{
let params: Params = {
pageID: this.keywords
}
WDRouterRule.jumpWithPage(WDRouterPage.searchCreatorPage,params)
})
}
}.cachedCount(6)
.cachedCount(6)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.layoutWeight(1)
.onReachEnd(()=>{
console.log(TAG,"触底了");
if(!this.isLoading){
//加载分页数据
this.getNewSearchResultData()
}
})
}.layoutWeight(1)
}
}
.backgroundColor($r('app.color.white'))
.layoutWeight(1)
.listDirection(Axis.Horizontal)
.width('100%')
.height('219lpx')
Divider()
.width('100%')
.height('12lpx')
.color($r('app.color.color_F5F5F5'))
.strokeWidth('12lpx')
}
private dataTransform(value: SearchResultContentItem, photos: FullColumnImgUrlDTO[]): ContentDTO {
... ...
import { Logger } from 'wdKit/Index'
import { Logger, NumberFormatterUtils } from 'wdKit/Index'
import { LikeViewModel } from '../../viewmodel/LikeViewModel'
import { SPHelper } from 'wdKit';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
... ... @@ -22,7 +22,7 @@ export struct LikeComponent {
@Prop data: Record<string, string>
enableBtn = true
componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口
styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏)
styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏) 3 透明背景
@State likeCount: number = 0 //点赞数
//上层传值 样例
... ... @@ -50,7 +50,11 @@ export struct LikeComponent {
//2: 新闻页中间位置样式
this.likeCompStyle2()
} else if (this.componentType == 3) {
//卡片底部互动样式
this.likeCompStyle3()
} else if (this.componentType == 4) {
// 直播,点赞按钮底测有灰色圆角背景+右上点赞数量
this.likeCompStyle4()
} else {
//1: 底部栏目样式 默认样式
this.likeCompStyle1()
... ... @@ -63,7 +67,8 @@ export struct LikeComponent {
transLikeStyle(): ILikeStyleResp {
if (this.likesStyle === 1) {
return {
url: this.likeStatus ? $r(`app.media.ic_like_check`) : $r(`app.media.ic_like_uncheck`),
url: this.likeStatus ? $r(`app.media.ic_like_check`) :
this.styleType == 1 ? this.componentType == 3?$r(`app.media.CarderInteraction_like`):$r('app.media.icon_like_default') : $r(`app.media.ic_like_uncheck`),
name: '赞'
}
} else if (this.likesStyle === 2) {
... ... @@ -79,7 +84,9 @@ export struct LikeComponent {
}
}
return {
url: $r(`app.media.icon_like_ckeck`), name: '点赞'
url: this.likeStatus ? $r(`app.media.ic_like_check`) :
this.styleType == 1 ? $r('app.media.icon_like_default') : $r(`app.media.ic_like_uncheck`),
name: '点赞'
}
}
... ... @@ -88,9 +95,8 @@ export struct LikeComponent {
//2: 新闻页中间位置样式
Column() {
Button() {
Row() {
Image(this.likeStatus ? $r('app.media.icon_like_select') : $r('app.media.icon_like_default'))
Image(this.transLikeStyle().url)
.width(20)
.height(20)
Text(this.likeCount.toString())
... ... @@ -125,13 +131,11 @@ export struct LikeComponent {
@Builder
likeCompStyle3() {
Row() {
Image(this.likeStatus ? $r('app.media.icon_like_select') :
this.styleType == 1 ? $r('app.media.CarderInteraction_like') :
$r('app.media.icon_like_default_white'))
Image(this.transLikeStyle().url)
.width(18)
.height(18)
// Text(this.likeStatus ? '已赞' : '点赞')
Text(this.likeCount > 0 ? this.likeCount.toString() : '点赞')
Text(this.likeStatus ? '已赞' : '点赞')
// Text(this.likeCount > 0 ? this.likeCount.toString() : '点赞')
.margin({ left: 4 })
.fontSize(14)
.fontColor(this.likeStatus ? '#ED2800' : '#666666')
... ... @@ -147,9 +151,7 @@ export struct LikeComponent {
//1: 底部栏目样式 默认样式
Column() {
// Image(this.likeStatus ? $r('app.media.icon_like_select') : $r('app.media.icon_like_default'))
Image(this.likeStatus ? $r('app.media.icon_like_select') :
this.styleType == 1 ? $r('app.media.icon_like_default') :
$r('app.media.icon_like_default_white'))
Image(this.transLikeStyle().url)
.width(24)
.height(24)
.onClick(() => {
... ... @@ -158,6 +160,43 @@ export struct LikeComponent {
}.width(24).height(24)
}
@Builder
likeCompStyle4() {
Stack({ alignContent: Alignment.Bottom }) {
Column() {
Image(this.transLikeStyle().url)
.width(24)
.height(24)
.onClick(() => {
this.clickButtonEvent()
})
}
.justifyContent(FlexAlign.Center)
.width(36)
.height(36)
.borderRadius(18)
.backgroundColor('#FFF5F5F5')
Row() {
Text(NumberFormatterUtils.formatNumberWithWan(this.likeCount || ''))
.fontSize(8)
.fontColor(Color.White)
.padding({ left: 4, right: 2 })
}
.height(12)
.alignItems(VerticalAlign.Center)
.position({ x: '100%', })
.markAnchor({ x: '100%' })
.backgroundImage($r('app.media.ic_like_back'))
.backgroundImageSize(ImageSize.Auto)
.visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
}
.width(36)
.height(42)
}
async clickButtonEvent() {
console.log(TAG, '点赞点击')
// 未登录,跳转登录
... ... @@ -184,6 +223,12 @@ export struct LikeComponent {
this.viewModel.executeLike2(this.data).then(() => {
console.log(TAG, '点赞接口调用成功')
// 直播点赞一直增加
if (this.contentDetailData.liveInfo) {
this.likeStatus = true
this.likeCount++
} else {
this.likeStatus = !this.likeStatus
//点赞和取消点赞成功后更新点赞数
if (this.likeStatus) {
... ... @@ -191,6 +236,7 @@ export struct LikeComponent {
} else {
this.likeCount--
}
}
if (this.likeCount <= 0) {
this.likeCount = 0
... ...
... ... @@ -48,6 +48,18 @@ export struct OperRowListView {
private onCommentFocus: () => void = () => {
}
@Prop @Watch('onDetailUpdated') contentDetailData: ContentDetailDTO // 稿件详情
/**
* 组件样式类型,根据详情页类型传值,组件内部根据样式展现类型做判断
* 1:底部栏目样式
* 2:新闻页中间位置样式
* 3:动态Tab内容下的互动入口
* 4:视频详情页
* 5:横屏直播详情页
* 6:竖屏直播详情页
* 7:图集详情页
*/
@Prop componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口
@Prop pageComponentType: number = -1 //1:视频详情页
@State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
@State operationButtonList: string[] = ['comment', 'collect', 'share'] // 组件展示条件
@State needLike: boolean = true
... ... @@ -65,6 +77,7 @@ export struct OperRowListView {
console.info(TAG, '22222----', this.styleType)
console.info(TAG, '3333----', this.needLike)
this.handleStyle()
this.onDetailUpdated()
}
async onDetailUpdated() {
... ... @@ -103,6 +116,8 @@ export struct OperRowListView {
}
build() {
// 视频详情页
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
// AudioDialog()
Row() {
... ... @@ -147,9 +162,10 @@ export struct OperRowListView {
.backgroundColor(this.bgColor)
.padding({
top: 10,
// bottom: `${this.bottomSafeHeight}px`
bottom: 50
bottom: `${this.bottomSafeHeight}px`
// bottom: 50
})
}
/**
... ... @@ -162,11 +178,15 @@ export struct OperRowListView {
CommentTabComponent({
publishCommentModel: this.publishCommentModel,
contentDetail: this.contentDetailData,
onCommentFocus: this.onCommentFocus
onCommentFocus: this.onCommentFocus,
pageComponentType: this.pageComponentType
})
}
}
.flexShrink(1)
.layoutWeight(1)
.margin({
right: this.pageComponentType === 1 ? 16 : 0,
})
if (this.showCommentIcon) {
Column() {
... ... @@ -189,7 +209,8 @@ export struct OperRowListView {
// if (this.likeBean?.contentId) {
LikeComponent({
data: this.likeBean,
styleType: this.styleType
styleType: this.styleType,
componentType: this.componentType
})
// }
}
... ...
... ... @@ -2,6 +2,8 @@ import { Action, NewspaperListBean, NewspaperListItemBean, NewspaperPositionItem
import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'
import { WDRouterRule } from 'wdRouter/Index'
import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog'
import { Logger } from 'wdKit';
import { window } from '@kit.ArkUI';
/**
* 读报纸半屏弹窗
... ... @@ -35,6 +37,12 @@ export struct ENewspaperListDialog {
// listDialogController: CustomDialogController
public closeDialog?: () => void
// 手势滑动相关
private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Up | PanDirection.Down })
private topFixedHeight = 124
@State topHeight: number = 124
private deviceHeight: number = 0
//watch监听报纸页码回调
onCurrentPageNumUpdated(): void {
console.log("ENewspaperListDialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum)
... ... @@ -46,7 +54,13 @@ export struct ENewspaperListDialog {
}
}
aboutToAppear(): void {
async aboutToAppear() {
// 屏幕高度 - 滑动高度计算
let windowClass: window.Window = await window.getLastWindow(getContext(this));
let changeHeight = 85 + 44 + px2vp(windowClass.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)
changeHeight += px2vp(windowClass.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
this.deviceHeight = px2vp(windowClass.getWindowProperties().windowRect.height) - changeHeight
this.isCurrentViewOpen = true
console.log("ENewspaperListDialog-aboutToAppear", "currentPageNum:", this.currentPageNum)
let _scrollIndex = Number.parseInt(this.currentPageNum)
... ... @@ -56,15 +70,13 @@ export struct ENewspaperListDialog {
}
aboutToDisappear() {
// if (this.pageListDialogController) {
// this.pageListDialogController = null
// }
this.isCurrentViewOpen = false
}
build() {
Stack() {
Column() {
Column() {
Row()
.width(43)
.height(4)
... ... @@ -110,6 +122,24 @@ export struct ENewspaperListDialog {
.height(6)
.margin({ top: 20, left: 16, right: 16 })
.objectFit(ImageFit.Contain)
}
.width('100%')
.gesture(
PanGesture(this.panOption)
.onActionStart((event: GestureEvent) => {
Logger.debug('ENewspaperListDialog','Pan start')
})
.onActionUpdate((event: GestureEvent) => {
if (this.topFixedHeight + event.offsetY >= this.topFixedHeight) {
this.topHeight = this.topFixedHeight + event.offsetY
}
Logger.debug('ENewspaperListDialog', 'topHeight:' + this.topHeight)
})
.onActionEnd(() => {
this.onCloseGestureDialog()
})
)
List({ scroller: this.listScroller, initialIndex: this.scrollIndex }) {
ForEach(this.newspaperListBean?.list, (item: NewspaperListItemBean, index: number) => {
... ... @@ -137,7 +167,7 @@ export struct ENewspaperListDialog {
.fontSize($r('app.float.font_size_14'))
.fontColor($r('app.color.color_222222'))
.fontWeight(600)
.maxLines(2)
// .maxLines(2)
.margin({
bottom: 8
})
... ... @@ -151,7 +181,7 @@ export struct ENewspaperListDialog {
.margin({
bottom: 8
})
.maxLines(2)
// .maxLines(2)
}
if (positionItem.downTitle) {
... ... @@ -162,7 +192,7 @@ export struct ENewspaperListDialog {
.margin({
bottom: 8
})
.maxLines(2)
// .maxLines(2)
}
if (positionItem.newsTxt) {
Text(positionItem.newsTxt)
... ... @@ -251,16 +281,13 @@ export struct ENewspaperListDialog {
this.currentPageNum = `${firstIndex < 9 ? '0' + (firstIndex + 1) : firstIndex + 1}`
// }
})
.onScroll((scrollOffset: number, scrollState: ScrollState) => {
// console.info(`onScroll scrollState = ScrollState` + scrollState + `, scrollOffset = ` + scrollOffset)
// if (this.scrollOffset == 0) {
// this.scrollOffset = 0
// }
})
}
.margin({ top: 124 })
// .margin({ top: 124 })
.margin({ top: this.topHeight })
.width('100%')
.backgroundColor(Color.White)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
.onClick(() => {
})
... ... @@ -272,6 +299,33 @@ export struct ENewspaperListDialog {
this.closeDialog()
}
})
.gesture(
PanGesture(this.panOption)
.onActionStart((event: GestureEvent) => {
Logger.debug('ENewspaperListDialog','Pan start')
})
.onActionUpdate((event: GestureEvent) => {
if (event) {
if (this.topFixedHeight + event.offsetY >= this.topFixedHeight) {
this.topHeight = this.topFixedHeight + event.offsetY
}
Logger.debug('ENewspaperListDialog', 'topHeight:' + this.topHeight)
}
})
.onActionEnd(() => {
this.onCloseGestureDialog()
})
)
}
onCloseGestureDialog() {
if (this.topHeight >= this.deviceHeight ) {
if (this.closeDialog) {
this.closeDialog()
}
} else {
this.topHeight = this.topFixedHeight
}
}
updateRecordsData() {
... ...
import lottie, { AnimationItem, AnimationSegment } from '@ohos/lottie';
@Component
export struct LottieView {
@Prop name: string
@Prop path: string
@Prop lottieWidth: number = 30
@Prop lottieHeight: number = 30
@Prop autoplay: boolean = false
@Prop loop: boolean = false
@Prop initialSegment?: AnimationSegment = [0, 120] // 动画起始帧
@Prop onReady: (animateItem: AnimationItem | null) => void // 动画初始化完成事件
@Prop onComplete: () => void = () => {
} // 动画完成事件
private politeChickyController: CanvasRenderingContext2D = new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象
private animateItem: AnimationItem | null = null; // 初始化loadAnimation接口的返回对象
// 页面隐藏销毁动画
onPageHide(): void {
this.animateItem?.destroy()
if (this.onComplete) {
this.animateItem?.removeEventListener('complete', this.onComplete)
}
}
/**
* 加载动画
* @param autoplay 控制动画是否自动播放参数
*/
loadAnimation() {
// 销毁动画,减少缓存
if (this.animateItem !== null) {
this.animateItem.destroy();
this.animateItem = null;
}
this.animateItem = lottie.loadAnimation({
container: this.politeChickyController,
renderer: 'canvas',
loop: this.loop,
autoplay: this.autoplay,
name: this.name, // 动画名称
path: this.path, // hap包内动画资源文件路径,仅支持json格式
// initialSegment: this.initialSegment
})
if (this.initialSegment) {
this.animateItem.segments = this.initialSegment
}
if (this.onComplete) {
this.animateItem.addEventListener('complete', this.onComplete)
}
}
build() {
Stack({ alignContent: Alignment.TopStart }) {
Canvas(this.politeChickyController)
.width(this.lottieWidth)
.height(this.lottieHeight)
.backgroundColor(Color.Black)
.onReady(() => {
this.loadAnimation();
if (this.onReady) {
this.onReady(this.animateItem)
}
})
.onClick(() => {
this.animateItem?.play()
})
}
}
}
/**
* WDMessageCenterMessageType 拉取消息类型
*/
export const enum WDMessageCenterMessageType {
WDMessageCenterMessageType_Interact = 1, //互动通知
WDMessageCenterMessageType_Subscribe, //预约消息
WDMessageCenterMessageType_System, //系统消息
}
export interface InteractMessageListModel{
data: InteractMessageMItem
code: number
message: string
success: string
timestamp: number
}
export class InteractMessageMItem{
pageNum:number = 0
pageSize:number = 0
totalCount:number = 0
hasNext:number = 0
list:InteractMessageModel[] = []
constructor(list?:InteractMessageModel[],pageNum?: number,pageSize?: number,totalCount?: number,hasNext?:number) {
}
}
export class InteractMessageModel {
classify: string = '';
contentId: string = '';
contentType: string = '';
id: number = 0;
message: string = '';
platform: string = '';
privateMailId: number = 0;
privateMailIdList: number[] = [];
privateMailIds: string = '';
privateMailNum: number = 0;
read: boolean = true;
source: string = '';
time: string = '';
title: string = '';
userId: string = '';
remark: string = '';
InteractMsubM:InteractMsubModel = new InteractMsubModel;
}
export class InteractMsubModel {
beReply: string = '';
headUrl: string = '';
contentId: string = '';
contentRelObjectid: string = '';
contentTitle: string = '';
commentContent: string = '';
userName: string = '';
userId: string = '';
contentRelId: string = '';
shareUrl: string = '';
userType: string = '';
contentRelType: string = '';
visitor: string = '';
contentType: string = '';
}
export interface InteractMParams {
contentType?: string;
pageNum?: string;
pageSize?: string;
userId?: string;
createTime?: string;
}
export interface InteractMDTO{
success: boolean;
code: number;
message: string;
data: number;
timestamp?: number;
}
\ No newline at end of file
... ...
... ... @@ -24,6 +24,7 @@ import { CommentLikeOperationRequestItem } from '../viewmodel/CommentLikeOperati
import { FollowOperationRequestItem } from '../viewmodel/FollowOperationRequestItem';
import { SpConstants } from 'wdConstant/Index';
import { MessageItem } from '../viewmodel/MessageItem';
import { MessageUnReadItem } from '../viewmodel/MessageUnReadItem';
const TAG = "MinePageDatasModel"
... ... @@ -597,6 +598,33 @@ class MinePageDatasModel{
})
})
}
/**
* 获取消息未读数据
* @param pageSize
* @param pageNum
* @returns
*/
getMessageUnReadData(): Promise<MessageUnReadItem> {
return new Promise<MessageUnReadItem>((success, error) => {
this.fetchMessageUnReadData().then((navResDTO: ResponseDTO<MessageUnReadItem>) => {
if (!navResDTO || navResDTO.code != 0) {
error(null)
return
}
let navigationBean = navResDTO.data as MessageUnReadItem
success(navigationBean);
}).catch((err: Error) => {
error(null)
})
})
}
fetchMessageUnReadData() {
let url = HttpUrlUtils.getMessageUnReadDataUrl()
return WDHttp.get<ResponseDTO<MessageUnReadItem>>(url)
};
}
const minePageDatasModel = MinePageDatasModel.getInstance()
... ...
... ... @@ -43,7 +43,6 @@ export interface MyCollectionListModel{
}
export interface contentListItemParams{
contentId?:string;
contentType?:string;
... ...
... ... @@ -8,5 +8,6 @@ struct SearchPage {
SearchComponent()
}.height('100%')
.width('100%')
.backgroundColor($r('app.color.white'))
}
}
\ No newline at end of file
... ...
import { router } from '@kit.ArkUI';
@Entry
@Component
struct ShowHomePageHeaderPage {
@State headPhotoUrl: string = '';
@State params:Record<string, string> = router.getParams() as Record<string, string>;
onPageShow() {
this.headPhotoUrl = this.params?.['headPhotoUrl'];
}
build() {
Row() {
Image(this.headPhotoUrl)
.alt( $r('app.media.WDAccountOwnerHedaerDefaultIcon') )
.width('100%')
.objectFit(ImageFit.Contain)
}
.width('100%')
.height('100%')
.alignItems(VerticalAlign.Center)
.backgroundColor($r('app.color.color_000000'))
.onClick(()=>{
router.back()
})
}
}
\ No newline at end of file
... ...
... ... @@ -4,18 +4,16 @@ import { router } from '@kit.ArkUI';
@Component
struct ShowUserHeaderPage {
@State headPhotoUrl: string = '';
@State headType: string = ''
@State params:Record<string, string> = router.getParams() as Record<string, string>;
onPageShow() {
this.headPhotoUrl = this.params?.['headPhotoUrl'];
this.headType = this.params?.['headType'] ?? '';
}
build() {
Row() {
Image(this.headPhotoUrl)
.alt(this.headType.length > 0 ? $r('app.media.WDAccountOwnerHedaerDefaultIcon') : $r('app.media.default_head'))
.alt($r('app.media.default_head'))
.width('720lpx')
.height('720lpx')
.objectFit(ImageFit.Auto)
... ...
// import { collcetRecordParams, MyCollectionItem, MyCollectionListModel } from '../model/MyCollectionModel';
import { HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork';
import { Logger } from 'wdKit';
import promptAction from '@ohos.promptAction';
import {
InteractMDTO,
InteractMessageListModel, InteractMessageMItem, InteractMParams } from '../model/InteractMessageModel';
const TAG = "MyCollectionViewModel"
class InteractMessageViewModel {
private static instance:InteractMessageViewModel
/**
* 单例模式
* @returns
*/
public static getInstance(): InteractMessageViewModel {
if (!InteractMessageViewModel.instance) {
InteractMessageViewModel.instance = new InteractMessageViewModel();
}
return InteractMessageViewModel.instance;
}
// ///互动通知
// WDMessageCenterMessageType_Interact = 1,
//
// ///预约消息
// WDMessageCenterMessageType_Subscribe = 2,
//
// ///系统消息
// WDMessageCenterMessageType_System = 3
BaseGetRequest(contentType:number,pageNum:number){
let userID = HttpUtils.getUserId();
let url = HttpUrlUtils.getMessageListDataUrl()+`?contentType=${contentType}&userId=${userID}&pageSize=${20}&pageNum=${pageNum}`
return WDHttp.get<InteractMessageListModel>(url)
}
fetchMessageList(contentType:number,pageNum:number):Promise<InteractMessageMItem>{
return new Promise((success,error) => {
this.BaseGetRequest(contentType,pageNum).then((navResDTO: InteractMessageListModel) => {
if (!navResDTO || navResDTO.code != 0) {
return
}
Logger.info(TAG, "fetchMessageList then,navResDTO.timeStamp:" + navResDTO.timestamp);
success(navResDTO.data)
}).catch((err: Error) => {
Logger.error(TAG, `fetchMessageList catch, error.name : ${err.name}, error.message:${err.message}`);
error("page data invalid");
})
})
}
getMessageLikeCount():Promise<number>{
return new Promise((success,error) => {
WDHttp.get<InteractMDTO>(HttpUrlUtils.getMessageLikeCount()).then((navResDTO: InteractMDTO) => {
if (navResDTO.code == 0) {
success(navResDTO.data)
}
})
.catch((error: Error) => {
Logger.info(TAG,'executeCollcet','ResponseDTO')
})
})
}
}
const interactMViewModel = InteractMessageViewModel.getInstance();
export default interactMViewModel as InteractMessageViewModel
\ No newline at end of file
... ...
... ... @@ -49,9 +49,6 @@ export class LiveModel {
params['relationId'] = relationId
params['liveId'] = liveId
params['isSubscribe'] = `${isSubscribe}`
Logger.info('relationId', relationId)
Logger.info('liveId', liveId)
Logger.info('isSubscribe', typeof isSubscribe)
return new Promise<ResponseDTO<string>>((success, fail) => {
HttpRequest.post<ResponseDTO<string>>(
HttpUrlUtils.getLiveAppointmentUrl(),
... ...
export class MessageUnReadItem{
activeCount: number = 0 //互动通知未读数
subscribeCount: number = 0 //预约消息未读数
systemCount: number = 0 //系统通知未读数
subscribeInfo: SubscribeInfo = new SubscribeInfo()
systemInfo: SystemInfo = new SystemInfo()
activeInfo: ActiveInfo = new ActiveInfo
}
class SubscribeInfo{
classify: string = ""
contentId: string = ""
contentType: string = ""
id: number = -1
message: string = ""
platform: string = ""
privateMailId: number = -1
privateMailIdList: Array< string > = []
privateMailIds: string = ""
privateMailNum: number = -1
read: boolean = false
source: string = ""
time: string = ""
title: string = ""
userId: number = -1
remark: string = ""
}
class SystemInfo{
classify: string = ""
contentType: string = ""
id: number = -1
message: string = ""
platform: string = ""
privateMailId: number = -1
privateMailIdList: Array< string > = []
privateMailIds: string = ""
privateMailNum: number = -1
read: boolean = false
source: string = ""
time: string = ""
title: string = ""
userId: number = -1
}
class ActiveInfo{
id:string = ""
message: string = ""
time: string = ""
title: string = ""
}
\ No newline at end of file
... ...
import FunctionsItem from './FunctionsItem'
@Observed
export default class MinePagePersonalFunctionsItem extends FunctionsItem {
isShowRedPoint:boolean = false
}
\ No newline at end of file
... ...
... ... @@ -24,6 +24,7 @@
"components/page/ThemeListPage",
"pages/ShowUserHeaderPage",
"pages/MineMessagePage",
"components/page/InteractMessagePage"
"components/page/InteractMessagePage",
"pages/ShowHomePageHeaderPage"
]
}
\ No newline at end of file
... ...
... ... @@ -7,6 +7,7 @@
"main": "Index.ets",
"version": "1.0.0",
"dependencies": {
"@ohos/lottie": "2.0.10",
"wdComponent": "file:../../features/wdComponent",
"wdPlayer": "file:../../features/wdPlayer",
"wdNetwork": "file:../../commons/wdNetwork",
... ...
... ... @@ -70,6 +70,7 @@ export struct DetailPlayLiveCommon {
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
this.publishCommentModel.commentContent = ''
// }
}
... ...
... ... @@ -61,8 +61,8 @@ export struct DetailPlayLivePage {
.layoutWeight(503)
.visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
if (this.contentDetailData?.newsId) {
OperRowListView({
componentType: 4,
operationButtonList: ['comment', 'collect', 'share', 'like'],
contentDetailData: this.contentDetailData,
publishCommentModel: this.publishCommentModel,
... ... @@ -73,7 +73,7 @@ export struct DetailPlayLivePage {
}
})
.visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
}
// LiveCommentComponent({ heartNum: this.liveRoomDataBean.likeNum })
// .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
}
... ...
import { window } from '@kit.ArkUI'
import lottie from '@ohos/lottie';
import { NumberFormatterUtils, StringUtils, WindowModel } from 'wdKit/Index'
import { DateFormatUtil, WDPlayerController } from 'wdPlayer/Index'
import { LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index'
import { DisplayDirection } from 'wdConstant/Index'
import { LiveFollowComponent } from 'wdComponent/Index'
import { LiveFollowComponent, LottieView } from 'wdComponent/Index'
@Component
export struct PlayUIComponent {
... ... @@ -44,6 +46,12 @@ export struct PlayUIComponent {
}
}
aboutToDisappear(): void {
if (this.liveDetailsBean.liveInfo?.liveState == 'running') {
lottie.destroy('live_status_wait')
}
}
build() {
Column() {
if (this.liveDetailsBean && this.liveDetailsBean.liveInfo) {
... ... @@ -113,11 +121,12 @@ export struct PlayUIComponent {
}
}
.width('100%')
// .width(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 'calc(100% - 80vp)' : 'calc(100% - 32vp)')
.padding({
top: 15,
bottom: 6,
left: 10,
right: 10
left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp',
right: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp'
})
.alignItems(HorizontalAlign.Start)
.visibility(this.isMenuVisible ? Visibility.Visible : Visibility.None)
... ... @@ -130,6 +139,7 @@ export struct PlayUIComponent {
// 预约
if (this.liveDetailsBean.liveInfo?.liveState == 'wait') {
Row() {
Image($r('app.media.icon_live_status_wait'))
.width(22)
.height(18)
... ... @@ -148,9 +158,21 @@ export struct PlayUIComponent {
// 直播中
else if (this.liveDetailsBean.liveInfo?.liveState == 'running') {
Row() {
Image($r('app.media.icon_live_status_running'))
Stack() {
Image($r('app.media.icon_live_status_running_back'))
.width(22)
.height(18)
LottieView({
name: 'live_status_wait',
path: "lottie/live_detail_living.json",
lottieWidth: 9,
lottieHeight: 9,
autoplay: true,
loop: true,
})
.margin({ right: 2 })
}
Text('直播中')
.fontSize('11fp')
.fontWeight(400)
... ... @@ -271,8 +293,8 @@ export struct PlayUIComponent {
.linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] })
.width('100%')
.padding({
left: 10,
right: 10,
left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp',
right: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp',
top: 15,
bottom: 15
})
... ...
... ... @@ -28,11 +28,11 @@ export struct TopPlayComponent {
updateData() {
//直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停
if (this.liveDetailsBean.liveInfo && this.liveDetailsBean.liveInfo.previewUrl && this.liveDetailsBean.liveInfo.previewUrl.length > 0) {
if (this.liveDetailsBean.liveInfo && this.liveDetailsBean.liveInfo.previewUrl &&
this.liveDetailsBean.liveInfo.previewUrl.length > 0) {
this.imgUrl = this.liveDetailsBean.liveInfo.previewUrl
Logger.debug(TAG, 'ok+' + `${this.imgUrl}`)
}
else if (this.liveDetailsBean.fullColumnImgUrls && this.liveDetailsBean.fullColumnImgUrls.length > 0) {
} else if (this.liveDetailsBean.fullColumnImgUrls && this.liveDetailsBean.fullColumnImgUrls.length > 0) {
this.imgUrl = this.liveDetailsBean.fullColumnImgUrls[0].url
Logger.debug(TAG, 'ok-' + `${this.imgUrl}`)
}
... ... @@ -81,6 +81,7 @@ export struct TopPlayComponent {
.alignSelf(ItemAlign.Center)
}
aboutToDisappear(): void {
async aboutToDisappear(): Promise<void> {
await this.playerController?.release()
}
}
\ No newline at end of file
... ...
... ... @@ -115,6 +115,7 @@ export struct PlayerCommentComponent {
// 收藏、分享、点赞是否需要根据字段显隐
OperRowListView({
styleType: 3,
componentType: 4,
operationButtonList: ['comment', 'collect', 'share', 'like'],
contentDetailData: this.contentDetailData,
publishCommentModel: this.publishCommentModel,
... ...
... ... @@ -37,11 +37,10 @@ export struct PlayerComponent {
}
}
aboutToDisappear(): void {
async aboutToDisappear(): Promise<void> {
this.playerController?.pause()
this.playerController?.stop()
this.playerController?.release()
await this.playerController?.release()
}
updateData() {
... ...
import lottie from '@ohos/lottie'
import { LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index'
import { LiveFollowComponent } from 'wdComponent/Index'
import { LiveFollowComponent, LottieView } from 'wdComponent/Index'
import { NumberFormatterUtils } from 'wdKit/Index'
@Preview
... ... @@ -9,6 +10,12 @@ export struct PlayerTitleComponent {
@Consume liveRoomDataBean: LiveRoomDataBean
@Consume liveState: string
aboutToDisappear(): void {
if (this.liveDetailsBean.liveInfo?.liveState == 'running') {
lottie.destroy('live_status_wait')
}
}
build() {
Column() {
Row() {
... ... @@ -47,10 +54,25 @@ export struct PlayerTitleComponent {
if (this.liveRoomDataBean.liveId) {
Row() {
if (this.liveState == 'running') {
Image($r('app.media.icon_live_status_running'))
Stack() {
Image($r('app.media.icon_live_status_running_back'))
.width(22)
.height(18)
.margin({ right: 1 })
LottieView({
name: 'live_status_wait',
path: "lottie/live_detail_living.json",
lottieWidth: 9,
lottieHeight: 9,
autoplay: true,
loop: true,
})
.margin({ right: 2 })
}.margin({ right: 1 })
// Image($r('app.media.icon_live_status_running'))
// .width(22)
// .height(18)
// .margin({ right: 1 })
}
Text(this.liveState == 'running' ? '直播中' : '回看')
... ...
import { ContentDetailDTO } from 'wdBean/Index'
import {
publishCommentModel
} from '../../../../../wdComponent/src/main/ets/components/comment/model/PublishCommentModel'
import { CommentComponent } from '../../../../../wdComponent/src/main/ets/components/comment/view/CommentComponent'
@Component
export struct CommentComponentPage {
scroller: Scroller = new Scroller()
@Consume contentDetailData: ContentDetailDTO
@Consume showCommentList: boolean
@State publishCommentModel: publishCommentModel = new publishCommentModel()
aboutToAppear(): void {
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
}
build() {
Scroll(this.scroller) {
Stack() {
CommentComponent({
publishCommentModel: this.publishCommentModel
})
Image($r("app.media.ic_close_black"))
.width(20)
.height(20)
.onClick(() => {
this.showCommentList = false
})
.margin({ top: 10, right: 20 })
.position({ x: '100%' })
.markAnchor({ x: '100%' })
}
}
.zIndex(1000)
.backgroundColor(Color.White)
}
}
\ No newline at end of file
... ...
import { ContentDetailDTO, InteractDataDTO } from 'wdBean';
import { PlayerConstants, WDPlayerController, WDPlayerRenderView } from 'wdPlayer';
import { WDPlayerController, WDPlayerRenderView } from 'wdPlayer';
import { ContentDetailRequest } from 'wdDetailPlayApi';
import {
batchLikeAndCollectParams,
... ... @@ -11,6 +11,7 @@ import { HttpUtils } from 'wdNetwork/Index';
import { DateTimeUtils } from 'wdKit/Index';
import { PlayerBottomView } from '../view/PlayerBottomView';
import { PlayerRightView } from '../view/PlayerRightView';
import { CommentComponentPage } from './CommentComponentPage';
const TAG = 'DetailPlayShortVideoPage';
... ... @@ -32,6 +33,7 @@ export struct DetailPlayShortVideoPage {
@Provide followStatus: string = '0' // 关注状态
@Provide isOpenDetail: boolean = false // 查看详情按钮点击
@Provide isDragging: boolean = false // 拖动时间进度条
@Provide showCommentList: boolean = false
@Consume @Watch('videoStatusChange') switchVideoStatus: boolean
@Consume @Watch('pageShowChange') pageShow: number
@Consume topSafeHeight: number
... ... @@ -148,6 +150,7 @@ export struct DetailPlayShortVideoPage {
this.progressVal = Math.floor(position * 100 / duration);
}
this.queryNewsInfoOfUser()
}
async aboutToDisappear(): Promise<void> {
... ... @@ -163,10 +166,14 @@ export struct DetailPlayShortVideoPage {
PlayerBottomView({
playerController: this.playerController
})
PlayerRightView({
playerController: this.playerController
})
CommentComponentPage({}).visibility(this.showCommentList ? Visibility.Visible : Visibility.None)
.position({ y: '100%' })
.markAnchor({ y: '100%' })
}
.height('100%')
.width('100%')
... ... @@ -192,6 +199,7 @@ export struct DetailPlayShortVideoPage {
@Builder
playerViewBuilder() {
WDPlayerRenderView({
playerController: this.playerController,
onLoad: async () => {
... ... @@ -205,10 +213,13 @@ export struct DetailPlayShortVideoPage {
.padding({
bottom: this.videoLandScape === 1 ? 115 : 0,
})
.layoutWeight(1)
.align(this.videoLandScape === 0 ? Alignment.Top : Alignment.Center)
.onClick(() => {
console.error('WDPlayerRenderView=== onClick')
this.playerController?.switchPlayOrPause();
})
}
}
\ No newline at end of file
... ...
... ... @@ -39,6 +39,7 @@ export struct VideoChannelDetail {
// private recommend?: string = '' // 0.非推荐,1.推荐;
@Link @Watch('navIndexChange') bottomNavIndex: number
@Link @Watch('navIndexChange') topNavIndex: number
@Prop @Watch('autoRefreshChange') autoRefresh: number = 0
@Consume barBackgroundColor: Color
private swiperController: SwiperController = new SwiperController()
@Provide showComment: boolean = false
... ... @@ -54,6 +55,18 @@ export struct VideoChannelDetail {
@State isMouted: boolean = false
@State isRequestError: boolean = false
autoRefreshChange() {
if (this.topNavIndex === 0) {
this.data = []
this.interactDataList = []
this.totalCount = 0
this.isMouted = false
this.getRecCompInfo()
this.getRecCompInfo()
}
}
pageShowChange() {
if (this.bottomNavIndex === 2 && this.topNavIndex === 0) {
this.barBackgroundColor = Color.Black
... ...
... ... @@ -43,7 +43,7 @@ export struct DetailDialog {
.height(200)
Row() {
Image($r('app.media.ic_close'))
Image($r("app.media.ic_close_white"))
.height(24).margin({ top: 20 }).onClick(() => {
this.controller.close()
if (this.isOpenDetail) {
... ...
... ... @@ -3,20 +3,56 @@ import { PlayerTitleView } from './PlayerTitleView'
import { PlayerProgressView } from './PlayerProgressView'
import { PlayerCommentView } from './PlayerCommentView'
import { PlayerTimeSeekView } from './PlayerTimeSeekView'
import { OperRowListView } from '../../../../../wdComponent/src/main/ets/components/view/OperRowListView'
import {
publishCommentModel
} from '../../../../../wdComponent/src/main/ets/components/comment/model/PublishCommentModel'
import { ContentDetailDTO } from 'wdBean/Index';
import { WindowModel } from 'wdKit/Index';
@Component
export struct PlayerBottomView {
private playerController?: WDPlayerController;
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@Consume showComment?: boolean
@Consume isOpenDetail?: boolean
@Consume isDragging?: boolean
@Consume contentDetailData: ContentDetailDTO
@State publishCommentModel: publishCommentModel = new publishCommentModel()
aboutToAppear(): void {
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
this.publishCommentModel.commentContent = ''
}
build() {
Column() {
PlayerTitleView()
PlayerProgressView({ playerController: this.playerController })
if (this.showComment) {
PlayerCommentView()
// PlayerCommentView()
OperRowListView({
pageComponentType: 1,
styleType: 3,
componentType: 4,
operationButtonList: ['comment',],
contentDetailData: this.contentDetailData,
publishCommentModel: this.publishCommentModel,
showCommentIcon: false,
onBack: () => {
WindowModel.shared.setWindowLayoutFullScreen(false)
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
}
})
.padding({
bottom: -this.bottomSafeHeight + 'px'
})
}
}
.alignItems(HorizontalAlign.Start)
... ...
... ... @@ -32,6 +32,7 @@ export struct PlayerRightView {
@Consume isOpenDetail: boolean
@Consume isDragging: boolean
@Consume showComment?: boolean
@Consume showCommentList: boolean
@State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
aboutToAppear() {
... ... @@ -343,7 +344,8 @@ export struct PlayerRightView {
}
.margin({ bottom: 20 })
.onClick((event: ClickEvent) => {
ToastUtils.showToast('评论为公共方法,待开发', 1000);
// ToastUtils.showToast('评论为公共方法,待开发', 1000);
this.showCommentList = true
})
}
... ...
... ... @@ -5,6 +5,14 @@
"value": "#FFFFFF"
},
{
"name": "color_transparent",
"value": "#00000000"
},
{
"name": "color_222222",
"value": "#222222"
},
{
"name": "play_track_color",
"value": "#1AFFFFFF"
},
... ... @@ -29,6 +37,18 @@
"value": "#4DFFFFFF"
},
{
"name": "color_666666",
"value": "#666666"
},
{
"name": "color_B0B0B0",
"value": "#B0B0B0"
},
{
"name": "color_EDEDED",
"value": "#EDEDED"
},
{
"name": "divider_color",
"value": "#D3D3D3"
},
... ...
... ... @@ -3,6 +3,22 @@
{
"name": "shared_desc",
"value": "description"
},
{
"name": "footer_text",
"value": "已显示全部内容"
},
{
"name": "pull_up_load_text",
"value": "加载中..."
},
{
"name": "pull_down_refresh_text",
"value": "下拉刷新"
},
{
"name": "release_refresh_text",
"value": "松开刷新"
}
]
}
\ No newline at end of file
... ...
... ... @@ -2,7 +2,10 @@ import HuaweiAuth from './utils/HuaweiAuth'
import { JumpInterceptorAction, RouterJumpInterceptor, WDRouterPage } from 'wdRouter'
import { BusinessError } from '@kit.BasicServicesKit'
import { router } from '@kit.ArkUI'
import { AccountManagerUtils } from 'wdKit/Index'
import { AccountManagerUtils, SPHelper } from 'wdKit/Index'
import { LoginViewModel } from './pages/login/LoginViewModel'
import { SpConstants } from 'wdConstant/Index'
import { ReportDeviceInfo } from './reportDeviceInfo/ReportDeviceInfo'
class LoginJumpHandler implements JumpInterceptorAction {
... ... @@ -37,4 +40,14 @@ export class LoginModule {
}
}
// 启动进入主页 和 每次登录成功调用
static reportDeviceInfo() {
ReportDeviceInfo.reportDeviceInfo().then((res) => {
let nickName = res.touristNickName
if (res.touristNickName) {
SPHelper.default.save(SpConstants.TOURIST_NICK_NAME, res.touristNickName)
}
})
}
}
\ No newline at end of file
... ...
... ... @@ -82,6 +82,30 @@ export class LoginModel {
})
}
// loginType 0:手机号密码 2:手机号登录 3:QQ 4:微信 5:微博 6:APPLEID 7:手机号一键登录8:账号+密码 9:华为一键登录
thirdPartLogin(loginType: number, otherParams: Record<string, string|number>) {
otherParams['loginType'] = loginType
otherParams['deviceId'] = HttpUtils.getDeviceId()
return new Promise<LoginBean>((success, fail) => {
HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), otherParams).then((data: ResponseDTO<LoginBean>) => {
Logger.debug("LoginViewModel:success2 ", data.message)
if (!data) {
fail("数据为空")
return
}
if (!data.data||data.code != 0) {
fail(data.message)
return
}
success(data.data)
}, (error: Error) => {
fail(error.message)
Logger.debug("LoginViewModel:error2 ", error.toString())
})
})
}
// {"password":"523acd319228efde34e8a30268ee8ca5e4fc421d72affa531676e1765940d22c","phone":"13625644528","loginType":0,"oldPassword":"BA5FD74F827AF9B271FE17CADC489C36","deviceId":"60da5af6-9c59-3566-8622-8c6c00710994"}
appLoginByPassword(phone: string, loginType: number, password: string, oldPassword: string) {
let bean: Record<string, string | number> = {};
... ...
... ... @@ -407,14 +407,9 @@ struct LoginPage {
queryUserDetail(){
this.loginViewModel.queryUserDetail().then(()=>{
router.back({
url: `${WDRouterPage.getBundleInfo()}`
}
)
router.back()
}).catch(()=>{
router.back({
url: `${WDRouterPage.getBundleInfo()}`
})
router.back()
})
}
... ...
... ... @@ -10,6 +10,7 @@ import { encryptMessage } from '../../utils/cryptoUtil'
import { SpConstants } from 'wdConstant/Index'
import { UserDetail } from 'wdBean/Index';
import { HttpUtils } from 'wdNetwork/Index'
import { LoginModule } from '../../LoginModule'
const TAG = "LoginViewModel"
... ... @@ -47,6 +48,27 @@ export class LoginViewModel {
return new Promise<LoginBean>((success, fail) => {
this.loginModel.appLogin(phone, loginType, verificationCode).then((data: LoginBean) => {
this.dealWithLoginSuccess(data)
success(data)
}).catch((error:string) => {
fail(error)
})
})
}
huaweiOneKeyLogin(authCode: string) {
return new Promise<LoginBean>((success, fail) => {
this.loginModel.thirdPartLogin(9, {"idToken": authCode}).then((data: LoginBean) => {
this.dealWithLoginSuccess(data)
success(data)
}).catch((error:string) => {
fail(error)
})
})
}
//TODO: 这里要整体改掉
dealWithLoginSuccess(data: LoginBean) {
SPHelper.default.saveSync(SpConstants.USER_FIRST_MARK, data.firstMark)
SPHelper.default.saveSync(SpConstants.USER_ID, data.id)
SPHelper.default.saveSync(SpConstants.USER_JWT_TOKEN, data.jwtToken)
... ... @@ -56,11 +78,8 @@ export class LoginViewModel {
SPHelper.default.saveSync(SpConstants.USER_Type, data.userType)
SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)
EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS)
success(data)
}).catch((error:string) => {
fail(error)
})
})
LoginModule.reportDeviceInfo()
}
async appLoginByPassword(phone: string, loginType: number, password: string, oldPassword: string) {
... ... @@ -75,15 +94,7 @@ export class LoginViewModel {
let passwordNew = await this.doMd(password)
Logger.debug(TAG, "PASSWORD:" + passwordNew)
this.loginModel.appLoginByPassword(phone, newLoginType, passwordNew, oldPassword).then((data: LoginBean) => {
SPHelper.default.saveSync(SpConstants.USER_FIRST_MARK, data.firstMark)
SPHelper.default.saveSync(SpConstants.USER_ID, data.id)
SPHelper.default.saveSync(SpConstants.USER_JWT_TOKEN, data.jwtToken)
SPHelper.default.saveSync(SpConstants.USER_LONG_TIME_NO_LOGIN_MARK, data.longTimeNoLoginMark)
SPHelper.default.saveSync(SpConstants.USER_REFRESH_TOKEN, data.refreshToken)
SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status)
SPHelper.default.saveSync(SpConstants.USER_Type, data.userType)
SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)
EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS)
this.dealWithLoginSuccess(data)
success(data)
}).catch((value: string) => {
fail(value)
... ... @@ -219,18 +230,29 @@ export class LoginViewModel {
this.loginModel.queryUserDetail().then((data: UserDetail) => {
//保存sp
if(data){
if(data.userName!=undefined){
SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)
}
if(data.phone!=undefined){
SPHelper.default.saveSync(SpConstants.USER_PHONE, data.phone)
}
}
if(data.userExtend){
if(data.userExtend.sex!=undefined){
SPHelper.default.saveSync(SpConstants.USER_SEX, data.userExtend.sex)
}
if(data.userExtend.creatorId!=undefined){
SPHelper.default.saveSync(SpConstants.USER_CREATOR_ID, data.userExtend.creatorId+"")
}
if(data.userExtend.headPhotoUrl!=undefined){
SPHelper.default.saveSync(SpConstants.USER_HEAD_PHOTO_URL, data.userExtend.headPhotoUrl)
}
if(data.userExtend.birthday!=undefined){
SPHelper.default.saveSync(SpConstants.USER_BIRTHDAY, data.userExtend.birthday)
}
}
success(data)
}).catch(() => {
}).catch((error:Error) => {
fail()
})
})
... ...
... ... @@ -3,13 +3,30 @@ import { Params } from 'wdBean/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import HuaweiAuth from '../../utils/HuaweiAuth'
import { BusinessError } from '@kit.BasicServicesKit'
import { ToastUtils } from 'wdKit/Index'
import { Logger, ToastUtils, CustomToast, EmitterUtils, EmitterEventId } from 'wdKit/Index'
import { LoginViewModel } from './LoginViewModel'
import {InterestsHobbiesModel} from '../../../../../../../products/phone/src/main/ets/pages/viewModel/InterestsHobbiesModel'
const TAG = "OneKeyLoginPage"
@Entry
@Component
struct OneKeyLoginPage {
anonymousPhone: string = ''
@State agreeProtocol: boolean = false
viewModel: LoginViewModel = new LoginViewModel()
@State toastText:string = ""
dialogToast: CustomDialogController = new CustomDialogController({
builder: CustomToast({
msg: this.toastText,
}),
autoCancel: false,
alignment: DialogAlignment.Center,
offset: { dx: 0, dy: -20 },
gridCount: 1,
customStyle: true,
maskColor:"#00000000"
})
aboutToAppear(): void {
this.anonymousPhone = HuaweiAuth.sharedInstance().anonymousPhone||""
... ... @@ -44,17 +61,7 @@ struct OneKeyLoginPage {
if (!this.agreeProtocol) {
return
}
HuaweiAuth.sharedInstance().oneKeyLogin().then((authorizeCode) => {
//TODO: 调用服务端接口登录
ToastUtils.shortToast("获取到授权code: " + authorizeCode + ",由于需要后台接口支持,暂时先跳转其他登录方式")
setTimeout(() => {
router.replaceUrl({url: WDRouterPage.loginPage.url()})
}, 3000)
}).catch((error: BusinessError) => {
})
this.requestLogin()
})
}
.padding({ left: 25, right: 25 })
... ... @@ -113,4 +120,47 @@ struct OneKeyLoginPage {
}.margin({ top: 15, right: 15 })
.width("100%")
}
async requestLogin() {
try {
let authorizeCode = await HuaweiAuth.sharedInstance().oneKeyLogin()
let data = await this.viewModel.huaweiOneKeyLogin(authorizeCode)
Logger.debug(TAG, "requestLogin: " + data.jwtToken)
this.showToastTip('登录成功')
///同步兴趣tag
let interestsModel = new InterestsHobbiesModel()
interestsModel.updateInterests()
this.queryUserDetail()
EmitterUtils.sendEvent(EmitterEventId.PEOPLE_SHIP_ATTENTION)
} catch (error) {
if (typeof error == "string") {
this.showToastTip(error)
} else {
(error as BusinessError)
this.showToastTip("登录失败")
}
}
}
showToastTip(msg:string){
this.toastText = msg
this.dialogToast.open()
}
queryUserDetail(){
this.viewModel.queryUserDetail().then(()=>{
router.back({
url: `${WDRouterPage.getBundleInfo()}`
}
)
}).catch(()=>{
router.back({
url: `${WDRouterPage.getBundleInfo()}`
})
})
}
}
\ No newline at end of file
... ...
import { AppUtils, DeviceUtil, Logger, UserDataLocal } from 'wdKit/Index';
import { HttpBizUtil, HttpUrlUtils, ResponseDTO } from 'wdNetwork/Index';
export class ReportDeviceInfo {
static reportDeviceInfo() {
const userId = UserDataLocal.getUserId() || ""
const url = HttpUrlUtils.reportDeviceInfo()
let bean: Record<string, string | number> = {};
bean['deviceId'] = DeviceUtil.clientId()
bean['appVersion'] = AppUtils.getAppVersionCode()
bean['platform'] = 3 /// 1Android 2iOS
bean['userId'] = userId
bean['brand'] = DeviceUtil.getMarketName()
bean['modelSystemVersion'] = DeviceUtil.getDisplayVersion()
bean['tenancy'] = 3 ///1-视界 2-英文版 3-中文版
return new Promise<ReportDeviceInfoRes>((success, fail) => {
HttpBizUtil.post<ResponseDTO<ReportDeviceInfoRes>>(url,bean).then((data: ResponseDTO<ReportDeviceInfoRes>) => {
if (!data) {
fail("数据为空")
return
}
if (data.code != 0) {
fail(data.message)
return
}
success(data.data!)
}, (error: Error) => {
fail(error.message)
Logger.debug("ReportDeviceInfo", error.toString())
})
})
}
}
export class ReportDeviceInfoRes {
clean : number = 0
touristNickName : string = ""
}
\ No newline at end of file
... ...
... ... @@ -94,10 +94,9 @@ export struct WDPlayerRenderView {
.renderFit(RenderFit.RESIZE_COVER)
}
// .onAreaChange(() => {
// this.updateLayout()
// })
.onAreaChange(() => {
this.updateLayout()
})
.backgroundColor("#000000")
// .height('100%')
... ...
... ... @@ -4,3 +4,4 @@
/build
/.cxx
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
{"v":"5.6.10","fr":60,"ip":0,"op":80,"w":30,"h":30,"nm":"直播页面-动效","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"空 13","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[7.5,7.375,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[50,50,100],"ix":6}},"ao":0,"ip":0,"op":80,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"形状图层 3","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[34,20.073,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15],[-2.25,-16.5],[2.25,-16.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-27.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-27.5],[-2.25,-29],[2.25,-29]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15.5],[-2.25,-17],[2.25,-17]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":30,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-3.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-3.5],[-2.25,-5],[2.25,-5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":40,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15.5],[-2.25,-17],[2.25,-17]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-27.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-27.5],[-2.25,-29],[2.25,-29]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":60,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15.625],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15.625],[-2.25,-17.125],[2.25,-17.125]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":70,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-3.375],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-3.375],[-2.25,-4.875],[2.25,-4.875]],"c":true}]},{"t":80,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15.375],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15.375],[-2.25,-16.875],[2.25,-16.875]],"c":true}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":80,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"形状图层 2","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-4,24.573,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-7.875],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-7.875],[-2.25,-9.375],[2.25,-9.375]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-20],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-20],[-2.25,-21.5],[2.25,-21.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-32],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-32],[-2.25,-33.5],[2.25,-33.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":30,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-20],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-20],[-2.25,-21.5],[2.25,-21.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":40,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-7.875],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-7.875],[-2.25,-9.375],[2.25,-9.375]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-20],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-20],[-2.25,-21.5],[2.25,-21.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":60,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-31.75],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-31.75],[-2.25,-33.25],[2.25,-33.25]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":70,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-19.875],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-19.875],[-2.25,-21.375],[2.25,-21.375]],"c":true}]},{"t":80,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-8],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-8],[-2.25,-9.5],[2.25,-9.5]],"c":true}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":80,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"形状图层 1","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[15,14.272,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-21],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-21],[-2.25,-22.5],[2.25,-22.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-9.375],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-9.375],[-2.25,-10.875],[2.25,-10.875]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,2.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,2.5],[-2.25,1],[2.25,1]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":30,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-9.375],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-9.375],[-2.25,-10.875],[2.25,-10.875]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":40,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-21.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-21.5],[-2.25,-23],[2.25,-23]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-9.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-9.5],[-2.25,-11],[2.25,-11]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":60,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,2.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,2.5],[-2.25,1],[2.25,1]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":70,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-9.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-9.5],[-2.25,-11],[2.25,-11]],"c":true}]},{"t":80,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-21.375],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-21.375],[-2.25,-22.875],[2.25,-22.875]],"c":true}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":80,"st":0,"bm":0}],"markers":[]}
\ No newline at end of file
... ...
{"v":"5.6.10","fr":30,"ip":0,"op":51,"w":500,"h":500,"nm":"预合成 1","ddd":0,"assets":[{"id":"image_0","w":90,"h":240,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAADwCAYAAACAL3OKAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAADW0lEQVR4nO3cv2lcQRRG8Tuzs0iBFRhcgcEVGFSBwRUYXIHBFRicqTOVJJACSfvnc+BNXvbgMUeBzi8ZJhPnDuLpYtySnEvTjarKW/8Q74GhIYaGGBpiaIihIYaGGBpiaIihIYaGjKpy1wHwRUMMDTE0xNAQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0MMDTE0xH00xBcNMTTE0BBDQwwNMTTE0BBDQwwNMTTE0BBDQwwNMTTE0BD30RBfNMTQEENDDA0xNMTQEENDDA0xNMTQEENDDA0xNMTQEEND3EdDfNEQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0MMDXEfDfFFQwwNMTTE0BBDQwwNMTTE0BBDQwwNMTTE0BBDQwwNMTTEfTTEFw0xNMTQEENDDA0xNMTQEENDDA0xNMTQEENDDA0xNMTQEPfREF80xNAQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0P6+XxO/Y+dqor3OfeW5O/GYWmFcSmuyXpVpfcez7lnO51Of6aMUAt+dUAMDTE0ZPTe/XcdAF80xNAQQ0MMDTE0xNAQQ0PcR4P76N8bh6UV3EdD3EeD++hfU0aohZHEXx0AP+8ghoaM3W7nPhrgi4YYGmJoiKEhhoYYGmJoSD+dTov9qfc595bk58ZhaYVxKa7JelVlt9vFc+7Zjsfjjykj1IJfHRBDQwwNcR8N8UVDDA0xNMTQEENDDA0xNKQfj8fF/tT7nHtL8n3jsLTCuBTXZL2qMsaI59yzHQ6Hb1NGqAW/OiCGhhgaMsYY7qMBvmiIoSGGhhgaYmiIoSGGhvTD4bDYn3qfc29JbjcOSyuMS3FN1qsq+/0+nnPP9vr6+nXKCLXgVwfE0BBDQ8Z+v3cfDfBFQwwNMTTE0BBDQwwNMTSkv7y8LPan3ufcW5IvG4elFcaluCbrVZWrq6t4zj3b8/Pz5ykj1IL/fzTEzzuIoSHj+vrafTTAFw0xNMTQEENDDA0xNMTQkP709LTYn3qfc29JPm0cllYYj4+P/uoA9CS5ubmJ59yzPTw8fHzrab8H7qMhhoYYGtKSfHjrH+I98C9DiKEhhoYYGmJoiKEhhob0+/v7xf7U+5x7S7LbOCytMO7u7vzVAWlJmufc8x+/85zyNf84xgAAAABJRU5ErkJggg==","e":1}],"fonts":{"list":[{"fName":"SourceHanSansSC-Normal","fFamily":"Source Han Sans SC","fStyle":"Normal","ascent":79.608999023214}]},"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"“图层 1”轮廓 2","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[160.08,177.473,0],"ix":2},"a":{"a":0,"k":[8.095,35.425,0],"ix":1},"s":{"a":0,"k":[300,300,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[1.244,-10.704],[-4.109,-12.458],[-0.711,-0.358],[-0.35,-0.041],[-0.041,-0.003],[-0.374,0.124],[-0.135,1.161],[0,0],[0.134,0.407],[-1.276,10.984],[-5.322,9.464],[0,0]],"o":[[-5.704,10.153],[-1.377,11.862],[0.249,0.755],[0.314,0.159],[0.041,0.005],[0.393,0.029],[1.109,-0.366],[0,0],[0.046,-0.426],[-3.832,-11.619],[1.152,-9.916],[0,0],[0,0]],"v":[[2.846,-34.399],[-7.576,-3.114],[-3.479,33.365],[-1.98,35.104],[-0.976,35.405],[-0.852,35.417],[0.31,35.274],[2.35,32.771],[2.353,32.749],[2.219,31.485],[-1.616,-2.421],[8.095,-31.491],[7.16,-35.425]],"c":true},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[8.094,35.425],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":51,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"矩形 1624.png","cl":"png","tt":1,"refId":"image_0","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":4,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":6,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":29,"s":[100]},{"t":34,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[170.767,290.291,0],"ix":2},"a":{"a":0,"k":[45.395,241.486,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":1,"s":[100,10,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":7,"s":[100,56,100]},{"t":12,"s":[100,100,100]}],"ix":6}},"ao":0,"ip":1,"op":52,"st":1,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"形状图层 3","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":1,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":7,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":29,"s":[100]},{"t":34,"s":[0]}],"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":1,"s":[-51]},{"t":12,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":1,"s":[157.75,279.75,0],"to":[-6.112,-21.415,0],"ti":[-5.612,39.702,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":7,"s":[145.538,168,0],"to":[5.612,-39.702,0],"ti":[-10.945,22.085,0]},{"t":12,"s":[174.75,77.75,0]}],"ix":2},"a":{"a":0,"k":[-75.25,-172.25,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-96.5,-181.5],[-62.25,-189],[-54,-155.5]],"c":false},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":18,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"形状 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":1,"op":52,"st":1,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"形状图层 1","parent":5,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":20,"ix":10},"p":{"a":0,"k":[34.937,47.412,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[33.333,33.333,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,0],[28.935,-6.447],[9,-5.25],[-17.25,4],[-21.26,3.424],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-24.106,5.371],[-16.232,9.469],[9.485,-2.2],[33.448,-5.387],[9.5,4.25],[-2.25,2.5]],"v":[[52.75,-14.25],[-9.435,-6.803],[-56.25,10.25],[-46.25,39],[7.26,24.826],[88,19],[89,36.25]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[{"i":[[0,0],[26.479,-4.851],[8.679,-2.444],[-17.998,2.691],[-23.469,3.069],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-12.46,2.283],[-15.41,4.339],[4.383,-0.655],[33.593,-4.393],[9.5,4.25],[-2.25,2.5]],"v":[[58,-15],[-7.178,-6.584],[-53.707,4.823],[-47,29.75],[0.76,22.576],[88,19],[89,36.25]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":15,"s":[{"i":[[0,0],[26.919,0.031],[6.044,-0.659],[-15.132,-2.622],[-23.644,1.071],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-13.471,-0.016],[-14.086,1.535],[4.404,0.763],[32.111,-1.455],[9.5,4.25],[-2.25,2.5]],"v":[[54.157,-14.073],[-2.442,-8.813],[-49.103,-6.764],[-50.1,19.6],[-0.512,21.013],[88,19],[89,36.25]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":24,"s":[{"i":[[0,0],[26.479,-4.851],[8.679,-2.444],[-17.998,2.691],[-23.469,3.069],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-12.46,2.283],[-15.41,4.339],[4.383,-0.655],[33.593,-4.393],[9.5,4.25],[-2.25,2.5]],"v":[[58,-15],[-7.178,-6.584],[-53.707,4.823],[-47,29.75],[0.76,22.576],[88,19],[89,36.25]],"c":false}]},{"t":40,"s":[{"i":[[0,0],[28.935,-6.447],[9,-5.25],[-17.25,4],[-21.26,3.424],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-24.106,5.371],[-16.232,9.469],[9.485,-2.2],[33.448,-5.387],[9.5,4.25],[-2.25,2.5]],"v":[[58,-15],[-9.435,-6.803],[-56.25,10.25],[-46.25,39],[7.26,24.826],[88,19],[89,36.25]],"c":false}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":12,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"形状 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":50,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"“img_hand”轮廓","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.775],"y":[0.621]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[-20]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":10,"s":[12]},{"t":40.0234375,"s":[-19.954]}],"ix":10},"p":{"a":0,"k":[447.982,216,0],"ix":2},"a":{"a":0,"k":[100.827,59.333,0],"ix":1},"s":{"a":0,"k":[300,300,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"形状 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.033,0.015],[0,0],[0.783,-0.214],[0.314,-0.792],[-0.133,-0.656],[-0.603,-0.563],[-0.587,-0.233],[0,0],[-0.073,-0.04],[-0.516,-0.842],[0.479,-1.208],[0.953,-0.502],[0,0],[0,0],[0,0],[-1.392,-0.86],[0.091,-1.641],[2.925,-1.592],[2.563,-0.334],[1.888,-0.636],[1.036,-1.094],[0.103,-0.722],[-0.26,-0.631],[-1.483,0.566],[-3.818,0.653],[-5.209,0.17],[-9.286,3.911],[0,0],[0,0],[-0.469,-0.165],[-0.024,-0.01],[0,0],[-0.206,-0.489],[0.163,-0.467],[0.01,-0.026],[0.495,-0.209],[0,0],[6.587,-0.214],[2.994,-0.511],[4.409,-1.635],[1.511,0.673],[0.629,1.524],[-0.21,1.467],[-0.98,1.035],[-2.962,0.997],[-2.561,0.334],[-1.666,0.907],[-0.117,0.852],[0.021,0.025],[0.515,0.318],[-2.348,-0.527],[0,0],[0,0],[-2.029,-0.079],[-0.168,0.089],[-0.048,0.103],[0.49,0.277],[0,0],[0.631,0.589],[0.298,1.464],[-0.637,1.605],[-1.864,0.508],[-0.535,0.015],[-0.648,1.306],[-1.813,0.428],[-1.806,-0.438],[-0.392,1.028],[-0.023,0.048],[-2.123,0.451],[-2.602,-1.082],[-0.033,-0.016],[0,0],[-0.034,-0.019],[-1.699,-3.421],[0,0],[0,0],[0.169,-0.503],[0.013,-0.032],[0.443,-0.22],[0.502,0.17],[0.033,0.013],[0.219,0.442],[0,0],[6.83,3.793],[0,0],[1.064,-0.227],[0.455,-0.915],[-0.154,-0.539],[-0.497,-0.308],[0,0],[0.408,-1.027],[1.026,0.405],[0,0],[0,0],[0.068,0.036],[0,0],[0.842,-0.198],[0.277,-0.557],[-0.093,-0.504],[-0.425,-0.402],[0,0],[0.237,-0.935],[0.032,-0.08],[0.015,-0.033],[0.934,0.237],[0.08,0.031]],"o":[[0,0],[-1.444,-0.567],[-0.577,0.157],[-0.344,0.868],[0.128,0.627],[0.263,0.245],[0,0],[0.077,0.03],[1.204,0.661],[0.679,1.108],[-0.415,1.046],[-0.842,0.444],[0,0],[0,0],[0,0],[2.121,1.31],[-0.133,2.377],[-2.104,1.145],[-2.301,0.3],[-2.333,0.785],[-0.397,0.419],[-0.107,0.745],[0.49,1.186],[4.665,-1.731],[3.174,-0.542],[6.094,-0.198],[0,0],[0,0],[0.458,-0.193],[0.024,0.009],[0,0],[0.491,0.2],[0.192,0.456],[-0.009,0.027],[-0.198,0.499],[0,0],[-9.741,4.104],[-5.028,0.164],[-3.573,0.611],[-1.873,0.715],[-1.375,-0.612],[-0.539,-1.304],[0.223,-1.562],[1.492,-1.576],[2.135,-0.719],[2.069,-0.269],[1.546,-0.841],[-0.014,-0.019],[-0.21,-0.254],[-1.135,-0.701],[1.606,0.361],[0,0],[0,0],[0.359,0.014],[0.069,-0.036],[-0.151,-0.213],[0,0],[-1.055,-0.418],[-1.228,-1.144],[-0.291,-1.433],[0.805,-2.031],[0.48,-0.13],[-0.099,-1.203],[0.833,-1.68],[1.331,-0.314],[0.031,-0.905],[0.019,-0.05],[1.024,-2.145],[1.886,-0.401],[0.034,0.014],[0,0],[0.034,0.016],[7.589,4.209],[0,0],[0,0],[0.236,0.476],[-0.012,0.033],[-0.182,0.46],[-0.475,0.236],[-0.033,-0.011],[-0.459,-0.182],[0,0],[-1.329,-2.67],[0,0],[-1.813,-0.748],[-0.816,0.173],[-0.338,0.913],[0.115,0.405],[0,0],[1.026,0.408],[-0.406,1.025],[0,0],[0,0],[-0.071,-0.028],[0,0],[-1.472,-0.43],[-0.593,0.14],[-0.357,0.721],[0.077,0.416],[0,0],[0.876,0.403],[-0.021,0.083],[-0.013,0.033],[-0.403,0.876],[-0.084,-0.021],[-0.033,-0.014]],"v":[[1.962,-13.096],[-8.76,-18.034],[-12.1,-18.564],[-13.438,-17.141],[-13.753,-14.855],[-12.658,-13.071],[-11.383,-12.354],[0.275,-7.73],[0.501,-7.625],[3.081,-5.371],[3.381,-1.898],[1.329,0.424],[-1.686,0.991],[-2.437,0.965],[-1.432,7.985],[4.895,10.726],[7.939,15.152],[3.353,21.106],[-3.648,23.325],[-9.932,24.728],[-14.984,27.546],[-15.734,29.258],[-15.503,31.322],[-12.544,32.252],[0.181,28.677],[12.755,27.609],[35.825,21.445],[35.827,21.444],[35.831,21.442],[37.273,21.398],[37.346,21.426],[37.363,21.432],[38.452,22.508],[38.497,23.942],[38.468,24.022],[37.385,25.128],[37.379,25.13],[12.887,31.607],[0.855,32.62],[-11.118,35.989],[-16.195,36.052],[-19.201,32.848],[-19.693,28.692],[-17.889,24.796],[-11.208,20.937],[-4.163,19.358],[1.439,17.593],[3.934,15.053],[3.882,14.987],[2.794,14.129],[-2.327,11.916],[-1.459,8.034],[-2.393,1.013],[-1.324,-2.997],[-0.535,-3.116],[-0.359,-3.325],[-1.32,-4.06],[-12.856,-8.636],[-15.385,-10.146],[-17.674,-14.058],[-17.156,-18.616],[-13.152,-22.424],[-11.63,-22.643],[-10.805,-26.407],[-6.835,-29.569],[-2.13,-29.383],[-1.495,-32.282],[-1.432,-32.43],[3.288,-36.324],[10.021,-35.302],[10.12,-35.257],[31.193,-25.105],[31.295,-25.052],[45.227,-13.607],[45.228,-13.604],[45.229,-13.603],[45.333,-12.075],[45.296,-11.977],[44.326,-10.922],[42.799,-10.819],[42.7,-10.855],[41.646,-11.825],[41.642,-11.833],[29.404,-21.527],[8.436,-31.629],[4.12,-32.411],[2.213,-30.778],[1.936,-28.6],[2.854,-27.53],[8.822,-25.163],[9.944,-22.566],[7.352,-21.443],[7.348,-21.444],[1.316,-23.823],[1.107,-23.919],[-2.447,-25.328],[-5.917,-25.676],[-7.222,-24.63],[-7.62,-22.792],[-6.867,-21.566],[3.635,-16.729],[4.737,-14.42],[4.658,-14.175],[4.615,-14.076],[2.307,-12.974],[2.061,-13.053]],"c":true},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[55.39,50.134],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":50,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":5,"nm":"上滑查看更多视频","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[249.5,409.099,0],"ix":2},"a":{"a":0,"k":[4.786,-22.901,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"t":{"d":{"k":[{"s":{"s":60,"f":"SourceHanSansSC-Normal","t":"上滑查看更多视频","j":2,"tr":0,"lh":72,"ls":0,"fc":[1,1,1],"sc":[0,0,0],"sw":0.00999999977648,"of":true},"t":0}]},"p":{},"m":{"g":1,"a":{"a":0,"k":[0,0],"ix":2}},"a":[]},"ip":0,"op":50,"st":0,"bm":0}],"markers":[{"tm":1,"cm":"{\n\t\"exportFlag\":\t1,\n\t\"storePath\":\t\"/Users/changkang/Downloads/中文版动效/动效导出最终版本的/动效\"\n}","dr":0}],"chars":[{"ch":"上","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[43.405,-82.883],[43.405,-3.625],[5.338,-3.625],[5.338,3.122],[95.471,3.122],[95.471,-3.625],[50.455,-3.625],[50.455,-44.614],[88.623,-44.614],[88.623,-51.361],[50.455,-51.361],[50.455,-82.883]],"c":true},"ix":2},"nm":"上","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"上","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"滑","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-3.928,-3.726],[0,0],[6.143,3.625]],"o":[[6.244,3.827],[0,0],[-3.928,-3.525],[0,0]],"v":[[9.467,-78.653],[27.594,-65.359],[31.924,-70.496],[13.696,-82.983]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-3.827,-3.122],[0,0],[5.74,2.921]],"o":[[5.841,3.122],[0,0],[-3.928,-3.122],[0,0]],"v":[[4.33,-50.656],[21.552,-39.679],[25.58,-44.916],[8.258,-55.389]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[4.633,-7.553],[0,0],[-4.431,10.272],[0,0]],"o":[[0,0],[5.035,-9.164],[0,0],[-4.935,11.078]],"v":[[7.755,1.913],[13.596,6.244],[29.105,-25.681],[23.868,-29.81]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[45.923,-22.055],[79.156,-22.055],[79.156,-14.2],[45.923,-14.2]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[45.923,-27.191],[45.923,-34.845],[79.156,-34.845],[79.156,-27.191]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":5,"ty":"sh","ix":6,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[1.41,0],[5.237,0.201],[-0.302,-1.511],[-2.618,1.007],[0,3.525],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,1.309],[-1.41,0.101],[0.806,1.611],[7.251,0],[2.618,-0.906],[0,0],[0,0]],"v":[[39.679,-40.384],[39.679,7.855],[45.923,7.855],[45.923,-9.164],[79.156,-9.164],[79.156,0.806],[77.344,2.518],[65.863,2.417],[67.776,7.956],[82.178,6.949],[85.602,0.806],[85.602,-40.384]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":6,"ty":"sh","ix":7,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[40.384,-80.667],[40.384,-53.476],[29.709,-53.476],[29.709,-36.658],[35.953,-36.658],[35.953,-47.836],[89.227,-47.836],[89.227,-36.658],[95.773,-36.658],[95.773,-53.476],[84.998,-53.476],[84.998,-80.667]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":7,"ty":"sh","ix":8,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[46.628,-53.476],[46.628,-63.144],[61.029,-63.144],[61.029,-53.476]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":8,"ty":"sh","ix":9,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[78.653,-53.476],[66.769,-53.476],[66.769,-67.978],[46.628,-67.978],[46.628,-75.229],[78.653,-75.229]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"滑","np":12,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"查","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[29.205,-21.854],[71.201,-21.854],[71.201,-12.891],[29.205,-12.891]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[29.205,-35.55],[71.201,-35.55],[71.201,-26.688],[29.205,-26.688]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[22.559,-40.585],[22.559,-7.855],[78.149,-7.855],[78.149,-40.585]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[7.654,-1.511],[7.654,4.532],[93.457,4.532],[93.457,-1.511]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[12.589,-4.33],[-1.007,-1.611],[-9.265,12.085],[0,0],[0,0],[0,0],[-14.099,-5.237],[-1.611,1.208],[8.862,9.467],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[-8.862,9.769],[1.41,1.309],[13.797,-5.539],[0,0],[0,0],[0,0],[9.366,11.884],[0.906,-1.712],[-12.991,-4.129],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[46.729,-84.494],[46.729,-71.301],[5.841,-71.301],[5.841,-65.359],[39.175,-65.359],[3.827,-42.197],[8.258,-36.758],[46.729,-65.259],[46.729,-43.707],[53.476,-43.707],[53.476,-65.359],[92.45,-37.564],[96.982,-43.103],[60.928,-65.359],[95.068,-65.359],[95.068,-71.301],[53.476,-71.301],[53.476,-84.494]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"查","np":8,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"看","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[32.73,-21.854],[78.049,-21.854],[78.049,-14.301],[32.73,-14.301]],"c":true},"ix":2},"nm":"看","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[32.73,-26.788],[32.73,-34.14],[78.049,-34.14],[78.049,-26.788]],"c":true},"ix":2},"nm":"看","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[32.73,-9.467],[78.049,-9.467],[78.049,-1.511],[32.73,-1.511]],"c":true},"ix":2},"nm":"看","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[24.573,-0.201],[-0.201,-1.611],[-9.567,0.403],[0.906,-2.518],[0,0],[0,0],[0,0],[1.41,-2.618],[0,0],[0,0],[0,0],[11.581,-6.647],[-0.906,-1.41],[-5.237,5.942],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.41,2.618],[0,0],[0,0],[0,0],[-1.108,2.719],[0,0],[0,0],[0,0],[-0.806,2.618],[-10.071,2.115]],"o":[[-15.912,3.424],[0.705,1.511],[8.862,0],[-0.705,2.518],[0,0],[0,0],[0,0],[-1.108,2.719],[0,0],[0,0],[0,0],[-6.445,10.876],[1.41,1.309],[7.15,-4.23],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[1.611,-2.417],[0,0],[0,0],[0,0],[1.208,-2.618],[0,0],[0,0],[0,0],[0.906,-2.618],[14.603,-0.906],[0,0]],"v":[[83.286,-83.588],[11.884,-78.452],[13.394,-73.114],[41.492,-73.819],[39.175,-66.367],[13.394,-66.367],[13.394,-60.928],[37.161,-60.928],[33.435,-52.771],[5.942,-52.771],[5.942,-47.131],[30.313,-47.131],[3.525,-20.142],[7.855,-14.905],[26.285,-30.313],[26.285,8.057],[32.73,8.057],[32.73,4.028],[78.049,4.028],[78.049,8.057],[84.695,8.057],[84.695,-39.578],[33.435,-39.578],[38.068,-47.131],[94.766,-47.131],[94.766,-52.771],[40.988,-52.771],[44.513,-60.928],[88.824,-60.928],[88.824,-66.367],[46.527,-66.367],[49.045,-74.222],[87.717,-78.653]],"c":true},"ix":2},"nm":"看","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"看","np":7,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"更","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.424,5.539],[0,0],[-5.136,-3.827],[12.387,-2.417],[-0.806,-1.511],[-6.747,4.532],[-23.666,-1.007],[-1.309,1.611],[12.991,6.143],[-1.309,6.345],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[4.935,-4.23]],"o":[[0,0],[3.525,6.042],[-6.244,3.625],[1.511,1.611],[13.394,-2.921],[13.797,7.452],[0.302,-2.216],[-22.961,-0.705],[5.539,-5.237],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.208,5.136],[-5.035,-3.424]],"v":[[25.177,-24.17],[19.437,-21.854],[32.327,-7.15],[4.834,2.014],[8.862,7.956],[38.47,-3.223],[94.464,7.654],[97.385,1.007],[43.909,-7.553],[53.375,-25.177],[87.817,-25.177],[87.817,-63.849],[54.382,-63.849],[54.382,-72.711],[94.061,-72.711],[94.061,-78.854],[6.546,-78.854],[6.546,-72.711],[47.433,-72.711],[47.433,-63.849],[15.912,-63.849],[15.912,-25.177],[46.326,-25.177],[37.766,-10.977]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0.101,-2.216],[0,0]],"o":[[0,0],[0,0],[0,2.216],[0,0],[0,0]],"v":[[22.357,-41.794],[47.433,-41.794],[47.433,-37.564],[47.232,-30.917],[22.357,-30.917]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,2.216],[0,0],[0,0],[0,0]],"o":[[0.101,-2.216],[0,0],[0,0],[0,0],[0,0]],"v":[[54.181,-30.917],[54.382,-37.564],[54.382,-41.794],[81.07,-41.794],[81.07,-30.917]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[22.357,-58.109],[47.433,-58.109],[47.433,-47.333],[22.357,-47.333]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[54.382,-58.109],[81.07,-58.109],[81.07,-47.333],[54.382,-47.333]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"更","np":8,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"多","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[16.214,-6.848],[-1.007,-1.611],[-6.647,5.438],[0,0],[8.157,-4.834],[4.532,2.518],[0,0],[-3.424,-3.021],[11.38,-2.014],[-0.705,-1.813],[-12.891,22.357],[0,0],[0,0],[0,0],[-2.014,2.518]],"o":[[-6.345,8.459],[1.511,1.108],[9.265,-4.431],[0,0],[-5.136,6.546],[-3.625,-3.122],[0,0],[4.129,2.417],[-10.977,5.539],[1.208,1.41],[25.681,-5.438],[0,0],[0,0],[0,0],[2.518,-2.417],[0,0]],"v":[[46.326,-84.595],[11.581,-59.216],[16.214,-54.382],[40.082,-69.388],[69.287,-69.388],[48.743,-52.267],[35.248,-61.533],[30.414,-58.008],[42.801,-49.146],[8.157,-37.665],[11.481,-31.622],[79.66,-73.114],[75.33,-75.833],[73.92,-75.531],[46.93,-75.531],[53.778,-82.983]],"c":true},"ix":2},"nm":"多","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[20.444,-7.452],[-0.906,-1.611],[-8.359,6.949],[0,0],[9.064,-5.136],[4.23,2.921],[0,0],[-3.323,-3.424],[17.322,-1.712],[-0.403,-1.913],[-14.099,29.709],[0,0],[0,0],[0,0],[-2.014,2.618]],"o":[[-7.352,10.071],[1.511,1.309],[12.79,-5.136],[0,0],[-5.136,8.258],[-3.525,-3.424],[0,0],[4.028,3.021],[-14.301,6.747],[1.108,1.611],[35.248,-4.23],[0,0],[0,0],[0,0],[2.518,-2.518],[0,0]],"v":[[62.741,-49.649],[20.444,-20.746],[24.774,-15.61],[56.598,-34.14],[84.796,-34.14],[63.144,-14.099],[50.253,-24.573],[44.714,-21.35],[56.9,-10.776],[7.956,1.511],[10.776,8.057],[94.867,-37.866],[90.436,-40.686],[89.127,-40.283],[63.345,-40.283],[70.193,-48.038]],"c":true},"ix":2},"nm":"多","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"多","np":5,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"视","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[45.721,-79.459],[45.721,-25.882],[52.167,-25.882],[52.167,-73.416],[84.192,-73.416],[84.192,-25.882],[90.939,-25.882],[90.939,-79.459]],"c":true},"ix":2},"nm":"视","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-1.813,-3.726],[0,0],[3.928,3.726]],"o":[[3.726,3.928],[0,0],[-1.813,-3.625],[0,0]],"v":[[15.912,-81.171],[25.378,-67.978],[30.817,-71.603],[21.048,-84.192]],"c":true},"ix":2},"nm":"视","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[25.378,-13.193],[-0.705,-1.41],[-3.827,11.38],[0,0],[-6.647,0],[0,0],[-0.906,15.811],[1.712,1.41],[3.726,0],[0,0],[0,2.921],[0,0],[0,0],[0,5.438],[0,0]],"o":[[0,0],[0,15.811],[1.41,1.108],[15.811,-8.258],[0,0],[0,6.445],[0,0],[8.459,0],[-1.813,-0.403],[-0.504,14.603],[0,0],[-3.021,0],[0,0],[0,0],[1.41,-5.942],[0,0],[0,0]],"v":[[64.453,-65.561],[64.453,-45.218],[35.953,2.921],[40.182,7.956],[67.676,-22.861],[67.676,-1.813],[76.941,6.345],[86.508,6.345],[96.982,-13.495],[91.241,-16.214],[86.609,1.108],[77.847,1.108],[74.02,-2.518],[74.02,-27.795],[69.086,-27.795],[70.898,-45.016],[70.898,-65.561]],"c":true},"ix":2},"nm":"视","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[10.474,-7.251],[-0.604,-1.913],[-4.028,4.431],[0,0],[0,0],[0,0],[-2.115,-3.122],[0,0],[3.827,4.028],[-2.82,7.855],[0,0],[0,0]],"o":[[0,0],[0,0],[-6.042,13.092],[1.108,1.208],[4.028,-3.021],[0,0],[0,0],[0,0],[3.726,4.633],[0,0],[-1.913,-2.216],[4.935,-6.949],[0,0],[0,0],[0,0]],"v":[[6.546,-67.072],[6.546,-60.828],[31.622,-60.828],[4.129,-27.594],[7.452,-21.149],[19.638,-32.428],[19.638,7.855],[25.983,7.855],[25.983,-36.356],[36.456,-22.458],[40.787,-27.896],[27.795,-42.499],[39.78,-64.856],[36.154,-67.273],[34.946,-67.072]],"c":true},"ix":2},"nm":"视","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"视","np":7,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"频","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[24.573,-6.647],[-0.504,-1.41],[-0.302,37.766]],"o":[[-0.302,35.751],[1.208,1.208],[26.184,-7.452],[0,0]],"v":[[70.898,-50.958],[44.916,3.323],[48.239,8.157],[76.639,-50.958]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-4.23,-4.532],[0,0],[6.848,4.834]],"o":[[6.848,5.035],[0,0],[-4.33,-4.431],[0,0]],"v":[[73.416,-8.661],[93.155,8.157],[97.284,3.726],[77.243,-12.488]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[21.249,-6.949],[-0.806,-1.712],[-5.539,22.458]],"o":[[-5.237,20.847],[1.309,1.41],[22.458,-8.157],[0,0]],"v":[[43.506,-38.873],[5.338,3.021],[8.963,8.258],[49.347,-37.463]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[4.33,-5.237],[-1.108,-0.906],[-2.316,8.258]],"o":[[-2.115,7.452],[1.511,0.806],[4.33,-5.539],[0,0]],"v":[[13.898,-39.88],[4.028,-19.638],[9.064,-16.415],[19.638,-38.672]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.41,3.726],[0,0],[0,0],[0,0],[0,0],[0,0],[1.41,-3.223]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[1.309,-3.323],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.007,3.525],[0,0]],"v":[[54.886,-61.432],[54.886,-13.898],[60.727,-13.898],[60.727,-55.994],[86.407,-55.994],[86.407,-13.998],[92.551,-13.998],[92.551,-61.432],[74.222,-61.432],[78.351,-72.409],[95.572,-72.409],[95.572,-78.452],[52.267,-78.452],[52.267,-72.409],[71.805,-72.409],[67.978,-61.432]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":5,"ty":"sh","ix":6,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[11.884,-75.632],[11.884,-52.872],[4.129,-52.872],[4.129,-46.729],[25.378,-46.729],[25.378,-16.113],[31.522,-16.113],[31.522,-46.729],[50.555,-46.729],[50.555,-52.872],[33.234,-52.872],[33.234,-65.863],[48.138,-65.863],[48.138,-71.603],[33.234,-71.603],[33.234,-84.494],[27.09,-84.494],[27.09,-52.872],[17.624,-52.872],[17.624,-75.632]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"频","np":9,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"}]}
\ No newline at end of file
... ...
... ... @@ -16,12 +16,15 @@ struct ImageAndTextDetailPage {
}
}
pageTransition(){
// 定义页面进入时的效果,从右边侧滑入
PageTransitionEnter({ type: RouteType.None, duration: 300 })
pageTransition() {
// 为目标页面时,进入:从右边侧滑入,退出:是右侧划出;跳转别的页面:左侧划出,返回:左侧划入。
PageTransitionEnter({ type: RouteType.Push, duration: 300 })
.slide(SlideEffect.Right)
// 定义页面退出时的效果,向右边侧滑出
PageTransitionExit({ type: RouteType.None, duration: 300 })
PageTransitionEnter({ type: RouteType.Pop, duration: 300 })
.slide(SlideEffect.Left)
PageTransitionExit({ type: RouteType.Push, duration: 300 })
.slide(SlideEffect.Left)
PageTransitionExit({ type: RouteType.Pop, duration: 300 })
.slide(SlideEffect.Right)
}
... ...
... ... @@ -8,6 +8,7 @@ import router from '@ohos.router';
import { promptAction } from '@kit.ArkUI';
import { UpgradeTipDialog } from "./upgradePage/UpgradeTipDialog"
import { ProcessUtils } from 'wdRouter/Index';
import { StartupManager } from '../startupmanager/StartupManager';
const TAG = 'MainPage';
... ... @@ -27,6 +28,8 @@ struct MainPage {
aboutToAppear() {
StartupManager.sharedInstance().appReachMainPage()
this.breakpointSystem.register()
let context = getContext(this) as common.UIAbilityContext
... ...
... ... @@ -18,11 +18,14 @@ struct SpacialTopicPage {
}
pageTransition() {
// 定义页面进入时的效果,从右边侧滑入
PageTransitionEnter({ type: RouteType.None, duration: 300 })
// 为目标页面时,进入:从右边侧滑入,退出:是右侧划出;跳转别的页面:左侧划出,返回:左侧划入。
PageTransitionEnter({ type: RouteType.Push, duration: 300 })
.slide(SlideEffect.Right)
// 定义页面退出时的效果,向右边侧滑出
PageTransitionExit({ type: RouteType.None, duration: 300 })
PageTransitionEnter({ type: RouteType.Pop, duration: 300 })
.slide(SlideEffect.Left)
PageTransitionExit({ type: RouteType.Push, duration: 300 })
.slide(SlideEffect.Left)
PageTransitionExit({ type: RouteType.Pop, duration: 300 })
.slide(SlideEffect.Right)
}
... ...
... ... @@ -90,6 +90,9 @@ export class StartupManager {
appReachMainPage() : Promise<void> {
return new Promise((resolve) => {
Logger.debug(TAG, "App 进入首页,开始其他任务初始化")
LoginModule.reportDeviceInfo()
//TODO:
resolve()
... ...
import { insightIntent, InsightIntentExecutor } from '@kit.AbilityKit';
import { window } from '@kit.ArkUI';
import { BusinessError } from '@kit.BasicServicesKit';
/**
* 意图调用
*/
export default class InsightIntentExecutorImpl extends InsightIntentExecutor {
private static readonly ViewColumn = 'ViewColumn';
/**
* override 执行前台UIAbility意图
*
* @param name 意图名称
* @param param 意图参数
* @param pageLoader 窗口
* @returns 意图调用结果
*/
onExecuteInUIAbilityForegroundMode(name: string, param: Record<string, Object>, pageLoader: window.WindowStage):
Promise<insightIntent.ExecuteResult> {
// 根据意图名称分发处理逻辑
switch (name) {
case InsightIntentExecutorImpl.ViewColumn:
return this.jumpToView(param, pageLoader);
default:
break;
}
return Promise.resolve({
code: -1,
result: {
message: 'unknown intent'
}
} as insightIntent.ExecuteResult)
}
/**
* 实现跳转新闻页面功能
*
* @param param 意图参数
* @param pageLoader 窗口
*/
private jumpToView(param: Record<string, Object>, pageLoader: window.WindowStage): Promise<insightIntent.ExecuteResult> {
return new Promise((resolve, reject) => {
// TODO 实现意图调用,loadContent的入参为歌曲落地页路径,例如:pages/SongPage
pageLoader.loadContent('pages/MainPage')
.then(() => {
let entityId: string = (param.items as Array<object>)?.[0]?.['entityId'];
// TODO 调用成功的情况,此处可以打印日志
resolve({
code: 0,
result: {
message: 'Intent execute success'
}
});
})
.catch((err: BusinessError) => {
// TODO 调用失败的情况
resolve({
code: -1,
result: {
message: 'Intent execute failed'
}
})
});
})
}
}
\ No newline at end of file
... ...
{
"insightIntents": [
{
"intentName": "ViewColumn",
"domain": "",
"intentVersion": "1.0.1",
"srcEntry": "./ets/utils/InsightIntentExecutorImpl.ets",
"uiAbility": {
"ability": "EntryAbility",
"executeMode": [
"background",
"foreground"
]
}
}
]
}
\ No newline at end of file
... ...