wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool: (34 commits)
  fix: 更多跳转,分割线
  ref |> 增加热门评论接口数据展示
  fix: 图集使用taskpool任务池优化图片加载、下载逻辑
  全文字体和箭头颜色
  全文字体和箭头颜色
  全文右对齐
  fix: 19768 内容找不到了默认缺省页,顶部缺少分割线,左下角缺少返回按钮,见截图
  fix: 19768 内容找不到了默认缺省页,顶部缺少分割线,左下角缺少返回按钮,见截图
  fix: 地方精选卡左侧边距去除,可滑动到左侧
  fix: 轮播卡下面不需要粗分割线,应该是细分割线
  fix: 19927 3:2横划卡-后台配置1个运营位,跳转设置--不跳转,鸿蒙端不应展示更多按钮
  fix: 音频悬浮窗跳转稿件详情开发部分,注释log代码
  fix: 音频悬浮窗跳转稿件详情开发部分,注释log代码
  fix |> 修复搜索结果2条调查标识,展开更多后第二条数据仍显示专题问题
  fix: 号主图集页,已关注按钮背景颜色
  ref |> 修复折叠屏上直播详情直播间tab消息被裁剪问题
  fix: 号主图集页,已关注按钮背景颜色
  fix |> 修复首次启动通知弹窗选择允许通知后,在设置页推送开关没有开启
  19899 我的-关注列表页面,底部文字“已显示全部内容”与导航条太近
  fix: 18748 功能缺陷-【uat】进入文章详情页,点击收藏按钮,多次点击,点赞数会消失,并且动画生硬
  ...
Showing 47 changed files with 961 additions and 413 deletions
... ... @@ -44,6 +44,12 @@ export class SpConstants{
//启动页数据存储key
static APP_LAUNCH_PAGE_DATA_MODEL = 'app_launch_page_data_model'
//国殇模式数据存储key
static APP_MOURNS_INFO_DATA_MODEL = 'app_mourns_info_model'
//稿件详情音频播放跳转存储key
static APP_NEWS_INFO_DATA_MODEL = 'app_news_info_model'
//频道信息流页面左右挂角
static APP_PAGE_CORNER_ADV = 'app_page_corner_adv_'
... ...
... ... @@ -28,12 +28,10 @@ export class WDRouterRule {
}
if (params) {
// router.pushUrl({ url: 'pages/routerpage2', , params: params })
console.log('page.url()==',page.url(),JSON.stringify(params))
// console.log('page.url()==',page.url(),JSON.stringify(params))
router.pushUrl({ url: page.url(), params: params })
} else {
router.pushUrl({ url: page.url() }, mode).catch((error: Error) => {
console.log("err", JSON.stringify(error)) //100002 uri is not exist
})
router.pushUrl({ url: page.url() }, mode)
}
} else {
ToastUtils.showToast("功能开发中", 1000);
... ... @@ -50,9 +48,7 @@ export class WDRouterRule {
// router.pushUrl({ url: 'pages/routerpage2', , params: params })
router.replaceUrl({ url: page.url(), params: params })
} else {
router.replaceUrl({ url: page.url() }).catch((error:Error)=>{
console.log("err",JSON.stringify(error))//100002 uri is not exist
})
router.replaceUrl({ url: page.url() })
}
} else {
ToastUtils.showToast("功能开发中", 1000);
... ...
... ... @@ -170,11 +170,11 @@ export class ProcessUtils {
*/
static processPage(content: ContentDTO) {
if (content == null) {
Logger.error(TAG, "processPage, content is null");
// Logger.error(TAG, "processPage, content is null");
return;
}
if (StringUtils.isEmpty(content.objectType)) {
Logger.error(TAG, "processPage, objectType is empty");
// Logger.error(TAG, "processPage, objectType is empty");
return;
}
// 网络出小差了,请检查网络后重试
... ... @@ -189,13 +189,13 @@ export class ProcessUtils {
if (typeof type == "number") {
type = `${type}`
}
console.log(TAG, 'objectType', `${JSON.stringify(content)}`);
// console.log(TAG, 'objectType', `${JSON.stringify(content)}`);
switch (type) {
case ContentConstants.TYPE_NONE:
Logger.debug(TAG, "processPage, do nothing");
// Logger.debug(TAG, "processPage, do nothing");
break;
case ContentConstants.TYPE_VOD:
Logger.debug(TAG, "processPage, nonsupport!!!");
// Logger.debug(TAG, "processPage, nonsupport!!!");
ProcessUtils.gotoVod(content)
break;
case ContentConstants.TYPE_LIVE:
... ... @@ -432,7 +432,7 @@ export class ProcessUtils {
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoH5NewsWeb, ${content.objectId}`);
// Logger.debug(TAG, `gotoH5NewsWeb, ${content.objectId}`);
}
public static gotoWeb(content: ContentDTO) {
... ... @@ -454,7 +454,7 @@ export class ProcessUtils {
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoWeb, ${content.objectId}`);
// Logger.debug(TAG, `gotoWeb, ${content.objectId}`);
}
public static gotoVod(content: ContentDTO) {
... ... @@ -473,7 +473,7 @@ export class ProcessUtils {
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoVod, ${content.objectId}`);
// Logger.debug(TAG, `gotoVod, ${content.objectId}`);
}
/**
... ... @@ -495,7 +495,7 @@ export class ProcessUtils {
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoLive, ${content.objectId}`);
// Logger.debug(TAG, `gotoLive, ${content.objectId}`);
}
//音频详情页
... ... @@ -514,7 +514,7 @@ export class ProcessUtils {
// } as Params,
// };
// WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoAudio, ${content.objectId}`);
// Logger.debug(TAG, `gotoAudio, ${content.objectId}`);
}
/**
... ... @@ -538,7 +538,7 @@ export class ProcessUtils {
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`);
// Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`);
}
/**
... ... @@ -561,7 +561,7 @@ export class ProcessUtils {
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`);
// Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`);
}
/**
... ... @@ -575,11 +575,12 @@ export class ProcessUtils {
entities: ['entity.system.browsable'],
uri: url
}
context.startAbility(wantInfo).then(() => {
Logger.debug(TAG, 'jumpExternalWebPage success')
}).catch((err: BusinessError) => {
Logger.error(TAG, 'jumpExternalWebPage success, error: ' + JSON.stringify(err))
})
context.startAbility(wantInfo)
// .then(() => {
// Logger.debug(TAG, 'jumpExternalWebPage success')
// }).catch((err: BusinessError) => {
// Logger.error(TAG, 'jumpExternalWebPage success, error: ' + JSON.stringify(err))
// })
}
/**
... ...
import { TopicInfo } from '../morningevening/TopicInfo';
import { ArrayList } from '@kit.ArkTS';
import { AdvRuleBean, CompAdvBean } from '../adv/AdvsRuleBean';
export interface GroupItem {
id: number;
... ... @@ -15,7 +16,6 @@ export interface TopicDetailData {
shareSummary: string;
id: number;
baselineCopywriting: string;
cornersAdv: string;
backgroundImgUrl: string;
description: string;
imgSize: string;
... ... @@ -38,4 +38,12 @@ export interface TopicDetailData {
topicInfo: TopicInfo;
baselineColor: string;
groups: ArrayList<GroupItem>;
/**
* 挂角广告数据
*/
cornersAdv: AdvRuleBean;
/**
* 广告中心-挂角广告信息
*/
cornersAdv2: CompAdvBean[];
}
\ No newline at end of file
... ...
... ... @@ -77,14 +77,71 @@ export struct CompParser {
this.componentBuilder();
}
.margin({
left: 6,
left: this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 ? 0 : 6,
right: (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_02 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) ? 0 : 6
})
}
@Builder
beforeDevider() {
if (
this.compDTO.compStyle === CompStyle.Card_09 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Column_09 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Row_06
) {
if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
}
}
@Builder
behindDevider() {
if (
this.compDTO.compStyle === CompStyle.Card_09 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Column_09 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Row_06
) {
if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
} else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
Divider().strokeWidth(1).color('#f5f5f5').width('120%').margin({left: -6})
} else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
// 大专题
if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
} else if (this.compDTO.compType === 'appStyle' || this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_03 || this.compDTO.compStyle === CompStyle.Card_Comp_Adv || this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
if (
this.nextCompDTO.compStyle === CompStyle.Card_09 ||
this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_09 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_12
) {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
} else {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
}
} else {
// Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
}
}
@Builder
componentBuilder() {
this.beforeDevider();
if (this.compDTO.operDataList[0]?.objectType !== '3' &&
this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口
... ... @@ -208,43 +265,7 @@ export struct CompParser {
// })
}
if (
this.compDTO.compStyle === CompStyle.Card_09 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Column_09 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Row_06
) {
if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
} else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
// Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
} else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
// 大专题
if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
} else if (this.compDTO.compType === 'appStyle' || this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_03 || this.compDTO.compStyle === CompStyle.Card_Comp_Adv || this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
if (
this.nextCompDTO.compStyle === CompStyle.Card_09 ||
this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_09 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_12
) {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
} else {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
}
} else {
// Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
}
this.behindDevider()
}
... ...
... ... @@ -79,7 +79,7 @@ export struct ENewspaperItemComponent {
this.startX = x;
this.startY = y;
let points: number[][] = this.getArea(x, y, this.newspaperListItemBean.items);
console.log("event.points", JSON.stringify(points))
// console.log("event.points", JSON.stringify(points))
if (points && points.length > 2) {
let path = new Path2D();
path.moveTo(px2vp(points[0][0]), px2vp(points[0][1]));
... ...
... ... @@ -35,6 +35,7 @@ import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare'
import { common } from '@kit.AbilityKit';
import { componentUtils } from '@kit.ArkUI';
import { TrackConstants, TrackingContent, TrackingPageBrowse } from 'wdTracking/Index';
import { LottieView } from '../components/lottie/LottieView';
const PATTERN_DATE_CN_RN: string = 'yyyy年MM月dd日 HH:mm';
... ... @@ -73,6 +74,7 @@ export struct ImageAndTextPageComponent {
pageShowTime:number = 0;
pageHideTime:number = 0;
lastTimeoutId?: number
@State needAnimation: boolean = false;
@Consume @Watch('pageShowForUpdateData') pageShow :number
@Consume @Watch('pageHideForUpdateData') pageHide :number
... ... @@ -106,13 +108,43 @@ export struct ImageAndTextPageComponent {
Row() {
Row() {
if (this.newsStatusOfUser?.likeStatus == '1') {
Image(this.contentDetailData?.likesStyle === 1 ? $r('app.media.ic_like_check') :
(this.contentDetailData?.likesStyle === 2 ? $r('app.media.icon_prayer_active') :
$r('app.media.icon_candle_active')))
if (this.contentDetailData?.likesStyle === 1) {
if (this.needAnimation) {
Row() {
LottieView({
name: 'articleLike',
path: 'lottie/article_like.json',
lottieWidth: 40,
lottieHeight: 40,
autoplay: true,
loop: false,
})
.position({
left: -6,
top: -8
})
}
.width(24)
.height(24)
.margin({ right: 3 })
} else {
Image($r('app.media.icon_like_select'))
.width(24)
.height(24)
.margin({ right: 5 })
}
} else if (this.contentDetailData?.likesStyle === 2) {
Image($r('app.media.icon_prayer_active'))
.width(24)
.height(24)
.margin({ right: 5 })
} else {
Image($r('app.media.icon_candle_active'))
.width(24)
.height(24)
.margin({ right: 5 })
}
} else {
Image(this.contentDetailData?.likesStyle === 1 ? $r('app.media.icon_like') :
(this.contentDetailData?.likesStyle === 2 ? $r('app.media.icon_prayer') :
$r('app.media.icon_candle')))
... ... @@ -464,9 +496,24 @@ export struct ImageAndTextPageComponent {
})
}
initAnimationConfig() {
if (this.contentDetailData?.openLikes && this.contentDetailData?.likesStyle !== 4) {
if (this.newsStatusOfUser?.likeStatus == '1') {
if (this.contentDetailData?.likesStyle === 1) {
this.needAnimation = false;
} else {
this.needAnimation = true;
}
}
} else {
this.needAnimation = true;
}
}
aboutToAppear() {
this.getDetail()
this.screenHeight = DisplayUtils.getDeviceHeight()
this.initAnimationConfig();
//注册通知,来自别的组件的评论成功通知
EmitterUtils.receiveEvent(EmitterEventId.COMMENT_PUBLISH, (targetId?: string) => {
if (targetId) {
... ...
... ... @@ -11,6 +11,8 @@ import { TrackConstants, TrackingButton } from 'wdTracking';
import { faceDetector } from '@kit.CoreVisionKit';
import mediaLibrary from '@ohos.multimedia.mediaLibrary';
import fileIo from '@ohos.file.fs';
import { httpRequest } from '../utils/httpRequest';
import { taskpool } from '@kit.ArkTS';
const PERMISSIONS: Array<Permissions> = [
'ohos.permission.READ_IMAGEVIDEO',
... ... @@ -21,6 +23,23 @@ const PERMISSIONS: Array<Permissions> = [
* saveButton参考文档
* https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/savebutton-0000001820999677
* */
@Concurrent
async function getPicture(imageUrl: string): Promise<ArrayBuffer> {
let ret: ArrayBuffer = await new Promise((resolve, reject) => {
httpRequest.httpRequestInStream(imageUrl, (res: ArrayBuffer) => {
resolve(res); // 成功时解析Promise
}, () => {
// 下载失败时弹窗提示检查网络
promptAction.showToast({
message: $r('app.string.image_request_fail'),
duration: 2000
});
reject(new Error('Image download failed')); // 失败时拒绝Promise
});
});
return ret
}
@Component
export struct ImageDownloadComponent {
@State image: PixelMap | undefined = undefined;
... ... @@ -79,61 +98,12 @@ export struct ImageDownloadComponent {
const context = getContext(this) as common.UIAbilityContext;
const atManager = abilityAccessCtrl.createAtManager();
await atManager.requestPermissionsFromUser(context, PERMISSIONS);
this.getPicture();
}
/**
* 通过http的request方法从网络下载图片资源
*/
async getPicture() {
// 每一个httpRequest对应一个HTTP请求任务,不可复用
let httpRequest = http.createHttp();
// 用于订阅HTTP响应头事件
httpRequest.on('headersReceive', (header: Object) => {
//console.info('header: ' + JSON.stringify(header));
});
// 用于订阅HTTP流式响应数据接收事件
let res = new ArrayBuffer(0);
httpRequest.on('dataReceive', (data: ArrayBuffer) => {
const newRes = new ArrayBuffer(res.byteLength + data.byteLength);
const resView = new Uint8Array(newRes);
resView.set(new Uint8Array(res));
resView.set(new Uint8Array(data), res.byteLength);
res = newRes;
// //console.info('dataReceive res length: ' + res.byteLength);
});
// 用于订阅HTTP流式响应数据接收完毕事件
httpRequest.on('dataEnd', () => {
this.transcodePixelMap(res);
// 判断网络获取到的资源是否为ArrayBuffer类型
//console.info(`dataEnd getPicture ${res}`)
if (res instanceof ArrayBuffer) {
//console.info(`dataEnd getPicture`)
this.imageBuffer = res as ArrayBuffer;
}
//console.info('No more data in response, data receive end');
});
httpRequest.requestInStream(this.url,
(error: BusinessError, data: number) => {
if (error) {
// 下载失败时弹窗提示检查网络,不执行后续逻辑
promptAction.showToast({
message: $r('app.string.image_request_fail'),
duration: 2000
// 通过任务池(taskpool)从网络下载图片资源
taskpool.execute(getPicture, this.url).then((res) => {
const imgBuffer = res as ArrayBuffer
this.imageBuffer = imgBuffer;
this.transcodePixelMap(imgBuffer);
})
//console.error(`http reqeust failed with. Code: ${error.code}, message: ${error.message}`);
return;
}
// 取消订阅HTTP响应头事件
httpRequest.off('headersReceive');
// 取消订阅HTTP流式响应数据接收事件
httpRequest.off('dataReceive');
// 取消订阅HTTP流式响应数据接收完毕事件
httpRequest.off('dataEnd');
// 当该请求使用完毕时,调用destroy方法主动销毁
httpRequest.destroy();
}
)
}
/**
... ...
... ... @@ -27,6 +27,7 @@ import { common } from '@kit.AbilityKit';
import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent';
import { EmitterEventId, EmitterUtils } from 'wdKit/Index'
import { ColorUtils } from '../../utils/ColorUtils';
import { SpConstants } from 'wdConstant';
const TAG = 'MorningEveningPaperComponent';
... ... @@ -35,7 +36,7 @@ const TAG = 'MorningEveningPaperComponent';
@Component
export struct MorningEveningPaperComponent {
@State pageInfoBean: PageInfoBean = {} as PageInfoBean
// @State compInfoBean: CompInfoBean = {} as CompInfoBean
@State compInfoBean: CompInfoBean = {} as CompInfoBean
@State compListItem: CompList = {} as CompList
@Provide commentList: InteractDataDTO[] = []
@State audioPlayUrl: string = ""
... ... @@ -96,14 +97,14 @@ export struct MorningEveningPaperComponent {
private AudioSuspension = new AudioSuspensionModel()
onCancel() {
console.log(TAG, "cj2024 onCancel = ")
// console.log(TAG, "cj2024 onCancel = ")
}
/**
* 回调无用
**/
onConfirm() {
console.log(TAG, "cj2024 onConfirm = ")
// console.log(TAG, "cj2024 onConfirm = ")
// if (this.playerController != undefined) {
//
// }
... ... @@ -113,10 +114,10 @@ export struct MorningEveningPaperComponent {
// 续播判断
changeContinue() {
console.log(TAG, "cj2024 changeContinue = 1")
// console.log(TAG, "cj2024 changeContinue = 1")
// if (this.nextContId) {
this.playerController.continue = () => {
console.log(TAG, "cj2024 changeContinue = 2")
// console.log(TAG, "cj2024 changeContinue = 2")
this.playerController?.stop();
// this.playVM.playWithContentId(this.nextContId ?? '');
}
... ... @@ -128,10 +129,10 @@ export struct MorningEveningPaperComponent {
async aboutToAppear() {
this.dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as string
console.info(TAG, `aboutToAppear = ` + this.dailyPaperTopicPageId)
// console.info(TAG, `aboutToAppear = ` + this.dailyPaperTopicPageId)
const currentTime = new Date().getTime()
console.log(TAG, "currentTime = " + currentTime)
console.log(TAG, `currentTime = ${currentTime}`)
// console.log(TAG, "currentTime = " + currentTime)
// console.log(TAG, `currentTime = ${currentTime}`)
try {
// let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId)
... ... @@ -144,46 +145,44 @@ export struct MorningEveningPaperComponent {
let dateTime = DateTimeUtils.parseDate(this.pageInfoBean?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN)
const dateShow = new Date(dateTime)
this.subTitle = `${dateShow.getFullYear()}年\n${(dateShow.getMonth() + 1)}月${dateShow.getDate()}日`
console.log(TAG, "pageInfoBean topicDate = " + this.pageInfoBean?.topicInfo?.topicDate)
console.log(TAG, "pageInfoBean title = " + this.pageInfoBean?.topicInfo?.title)
console.log(TAG, "pageInfoBean dateTime = " + dateTime)
console.log(TAG, "pageInfoBean subTitle = " + this.subTitle)
console.log(TAG, "this.pageInfoBean = " + JSON.stringify(this.pageInfoBean))
// console.log(TAG, "pageInfoBean topicDate = " + this.pageInfoBean?.topicInfo?.topicDate)
// console.log(TAG, "pageInfoBean title = " + this.pageInfoBean?.topicInfo?.title)
//
// console.log(TAG, "pageInfoBean dateTime = " + dateTime)
// console.log(TAG, "pageInfoBean subTitle = " + this.subTitle)
//
// console.log(TAG, "this.pageInfoBean = " + JSON.stringify(this.pageInfoBean))
this.isHasTopView = this.pageInfoBean?.topicInfo?.frontLinkObject?true:false
let coverUrl = this.isHasTopView?this.pageInfoBean?.topicInfo?.frontLinkObject?.coverUrl as string :''
this.setComponentBgColor(coverUrl)
// this.compInfoBean = compInfoBean
//信息流缓存
let BeanString = SPHelper.default.getSync('MorningEveningComp'+this.dailyPaperTopicPageId,'') as string
let compInfoBean = {} as CompInfoBean
if (BeanString.length > 0) {
compInfoBean = JSON.parse(BeanString)
}else {
} else {
SPHelper.default.delete('MorningEveningComp'+this.dailyPaperTopicPageId)
compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo(pageInfoBean?.id, pageInfoBean?.groups[0]?.id, currentTime + "", pageInfoBean?.topicInfo?.topicId)
SPHelper.default.saveSync('MorningEveningComp'+this.dailyPaperTopicPageId,JSON.stringify(compInfoBean))
}
console.log(TAG, "compInfoBean = " + JSON.stringify(compInfoBean))
if (compInfoBean?.compList[0]) {
this.compListItem = compInfoBean?.compList[0]
console.log(TAG, '获取评论数据' + `${this.compListItem.operDataList.length}`)
// console.log(TAG, '获取评论数据' + `${this.compListItem.operDataList.length}`)
if (this.compListItem.operDataList && this.compListItem.operDataList.length > 0) {
this.getAllContentInteractData(this.compListItem.operDataList)
}
console.log(TAG, 'compInfoBean?.compList[0].audioDataList', JSON.stringify(compInfoBean?.compList[0].audioDataList))
// console.log(TAG, 'compInfoBean?.compList[0].audioDataList', JSON.stringify(compInfoBean?.compList[0].audioDataList))
if (compInfoBean?.compList[0].audioDataList.length > 0) {
this.audioPlayUrl = compInfoBean?.compList[0].audioDataList[0]?.audioUrl
this.audioTitle = compInfoBean?.compList[0].audioDataList[0]?.title
console.log(TAG, 'this.audioPlayUrl', this.audioPlayUrl)
// console.log(TAG, 'this.audioPlayUrl', this.audioPlayUrl)
}
}
console.log(TAG, "compInfoBean compStyle = " + compInfoBean.compList[0].compStyle)
// console.log(TAG, "compInfoBean compStyle = " + compInfoBean.compList[0].compStyle)
this.playerController.onTimeUpdate = (position, duration) => {
this.currentTime = DateFormatUtil.secondToTime(position);
this.totalTime = DateFormatUtil.secondToTime(duration);
... ... @@ -195,6 +194,11 @@ export struct MorningEveningPaperComponent {
compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo(pageInfoBean?.id, pageInfoBean?.groups[0]?.id, currentTime + "", pageInfoBean?.topicInfo?.topicId)
SPHelper.default.saveSync('MorningEveningComp'+this.dailyPaperTopicPageId,JSON.stringify(compInfoBean))
}
// 音频悬浮窗跳转数据
this.compInfoBean = compInfoBean
// console.log('AudioSuspensionModel', "compInfoBean = " + JSON.stringify(compInfoBean))
// console.log('AudioSuspensionModel', "compInfoBean11 = " + JSON.stringify(this.compInfoBean))
} catch (exception) {
this.isContentFailed = true
... ... @@ -219,10 +223,10 @@ export struct MorningEveningPaperComponent {
contentType: Number(item.objectType ?? '1')
})
})
console.log(TAG, '获取评论数据' + `${JSON.stringify(params)}`)
// console.log(TAG, '获取评论数据' + `${JSON.stringify(params)}`)
this.commentList = await PeopleShipMainViewModel.getContentInteractInfo(params)
console.log(TAG, '获取评论数据' + `${JSON.stringify(this.commentList)}`)
// console.log(TAG, '获取评论数据' + `${JSON.stringify(this.commentList)}`)
} catch (exception) {
... ... @@ -232,7 +236,7 @@ export struct MorningEveningPaperComponent {
async setComponentBgColor(imageUrl: string) {
// 图片转换为PixelMap对象
// const pixelMap: image.PixelMap = await image2PixelMap(item.icon);
console.log(TAG, "compInfoBean compStyle = " + imageUrl)
// console.log(TAG, "compInfoBean compStyle = " + imageUrl)
if (this.pageInfoBean.backgroundColor.length > 0){
let colorDatas = ColorUtils.hexColorValueToRGB(this.pageInfoBean.backgroundColor)
... ... @@ -270,11 +274,11 @@ export struct MorningEveningPaperComponent {
const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource);
effectKit.createColorPicker(pixelMap, (err, colorPicker) => {
let color = colorPicker.getLargestProportionColor();
console.log(TAG, "compInfoBean compStyle = " + color)
// console.log(TAG, "compInfoBean compStyle = " + color)
color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
// 将取色器选取的color示例转换为十六进制颜色代码
this.mixedBgColor = "#ff" + color.alpha.toString(16) + color.red.toString(16).padStart(2,'0') + color.green.toString(16).padStart(2,'0') + color.blue.toString(16).padStart(2,'0');
console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor)
// console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor)
});
}
}
... ... @@ -398,12 +402,13 @@ export struct MorningEveningPaperComponent {
.margin({ left: this.currentStatus === PlayerConstants.STATUS_START ?6:9 })// .alignSelf(ItemAlign.Center)
.objectFit(ImageFit.Contain)
.onClick(() => {
console.log("TAG", "cj compInfoBean onClick1 = " + this.isAudioPlaying)
// console.log("TAG", "cj compInfoBean onClick1 = " + this.isAudioPlaying)
// dialog.open()
// this.playerController.firstPlay(this.audioPlayUrl, this.audioTitle)
// SPHelper.default.save(SpConstants.APP_NEWS_INFO_DATA_MODEL, JSON.stringify(this.compInfoBean))
this.AudioSuspension.setPlayerUrl(this.audioPlayUrl, this.audioTitle)
console.log(TAG, "this.audioPlayUrl = " + this.audioPlayUrl)
console.log("TAG", "cj compInfoBean onClick2 = " + this.isAudioPlaying)
// console.log(TAG, "this.audioPlayUrl = " + this.audioPlayUrl)
// console.log("TAG", "cj compInfoBean onClick2 = " + this.isAudioPlaying)
})
}
.height('100%')
... ...
... ... @@ -6,11 +6,29 @@ import { OffsetModel } from '../model/OffsetModel';
import { WindowSizeManager } from '../utils/Managers';
import { runWithAnimation } from '../utils/FuncUtils';
import { PhotoListBean } from 'wdBean/Index';
import { http } from '@kit.NetworkKit';
import { router } from '@kit.ArkUI';
import { taskpool } from '@kit.ArkTS';
import { httpRequest } from '../utils/httpRequest';
const TAG = 'MultiPictureDetailItemComponent';
@Concurrent
async function getPicture(imageUrl: string): Promise<ArrayBuffer> {
let ret: ArrayBuffer = await new Promise((resolve, reject) => {
httpRequest.httpRequestInStream(imageUrl, (res: ArrayBuffer) => {
resolve(res); // 成功时解析Promise
}, () => {
// 下载失败时弹窗提示检查网络
promptAction.showToast({
message: $r('app.string.image_request_fail'),
duration: 2000
});
reject(new Error('Image download failed')); // 失败时拒绝Promise
});
});
return ret
}
@Reusable
@Component
export struct MultiPictureDetailItemComponent {
... ... @@ -34,65 +52,17 @@ export struct MultiPictureDetailItemComponent {
windowSizeManager: WindowSizeManager = new WindowSizeManager();
async aboutToAppear() {
aboutToAppear() {
this.imageUri = this.MultiPictureDetailItem.picPath
this.getPicture()
}
/**
* 通过http的request方法从网络下载图片资源
*/
async getPicture() {
// 每一个httpRequest对应一个HTTP请求任务,不可复用
let httpRequest = http.createHttp();
// 用于订阅HTTP响应头事件
httpRequest.on('headersReceive', (header: Object) => {
console.info('header: ' + JSON.stringify(header));
});
// 用于订阅HTTP流式响应数据接收事件
let res = new ArrayBuffer(0);
httpRequest.on('dataReceive', (data: ArrayBuffer) => {
const newRes = new ArrayBuffer(res.byteLength + data.byteLength);
const resView = new Uint8Array(newRes);
resView.set(new Uint8Array(res));
resView.set(new Uint8Array(data), res.byteLength);
res = newRes;
// console.info('dataReceive res length: ' + res.byteLength);
});
// 用于订阅HTTP流式响应数据接收完毕事件
httpRequest.on('dataEnd', () => {
this.transcodePixelMap(res);
// 判断网络获取到的资源是否为ArrayBuffer类型
console.info(`dataEnd getPicture ${res}`)
if (res instanceof ArrayBuffer) {
console.info(`dataEnd getPicture`)
this.imageBuffer = res as ArrayBuffer;
}
console.info('No more data in response, data receive end');
});
httpRequest.requestInStream(this.imageUri,
(error: BusinessError, data: number) => {
if (error) {
// 下载失败时弹窗提示检查网络,不执行后续逻辑
promptAction.showToast({
message: $r('app.string.image_request_fail'),
duration: 2000
// 通过任务池(taskpool)从网络下载图片资源
taskpool.execute(getPicture, this.imageUri).then((res) => {
const imgBuffer = res as ArrayBuffer
this.imageBuffer = imgBuffer;
this.transcodePixelMap(imgBuffer);
})
console.error(`http reqeust failed with. Code: ${error.code}, message: ${error.message}`);
return;
}
// 取消订阅HTTP响应头事件
httpRequest.off('headersReceive');
// 取消订阅HTTP流式响应数据接收事件
httpRequest.off('dataReceive');
// 取消订阅HTTP流式响应数据接收完毕事件
httpRequest.off('dataEnd');
// 当该请求使用完毕时,调用destroy方法主动销毁
httpRequest.destroy();
}
)
}
/**
* 使用createPixelMap将ArrayBuffer类型的图片装换为PixelMap类型
* @param data:网络获取到的资源
... ...
... ... @@ -22,6 +22,10 @@ import { PageRepository } from '../repository/PageRepository';
import { CommentDialogView } from './CommentDialogView';
import { faceDetector } from '@kit.CoreVisionKit';
import { channelSkeleton } from './skeleton/channelSkeleton';
import PageAdModel from '../viewmodel/PageAdvModel';
import { ProcessUtils } from 'wdRouter/Index';
import { GrayManageModel } from '../viewmodel/GrayManageModel';
import router from '@ohos.router';
const TAG: string = 'SpacialTopicPageComponent'
... ... @@ -51,10 +55,14 @@ export struct SpacialTopicPageComponent {
@State showComment: boolean = false
@State topicInfo: TopicInfo = {} as TopicInfo
@State topicDetail: TopicDetailData = {} as TopicDetailData
@State private pageAdvModel: PageAdModel = new PageAdModel();
@State shareInfo: ShareInfoDTO = {} as ShareInfoDTO
@State showBottomView: boolean = false;
@State executedStartTime: number = new Date().getTime()
// 国殇灰度管理
GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage')
private trySendData2H5() {
if (!this.webPrepared) {
return
... ... @@ -85,7 +93,7 @@ export struct SpacialTopicPageComponent {
this.topicDetail = JSON.parse(dataString);
this.topicInfo = this.topicDetail.topicInfo;
this.pageAdvModel.analysisTopicAdvSource(this.topicDetail)
if (this.topicInfo) {
// 转换详情数据
this.contentDetailData.openComment = Number(this.topicInfo.commentFlag)
... ... @@ -105,7 +113,6 @@ export struct SpacialTopicPageComponent {
this.shareInfo.shareUrl = this.topicInfo.shareUrl
this.contentDetailData.shareInfo = this.shareInfo
console.log('contentDetailData111', JSON.stringify(this.contentDetailData))
// if(this.topicInfo.shareOpen === 1){
// if (!this.operationButtonList.includes('share')) {
// this.operationButtonList.push('share');
... ... @@ -161,15 +168,45 @@ export struct SpacialTopicPageComponent {
.height(CommonConstants.FULL_HEIGHT)
.padding({ bottom: this.action?.params?.backVisibility ? 115 : 75 })
RelativeContainer() {
// 挂角广告
this.pageHornAd()
}
if (!this.isNetConnected) {
Column() {
Image($r('app.media.line'))
.width('calc(100% - 36vp)')
.height(7)
.position({
top: 92,
left: 18
})
EmptyComponent({
emptyHeight: 'calc(100% - 55vp)',
emptyType: 1,
emptyButton: true,
retry: () => {
// this.getDetail()
this.reload++
}
}).padding({ bottom: 200 })
}).padding({ bottom: 200, top: 48 })
Image($r("app.media.back_icon"))
.width(24)
.height(24)
.onClick(() => {
router.back();
})
.position({
bottom: 15,
left: 16
})
}
.width('100%')
.height('100%')
.layoutWeight(1)
.backgroundColor(0xffffff)
} else {
if (!this.isPageEnd) {
channelSkeleton().padding({ top: `${this.topSafeHeight}px`, bottom: this.bottomSafeHeight })
... ... @@ -200,6 +237,102 @@ export struct SpacialTopicPageComponent {
}.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT)
}
/**
* 页面挂角广告
*/
@Builder
pageHornAd() {
if (this.pageAdvModel.isShowAds) {
if (this.pageAdvModel.pageCornerAdv.matInfo != null && this.pageAdvModel.pageCornerAdv.matInfo.linkType != '2') {
// 广告中心的挂角广告
this.drawPageCornerAdvView(1, 1 == this.pageAdvModel.isRightAdv)
} else if (this.pageAdvModel.pageCornerContentInfo.advert != null ) {
// 展现中心的挂角广告业务
this.drawPageCornerAdvView(2, 1 == this.pageAdvModel.isRightAdv)
}
}
}
/**
* 绘制页面挂角
*
* @param type 1:广告中心的挂角广告;2:展现中心的挂角广告
* @param isRightCorne true:右挂角;false:左挂角
*/
@Builder
drawPageCornerAdvView(type: number, isRightCorne: boolean) {
// 页面左挂角
Image(type === 1 ? this.pageAdvModel.pageCornerAdv.matInfo.matImageUrl[0]
: this.pageAdvModel.pageCornerContentInfo.advert.displayUrl)
.width($r('app.float.vp_80'))
.height($r('app.float.vp_80'))
.id("left_iv")
.alignRules({
bottom: { anchor: '__container__', align: VerticalAlign.Bottom },
left: { anchor: isRightCorne ? "" : '__container__', align: HorizontalAlign.Start },
right: { anchor: isRightCorne ? '__container__' : "", align: HorizontalAlign.End },
})
.margin({
bottom: "105vp",
left: isRightCorne ? 0 : $r('app.float.card_comp_pagePadding_lf'),
right: isRightCorne ? $r('app.float.card_comp_pagePadding_lf') : 0,
})
.onClick(() => {
if (type === 1) {
// 广告业务跳转
ProcessUtils.openAdvDetail(this.pageAdvModel.pageCornerAdv.matInfo);
} else {
// 展现中心的业务跳转
ProcessUtils.advJumpMainPage(this.pageAdvModel.pageCornerContentInfo.advert)
}
})
.grayscale(this.GrayManage.get().isMourning() ? 1 : 0)
// 关闭按钮
Image($r('app.media.icon_adv_horn_close'))
.id('left_close')
.width($r('app.float.vp_16'))
.alignRules({
top: { anchor: 'left_iv', align: VerticalAlign.Top },
left: { anchor: isRightCorne ? '' : 'left_iv', align: HorizontalAlign.Start },
right: { anchor: isRightCorne ? 'left_iv' : '', align: HorizontalAlign.End },
})
.offset({
x: isRightCorne ? 10 : -10,
y: isRightCorne ? -10 : -10
})
.onClick(() => {
// 关闭挂角广告
this.pageAdvModel.isShowAds = false;
})
.grayscale(this.GrayManage.get().isMourning() ? 1 : 0)
if (type == 1) {
Text($r('app.string.comp_advertisement'))
.width($r('app.float.vp_28'))
.height($r('app.float.vp_16'))
.fontSize($r('app.float.font_size_10'))
.fontColor(Color.White)
.id('left_tag')
.alignRules({
bottom: { anchor: 'left_iv', align: VerticalAlign.Bottom },
left: { anchor: isRightCorne ? '' : 'left_iv', align: HorizontalAlign.Start },
right: { anchor: isRightCorne ? 'left_iv' : '', align: HorizontalAlign.End },
})
.textAlign(TextAlign.Center)
.backgroundColor($r('app.color.res_color_general_000000_30'))
.borderRadius({
topLeft: $r('app.float.vp_2'),
topRight: $r('app.float.vp_2'),
bottomLeft: $r('app.float.vp_2'),
bottomRight: $r('app.float.vp_2')
})
.grayscale(this.GrayManage.get().isMourning() ? 1 : 0)
}
}
aboutToAppear() {
if (!this.action?.params?.backVisibility) {
// WindowModel.shared.setWindowLayoutFullScreen(true)
... ...
... ... @@ -68,9 +68,9 @@ export struct Card10Component {
initHideDetail() {
const curRouter = router.getState().name;
if (curRouter === 'MyCollectionListPage') {
this.hideDetail = true;
}
// if (curRouter === 'MyCollectionListPage') {
// this.hideDetail = true;
// }
}
titleInit() {
... ... @@ -154,7 +154,6 @@ export struct Card10Component {
.height(40)
.borderRadius($r('app.float.button_border_radius'))
.justifyContent(FlexAlign.Center)
.margin({ top: 5 })
.onClick((event: ClickEvent) => {
InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
ProcessUtils.processPage(this.contentDTO)
... ...
... ... @@ -35,9 +35,9 @@ export struct Card9Component {
initHideDetail() {
const curRouter = router.getState().name;
if (curRouter === 'MyCollectionListPage') {
this.hideDetail = true;
}
// if (curRouter === 'MyCollectionListPage') {
// this.hideDetail = true;
// }
}
//内容浏览Tracking
... ...
... ... @@ -35,6 +35,8 @@ export class commentListModel extends PageModel {
totalCommentNum: string = '0'
hasNext: number = 0
list: commentItemModel[] = []
hotList: commentItemModel[] = [] // 仅第一页存在
hotIds: string[] = [] // 仅第一页存在
// constructor(pageNum:number, pageSize:number, totalCount: number, hasNext: number, list: commentItemModel[]) {
// super()
// this.pageNum = pageNum
... ... @@ -45,9 +47,16 @@ export class commentListModel extends PageModel {
// }
}
export enum CommentItemCustomType {
comment = 0,
newTitle = 1, // 最新评论标题
hotTitle = 2, // 热门评论标题
hotComment = 3,
}
@Observed
export class commentItemModel {
api_customType: CommentItemCustomType = CommentItemCustomType.comment
authorLike: string = ''
avatarFrame: string = ''
checkStatus: string = ''
... ...
import { DateTimeUtils, EmitterEventId, EmitterUtils, LazyDataSource,
PublicDialogManager,
StringUtils } from 'wdKit/Index';
import { commentItemModel, WDPublicUserType } from '../model/CommentModel';
import { CommentItemCustomType, commentItemModel, WDPublicUserType } from '../model/CommentModel';
import commentViewModel from '../viewmodel/CommentViewModel';
import { CommentText } from './CommentText';
import { CommentCustomDialog } from './CommentCustomDialog';
... ... @@ -37,6 +37,7 @@ export struct CommentComponent {
listScroller: ListScroller = new ListScroller(); // scroller控制器
historyOffset: number = 0; // 上次浏览到列表距离顶端的偏移量offset
@State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource();
firstPageHotIds: string = ''
@State dialogController: CustomDialogController | null = null;
// @State private browSingModel: commentListModel = new commentListModel()
... ... @@ -49,6 +50,7 @@ export struct CommentComponent {
// 是否在弹框中
@Provide inDialog: boolean = false
private dialogBeforeJumpOtherPageAction: () => void = () => {}
private dialogUpdateTitle: (title: string) => void = () => {}
// 在自定义组件即将析构销毁时将dialogControlle置空
aboutToDisappear() {
... ... @@ -99,7 +101,16 @@ export struct CommentComponent {
/*一级评论*/
// if (this.publishCommentModel.lastCommentModel)
if (this.publishCommentModel.lastCommentModel.parentId == '-1') {
this.allDatas.addFirstItem(model)
let newCommentHeaderIndex = this.indexOfNewCommentHeaderTitle()
if (newCommentHeaderIndex === -1) {
let newCommentTitle = new commentItemModel()
newCommentTitle.api_customType = CommentItemCustomType.newTitle
this.allDatas.addItems([newCommentTitle, model])
} else {
this.allDatas.addItem(model, newCommentHeaderIndex + 1)
}
} else {
//二级评论
this.allDatas.getDataArray().forEach(element => {
... ... @@ -116,14 +127,19 @@ export struct CommentComponent {
/*标题:全部评论*/
@Builder
titleHeader() {
titleHeader(title: string = "最新评论", showGapLine: boolean = false) {
Column() {
if (showGapLine) {
Divider().strokeWidth(6).color('#f5f5f5')
}
Row() {
Row() {
Image($r('app.media.redLine'))
.height(16)
.width(3)
Text('全部评论')
Text(title)
.fontSize(16)// .fontColor('#222222')
.fontColor($r('app.color.color_222222'))
.fontWeight(FontWeight.Medium)
... ... @@ -145,12 +161,7 @@ export struct CommentComponent {
.height(44)
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.onClick(() => {
// this.allDatas.push(new commentItemModel())
// this.allDatas.addFirstItem(new commentItemModel())
// this.allDatas.reloadData();
})
}
}
/*1级评论作为titleHeader*/
... ... @@ -177,16 +188,29 @@ export struct CommentComponent {
build() {
Column() {
List({ scroller: this.listScroller }) {
if (!this.isComments) {
if (this.showTitleComponent) {
ListItemGroup({ header: this.titleHeader() })
}
if (!this.isComments) {
EmptyComponent({ emptyType: 17 })
.height(300)
} else {
LazyForEach(this.allDatas, (item: commentItemModel, index: number) => {
if (item.hasMore) {
if (item.api_customType === CommentItemCustomType.newTitle) {
if (this.inDialog && index === 0) {
ListItemGroup()
} else {
ListItemGroup({ header: this.titleHeader("最新评论", index !== 0) })
}
}
else if (item.api_customType === CommentItemCustomType.hotTitle) {
if (this.inDialog && index === 0) {
ListItemGroup()
} else {
ListItemGroup({ header: this.titleHeader("热门评论") })
}
}
else if (item.hasMore) {
ListItemGroup({
header: this.CommentHeaderItem(item, index),
footer: this.GroupFooterView(item, index)
... ... @@ -234,6 +258,9 @@ export struct CommentComponent {
}
.scrollBar(BarState.Off)
.margin({ bottom: 10 })
.onScrollIndex((start) => {
this.updateDialogTitleWithStartIndex(start)
})
.onReachEnd(() => {
if (!this.fixedHeightMode) {
return
... ... @@ -252,6 +279,30 @@ export struct CommentComponent {
}
updateDialogTitleWithStartIndex(start: number) {
if (!this.inDialog) {
return
}
if (this.allDatas.size() === 0) {
this.dialogUpdateTitle("评论")
return
}
if (this.allDatas.getFirst().api_customType !== CommentItemCustomType.hotTitle) {
this.dialogUpdateTitle("最新评论")
return
}
let newCommentHeaderIndex = this.indexOfNewCommentHeaderTitle()
if (newCommentHeaderIndex == -1) {
this.dialogUpdateTitle("热门评论")
return
}
if (start < newCommentHeaderIndex + 1) {
this.dialogUpdateTitle("热门评论")
} else {
this.dialogUpdateTitle("最新评论")
}
}
parentOnReachEnd() {
if (this.fixedHeightMode) {
return
... ... @@ -268,11 +319,41 @@ export struct CommentComponent {
//获取数据
async getData() {
let pageIndex = this.currentPage
commentViewModel.fetchContentCommentList(pageIndex + '', this.publishCommentModel.targetId,
this.publishCommentModel.targetType)
commentViewModel.fetchContentCommentList(pageIndex + ''
,this.publishCommentModel.targetId
,this.publishCommentModel.targetType
,this.firstPageHotIds)
.then(commentListModel => {
console.log('评论:', JSON.stringify(commentListModel.list))
if (pageIndex == 1) {
// 保存第一页热门评论ids
if (commentListModel.hotIds.length > 0) {
this.firstPageHotIds = commentListModel.hotIds.join(",")
}
if (commentListModel.list.length > 0) { // 热门评论增加头部
let newCommentTitle = new commentItemModel()
newCommentTitle.api_customType = CommentItemCustomType.newTitle
let newArray = [newCommentTitle]
commentListModel.list = newArray.concat(commentListModel.list)
}
if (commentListModel.hotList.length > 0) { // 最新评论增加头部
let hotCommentTitle = new commentItemModel()
hotCommentTitle.api_customType = CommentItemCustomType.hotTitle
let newArray = [hotCommentTitle]
commentListModel.hotList = newArray.concat(commentListModel.hotList)
commentListModel.list = commentListModel.hotList.concat(commentListModel.list)
}
} else { // 非首页数据
if (commentListModel.list.length > 0 && !this.hasNewCommentHeaderTitle()) { // 如果之前仅存在热门评论,这里需要补下数据
let newCommentTitle = new commentItemModel()
newCommentTitle.api_customType = CommentItemCustomType.newTitle
let newArray = [newCommentTitle]
commentListModel.list = newArray.concat(commentListModel.list)
}
}
// 这里需要先赋值,否则下次UI刷新可能重复进入第1页两次
this.currentPage = pageIndex + 1
... ... @@ -313,6 +394,29 @@ export struct CommentComponent {
}
})
}
hasNewCommentHeaderTitle() {
let hasNewCommentHeader = false
this.allDatas.getDataArray().forEach((comment) => {
if (comment.api_customType === CommentItemCustomType.newTitle) {
hasNewCommentHeader = true
}
})
return hasNewCommentHeader
}
indexOfNewCommentHeaderTitle() {
let resultIndex = -1;
const array = this.allDatas.getDataArray()
for (let index = 0; index < array.length; index++) {
if (array[index].api_customType === CommentItemCustomType.newTitle) {
resultIndex = index;
break
}
}
return resultIndex
}
}
... ...
... ... @@ -74,6 +74,7 @@ struct CommentListDialog {
/// 内部使用
@Link publishCommentModel: publishCommentModel
@State private operationButtonList: string[] = []
@State title: string = "评论"
/// 外部初始化
@Link contentDetailData: ContentDetailDTO // 详情页传
... ... @@ -122,6 +123,9 @@ struct CommentListDialog {
if (this.onClose) {
this.onClose()
}
},
dialogUpdateTitle: (title) => {
this.title = title
}
}).layoutWeight(1)
... ... @@ -153,7 +157,7 @@ struct CommentListDialog {
Image($r('app.media.redLine'))
.height(16)
.width(3)
Text('全部评论')
Text(this.title)
.fontSize(16)// .fontColor('#222222')
.fontColor($r('app.color.color_222222'))
.fontWeight(FontWeight.Medium)
... ...
... ... @@ -8,6 +8,7 @@ import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest';
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { TrackConstants, TrackingContent } from 'wdTracking/Index';
import {
CommentItemCustomType,
commentItemModel,
commentListModel,
commentStatusListModel,
... ... @@ -33,9 +34,13 @@ class CommentViewModel {
}
/*获取所有评论*/
fetchContentCommentList(pageNum: string, contentId: string, contentType: string): Promise<commentListModel> {
fetchContentCommentList(pageNum: string, contentId: string, contentType: string, firstPageHotIds: string = ''): Promise<commentListModel> {
let url = HttpUrlUtils.getContentCommentListDataUrl() + `?&pageSize=${10}&pageNum=${pageNum}&contentId=${contentId}&contentType=${contentType}&deviceId=${HttpUtils.getDeviceId()}&userId=${HttpUtils.getUserId()}&userType=${HttpUtils.getUserType()}&time=${DateTimeUtils.getCurTime(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)}`
url = url + "&hotComment=1"
if (pageNum !== "1" && firstPageHotIds.length > 0) {
url = url + `&hotIds=` + firstPageHotIds
}
url = url.replace(' ', '%20')
return new Promise<commentListModel>((success, fail) => {
... ... @@ -49,10 +54,24 @@ class CommentViewModel {
return
}
let listData = data.data as commentListModel
this.fetchCommentStatusAndConfigAuthIcon(listData).then((commentListModel) => {
this.fetchCommentStatusAndConfigAuthIcon(listData, false).then((commentListModel) => {
console.log(TAG, 'fetchCommentStatusAndConfigAuthIcon完成')
if (pageNum !== "1") {
success(commentListModel)
return
}
// 热门评论批查
this.fetchCommentStatusAndConfigAuthIcon(listData, true).then((commentListModel) => {
console.log(TAG, 'hot comment fetchCommentStatusAndConfigAuthIcon完成')
listData.hotList.forEach((item) => {
item.api_customType = CommentItemCustomType.hotComment
})
success(commentListModel)
})
})
}, (error: Error) => {
fail(error.message)
... ... @@ -213,7 +232,7 @@ class CommentViewModel {
}
/*多接口批查*/
fetchCommentStatusAndConfigAuthIcon(model: commentListModel): Promise<commentListModel> {
fetchCommentStatusAndConfigAuthIcon(model: commentListModel, hot: boolean = false): Promise<commentListModel> {
let commentIDs: string[] = [];
... ... @@ -222,7 +241,7 @@ class CommentViewModel {
let creatorIDs: string[] = [];
//主评论
for (const element of model.list) {
for (const element of (hot ? model.hotList : model.list)) {
if ((element.id + '').length > 0) {
commentIDs.push(element.id + '')
}
... ... @@ -277,7 +296,7 @@ class CommentViewModel {
let listData = data.data as commentStatusModel[]
//点赞
for (const element of listData) {
for (const commentModel of model.list) {
for (const commentModel of (hot ? model.hotList : model.list)) {
if (element.commentId == commentModel.id) {
commentModel.api_status = element.status
}
... ... @@ -319,7 +338,7 @@ class CommentViewModel {
let listData = data.data as commentStatusModel[]
for (const element of listData) {
for (const commentModel of model.list) {
for (const commentModel of (hot ? model.hotList : model.list)) {
if (element.userId == commentModel.fromUserId) {
commentModel.api_levelHead = element.levelHead
}
... ... @@ -364,7 +383,7 @@ class CommentViewModel {
let listData = data.data as commentStatusModel[]
for (const element of listData) {
for (const commentModel of model.list) {
for (const commentModel of (hot ? model.hotList : model.list)) {
if (element.creatorId == commentModel.fromCreatorId) {
commentModel.api_authIcon = element.authIcon
}
... ... @@ -400,6 +419,7 @@ class CommentViewModel {
deepCopyCommentItemModel(model: commentItemModel) {
let newModel = new commentItemModel()
newModel.api_customType = model.api_customType
newModel.authorLike = model.authorLike
newModel.avatarFrame = model.avatarFrame
newModel.checkStatus = model.checkStatus
... ...
... ... @@ -214,8 +214,9 @@ struct CarouselLayout01CardView {
colors: [[0x7508111A, 0.0], [0x7508111A, 0.3], [Color.Transparent, 1.0]]
})
.position({
bottom: 10
bottom: 0
})
.borderRadius($r('app.float.image_border_radius'))
}
.width(CommonConstants.FULL_PARENT)
.height(CommonConstants.FULL_PARENT)
... ...
... ... @@ -14,7 +14,7 @@ const TAG = 'Zh_Single_Column-09'
@Entry
@Component
export struct ZhSingleColumn09 {
@State fullyTraversed: boolean = false;
@State fullyTraversed: boolean = false; //换一换置灰标记
@State private pageModel: PageModel = new PageModel();
@State pageId: string = '';
@State pageName: string = '';
... ... @@ -26,11 +26,46 @@ export struct ZhSingleColumn09 {
@State compIndex: number = 0;
@State currentOperDataListIndex: number = 0; //记录换一换点击次数
@State visitedIndices: Set<number> = new Set<number>();
private currentIndex: number = 0;
@State currentDataList: ContentDTO[] = []
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
this.operDataList = this.shuffleArray(this.compDTO?.operDataList)
// this.operDataList = this.shuffleArray(this.compDTO?.operDataList)
this.operDataList = this.padData(this.compDTO?.operDataList)
this.currentOperDataListIndex = this.compDTO?.operDataList.length
this.currentDataList = this.getNextBatch()
}
/**
* 若数据不满足8个以上直接返回
* 若最后一屏不够补齐至8个
* */
private padData(data: ContentDTO[]): ContentDTO[] {
if (data.length < 9) {
return data
}
const remainder = data.length % 8;
if (remainder === 0) {
return data;
}
const paddingCount = 8 - remainder;
const padding = data.slice(0, paddingCount);
return [...data, ...padding];
}
/**
* 换一换切换数据
* */
public getNextBatch(): ContentDTO[] {
const batch = this.operDataList.slice(this.currentIndex, this.currentIndex + 8);
this.currentIndex += 8;
if (this.currentIndex >= this.operDataList.length) {
this.fullyTraversed = true //数据展现完毕,置灰标记
}
return batch;
}
trackClick(type: 'close_interest_card_click' | 'interest_card_selecting_click') {
... ... @@ -142,8 +177,8 @@ export struct ZhSingleColumn09 {
.justifyContent(FlexAlign.SpaceBetween)
.width('100%')
Flex({wrap: FlexWrap.Wrap}) {
ForEach(this.operDataList.slice(0, 8), (item: ContentDTO, index: number) => {
Flex({ wrap: FlexWrap.Wrap }) {
ForEach(this.currentDataList, (item: ContentDTO, index: number) => {
Row() {
Stack({ alignContent: Alignment.TopEnd }) {
Image(this.loadImg ? item.coverUrl : '')
... ... @@ -156,7 +191,7 @@ export struct ZhSingleColumn09 {
.width('100%')
.height('100%')
.backgroundColor('rgba(0, 0, 0, 1)')
.opacity(0.4)
.opacity(this.activeIndexs.includes(index) ? 0.8 : 0.4)
.borderRadius(3)
Text(item.newsTitle)
... ... @@ -204,10 +239,14 @@ export struct ZhSingleColumn09 {
return
}
if (this.compDTO?.operDataList.length > 8) {
this.operDataList = this.shuffleArray(this.operDataList)
// this.operDataList = this.shuffleArray(this.operDataList)
// if (this.pageModel) {
// this.pageModel.compList.deleteItem(this.compIndex)
// }
if (this.fullyTraversed) {
return; // 所有数据已取完
}
this.currentDataList = this.getNextBatch()
this.activeIndexs = [];
}
})
... ...
... ... @@ -60,17 +60,19 @@ export struct ZhSingleRow02 {
toMore() {
if (this.moreWidth > this.initMoreWidth * 2) {
if (this.compDTO?.objectType === '11') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
} else {
const contentDTO: ContentDTO = {
objectId: this.compDTO.objectId,
objectType: this.compDTO.objectType,
linkUrl: this.compDTO.linkUrl,
pageId: this.compDTO.pageId
} as ContentDTO
ProcessUtils.processPage(contentDTO)
}
ProcessUtils.compJumpPage(this.compDTO)
// if (this.compDTO?.objectType === '11') {
// ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
// } else {
// const contentDTO: ContentDTO = {
// objectId: this.compDTO.objectId,
// objectType: this.compDTO.objectType,
// linkUrl: this.compDTO.linkUrl,
// pageId: this.compDTO.pageId
// } as ContentDTO
// ProcessUtils.processPage(contentDTO)
// }
}
}
... ...
... ... @@ -372,7 +372,7 @@ export struct ZhSingleRow03 {
})
Text(item.newsTitle)
.width(201)
.width('calc(100% - 106vp - 12vp)')
.height(60)
.maxLines(3)
.textOverflow({overflow: TextOverflow.Ellipsis})
... ... @@ -380,6 +380,7 @@ export struct ZhSingleRow03 {
}
.margin({bottom: 16})
.justifyContent(FlexAlign.Start)
.width('100%')
Row() {
Flex({justifyContent: FlexAlign.SpaceBetween}){
... ... @@ -474,17 +475,19 @@ export struct ZhSingleRow03 {
}
private jumpToMore() {
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
params: {
url: this.compDTO.linkUrl
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
} else {
this.jumpToLiveMorePage()
}
ProcessUtils.compJumpPage(this.compDTO)
return;
// if (this.compDTO.linkUrl) {
// let taskAction: Action = {
// type: 'JUMP_H5_BY_WEB_VIEW',
// params: {
// url: this.compDTO.linkUrl
// } as Params,
// };
// WDRouterRule.jumpWithAction(taskAction)
// } else {
// this.jumpToLiveMorePage()
// }
}
}
... ...
... ... @@ -60,7 +60,8 @@ export struct ZhSingleRow04 {
.margin({ bottom: 8 })
.width('100%')
.padding({
right: 10
left: 16,
right: 16
})
// 列表内容
... ... @@ -74,7 +75,7 @@ export struct ZhSingleRow04 {
)
.margin({
right: index === this.compDTO.operDataList.length - 1 ? 26 : 0,
left: index === 0 ? 2 : 0,
left: index === 0 ? 16 : 0,
top: 6
})
.onClick(() => {
... ... @@ -92,7 +93,7 @@ export struct ZhSingleRow04 {
}
.width(CommonConstants.FULL_WIDTH)
.padding({
left: 10,
left: 0,
right: 0,
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
... ...
... ... @@ -37,6 +37,6 @@ struct FollowListPage {
.width('100%')
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)+10})
}
}
\ No newline at end of file
... ...
import { PeopleShipRecommendComponent } from './PeopleShipRecommendComponent';
import { PeopleShipMainViewModel } from '../../viewmodel/PeopleShipMainViewModel';
import { HttpUtils } from 'wdNetwork/Index';
import { Logger, DateTimeUtils, EmitterEventId, EmitterUtils } from 'wdKit';
import { Logger, DateTimeUtils, EmitterEventId, EmitterUtils, ToastUtils } from 'wdKit';
import { autoRefresh, onActionEnd, onActionStart, onActionUpdate,closeRefresh } from '../../utils/NewPullDownRefresh';
import {
... ... @@ -88,27 +88,31 @@ export struct PeopleShipMainComponent {
Column(){
if (this.viewType == ViewType.LOADING) {
this.LoadingLayout()
} else if (this.viewType == ViewType.ERROR) {
//缺省页
EmptyComponent({
emptyType: this.pageModel.emptyType,
emptyButton: true,
retry: () => {
this.getData()
}
})
.grayscale(this.GrayManage.get().isRmhMourning(`${this.channelId}`) ? 1 : 0)
} else if (this.viewType == ViewType.EMPTY) {
//缺省页
EmptyComponent({
emptyType: this.pageModel.emptyType,
emptyButton: true,
retry: () => {
this.getData()
}
})
.grayscale(this.GrayManage.get().isRmhMourning(`${this.channelId}`) ? 1 : 0)
}else {
// else if (this.viewType == ViewType.ERROR) {
// //缺省页
// // EmptyComponent({
// // emptyType: this.pageModel.emptyType,
// // emptyButton: true,
// // retry: () => {
// // this.getData()
// // }
// // })
// // .grayscale(this.GrayManage.get().isRmhMourning(`${this.channelId}`) ? 1 : 0)
//
// } else if (this.viewType == ViewType.EMPTY) {
// // //缺省页
// // EmptyComponent({
// // emptyType: this.pageModel.emptyType,
// // emptyButton: true,
// // retry: () => {
// // this.getData()
// // }
// // })
// // .grayscale(this.GrayManage.get().isRmhMourning(`${this.channelId}`) ? 1 : 0)
//
// }
else {
if (this.followList.length == 0) {
this.ListLayout()
} else {
... ... @@ -328,7 +332,7 @@ export struct PeopleShipMainComponent {
// 获取用户关注人数
let object = new FollowListDetailRequestItem(-1, 20, 1)
let followInfo = await MinePageDatasModel.getMineFollowListData(object, getContext(this))
Logger.debug('PeopleShipMainComponent', '获取页面信息' + `${JSON.stringify(followInfo)}`)
// Logger.debug('PeopleShipMainComponent', '获取页面信息' + `${JSON.stringify(followInfo)}`)
if (followInfo.list.length == 0) {
this.followList = []
... ... @@ -347,6 +351,7 @@ export struct PeopleShipMainComponent {
} catch (exception) {
this.viewType = ViewType.ERROR
this.isLoading = false
ToastUtils.shortToast('加载失败,请稍后重试')
}
}
... ... @@ -362,11 +367,14 @@ export struct PeopleShipMainComponent {
this.viewType = ViewType.LOADED
this.changeButton = false
this.isLoading = false
Logger.debug('PeopleShipMainComponent', 'getRmhRecommendInfo' + `${JSON.stringify(this.rmhList)}`)
// Logger.debug('PeopleShipMainComponent', 'getRmhRecommendInfo' + `${JSON.stringify(this.rmhList)}`)
if (resolve) {
resolve('已更新至最新')
}
this.closeRefresh(true)
if(this.rmhList?.length! === 0) {
ToastUtils.shortToast('加载失败,请稍后重试')
}
} catch (exception) {
if (resolve) {
resolve('')
... ... @@ -375,6 +383,7 @@ export struct PeopleShipMainComponent {
this.viewType = ViewType.ERROR
this.changeButton = false
this.isLoading = false
ToastUtils.shortToast('加载失败,请稍后重试')
}
}
... ... @@ -390,7 +399,7 @@ export struct PeopleShipMainComponent {
try {
// 获取列表数据
let listData = await PeopleShipMainViewModel.getAttentionContentListInfo(this.currentPage, 20, this.loadTime)
Logger.debug('PeopleShipMainComponent', '获取页面信息' + `${JSON.stringify(listData)}`)
// Logger.debug('PeopleShipMainComponent', '获取页面信息' + `${JSON.stringify(listData)}`)
if (listData && listData.list && listData.list.length > 0) {
if (listData.list.length === 20) {
this.hasMore = true;
... ... @@ -429,7 +438,7 @@ export struct PeopleShipMainComponent {
})
let listData = await PeopleShipMainViewModel.getContentInteractInfo(params)
Logger.debug('PeopleShipMainComponent', '获取页面信息' + `${JSON.stringify(listData)}`)
// Logger.debug('PeopleShipMainComponent', '获取页面信息' + `${JSON.stringify(listData)}`)
this.resolveEnd(true, resolve)
if (this.currentPage == 1) {
... ... @@ -481,6 +490,7 @@ export struct PeopleShipMainComponent {
}
if (this.currentPage == 1 && !isTop) {
this.viewType = ViewType.ERROR
ToastUtils.shortToast('加载失败,请稍后重试')
} else {
this.viewType = ViewType.LOADED
}
... ... @@ -489,8 +499,8 @@ export struct PeopleShipMainComponent {
// 说是首页必须要调用
async getInitData() {
Logger.debug('PeopleShipMainComponent',
`getData id: ${this.pageId} , ${this.channelId} , navIndex: ${this.currentTopNavSelectedIndex}`);
// Logger.debug('PeopleShipMainComponent',
// `getData id: ${this.pageId} , ${this.channelId} , navIndex: ${this.currentTopNavSelectedIndex}`);
this.pageModel.pageId = this.pageId;
this.pageModel.groupId = this.pageId;
this.pageModel.channelId = this.channelId;
... ... @@ -526,7 +536,7 @@ export struct PeopleShipMainComponent {
objects.creators.push(creator)
}
})
Logger.debug('PeopleShipMainComponent', `一键关注接口参数: ${JSON.stringify(objects)}`);
// Logger.debug('PeopleShipMainComponent', `一键关注接口参数: ${JSON.stringify(objects)}`);
let batchInfo = await PeopleShipMainViewModel.getAttentionBatchInfo(objects)
this.oneKeyFollow = false
if (batchInfo.code === 0 || batchInfo.code.toString() === "0") {
... ... @@ -556,7 +566,7 @@ export struct PeopleShipMainComponent {
return
}
// 当前页面,自动刷新数据
Logger.debug(TAG, 'page onAutoRefresh ' + this.autoRefresh)
// Logger.debug(TAG, 'page onAutoRefresh ' + this.autoRefresh)
this.listScroller.scrollToIndex(0)
autoRefresh(this.pageModel,this.onRefresh)
}
... ...
... ... @@ -475,7 +475,7 @@ export struct SearchResultContentComponent {
contentDTO.coverSize = ""
contentDTO.coverType = value.data.type == "5" ? 1 : -1
contentDTO.coverUrl =
this.searchType == "activity" ? value.data.zhChannelPageImg : value.data.appStyleImages.split("&&")[0];
this.searchType == "activity" ? value.data.zhChannelPageImg : value.data.appStyleImages.split("&&")[0].split('?')[0];
contentDTO.description = value.data.description
contentDTO.districtCode = value.data.districtCode
contentDTO.endTime = value.data.endTime
... ... @@ -515,7 +515,7 @@ export struct SearchResultContentComponent {
contentDTO.visitorComment = -1
contentDTO.fullColumnImgUrls = photos
contentDTO.newsSummary = ""
contentDTO.hasMore = -1
contentDTO.hasMore = this.hasMore ? 1 : -1
contentDTO.slideShows = []
contentDTO.voiceInfo = {} as VoiceInfoDTO
contentDTO.tagWord = -1
... ...
... ... @@ -74,7 +74,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
.onClick(() => {
InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[0], this.pageId, this.pageName)
this.clicked = true;
ProcessUtils.gotoLive(this.compDTO?.operDataList[0])
ProcessUtils.processPage(this.compDTO?.operDataList[0])
})
}
... ...
... ... @@ -65,11 +65,9 @@ export struct LiveHorizontalCardComponent {
}
liveToMore() {
ProcessUtils.compJumpPage(this.compDTO)
return;
if (!!this.compDTO.dataSourceType) {
// if (this.compDTO.dataSourceType === 'OBJECT_POS') {
// ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
// return;
// }
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_INNER_NEW_PAGE',
... ... @@ -84,14 +82,8 @@ export struct LiveHorizontalCardComponent {
}
} as Params,
};
// this.compDTO.operDataList = []
// console.log('LiveHorizontalCardComponent', JSON.stringify(this.compDTO))
// console.log('LiveHorizontalCardComponent', this.compDTO.relId)
// console.log('LiveHorizontalCardComponent', this.compDTO.relType)
// console.log('LiveHorizontalCardComponent', JSON.stringify(taskAction))
WDRouterRule.jumpWithAction(taskAction)
} else {
// console.log('LiveHorizontalCardComponent', 'jumpToLiveMorePage')
this.jumpToLiveMorePage()
}
} else {
... ... @@ -103,7 +95,6 @@ export struct LiveHorizontalCardComponent {
linkUrl: this.compDTO.linkUrl,
pageId: this.compDTO.pageId
} as ContentDTO
// console.log('LiveHorizontalCardComponent', 'ProcessUtils.processPage')
ProcessUtils.processPage(contentDTO)
}
}
... ...
... ... @@ -242,7 +242,7 @@ export struct LiveOperRowListView {
}
.padding({top:10})
.layoutWeight(1)
.margin({ left: 16 })
.margin({ left: 0 })
}
/**
... ...
... ... @@ -815,6 +815,7 @@ class MinePageDatasModel{
contentDTO.source = StringUtils.isEmpty(value.creatorName) ? value.sourceName : value.creatorName
contentDTO.objectId = value.id
contentDTO.objectType = value.type
contentDTO.objectLevel = value.topicType
contentDTO.channelId = value.channelId
contentDTO.relId = value.relId
contentDTO.relType = value.relType
... ...
import { http } from '@kit.NetworkKit';
const TAG = 'httpRequestInStream'
export class httpRequest {
// 大于5M的下载请求,使用流下载
/**
* 发起HTTP请求以下载图片资源
* @param {string} imageUrl 图片的URL
* @param {Function} onSuccess 成功回调函数
* @param {Function} onError 失败回调函数
*/
public static httpRequestInStream(imageUrl:string, onSuccess:Function, onError:Function) {
// 每一个httpRequest对应一个HTTP请求任务,不可复用
const httpRequest = http.createHttp();
// 订阅HTTP响应头事件
httpRequest.on('headersReceive', (header) => {
// console.info('header: ' + JSON.stringify(header));
});
// 用于订阅HTTP流式响应数据接收事件
let res = new ArrayBuffer(0);
httpRequest.on('dataReceive', (data) => {
const newRes = new ArrayBuffer(res.byteLength + data.byteLength);
const resView = new Uint8Array(newRes);
resView.set(new Uint8Array(res));
resView.set(new Uint8Array(data), res.byteLength);
res = newRes;
// console.info(TAG, 'dataReceive res length: ' + res.byteLength);
});
// 用于订阅HTTP流式响应数据接收完毕事件
httpRequest.on('dataEnd', () => {
if (res instanceof ArrayBuffer) {
// 如果成功,调用onSuccess回调
// console.info(TAG, 'Success in response, data receive end');
onSuccess(res);
} else {
// 如果数据不是ArrayBuffer类型,可以在这里处理异常
// console.error(TAG, 'Unexpected data type:', res);
onError(new Error('Data is not an ArrayBuffer'));
}
// console.info(TAG, 'No more data in response, data receive end');
});
httpRequest.requestInStream(imageUrl, (error, data) => {
if (error) {
// 如果发生错误,取消订阅事件并销毁请求对象
httpRequest.off('headersReceive');
httpRequest.off('dataReceive');
httpRequest.off('dataEnd');
httpRequest.destroy();
// console.error(`http request failed with. Code: ${error.code}, message: ${error.message}`);
// 调用onError回调
onError(error);
return;
}
// 取消订阅事件
httpRequest.off('headersReceive');
httpRequest.off('dataReceive');
httpRequest.off('dataEnd');
// 销毁请求对象
httpRequest.destroy();
});
}
}
\ No newline at end of file
... ...
import { PageInfoDTO } from 'wdBean/Index';
import { PageInfoDTO,TopicDetailData } from 'wdBean/Index';
import { AdvRuleBean, CompAdvBean } from 'wdBean/src/main/ets/bean/adv/AdvsRuleBean';
import { DateTimeUtils, SPHelper } from 'wdKit/Index';
import { ArrayList } from '@kit.ArkTS';
... ... @@ -21,15 +21,23 @@ export default class PageAdModel {
// 1:右边;2:左边 -> 默认右边
pageCornerContentInfo: AdvRuleBean = {} as AdvRuleBean
analysisAdvSource(pageInfo: PageInfoDTO) {
this.analysisAllAdvSource(pageInfo.hasAdInfo,pageInfo.cornersAdv,pageInfo.cornersAdv2,pageInfo.id)
}
analysisTopicAdvSource(topicDetail: TopicDetailData) {
this.analysisAllAdvSource(topicDetail.hasAdInfo,topicDetail.cornersAdv,topicDetail.cornersAdv2,topicDetail.id)
}
/**
* 解析广告资源
* @param pageInfo
*/
async analysisAdvSource(pageInfo: PageInfoDTO) {
if (pageInfo.hasAdInfo === 1 && pageInfo.cornersAdv != null) {
private async analysisAllAdvSource(hasAdInfo: number,cornersAd: AdvRuleBean,cornersAd2: CompAdvBean[],id: number) {
if (hasAdInfo === 1 && cornersAd != null) {
// 优先展示展现中心广告
let cornersAdv = pageInfo.cornersAdv
let cornersAdv = cornersAd
if (cornersAdv == null) {
return
... ... @@ -50,9 +58,9 @@ export default class PageAdModel {
this.pageCornerContentInfo = cornersAdv;
this.isShowAds = true
} else if (pageInfo.cornersAdv2 != null && pageInfo.cornersAdv2.length > 0) {
} else if (cornersAd2 != null && cornersAd2.length > 0) {
// 广告中心-挂角广告信息
let cornersAdv2 = pageInfo.cornersAdv2
let cornersAdv2 = cornersAd2
if (cornersAdv2.length == 0) {
return
... ... @@ -61,7 +69,7 @@ export default class PageAdModel {
let pageCoreAdvArray = this.treatPageInfoAdsData(cornersAdv2);
let advLength = pageCoreAdvArray.length;
let pageId = pageInfo.id.toString();
let pageId = id.toString();
let a = 0;
if (advLength > 1) {
a = await this.calPageAdvIndex(pageId,advLength)
... ... @@ -86,8 +94,8 @@ export default class PageAdModel {
this.pageCornerAdv = showCompAdvBean
this.isShowAds = true
}
}
/**
* 计算投放广告的序列号
* @param pageId
... ...
... ... @@ -148,12 +148,20 @@ export struct DetailPlayVLivePage {
.width('100%')
.blur(100)
.renderFit(RenderFit.RESIZE_COVER)
RelativeContainer()
.backgroundColor(Color.Black)
.visibility(this.isPlayerError ? Visibility.Visible :
Visibility.None)
// 直播结束且无回看
if (this.liveState === 'end' && StringUtils.isEmpty(this.playUrl)) {
PlayerEndView()
} else {
// 直播暂停,仍然可以评论
if (this.liveState === 'pause') {
RelativeContainer()
.backgroundColor('#000000')
.opacity(0.5)
LiveEmptyComponent({
emptyType: WDLiveViewDefaultType.WDViewDefaultType_NoLiveSuspend
})
... ... @@ -168,6 +176,9 @@ export struct DetailPlayVLivePage {
} else {
// 没有配置垫片资源
RelativeContainer()
.backgroundColor('#000000')
.opacity(0.5)
LiveEmptyComponent({
emptyType: WDLiveViewDefaultType.WDViewDefaultType_NoLiveSuspend
})
... ...
... ... @@ -98,11 +98,10 @@ export struct TabComponent {
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.fontSize('18vp')
.fontWeight(this.currentIndex === index ? 600 : 400)
Divider()
.strokeWidth(2)
Image($r('app.media.icon_tab_indictor_line'))
.margin({ top: 6 })
.width(15)
.color('#CB0000')
.width(18)
.height(2)
.visibility(this.currentIndex === index ? Visibility.Visible : Visibility.Hidden)
}.justifyContent(FlexAlign.Center)
.constraintSize({ minWidth: 35 })
... ...
... ... @@ -124,7 +124,6 @@ export struct TabLiveItemComponent {
RelativeContainer() {
Image(this.item.transcodeImageUrl)
.width('100%')
.height(174)
.objectFit(ImageFit.Cover)
.borderRadius(4)
.id('iv_id')
... ... @@ -160,7 +159,7 @@ export struct TabLiveItemComponent {
.margin({
top: 8,
})
.height(174)
.height('auto')
.onClick(() => {
this.gotoVideoPlayPage()
})
... ...
... ... @@ -98,7 +98,7 @@ export struct DetailPlayShortVideoPage {
this.imageVisible = false
})
} else {
this.playerController.pause()
this.playerController.stop()
}
}
}
... ... @@ -189,6 +189,7 @@ export struct DetailPlayShortVideoPage {
}
async aboutToAppear() {
this.isPlay = true
if (!this.onlyWifiLoadVideo) {
this.onlyWifiLoadVideo = await onlyWifiLoadVideo()
this.toastTextVisible = this.onlyWifiLoadVideo ? false : true
... ...
... ... @@ -88,7 +88,7 @@ export struct OperationListView {
} else {
this.interactData.likeNum = Number(this.interactData.likeNum) - 1
}
console.log('点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum)
// console.log('点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum)
// this.queryContentInteractCount()
}
... ... @@ -124,7 +124,7 @@ export struct OperationListView {
} else {
this.interactData.collectNum = Number(this.interactData.collectNum) - 1
}
console.log('收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum)
// console.log('收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum)
}
})
... ... @@ -146,7 +146,7 @@ export struct OperationListView {
this.interactData.collectNum = res.data[0]?.collectNum
this.interactData.commentNum = res.data[0]?.commentNum
}
console.log('获取互动点赞等数据===', JSON.stringify(res))
// console.log('获取互动点赞等数据===', JSON.stringify(res))
})
}
... ... @@ -174,7 +174,7 @@ export struct OperationListView {
status: 1,
}
ContentDetailRequest.postInteractAccentionOperate(params2).then(res => {
console.log('关注号主==', JSON.stringify(res.data))
// console.log('关注号主==', JSON.stringify(res.data))
if (this.followStatus == '1') {
this.followStatus = '0'
} else {
... ...
... ... @@ -87,21 +87,21 @@ export struct PlayerRightView {
relType: this.contentDetailData?.reLInfo?.relType || '' + '',
userHeaderUrl: this.contentDetailData?.userInfo?.headPhotoUrl || '' + '',
}
console.log(TAG, '点赞params', JSON.stringify(params))
// console.log(TAG, '点赞params', JSON.stringify(params))
ContentDetailRequest.postExecuteLike(params).then(res => {
console.log(TAG, '点赞this.newsStatusOfUser', JSON.stringify(this.newsStatusOfUser))
// console.log(TAG, '点赞this.newsStatusOfUser', JSON.stringify(this.newsStatusOfUser))
if (this.newsStatusOfUser) {
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1'
if (this.newsStatusOfUser.likeStatus == '1') {
this.interactData.likeNum = Number(this.interactData.likeNum || 0) + 1
TrackingContent.like(true, this.pageId, this.pageName, this.pageParam)
console.log(TAG, '点赞')
// console.log(TAG, '点赞')
} else {
this.interactData.likeNum = Math.max(0, Number(this.interactData.likeNum || 0) - 1)
TrackingContent.like(false, this.pageId, this.pageName, this.pageParam)
console.log(TAG, '取消点赞')
// console.log(TAG, '取消点赞')
}
console.log(TAG, '点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum)
// console.log(TAG, '点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum)
// this.queryContentInteractCount()
}
... ... @@ -135,13 +135,13 @@ export struct PlayerRightView {
if (this.newsStatusOfUser.collectStatus === 1) {
this.interactData.collectNum = Number(this.interactData.collectNum || 0) + 1
TrackingContent.collect(true, this.pageId, this.pageName, this.pageParam)
console.log(TAG, '收藏')
// console.log(TAG, '收藏')
} else {
this.interactData.collectNum = Math.max(0, Number(this.interactData.collectNum || 0) - 1)
TrackingContent.collect(false, this.pageId, this.pageName, this.pageParam)
console.log(TAG, '取消收藏')
// console.log(TAG, '取消收藏')
}
console.log(TAG, '收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum)
// console.log(TAG, '收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum)
}
})
... ... @@ -163,7 +163,7 @@ export struct PlayerRightView {
this.interactData.collectNum = res.data[0]?.collectNum || 0
this.interactData.commentNum = res.data[0]?.commentNum || 0
}
console.log('获取互动点赞等数据===', JSON.stringify(res))
// console.log('获取互动点赞等数据===', JSON.stringify(res))
})
}
... ... @@ -191,17 +191,18 @@ export struct PlayerRightView {
status: 1,
}
ContentDetailRequest.postInteractAccentionOperate(params2).then(res => {
console.log(TAG, '关注号主==', JSON.stringify(res.data))
// console.log(TAG, '关注号主==', JSON.stringify(res.data))
if (this.followStatus == '1') {
this.followStatus = '0'
} else {
this.followStatus = '1'
ContentDetailRequest.postPointLevelOperate({ operateType: 6 }).then((res) => {
if (res.data?.showToast) {
ToastUtils.showToast(res.data.ruleName + '+' + res.data.rulePoint + '积分', 1000);
}
})
console.log(TAG, '关注号主')
ContentDetailRequest.postPointLevelOperate({ operateType: 6 })
// .then((res) => {
// if (res.data?.showToast) {
// ToastUtils.showToast(res.data.ruleName + '+' + res.data.rulePoint + '积分', 1000);
// }
// })
// console.log(TAG, '关注号主')
TrackingContent.follow(true, this.followUserId, this.followUserName, this.pageId, this.pageName, this.pageParam)
}
})
... ... @@ -302,8 +303,7 @@ export struct PlayerRightView {
}
transNum2String(name: 'likeNum' | 'collectNum' | 'commentNum') {
console.log(TAG, 'transNum2String', this.interactData.likeNum, this.interactData.collectNum,
this.interactData.commentNum)
// console.log(TAG, 'transNum2String', this.interactData.likeNum, this.interactData.collectNum,this.interactData.commentNum)
if (name === 'likeNum') {
return this.interactData.likeNum != 0 ?
NumberFormatterUtils.formatNumberWithWan(this.interactData.likeNum || '') : ''
... ...
... ... @@ -94,7 +94,8 @@ export struct PlayerTitleView {
}
clipStr += strArr[i]
}
console.log(TAG, 'clipStr:', clipStr)
clipStr += this.isOverLines ? '...' : '';
console.log(TAG, 'clipStr2:', clipStr)
return clipStr
}
... ... @@ -130,7 +131,8 @@ export struct PlayerTitleView {
}
clipStr += strArr[i]
}
console.log(TAG, 'clipTitleText clipStr:', clipStr)
console.log(TAG, 'clipTitleText clipStr1:', clipStr)
clipStr += this.isTitleOverLines ? '...' : '';
return clipStr
}
... ... @@ -217,7 +219,54 @@ export struct PlayerTitleView {
// })
// }
// } else {
this.detailDesc()
// }
Text(DateTimeUtils.formatDate(new Date(this.contentDetailData?.publishTime).getTime(),
DateTimeUtils.PATTERN_DATE_TIME_HYPHEN_MM))
.fontSize(12)
.fontColor(Color.White)
.opacity(0.7)
.lineHeight(16)
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
.margin({ top: 8, bottom: 8 })
}
.width(this.windowWidth - 150 + 'px')
.padding({ left: 16, right: 22 })
.alignItems(HorizontalAlign.Start)
.visibility(this.isOpenDetail || this.isDragging ? Visibility.None : Visibility.Visible)
}
@Builder
detailDesc() {
/**
* 标题大于三行或存在简介显示查看详情按钮
*/
// if (this.rmhPlatform == 1) {
// if (this.titleHeight > 200 || this.summary) {
// Text('查看详情 > ')
// .padding({
// left: 6,
// right: 6,
// top: 4,
// bottom: 4
// })
// .borderRadius(2)
// .backgroundColor('#99636363')
// .fontFamily('PingFang SC-Regular')
// .fontColor(Color.White)
// .fontSize(12)
// .lineHeight(14)
// .fontWeight(400)
// .onClick(() => {
// this.isOpenDetail = true
// this.dialogController?.open()
// })
// }
// } else {
if (this.summary && this.titleLines < 4) {
Stack({ alignContent: Alignment.TopStart }) {
Text() {
Span(this.clipText(this.summary, 14, this.summaryLines, this.windowWidth - 150 - vp2px(50)))
.fontSize(14)
... ... @@ -229,9 +278,18 @@ export struct PlayerTitleView {
this.isOpenDetail = true
this.dialogController?.open()
})
}
// .position({ x: 0, y: 0 })
.padding({
left: 0,
right: 6,
top: 0,
bottom: 8
})
if (this.isOverLines) {
Span('... 全文')
.fontColor('#888888')
Text() {
Span('全文')
.fontColor('#99FFFFFF')
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
.fontSize(12)
... ... @@ -251,37 +309,31 @@ export struct PlayerTitleView {
this.isOpenDetail = true
this.dialogController?.open()
})
}
}
.textAlign(TextAlign.Center)
// .width('100%')
.position({ x: '100%', y: this.summaryLines*23 }) //行高+margin
.translate({ x: '-100%', y: '-100%' })
// .markAnchor({ x: '100%', y: '100%' })
.padding({
left: 0, //6
left: 0,
right: 6,
top: 0, //4
bottom: 8
top: 0,
bottom: 6
})
}
// }
Text(DateTimeUtils.formatDate(new Date(this.contentDetailData?.publishTime).getTime(),
DateTimeUtils.PATTERN_DATE_TIME_HYPHEN_MM))
.fontSize(12)
.fontColor(Color.White)
.opacity(0.7)
.lineHeight(16)
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
.margin({ top: 8, bottom: 8 })
}
.width(this.windowWidth - 150 + 'px')
.padding({ left: 16, right: 22 })
.alignItems(HorizontalAlign.Start)
.visibility(this.isOpenDetail || this.isDragging ? Visibility.None : Visibility.Visible)
.width('100%')
}
}
/**
* 标题
* */
@Builder
titleBuilder() {
// Stack({ alignContent: this.isTitleOverLines ? Alignment.BottomEnd : Alignment.Start }) {
Stack({ alignContent: Alignment.TopStart }) {
Text() {
Span(this.clipTitleText(this.getTitle(), 16, 4, this.windowWidth - 234 - vp2px(50)))
.fontSize(16)
... ... @@ -289,9 +341,28 @@ export struct PlayerTitleView {
.lineHeight(22)
.fontWeight(600)
.fontFamily('PingFang SC-Regular')
}
// .position({ x: 0, y: 0 })
.onAreaChange((oldArea: Area, newArea: Area) => {
//console.info(`cj2024 titleLines = ${newArea.height as number} line = ${(newArea.height as number) / 20}`)
this.titleLines = Math.floor((newArea.height as number) / 22) // 22是行高
//console.info(`cj2024 titleLines = ${this.titleLines}`)
this.updateSummaryLines()
})
.maxLines(4)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.padding({
left: 0, //6
right: 6,
top: 0, //4
bottom: 8
})
Text() {
if (this.isTitleOverLines) {
Span('... 全文')
.fontColor(Color.White)
Span('全文')
.fontColor('#99FFFFFF')
.fontWeight(600)
.fontFamily('PingFang SC-Regular')
.fontSize(12)
... ... @@ -311,15 +382,14 @@ export struct PlayerTitleView {
this.isOpenDetail = true
this.dialogController?.open()
})
}
}
.onAreaChange((oldArea: Area, newArea: Area) => {
//console.info(`cj2024 titleLines = ${newArea.height as number} line = ${(newArea.height as number) / 20}`)
this.titleLines = Math.floor((newArea.height as number) / 22) // 22是行高
//console.info(`cj2024 titleLines = ${this.titleLines}`)
this.updateSummaryLines()
})
.textAlign(TextAlign.Center)
// .width('100%')
.position({ x: '100%', y: this.titleLines*23 }) //行高+margin
.translate({ x: '-100%', y: '-100%' })
// .position({ x: '100%', y: '100%' })
// .markAnchor({ x: '100%', y: '100%' })
.padding({
left: 0, //6
right: 6,
... ... @@ -327,4 +397,6 @@ export struct PlayerTitleView {
bottom: 8
})
}
.width('100%')
}
}
... ...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16"><g transform="matrix(0,-1,1,0,-16,16)"><g><path d="M10.303455641479491,17.960819560243227L4.363755241479492,23.900515460243227Q4.324434578479492,23.939835460243224,4.324704443879492,23.995445460243225Q4.324434578479492,24.051055460243226,4.363755241479492,24.090375460243223L10.303455641479491,30.030075460243225Q10.342505641479491,30.069075460243226,10.397735641479493,30.069075460243226Q10.452965641479492,30.069075460243226,10.492015641479492,30.030075460243225L11.387685641479493,29.134375460243227Q11.406435641479492,29.115675460243224,11.416585641479493,29.091175460243225Q11.426735641479493,29.066675460243225,11.426735641479493,29.040075460243223Q11.426735641479493,29.013575460243224,11.416585641479493,28.989075460243225Q11.406435641479492,28.964575460243225,11.387685641479493,28.945875460243226L6.437285641479493,23.995445460243225L11.387685641479493,19.045045460243227Q11.406435641479492,19.026295460243226,11.416585641479493,19.001795460243226Q11.426735641479493,18.977295460243226,11.426735641479493,18.950765460243225Q11.426735641479493,18.924245460243224,11.416585641479493,18.899744460243227Q11.406435641479492,18.875241460243224,11.387685641479493,18.856488460243224L10.492015641479492,17.960819560243227Q10.452965641479492,17.921767119783226,10.397735641479493,17.921767119783226Q10.342505641479491,17.921767119783226,10.303455641479491,17.960819560243227Z" fill-rule="evenodd" fill="#888888" fill-opacity="1"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16"><g transform="matrix(0,-1,1,0,-16,16)"><g><path d="M10.303455641479491,17.960819560243227L4.363755241479492,23.900515460243227Q4.324434578479492,23.939835460243224,4.324704443879492,23.995445460243225Q4.324434578479492,24.051055460243226,4.363755241479492,24.090375460243223L10.303455641479491,30.030075460243225Q10.342505641479491,30.069075460243226,10.397735641479493,30.069075460243226Q10.452965641479492,30.069075460243226,10.492015641479492,30.030075460243225L11.387685641479493,29.134375460243227Q11.406435641479492,29.115675460243224,11.416585641479493,29.091175460243225Q11.426735641479493,29.066675460243225,11.426735641479493,29.040075460243223Q11.426735641479493,29.013575460243224,11.416585641479493,28.989075460243225Q11.406435641479492,28.964575460243225,11.387685641479493,28.945875460243226L6.437285641479493,23.995445460243225L11.387685641479493,19.045045460243227Q11.406435641479492,19.026295460243226,11.416585641479493,19.001795460243226Q11.426735641479493,18.977295460243226,11.426735641479493,18.950765460243225Q11.426735641479493,18.924245460243224,11.416585641479493,18.899744460243227Q11.406435641479492,18.875241460243224,11.387685641479493,18.856488460243224L10.492015641479492,17.960819560243227Q10.452965641479492,17.921767119783226,10.397735641479493,17.921767119783226Q10.342505641479491,17.921767119783226,10.303455641479491,17.960819560243227Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="0.6"/></g></g></svg>
\ No newline at end of file
... ...
{"v":"5.6.10","fr":60,"ip":0,"op":30,"w":120,"h":120,"nm":"动态稿件卡-点赞-18*18","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"空 23","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[45,45,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[75,75,100],"ix":6}},"ao":0,"ip":0,"op":30,"st":-8,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"圆 6","parent":1,"sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":7,"s":[10]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":9,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":11,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":22,"s":[100]},{"t":24,"s":[0]}],"ix":11},"r":{"a":0,"k":300,"ix":10},"p":{"a":0,"k":[20,20,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[80,80,100],"ix":6}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":7,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":9,"s":[4,4]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":11,"s":[6,6]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":13,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":18,"s":[10,10]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":20,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":22,"s":[8,8]},{"t":24,"s":[8,8]}],"ix":2},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":7,"s":[0,-8],"to":[0,-5.333],"ti":[0,6.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":9,"s":[0,-40],"to":[0,-6.667],"ti":[0,2.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":11,"s":[0,-48],"to":[0,-2.667],"ti":[0,7]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":13,"s":[0,-56],"to":[0,-7],"ti":[0,6.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":18,"s":[0,-90],"to":[0,-1.958],"ti":[0,0.799]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":22,"s":[0,-88],"to":[0,-1.921],"ti":[0,0.706]},{"t":24,"s":[0,-100]}],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.929411764706,0.156862745098,0,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":30,"st":-8,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"圆 5","parent":1,"sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":7,"s":[10]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":9,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":11,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":22,"s":[100]},{"t":24,"s":[0]}],"ix":11},"r":{"a":0,"k":240,"ix":10},"p":{"a":0,"k":[20,20,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[80,80,100],"ix":6}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":7,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":9,"s":[4,4]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":11,"s":[6,6]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":13,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":18,"s":[10,10]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":20,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":22,"s":[8,8]},{"t":24,"s":[8,8]}],"ix":2},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":7,"s":[0,-8],"to":[0,-5.333],"ti":[0,6.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":9,"s":[0,-40],"to":[0,-6.667],"ti":[0,2.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":11,"s":[0,-48],"to":[0,-2.667],"ti":[0,7]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":13,"s":[0,-56],"to":[0,-7],"ti":[0,6.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":18,"s":[0,-90],"to":[0,-1.958],"ti":[0,0.799]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":22,"s":[0,-88],"to":[0,-1.921],"ti":[0,0.706]},{"t":24,"s":[0,-100]}],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.929411764706,0.156862745098,0,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":30,"st":-8,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"圆 4","parent":1,"sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":7,"s":[10]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":9,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":11,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":22,"s":[100]},{"t":24,"s":[0]}],"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":0,"k":[20,20,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[80,80,100],"ix":6}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":7,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":9,"s":[4,4]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":11,"s":[6,6]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":13,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":18,"s":[10,10]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":20,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":22,"s":[8,8]},{"t":24,"s":[8,8]}],"ix":2},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":7,"s":[0,-8],"to":[0,-5.333],"ti":[0,6.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":9,"s":[0,-40],"to":[0,-6.667],"ti":[0,2.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":11,"s":[0,-48],"to":[0,-2.667],"ti":[0,7]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":13,"s":[0,-56],"to":[0,-7],"ti":[0,6.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":18,"s":[0,-90],"to":[0,-1.958],"ti":[0,0.799]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":22,"s":[0,-88],"to":[0,-1.921],"ti":[0,0.706]},{"t":24,"s":[0,-100]}],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.929411764706,0.156862745098,0,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":30,"st":-8,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"圆 2","parent":1,"sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":7,"s":[10]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":9,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":11,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":22,"s":[100]},{"t":24,"s":[0]}],"ix":11},"r":{"a":0,"k":60,"ix":10},"p":{"a":0,"k":[20,20,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[80,80,100],"ix":6}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":7,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":9,"s":[4,4]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":11,"s":[6,6]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":13,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":18,"s":[10,10]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":20,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":22,"s":[8,8]},{"t":24,"s":[8,8]}],"ix":2},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":7,"s":[0,-8],"to":[0,-5.333],"ti":[0,6.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":9,"s":[0,-40],"to":[0,-6.667],"ti":[0,2.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":11,"s":[0,-48],"to":[0,-2.667],"ti":[0,7]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":13,"s":[0,-56],"to":[0,-7],"ti":[0,6.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":18,"s":[0,-90],"to":[0,-1.958],"ti":[0,0.799]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":22,"s":[0,-88],"to":[0,-1.921],"ti":[0,0.706]},{"t":24,"s":[0,-100]}],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.929411764706,0.156862745098,0,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":30,"st":-8,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"圆","parent":1,"sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":7,"s":[10]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":9,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":11,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":22,"s":[100]},{"t":24,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[20,20,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[80,80,100],"ix":6}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":7,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":9,"s":[4,4]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":11,"s":[6,6]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":13,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":18,"s":[10,10]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":20,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":22,"s":[8,8]},{"t":24,"s":[8,8]}],"ix":2},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":7,"s":[0,-8],"to":[0,-5.333],"ti":[0,6.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":9,"s":[0,-40],"to":[0,-6.667],"ti":[0,2.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":11,"s":[0,-48],"to":[0,-2.667],"ti":[0,7]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":13,"s":[0,-56],"to":[0,-7],"ti":[0,6.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":18,"s":[0,-90],"to":[0,-1.958],"ti":[0,0.799]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":22,"s":[0,-88],"to":[0,-1.921],"ti":[0,0.706]},{"t":24,"s":[0,-100]}],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.929411764706,0.156862745098,0,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":30,"st":-8,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"圆 3","parent":1,"sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":7,"s":[10]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":9,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":11,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":22,"s":[100]},{"t":24,"s":[0]}],"ix":11},"r":{"a":0,"k":120,"ix":10},"p":{"a":0,"k":[20,20,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[80,80,100],"ix":6}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":7,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":9,"s":[4,4]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":11,"s":[6,6]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":13,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":18,"s":[10,10]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":20,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":22,"s":[8,8]},{"t":24,"s":[8,8]}],"ix":2},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":7,"s":[0,-8],"to":[0,-5.333],"ti":[0,6.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":9,"s":[0,-40],"to":[0,-6.667],"ti":[0,2.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":11,"s":[0,-48],"to":[0,-2.667],"ti":[0,7]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":13,"s":[0,-56],"to":[0,-7],"ti":[0,6.667]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":18,"s":[0,-90],"to":[0,-1.958],"ti":[0,0.799]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":22,"s":[0,-88],"to":[0,-1.921],"ti":[0,0.706]},{"t":24,"s":[0,-100]}],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.929411764706,0.156862745098,0,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":30,"st":-8,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"圈","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[20,20,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[80,80,100],"ix":6}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":7,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":9,"s":[60,60]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":11,"s":[76,76]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":13,"s":[84,84]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":17,"s":[140,140]},{"t":20,"s":[144,144]}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"op","nm":"位移路径 1","a":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":7,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":9,"s":[-5]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":11,"s":[-16]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":13,"s":[-10]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":18,"s":[-1]},{"t":23,"s":[0]}],"ix":1},"lj":1,"ml":{"a":0,"k":5,"ix":3},"ix":2,"mn":"ADBE Vector Filter - Offset","hd":false},{"ty":"st","c":{"a":0,"k":[0.929411764706,0.156862745098,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":7,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":9,"s":[10]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":11,"s":[32]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":13,"s":[20]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":18,"s":[1]},{"t":23,"s":[0]}],"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false}],"ip":0,"op":30,"st":-8,"bm":0},{"ddd":0,"ind":9,"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":[20,19.999,0],"ix":2},"a":{"a":0,"k":[12,12,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":2,"s":[400,400,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":7,"s":[20,20,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":18,"s":[440,440,100]},{"t":23,"s":[400,400,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[2.148,-2.148],[-2.148,-2.148],[0,0],[0,0],[0,0],[-0.195,0.195],[0,0],[2.148,2.148],[2.148,-2.148],[0,0]],"o":[[-2.148,-2.148],[-2.148,2.148],[0,0],[0,0],[0,0],[0.195,0.195],[0,0],[2.148,-2.148],[-2.148,-2.148],[0,0],[0,0]],"v":[[-1.061,-7.156],[-8.839,-7.156],[-8.839,0.622],[-7.778,1.684],[-0.354,9.107],[-0.353,9.109],[0.354,9.109],[8.839,0.622],[8.839,-7.156],[1.061,-7.156],[0,-6.094]],"c":true},"ix":2},"nm":"路径 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":2,"s":[{"i":[[0,0],[0,0],[0,0],[1.374,-1.233],[0,0],[-1.366,-1.367],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[1.233,1.374],[0,0],[1.367,-1.367],[0,0],[0,0]],"o":[[0,0],[0,0],[-1.321,-1.321],[0,0],[-1.366,1.367],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[1.321,-1.321],[0,0],[-1.367,-1.367],[0,0],[0,0],[0,0]],"v":[[-1.414,-4.68],[-1.414,-4.68],[-2.475,-5.742],[-7.285,-5.874],[-7.425,-5.742],[-7.425,-0.792],[-6.364,0.27],[-6.362,0.268],[-4.749,1.889],[-4.747,1.887],[0,6.633],[4.95,1.684],[4.948,1.682],[6.362,0.266],[6.364,0.27],[7.425,-0.792],[7.557,-5.602],[7.425,-5.742],[2.475,-5.742],[1.682,-4.949],[-0.002,-3.275]],"c":true}]},{"t":7,"s":[{"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],[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],[0,0]],"v":[[0.012,0.237],[0.059,0.187],[0.021,0.223],[0.09,0.22],[0.059,0.204],[0.075,0.177],[0.042,0.207],[0.044,0.205],[0.063,0.201],[0.066,0.199],[0.031,0.226],[0.044,0.215],[0.042,0.213],[0.049,0.235],[0.032,0.234],[0.034,0.24],[0.057,0.148],[0.011,0.235],[0.026,0.2],[0.088,0.176],[0.029,0.163]],"c":true}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":3,"nm":"合并路径 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":7,"s":[0.40000000596,0.40000000596,0.40000000596,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":8,"s":[0.929411768913,0.156862750649,0,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":11,"s":[0.929411768913,0.156862750649,0,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":13,"s":[0.929411764706,0.156862745098,0,1]},{"t":20,"s":[0.929411764706,0.156862745098,0,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":[12,11.756],"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":30,"st":-8,"bm":0}],"markers":[]}
\ No newline at end of file
... ...
... ... @@ -32,7 +32,7 @@ struct MainPage {
upgradeDialogController?: CustomDialogController
watchCurrentBreakpoint() {
Logger.info(TAG, `watchCurrentBreakpoint, this.currentBreakpoint: ${this.currentBreakpoint}`);
// Logger.info(TAG, `watchCurrentBreakpoint, this.currentBreakpoint: ${this.currentBreakpoint}`);
}
aboutToAppear() {
... ... @@ -41,14 +41,14 @@ struct MainPage {
this.breakpointSystem.register()
Logger.info(TAG, `aboutToAppear `);
// Logger.info(TAG, `aboutToAppear `);
EmitterUtils.receiveEvent(EmitterEventId.FORCE_USER_LOGIN_OUT, () => {
LogoutViewModel.clearLoginInfo()
})
let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_MOURNS_INFO_DATA_MODEL,'') as string
let dataModel : LaunchDataModel = JSON.parse(dataModelStr)
console.log(dataModelStr)
// console.log(dataModelStr)
// 处理国殇模式数据
let mourns: mournsInfoModel = dataModel.mourns as mournsInfoModel
let GrayManage = new GrayManageModel()
... ... @@ -63,22 +63,22 @@ struct MainPage {
aboutToDisappear() {
this.breakpointSystem.unregister()
Logger.info(TAG, 'aboutToDisappear');
// Logger.info(TAG, 'aboutToDisappear');
}
onPageHide() {
Logger.info(TAG, 'onPageHide');
// Logger.info(TAG, 'onPageHide');
this.pageHide = Math.random()
}
onPageShow() {
Logger.info(TAG, 'onPageShow');
// Logger.info(TAG, 'onPageShow');
this.pageShow = Math.random()
// 升级检查
// this.upgradeCheck()
Logger.debug('setBarBackgroundColor','Top onPageShow ')
// Logger.debug('setBarBackgroundColor','Top onPageShow ')
}
upgradeCheck() {
... ... @@ -104,8 +104,6 @@ struct MainPage {
})
this.upgradeDialogController?.open()
}
}).catch(() => {
})
}
... ... @@ -115,13 +113,13 @@ struct MainPage {
// 拦截返回键,切到后台
const windowClass = WindowModel.shared.getWindowClass() as window.Window
windowClass.minimize().then(() => {
Logger.debug(TAG, 'Succeeded in minimizing the window.');
// Logger.debug(TAG, 'Succeeded in minimizing the window.');
}).catch((err: BusinessError) => {
Logger.error(TAG, 'Failed to minimize the window. Cause: ' + JSON.stringify(err));
// Logger.error(TAG, 'Failed to minimize the window. Cause: ' + JSON.stringify(err));
return false
});
} catch (err) {
Logger.error(TAG, 'Failed to minimize: ' + JSON.stringify(err));
// Logger.error(TAG, 'Failed to minimize: ' + JSON.stringify(err));
return false
}
return true
... ...
... ... @@ -105,16 +105,13 @@ struct LaunchPage {
let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
if (!dataModelStr) {
this.requestLaunchPageData()
//直接跳转首页
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
return
}
let dataModel : LaunchDataModel = JSON.parse(dataModelStr)
console.log(dataModelStr)
//同意隐私协议后每次启动app请求启动页相关数据,并更新数据
this.requestLaunchPageData();
// console.log(dataModelStr)
if (dataModel.launchPageInfo || dataModel.launchAdInfo.length) {
//跳转广告页
... ... @@ -126,6 +123,8 @@ struct LaunchPage {
//直接跳转首页
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
}
//同意隐私协议后每次启动app请求启动页相关数据,并更新数据
this.requestLaunchPageData();
}
});
});
... ... @@ -194,8 +193,15 @@ struct LaunchPage {
launchPageModel.getLaunchPageData()
}
requestMournsInfoData() {
//请求国殇模式数据并保存
let launchPageModel = new LaunchPageModel()
launchPageModel.getMournsInfoData()
}
aboutToAppear(): void {
this.requestAgreement()
this.requestMournsInfoData()
}
... ...
import { AudioSuspensionModel } from 'wdComponent'
import { PlayerConstants, DateFormatUtil } from 'wdPlayer'
import { EmitterEventId, EmitterUtils } from 'wdKit/Index'
import { EmitterEventId, EmitterUtils, SPHelper } from 'wdKit/Index'
import window from '@ohos.window';
import lottie from '@ohos/lottie';
import { LottieView } from 'wdComponent/Index'
// import { ProcessUtils } from 'wdRouter';
// import { CompInfoBean, ContentDTO } from 'wdBean';
// import { SpConstants } from 'wdConstant';
const TAG = 'AudioSuspensionModel'
... ... @@ -153,6 +156,19 @@ struct Index {
.width(243)
.height(60)
.justifyContent(FlexAlign.Start)
// .onClick(() => {
// let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_NEWS_INFO_DATA_MODEL,'') as string
// console.log(TAG, dataModelStr)
// let dataModel : CompInfoBean = JSON.parse(dataModelStr)
// //公共跳转
// let content: ContentDTO = {
// objectId: this.itemBeanClicked.newsId + '',
// objectType: this.itemBeanClicked.newsType + '',
// relId: this.itemBeanClicked.relId + '',
// relType: this.itemBeanClicked.relType ?? '0'
// } as ContentDTO
// ProcessUtils.processPage(content)
// })
Row() {
Image(this.currentStatus === PlayerConstants.STATUS_START ? $r("app.media.icon_audio_pause_svg") : $r("app.media.icon_audio_playing_svg"))
... ...
... ... @@ -276,7 +276,7 @@ export struct MultiPictureDetailPageComponent {
}.alignItems(VerticalAlign.Center)
}
.borderRadius(4)
.backgroundColor('#333333')
.backgroundColor('#33FFFFFF')
.width(54)
.height(24)
.onClick(() => {
... ...
... ... @@ -20,15 +20,41 @@ export class LaunchPageModel {
fail(data.message)
return
}
Logger.debug("LaunchPageModel获取启动相关数据获取成功:success ", JSON.stringify(data))
// Logger.debug("LaunchPageModel获取启动相关数据获取成功:success ", JSON.stringify(data))
success(data.data);
//存储数据
let obj : string = JSON.stringify(data.data)
console.log(obj)
// console.log(obj)
SPHelper.default.saveSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,obj)
}, (error: Error) => {
Logger.debug("LaunchPageModel获取启动相关数据获取失败:error ", error.toString())
// Logger.debug("LaunchPageModel获取启动相关数据获取失败:error ", error.toString())
fail(error.message)
})
})
}
getMournsInfoData(): Promise<LaunchDataModel> {
return new Promise<LaunchDataModel>((success, fail) => {
HttpRequest.get<ResponseDTO<LaunchDataModel>>(HttpUrlUtils.getLaunchPageDataUrl()).then((data: ResponseDTO<LaunchDataModel>) => {
if (!data || !data.data) {
fail("数据为空")
return
}
if (data.code != 0) {
fail(data.message)
return
}
// Logger.debug("LaunchPageModel获取启动相关数据获取成功:success ", JSON.stringify(data))
// 处理国殇模式数据
success(data.data);
//存储数据
let obj : string = JSON.stringify(data.data)
// console.log(obj)
SPHelper.default.saveSync(SpConstants.APP_MOURNS_INFO_DATA_MODEL,obj)
}, (error: Error) => {
// Logger.debug("LaunchPageModel获取启动相关数据获取失败:error ", error.toString())
fail(error.message)
})
})
... ...
... ... @@ -141,6 +141,7 @@ export class StartupManager {
GetuiPush.sharedInstance().requestEnableNotifications(this.context!).then((enabled) => {
HWLocationUtils.startLocationService()
SPHelper.default.save(SpConstants.SETTING_PUSH_SWITCH,enabled)
})
GetuiPush.sharedInstance().onReachMainPage()
... ...