zhangfengjin

Merge remote-tracking branch 'origin/main'

# Conflicts:
#	sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
Showing 211 changed files with 4170 additions and 1159 deletions
@@ -47,4 +47,5 @@ export class SpConstants{ @@ -47,4 +47,5 @@ export class SpConstants{
47 47
48 //游客状态下首次评论时间 48 //游客状态下首次评论时间
49 static FIRSTCOMMENTTIME = 'firstCommentTime' 49 static FIRSTCOMMENTTIME = 'firstCommentTime'
  50 + static TOURIST_NICK_NAME = 'touristNickName'
50 } 51 }
@@ -20,6 +20,8 @@ export { WindowModel } from './src/main/ets/utils/WindowModel' @@ -20,6 +20,8 @@ export { WindowModel } from './src/main/ets/utils/WindowModel'
20 20
21 export { SPHelper } from './src/main/ets/utils/SPHelper' 21 export { SPHelper } from './src/main/ets/utils/SPHelper'
22 22
  23 +export { KVStoreHelper } from './src/main/ets/utils/KVStoreHelper'
  24 +
23 export { AccountManagerUtils } from './src/main/ets/utils/AccountManagerUtils' 25 export { AccountManagerUtils } from './src/main/ets/utils/AccountManagerUtils'
24 26
25 export { CollectionUtils } from './src/main/ets/utils/CollectionUtils' 27 export { CollectionUtils } from './src/main/ets/utils/CollectionUtils'
@@ -61,3 +63,5 @@ export { MpaasUtils } from './src/main/ets/mpaas/MpaasUtils' @@ -61,3 +63,5 @@ export { MpaasUtils } from './src/main/ets/mpaas/MpaasUtils'
61 export { MpaasUpgradeCheck, UpgradeTipContent } from './src/main/ets/mpaas/MpaasUpgradeCheck' 63 export { MpaasUpgradeCheck, UpgradeTipContent } from './src/main/ets/mpaas/MpaasUpgradeCheck'
62 64
63 export { TingyunAPM } from './src/main/ets/tingyunAPM/TingyunAPM' 65 export { TingyunAPM } from './src/main/ets/tingyunAPM/TingyunAPM'
  66 +
  67 +export { FastClickUtil } from './src/main/ets/utils/FastClickUtil';
  1 +import systemDateTime from '@ohos.systemDateTime';
  2 +
  3 +/**
  4 + * 屏蔽快速点击事件,规定时间内只触发一次
  5 + */
  6 +export class FastClickUtil {
  7 +
  8 + static MIN_DELAY_TIME = 500
  9 +
  10 + static minDelayBeforeTime = 0
  11 +
  12 + static async isMinDelayTime(): Promise<boolean> {
  13 + let systime = await systemDateTime.getCurrentTime();
  14 + return new Promise<boolean>((success, error) => {
  15 + let rtnvalue = systime - FastClickUtil.minDelayBeforeTime <= FastClickUtil.MIN_DELAY_TIME;
  16 + this.minDelayBeforeTime = systime;
  17 + success(rtnvalue);
  18 + })
  19 + }
  20 +}
  21 +
  1 +import { distributedKVStore } from '@kit.ArkData';
  2 +import { BusinessError } from '@kit.BasicServicesKit';
  3 +import { AppUtils } from './AppUtils';
  4 +import { Logger } from './Logger';
  5 +
  6 +const TAG = 'KVStoreHelper'
  7 +
  8 +/**
  9 + * 键值型数据库管理类,类似sp,存储变大,单条数据,value<4M
  10 + */
  11 +export class KVStoreHelper {
  12 + private static _context: Context;
  13 + // TODO 待优化,可以指定数据库名,创建多个数据库。当前没有需求,只创建一个,缓存接口数据用。
  14 + private static _default_store_id: string = 'default_kv_store';
  15 + private kvManager: distributedKVStore.KVManager | undefined = undefined;
  16 + private kvStore: distributedKVStore.SingleKVStore | undefined = undefined;
  17 +
  18 + private constructor() {
  19 + Logger.error(TAG, 'constructor')
  20 + }
  21 +
  22 + static init(context: Context) {
  23 + Logger.error(TAG, 'init')
  24 + KVStoreHelper._context = context;
  25 + KVStoreHelper.default.createKVManager()
  26 + KVStoreHelper.default.createKVStore()
  27 + }
  28 +
  29 + // 静态属性
  30 + static default: KVStoreHelper = new KVStoreHelper();
  31 +
  32 + private createKVManager() {
  33 + if (this.kvManager) {
  34 + return
  35 + }
  36 + if (!KVStoreHelper._context) {
  37 + Logger.fatal(TAG, 'context is null, must be initialized first')
  38 + return
  39 + }
  40 + let context: Context = KVStoreHelper._context;
  41 + const kvManagerConfig: distributedKVStore.KVManagerConfig = {
  42 + context: context,
  43 + bundleName: AppUtils.getPackageName(context)
  44 + };
  45 + try {
  46 + // 创建KVManager实例
  47 + this.kvManager = distributedKVStore.createKVManager(kvManagerConfig);
  48 + Logger.info(TAG, 'Succeeded in creating KVManager.');
  49 + // 继续创建获取数据库
  50 + } catch (e) {
  51 + let error = e as BusinessError;
  52 + Logger.error(TAG, `Failed to create KVManager. Code:${error.code},message:${error.message}`);
  53 + }
  54 + }
  55 +
  56 + private createKVStore() {
  57 + if (this.kvStore) {
  58 + return
  59 + }
  60 + if (!this.kvManager) {
  61 + this.createKVManager()
  62 + // 直接拦截,避免陷入循环
  63 + Logger.error(TAG, 'kvManager is null, please re-create it and try again')
  64 + return
  65 + }
  66 + try {
  67 + const options: distributedKVStore.Options = {
  68 + createIfMissing: true,
  69 + encrypt: false,
  70 + backup: false,
  71 + autoSync: false,
  72 + // kvStoreType不填时,默认创建多设备协同数据库
  73 + kvStoreType: distributedKVStore.KVStoreType.SINGLE_VERSION,
  74 + securityLevel: distributedKVStore.SecurityLevel.S1
  75 + };
  76 + this.kvManager?.getKVStore<distributedKVStore.SingleKVStore>(KVStoreHelper._default_store_id, options,
  77 + (err, store: distributedKVStore.SingleKVStore) => {
  78 + if (err) {
  79 + Logger.error(TAG, `Failed to get KVStore: Code:${err.code},message:${err.message}`);
  80 + return;
  81 + }
  82 + Logger.info(TAG, 'Succeeded in getting KVStore.');
  83 + this.kvStore = store;
  84 + // 请确保获取到键值数据库实例后,再进行相关数据操作
  85 + });
  86 + } catch (e) {
  87 + let error = e as BusinessError;
  88 + Logger.error(TAG, `An unexpected error occurred. Code:${error.code},message:${error.message}`);
  89 + }
  90 + }
  91 +
  92 + private checkStoreCreated() {
  93 + if (!this.kvManager) {
  94 + this.createKVManager()
  95 + }
  96 + if (!this.kvStore) {
  97 + this.createKVStore()
  98 + }
  99 + }
  100 +
  101 + get(key: string, def: boolean | string | number | Uint8Array): Promise<boolean | string | number | Uint8Array> {
  102 + // this.checkStoreCreated()
  103 + return new Promise<boolean | string | number | Uint8Array>((success, failed) => {
  104 + try {
  105 + this.kvStore?.get(key, (err, data) => {
  106 + if (err != undefined) {
  107 + Logger.debug(TAG, `Failed to get data. Code:${err.code},message:${err.message}`);
  108 + success(def)
  109 + return;
  110 + }
  111 + success(data)
  112 + Logger.debug(TAG, `Succeeded in getting data. Data:${data}`);
  113 + });
  114 + } catch (e) {
  115 + success(def)
  116 + let error = e as BusinessError;
  117 + Logger.error(TAG, `Failed to get data. Code:${error.code},message:${error.message}`);
  118 + }
  119 + });
  120 + }
  121 +
  122 + put(key: string, value: boolean | string | number | Uint8Array) {
  123 + // this.checkStoreCreated()
  124 + try {
  125 + this.kvStore?.put(key, value, (err) => {
  126 + if (err !== undefined) {
  127 + Logger.debug(TAG, `Failed to put data. Code:${err.code},message:${err.message}`);
  128 + return;
  129 + }
  130 + Logger.debug(TAG, 'Succeeded in putting data.');
  131 + });
  132 + } catch (e) {
  133 + let error = e as BusinessError;
  134 + Logger.error(TAG, `An unexpected error occurred. Code:${error.code},message:${error.message}`);
  135 + }
  136 + }
  137 +
  138 + del(key: string) {
  139 + // this.checkStoreCreated()
  140 + try {
  141 + this.kvStore?.delete(key, (err) => {
  142 + if (err !== undefined) {
  143 + Logger.debug(TAG, `Failed to delete data. Code:${err.code},message:${err.message}`);
  144 + return;
  145 + }
  146 + Logger.debug(TAG, 'Succeeded in deleting data.');
  147 + });
  148 + } catch (e) {
  149 + let error = e as BusinessError;
  150 + Logger.error(TAG, `An unexpected error occurred. Code:${error.code},message:${error.message}`);
  151 + }
  152 + }
  153 +}
@@ -4,7 +4,7 @@ import { Logger } from './Logger'; @@ -4,7 +4,7 @@ import { Logger } from './Logger';
4 const TAG = 'SPHelper' 4 const TAG = 'SPHelper'
5 5
6 /** 6 /**
7 - * sp存储 7 + * sp存储,单条数据,value<1k;业务数据超过1k的,建议使用KVStoreHelper
8 */ 8 */
9 export class SPHelper { 9 export class SPHelper {
10 private static context: Context; 10 private static context: Context;
@@ -5,7 +5,7 @@ export class ToastUtils { @@ -5,7 +5,7 @@ export class ToastUtils {
5 private static shortToastTime: number = 1000 5 private static shortToastTime: number = 1000
6 6
7 static showToast(message: ResourceStr, duration: number) { 7 static showToast(message: ResourceStr, duration: number) {
8 - prompt.showToast({ message: message, duration: duration }) 8 + prompt.showToast({ message: message, duration: duration, alignment: Alignment.Center })
9 } 9 }
10 10
11 static shortToast(message: ResourceStr) { 11 static shortToast(message: ResourceStr) {
@@ -12,3 +12,5 @@ export { HttpUtils } from "./src/main/ets/utils/HttpUtils" @@ -12,3 +12,5 @@ export { HttpUtils } from "./src/main/ets/utils/HttpUtils"
12 12
13 export { HostEnum, HostManager } from "./src/main/ets/http/HttpHostManager" 13 export { HostEnum, HostManager } from "./src/main/ets/http/HttpHostManager"
14 14
  15 +export { CacheData } from "./src/main/ets/utils/CacheData"
  16 +
@@ -135,6 +135,14 @@ export class HttpUrlUtils { @@ -135,6 +135,14 @@ export class HttpUrlUtils {
135 */ 135 */
136 static readonly APPOINTMENT_ExecuteCollcet_PATH: string = "/api/rmrb-interact/interact/zh/c/collect/executeCollcetRecord"; 136 static readonly APPOINTMENT_ExecuteCollcet_PATH: string = "/api/rmrb-interact/interact/zh/c/collect/executeCollcetRecord";
137 /** 137 /**
  138 + * 个人中心 - 消息
  139 + */
  140 + static readonly APPOINTMENT_MessageList_PATH: string = "/api/rmrb-inside-mail/zh/c/inside-mail/private";
  141 + /**
  142 + * 个人中心 - 消息 点赞数
  143 + */
  144 + static readonly APPOINTMENT_getMessageLikeCount_PATH: string = "/api/rmrb-inside-mail/zh/c/inside-mail/private/getLikeCount";
  145 + /**
138 * 个人中心 我的评论列表 146 * 个人中心 我的评论列表
139 */ 147 */
140 static readonly MINE_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/myCommentList"; 148 static readonly MINE_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/myCommentList";
@@ -301,6 +309,45 @@ export class HttpUrlUtils { @@ -301,6 +309,45 @@ export class HttpUrlUtils {
301 * 查询是否设置过密码checkSetPassword 309 * 查询是否设置过密码checkSetPassword
302 */ 310 */
303 static readonly CHECK_SET_PASSWORD_PATH: string = "/api/rmrb-user-center/user/zh/c/ifSetPassword"; 311 static readonly CHECK_SET_PASSWORD_PATH: string = "/api/rmrb-user-center/user/zh/c/ifSetPassword";
  312 + /**
  313 + * 获取oss 配置
  314 + */
  315 + static readonly OSS_PARAMS_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/oss/configs";
  316 +
  317 + /**
  318 + * 获取上传OSS token
  319 + */
  320 + static readonly STS_TOKEN_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/oss/stsToken";
  321 +
  322 + /**
  323 + * 获取意见反馈类型
  324 + */
  325 + static readonly FEEDBACK_TYPE_PATH: string = "/api/rmrb-interact/interact/c/user/optionClassify/list";
  326 +
  327 + /**
  328 + * 查询点赞、回复我的、系统消息的未读数量以及回复/评论人
  329 + */
  330 + static readonly MESSAGE_UN_READ_DATA_PATH: string = "/api/rmrb-inside-mail/zh/c/inside-mail/private/polymerizationInfo?createTime=";
  331 +
  332 + /**
  333 + * 直播详情-直播人数
  334 + */
  335 + static readonly LIVE_ROOM_BATCH_ALL_DATA_PATH: string = "/api/live-center-message/zh/a/live/room/number/batch/all";
  336 +
  337 + /**
  338 + * 点击消息
  339 + */
  340 + static readonly SEND_MESSAGE_PATH: string = "/api/rmrb-inside-mail/zh/c/inside-mail/private/touch?createTime=";
  341 +
  342 + /**
  343 + * 点击具体某个消息
  344 + */
  345 + static readonly ENTER_MESSAGE_PATH: string = "/api/rmrb-inside-mail/zh/c/inside-mail/private/readAll?contentType=";
  346 +
  347 + /**
  348 + * 推送消息
  349 + */
  350 + static readonly HISTORY_PUSH_MESSAGE_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/push";
304 351
305 static getHost(): string { 352 static getHost(): string {
306 return HostManager.getHost(); 353 return HostManager.getHost();
@@ -463,6 +510,16 @@ export class HttpUrlUtils { @@ -463,6 +510,16 @@ export class HttpUrlUtils {
463 return url 510 return url
464 } 511 }
465 512
  513 + static getMessageListDataUrl() {
  514 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.APPOINTMENT_MessageList_PATH
  515 + return url
  516 + }
  517 +
  518 + static getMessageLikeCount() {
  519 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.APPOINTMENT_getMessageLikeCount_PATH
  520 + return url
  521 + }
  522 +
466 static getExecuteCollcetUrl() { 523 static getExecuteCollcetUrl() {
467 let url = HttpUrlUtils.getHost() + HttpUrlUtils.APPOINTMENT_ExecuteCollcet_PATH 524 let url = HttpUrlUtils.getHost() + HttpUrlUtils.APPOINTMENT_ExecuteCollcet_PATH
468 return url 525 return url
@@ -699,4 +756,39 @@ export class HttpUrlUtils { @@ -699,4 +756,39 @@ export class HttpUrlUtils {
699 return url; 756 return url;
700 } 757 }
701 758
  759 + //获取消息未读接口
  760 + static getMessageUnReadDataUrl() {
  761 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.MESSAGE_UN_READ_DATA_PATH
  762 + return url
  763 + }
  764 +
  765 + static reportDeviceInfo() {
  766 + let url = HttpUrlUtils.getHost() + "/api/rmrb-user-center/common/user/c/device/push";
  767 + return url;
  768 + }
  769 +
  770 + //获取直播人数
  771 + static getLiveRoomBatchAllDataUrl() {
  772 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.LIVE_ROOM_BATCH_ALL_DATA_PATH
  773 + return url
  774 + }
  775 +
  776 +
  777 + //点击消息
  778 + static getSendClickMessageUrl() {
  779 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.SEND_MESSAGE_PATH
  780 + return url
  781 + }
  782 +
  783 + //消息 历史推送消息
  784 + static getHistoryPushUrl() {
  785 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.HISTORY_PUSH_MESSAGE_PATH
  786 + return url
  787 + }
  788 +
  789 + //点击具体某个消息
  790 + static getEnterClickMessageUrl() {
  791 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.ENTER_MESSAGE_PATH
  792 + return url
  793 + }
702 } 794 }
  1 +/**
  2 + * 接口数据存储封装类
  3 + */
  4 +import { DateTimeUtils, StringUtils } from 'wdKit/Index';
  5 +import { CacheDataSaveUtil } from './CacheDataSaveUtil';
  6 +
  7 +export class CacheData {
  8 + // 接口返回数据
  9 + networkData?: object;
  10 + // 数据更新时间戳
  11 + updateTimeInMillis: number = 0;
  12 + // 接口返回md5,用于判断接口数据是否更新
  13 + md5: string = '';
  14 +
  15 + constructor(md5: string, timeMillis: number, networkData: object) {
  16 + this.md5 = md5
  17 + this.updateTimeInMillis = timeMillis
  18 + this.networkData = networkData
  19 + }
  20 +
  21 + /**
  22 + * 根据新旧md5值进行判断,是否需要刷新数据
  23 + * @param responseMd5 新值,接口返回
  24 + * @returns
  25 + */
  26 + needRefreshByMd5(responseMd5: string): boolean {
  27 + if (StringUtils.isEmpty(this.md5) || StringUtils.isEmpty(responseMd5)) {
  28 + return false
  29 + }
  30 + return this.md5 != responseMd5
  31 + }
  32 +
  33 + static saveCacheData(cacheKey: string, data: object, responseMd5: string) {
  34 + if (!data) {
  35 + return
  36 + }
  37 + let time = DateTimeUtils.getTimeStamp()
  38 + let cacheData = new CacheData(responseMd5, time, data)
  39 + CacheDataSaveUtil.save(cacheKey, JSON.stringify(cacheData))
  40 + }
  41 +
  42 + /**
  43 + * 获取缓存数据
  44 + */
  45 + static getLocalCacheData(key: string): Promise<CacheData | null> {
  46 + return new Promise<CacheData | null>((success) => {
  47 + if (StringUtils.isEmpty(key)) {
  48 + success(null)
  49 + return
  50 + }
  51 + let ll = CacheDataSaveUtil.get(key)
  52 + if (ll instanceof Promise) {
  53 + ll.then((data) => {
  54 + let str = data as string
  55 + let cache = JSON.parse(str) as CacheData
  56 + success(cache)
  57 + })
  58 + } else {
  59 + success(null)
  60 + }
  61 + })
  62 + }
  63 +}
  1 +import { KVStoreHelper, StringUtils } from 'wdKit/Index';
  2 +
  3 +/**
  4 + * 接口数据存储工具类
  5 + */
  6 +export class CacheDataSaveUtil {
  7 + static save(key: string, value: string) {
  8 + if (StringUtils.isEmpty(key)) {
  9 + return
  10 + }
  11 + KVStoreHelper.default.put(key, value)
  12 + }
  13 +
  14 + static get(key: string) {
  15 + if (StringUtils.isEmpty(key)) {
  16 + return ''
  17 + }
  18 + return KVStoreHelper.default.get(key, '')
  19 + }
  20 +}
@@ -92,6 +92,8 @@ export function registerRouter() { @@ -92,6 +92,8 @@ export function registerRouter() {
92 return WDRouterPage.liveMorePage 92 return WDRouterPage.liveMorePage
93 } else if (action.params?.pageID == "ORDER_MORE_PAGE") { 93 } else if (action.params?.pageID == "ORDER_MORE_PAGE") {
94 return WDRouterPage.reserveMorePage 94 return WDRouterPage.reserveMorePage
  95 + } else if (action.params?.pageID == "FeedBackActivity") {
  96 + return WDRouterPage.feedBackActivity
95 } 97 }
96 return undefined 98 return undefined
97 }) 99 })
@@ -119,6 +119,8 @@ export class WDRouterPage { @@ -119,6 +119,8 @@ export class WDRouterPage {
119 static searchPage = new WDRouterPage("wdComponent", "ets/pages/SearchPage"); 119 static searchPage = new WDRouterPage("wdComponent", "ets/pages/SearchPage");
120 //消息主页 120 //消息主页
121 static mineMessagePage = new WDRouterPage("wdComponent", "ets/pages/MineMessagePage"); 121 static mineMessagePage = new WDRouterPage("wdComponent", "ets/pages/MineMessagePage");
  122 + //预约消息主页
  123 + static subscribeMessagePage = new WDRouterPage("wdComponent", "ets/pages/SubscribeMessagePage");
122 //搜索人民号主页 124 //搜索人民号主页
123 static searchCreatorPage = new WDRouterPage("wdComponent", "ets/pages/SearchCreatorPage"); 125 static searchCreatorPage = new WDRouterPage("wdComponent", "ets/pages/SearchCreatorPage");
124 //人民号主页 126 //人民号主页
@@ -133,4 +135,12 @@ export class WDRouterPage { @@ -133,4 +135,12 @@ export class WDRouterPage {
133 static columnPage = new WDRouterPage("phone", "ets/pages/column/ColumnPage"); 135 static columnPage = new WDRouterPage("phone", "ets/pages/column/ColumnPage");
134 //展示头像 136 //展示头像
135 static showUserHeaderPage = new WDRouterPage("wdComponent", "ets/pages/ShowUserHeaderPage"); 137 static showUserHeaderPage = new WDRouterPage("wdComponent", "ets/pages/ShowUserHeaderPage");
  138 +
  139 + //意见反馈
  140 + static feedBackActivity = new WDRouterPage("wdComponent", "ets/components/FeedBackActivity");
  141 +
  142 + // 人民号主页头像显示
  143 + static showHomePageHeaderPage = new WDRouterPage("wdComponent", "ets/pages/ShowHomePageHeaderPage");
  144 +
  145 +
136 } 146 }
@@ -108,7 +108,11 @@ export class ProcessUtils { @@ -108,7 +108,11 @@ export class ProcessUtils {
108 break; 108 break;
109 case ContentConstants.TYPE_TELETEXT: 109 case ContentConstants.TYPE_TELETEXT:
110 // 图文详情,跳转h5 110 // 图文详情,跳转h5
  111 + if(content?.linkUrl){ //有 linkUrl 走专题页展示逻辑
  112 + ProcessUtils.gotoSpecialTopic(content)
  113 + }else{
111 ProcessUtils.gotoWeb(content); 114 ProcessUtils.gotoWeb(content);
  115 + }
112 break; 116 break;
113 case ContentConstants.TYPE_LINK: 117 case ContentConstants.TYPE_LINK:
114 ProcessUtils.gotoDefaultWeb(content); 118 ProcessUtils.gotoDefaultWeb(content);
@@ -441,4 +445,26 @@ export class ProcessUtils { @@ -441,4 +445,26 @@ export class ProcessUtils {
441 let params = { 'creatorId': creatorId } as Record<string, string>; 445 let params = { 'creatorId': creatorId } as Record<string, string>;
442 WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) 446 WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params)
443 } 447 }
  448 +
  449 + /**
  450 + * 意见反馈
  451 + */
  452 + public static gotoFeedBackActivity() {
  453 + let taskAction: Action = {
  454 + type: 'JUMP_INNER_NEW_PAGE',
  455 + params: {
  456 + pageID: 'FeedBackActivity'
  457 + } as Params,
  458 + };
  459 +
  460 + WDRouterRule.jumpWithAction(taskAction)
  461 + }
  462 +
  463 + /**
  464 + * 跳转到登录页
  465 + */
  466 + public static gotoLoginPage() {
  467 +
  468 + WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
  469 + }
444 } 470 }
@@ -39,14 +39,14 @@ class AppLoginAuthInfo { @@ -39,14 +39,14 @@ class AppLoginAuthInfo {
39 } 39 }
40 40
41 interface IDataJson { 41 interface IDataJson {
42 - jumpType:number  
43 - jumpUrl:string  
44 - newsId:string  
45 - newsObjectLevel:string  
46 - newsObjectType:number  
47 - newsRelId:string  
48 - newsTitle:string  
49 - pageId:string 42 + jumpType: number
  43 + jumpUrl: string
  44 + newsId: string
  45 + newsObjectLevel: string
  46 + newsObjectType: number
  47 + newsRelId: string
  48 + newsTitle: string
  49 + pageId: string
50 } 50 }
51 51
52 /** 52 /**
@@ -209,6 +209,11 @@ function handleJsCallAppInnerLinkMethod(data: Message) { @@ -209,6 +209,11 @@ function handleJsCallAppInnerLinkMethod(data: Message) {
209 let creatorId = urlParams.get('creatorId') || '' 209 let creatorId = urlParams.get('creatorId') || ''
210 ProcessUtils.gotoPeopleShipHomePage(creatorId) 210 ProcessUtils.gotoPeopleShipHomePage(creatorId)
211 break; 211 break;
  212 + case 'app':
  213 + if (urlParams.get('subType') === 'login') {
  214 + ProcessUtils.gotoLoginPage()
  215 + }
  216 + break;
212 default: 217 default:
213 break; 218 break;
214 } 219 }
1 import { Message } from 'wdJsBridge/src/main/ets/bean/Message'; 1 import { Message } from 'wdJsBridge/src/main/ets/bean/Message';
2 -import { H5ReceiveDataJsonBean, postBatchAttentionStatusResult } from 'wdBean';  
3 -import { ResponseDTO, WDHttp, HttpUrlUtils } from 'wdNetwork'; 2 +import { WDHttp, HttpUrlUtils } from 'wdNetwork';
4 3
5 const TAG = 'JsCallAppService' 4 const TAG = 'JsCallAppService'
6 5
7 6
8 export function handleJsCallAppService(data: Message, callback: (res: string) => void) { 7 export function handleJsCallAppService(data: Message, callback: (res: string) => void) {
9 - let url: string = HttpUrlUtils.getHost() + data?.data?.url  
10 -  
11 - let responseMap: ResponseDTO<postBatchAttentionStatusResult> = {} as ResponseDTO<postBatchAttentionStatusResult> 8 + if (data?.data?.method === 'get') {
  9 + let queryString: string = ''
  10 + let parameters = data?.data?.parameters
  11 + if (parameters) {
  12 + queryString = Object.keys(parameters)
  13 + .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(parameters?.[key])}`)
  14 + .join('&');
  15 + }
12 16
13 - let h5ReceiveDataJson: H5ReceiveDataJsonBean<ResponseDTO<postBatchAttentionStatusResult>> = { 17 + let url: string = HttpUrlUtils.getHost() + data?.data?.url
  18 + if (queryString) {
  19 + url = url + `?${queryString}`
  20 + }
  21 + console.log('yzl', queryString, url)
  22 + WDHttp.get(url).then((res) => {
  23 + callback(JSON.stringify({
14 netError: '0', 24 netError: '0',
15 - responseMap  
16 - } as H5ReceiveDataJsonBean<ResponseDTO<postBatchAttentionStatusResult>> 25 + responseMap: res
  26 + }))
  27 + })
  28 + }
  29 + if (data?.data?.method === 'post') {
  30 + let url: string = HttpUrlUtils.getHost() + data?.data?.url
17 31
18 - // if (data?.data?.method === 'get') {  
19 - // WDHttp.get<ResponseDTO<postBatchAttentionStatusResult>>(url, headers).then((res: ResponseDTO<postBatchAttentionStatusResult>) => {  
20 - // callback(JSON.stringify(res))  
21 - // })  
22 - // }  
23 - if (data?.data?.method === 'post' && data?.data?.url === '/api/rmrb-interact/interact/zh/c/batchAttention/status') {  
24 - WDHttp.post<ResponseDTO<postBatchAttentionStatusResult>>(url, data?.data?.parameters).then((res: ResponseDTO<postBatchAttentionStatusResult>) => {  
25 - h5ReceiveDataJson.responseMap = res  
26 - callback(JSON.stringify(h5ReceiveDataJson)) 32 + WDHttp.post(url, data?.data?.parameters).then((res) => {
  33 + callback(JSON.stringify({
  34 + netError: '0',
  35 + responseMap: res
  36 + }))
27 }) 37 })
28 } 38 }
29 } 39 }
@@ -55,7 +55,7 @@ export struct WdWebLocalComponent { @@ -55,7 +55,7 @@ export struct WdWebLocalComponent {
55 .mixedMode(MixedMode.All) 55 .mixedMode(MixedMode.All)
56 .onlineImageAccess(true) 56 .onlineImageAccess(true)
57 .enableNativeEmbedMode(true) 57 .enableNativeEmbedMode(true)
58 - .layoutMode(WebLayoutMode.FIT_CONTENT) 58 + // .layoutMode(WebLayoutMode.FIT_CONTENT)
59 // .nestedScroll({ scrollForward: NestedScrollMode.SELF_FIRST, scrollBackward: NestedScrollMode.PARENT_FIRST }) 59 // .nestedScroll({ scrollForward: NestedScrollMode.SELF_FIRST, scrollBackward: NestedScrollMode.PARENT_FIRST })
60 .height(this.webHeight) 60 .height(this.webHeight)
61 .onPageBegin((event) => { 61 .onPageBegin((event) => {
@@ -172,3 +172,6 @@ export { MasterDetailRes } from './src/main/ets/bean/user/MasterDetailRes'; @@ -172,3 +172,6 @@ export { MasterDetailRes } from './src/main/ets/bean/user/MasterDetailRes';
172 172
173 export { ReserveItemBean } from './src/main/ets/bean/live/ReserveItemBean'; 173 export { ReserveItemBean } from './src/main/ets/bean/live/ReserveItemBean';
174 174
  175 +
  176 +
  177 +export { FeedbackTypeBean } from './src/main/ets/bean/detail/FeedbackTypeBean';
@@ -84,7 +84,7 @@ export class ContentDTO implements BaseDTO { @@ -84,7 +84,7 @@ export class ContentDTO implements BaseDTO {
84 openType: string = ''; 84 openType: string = '';
85 extra: string = '' 85 extra: string = ''
86 86
87 - static clone(old:ContentDTO): ContentDTO { 87 + static clone(old: ContentDTO): ContentDTO {
88 let content = new ContentDTO(); 88 let content = new ContentDTO();
89 content.appStyle = old.appStyle; 89 content.appStyle = old.appStyle;
90 content.cityCode = old.cityCode; 90 content.cityCode = old.cityCode;
1 export interface commentInfo { 1 export interface commentInfo {
2 commentTitle: string, 2 commentTitle: string,
3 newsTitle: string, 3 newsTitle: string,
4 - userName: string,  
5 - userHeaderUrl: string, 4 + userId?: string,
  5 + userName?: string,
  6 + userHeaderUrl?: string,
6 publishTime: number, 7 publishTime: number,
7 commentId: string, 8 commentId: string,
8 newsId: string, 9 newsId: string,
9 relId: string; 10 relId: string;
10 relType: string; 11 relType: string;
11 - userId: string; 12 + newsType?: string,
  13 + objectType?: string,
12 } 14 }
  1 +export interface FeedbackTypeBean {
  2 + classifyName: string;
  3 + id: number;
  4 + isselect: boolean;
  5 +}
@@ -57,6 +57,8 @@ export { AudioDetailComponent } from "./src/main/ets/components/AudioDetailCompo @@ -57,6 +57,8 @@ export { AudioDetailComponent } from "./src/main/ets/components/AudioDetailCompo
57 57
58 export { DynamicDetailComponent } from "./src/main/ets/components/DynamicDetailComponent" 58 export { DynamicDetailComponent } from "./src/main/ets/components/DynamicDetailComponent"
59 59
  60 +export { FeedBackActivity } from "./src/main/ets/components/FeedBackActivity"
  61 +
60 export { AudioSuspensionModel } from "./src/main/ets/viewmodel/AudioSuspensionModel" 62 export { AudioSuspensionModel } from "./src/main/ets/viewmodel/AudioSuspensionModel"
61 63
62 export { BroadcastPageComponent } from "./src/main/ets/components/broadcast/BroadcastPageComponent" 64 export { BroadcastPageComponent } from "./src/main/ets/components/broadcast/BroadcastPageComponent"
@@ -65,7 +67,7 @@ export { FirstTabTopSearchComponent } from "./src/main/ets/components/search/Fir @@ -65,7 +67,7 @@ export { FirstTabTopSearchComponent } from "./src/main/ets/components/search/Fir
65 67
66 export { ListHasNoMoreDataUI } from "./src/main/ets/components/reusable/ListHasNoMoreDataUI" 68 export { ListHasNoMoreDataUI } from "./src/main/ets/components/reusable/ListHasNoMoreDataUI"
67 69
68 -export { LottieView } from './src/main/ets/lottie/LottieView' 70 +export { LottieView } from './src/main/ets/components/lottie/LottieView'
69 71
70 export { SpacialTopicPageComponent } from './src/main/ets/components/SpacialTopicPageComponent' 72 export { SpacialTopicPageComponent } from './src/main/ets/components/SpacialTopicPageComponent'
71 73
1 -import { CommonConstants, CompStyle } from 'wdConstant';  
2 -import { ContentDTO } from 'wdBean'; 1 +import { CompStyle } from 'wdConstant';
  2 +import { CompDTO, ContentDTO } from 'wdBean';
3 import { Card2Component } from './cardview/Card2Component'; 3 import { Card2Component } from './cardview/Card2Component';
4 import { Card3Component } from './cardview/Card3Component'; 4 import { Card3Component } from './cardview/Card3Component';
5 import { Card4Component } from './cardview/Card4Component'; 5 import { Card4Component } from './cardview/Card4Component';
@@ -24,13 +24,14 @@ import { Card21Component } from './cardview/Card21Component'; @@ -24,13 +24,14 @@ import { Card21Component } from './cardview/Card21Component';
24 @Component 24 @Component
25 export struct CardParser { 25 export struct CardParser {
26 @State contentDTO: ContentDTO = new ContentDTO(); 26 @State contentDTO: ContentDTO = new ContentDTO();
  27 + @State compDTO: CompDTO = {} as CompDTO
27 28
28 build() { 29 build() {
29 - this.contentBuilder(this.contentDTO); 30 + this.contentBuilder(this.contentDTO, this.compDTO);
30 } 31 }
31 32
32 @Builder 33 @Builder
33 - contentBuilder(contentDTO: ContentDTO) { 34 + contentBuilder(contentDTO: ContentDTO, compDTO: CompDTO) {
34 if (contentDTO.appStyle === CompStyle.Card_02) { 35 if (contentDTO.appStyle === CompStyle.Card_02) {
35 Card2Component({ contentDTO }) 36 Card2Component({ contentDTO })
36 } else if (contentDTO.appStyle === CompStyle.Card_03) { 37 } else if (contentDTO.appStyle === CompStyle.Card_03) {
@@ -38,7 +39,7 @@ export struct CardParser { @@ -38,7 +39,7 @@ export struct CardParser {
38 } else if (contentDTO.appStyle === CompStyle.Card_04) { 39 } else if (contentDTO.appStyle === CompStyle.Card_04) {
39 Card4Component({ contentDTO }) 40 Card4Component({ contentDTO })
40 } else if (contentDTO.appStyle === CompStyle.Card_05) { 41 } else if (contentDTO.appStyle === CompStyle.Card_05) {
41 - Card5Component({ contentDTO }) 42 + Card5Component({ contentDTO, titleShowPolicy: compDTO.titleShowPolicy })
42 } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle 43 } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle
43 .Card_13) { 44 .Card_13) {
44 Card6Component({ contentDTO }) 45 Card6Component({ contentDTO })
@@ -64,8 +65,7 @@ export struct CardParser { @@ -64,8 +65,7 @@ export struct CardParser {
64 Card20Component({ contentDTO }) 65 Card20Component({ contentDTO })
65 } else if (contentDTO.appStyle === CompStyle.Card_21) { 66 } else if (contentDTO.appStyle === CompStyle.Card_21) {
66 Card21Component({ contentDTO }) 67 Card21Component({ contentDTO })
67 - }  
68 - else { 68 + } else {
69 // todo:组件未实现 / Component Not Implemented 69 // todo:组件未实现 / Component Not Implemented
70 // Text(contentDTO.appStyle) 70 // Text(contentDTO.appStyle)
71 // .width(CommonConstants.FULL_PARENT) 71 // .width(CommonConstants.FULL_PARENT)
1 -import { SPHelper,Logger,ToastUtils } from 'wdKit';  
2 -import { ContentDetailDTO, Action, ContentDTO,batchLikeAndCollectResult } from 'wdBean'; 1 +import { SPHelper, Logger, ToastUtils } from 'wdKit';
  2 +import { ContentDetailDTO, Action, ContentDTO, batchLikeAndCollectResult } from 'wdBean';
3 import { ProcessUtils } from 'wdRouter'; 3 import { ProcessUtils } from 'wdRouter';
4 import router from '@ohos.router'; 4 import router from '@ohos.router';
5 import { batchLikeAndCollectParams } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; 5 import { batchLikeAndCollectParams } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
6 import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; 6 import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel';
7 import { SpConstants } from 'wdConstant/Index'; 7 import { SpConstants } from 'wdConstant/Index';
8 import { WDShare } from 'wdShare/Index'; 8 import { WDShare } from 'wdShare/Index';
9 -import {LikeComponent} from './view/LikeComponent' 9 +import { LikeComponent } from './view/LikeComponent'
  10 +
10 const TAG = 'CarderInteraction' 11 const TAG = 'CarderInteraction'
  12 +
11 /** 13 /**
12 * 卡片 分享、评论、点赞公用组件 14 * 卡片 分享、评论、点赞公用组件
13 */ 15 */
@@ -15,9 +17,10 @@ const TAG = 'CarderInteraction' @@ -15,9 +17,10 @@ const TAG = 'CarderInteraction'
15 export struct CarderInteraction { 17 export struct CarderInteraction {
16 @Prop contentDTO: ContentDTO 18 @Prop contentDTO: ContentDTO
17 @State contentId: string = '' 19 @State contentId: string = ''
18 - @State contentDetailData: ContentDetailDTO = {} as ContentDetailDTO  
19 - @State newsStatusOfUser: batchLikeAndCollectResult = {} as batchLikeAndCollectResult// 点赞、收藏状态 20 + @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
  21 + @State newsStatusOfUser: batchLikeAndCollectResult = {} as batchLikeAndCollectResult // 点赞、收藏状态
20 @State likeBean: Record<string, string> = {} 22 @State likeBean: Record<string, string> = {}
  23 +
21 async aboutToAppear() { 24 async aboutToAppear() {
22 await this.getContentDetailData() 25 await this.getContentDetailData()
23 // 点赞需要数据 26 // 点赞需要数据
@@ -28,51 +31,55 @@ export struct CarderInteraction { @@ -28,51 +31,55 @@ export struct CarderInteraction {
28 this.likeBean['userHeaderUrl'] = this.contentDetailData.userInfo?.headPhotoUrl + '' 31 this.likeBean['userHeaderUrl'] = this.contentDetailData.userInfo?.headPhotoUrl + ''
29 this.likeBean['channelId'] = this.contentDetailData.reLInfo?.channelId + '' 32 this.likeBean['channelId'] = this.contentDetailData.reLInfo?.channelId + ''
30 } 33 }
  34 +
31 build() { 35 build() {
32 - Row(){  
33 - Row(){ 36 + Row() {
  37 + Row() {
34 Image($r('app.media.CarderInteraction_share')) 38 Image($r('app.media.CarderInteraction_share'))
35 .width(18) 39 .width(18)
36 .height(18) 40 .height(18)
37 Text('分享') 41 Text('分享')
38 - .margin({left:4}) 42 + .margin({ left: 4 })
39 .fontSize(14) 43 .fontSize(14)
40 .fontColor('#666666') 44 .fontColor('#666666')
41 } 45 }
42 .justifyContent(FlexAlign.Center) 46 .justifyContent(FlexAlign.Center)
43 - .onClick(()=>{ 47 + .onClick(() => {
44 WDShare.shareContent(this.contentDetailData) 48 WDShare.shareContent(this.contentDetailData)
45 }) 49 })
46 - Row(){ 50 +
  51 + Row() {
47 Image($r('app.media.CarderInteraction_comment')) 52 Image($r('app.media.CarderInteraction_comment'))
48 .width(18) 53 .width(18)
49 .height(18) 54 .height(18)
50 Text('评论') 55 Text('评论')
51 - .margin({left:4}) 56 + .margin({ left: 4 })
52 .fontSize(14) 57 .fontSize(14)
53 .fontColor('#666666') 58 .fontColor('#666666')
54 } 59 }
55 .justifyContent(FlexAlign.Center) 60 .justifyContent(FlexAlign.Center)
56 - .onClick(()=>{ 61 + .onClick(() => {
57 ProcessUtils.processPage(this.contentDTO) 62 ProcessUtils.processPage(this.contentDTO)
58 }) 63 })
  64 +
59 this.builderLike() 65 this.builderLike()
60 } 66 }
61 .width('100%') 67 .width('100%')
62 - .margin({top:11}) 68 + .margin({ top: 11 })
63 .padding({ 69 .padding({
64 - left:21,  
65 - right:21 70 + left: 21,
  71 + right: 21
66 }) 72 })
67 .justifyContent(FlexAlign.SpaceBetween) 73 .justifyContent(FlexAlign.SpaceBetween)
68 .alignItems(VerticalAlign.Center) 74 .alignItems(VerticalAlign.Center)
69 } 75 }
  76 +
70 /** 77 /**
71 * 点赞组件 78 * 点赞组件
72 */ 79 */
73 @Builder 80 @Builder
74 builderLike() { 81 builderLike() {
75 - Row(){ 82 + Row() {
76 if (this.likeBean?.contentId) { 83 if (this.likeBean?.contentId) {
77 LikeComponent({ 84 LikeComponent({
78 data: this.likeBean, 85 data: this.likeBean,
@@ -88,13 +95,13 @@ export struct CarderInteraction { @@ -88,13 +95,13 @@ export struct CarderInteraction {
88 * */ 95 * */
89 private async getContentDetailData() { 96 private async getContentDetailData() {
90 try { 97 try {
91 - let data = await MultiPictureDetailViewModel.getDetailData(this.contentDTO.relId, this.contentDTO.objectId, this.contentDTO.relType) 98 + let data = await MultiPictureDetailViewModel.getDetailData(this.contentDTO.relId, this.contentDTO.objectId,
  99 + this.contentDTO.relType)
92 this.contentDetailData = data[0]; 100 this.contentDetailData = data[0];
93 - console.log('动态详情',JSON.stringify(this.contentDetailData)) 101 + console.log('动态详情', JSON.stringify(this.contentDetailData))
94 } catch (exception) { 102 } catch (exception) {
95 - console.log('请求失败',JSON.stringify(exception)) 103 + console.log('请求失败', JSON.stringify(exception))
96 } 104 }
97 } 105 }
98 -  
99 } 106 }
100 107
@@ -14,7 +14,6 @@ import { ZhSingleRow06 } from './compview/ZhSingleRow06'; @@ -14,7 +14,6 @@ import { ZhSingleRow06 } from './compview/ZhSingleRow06';
14 import { ZhSingleColumn04 } from './compview/ZhSingleColumn04'; 14 import { ZhSingleColumn04 } from './compview/ZhSingleColumn04';
15 import { ZhSingleColumn09 } from './compview/ZhSingleColumn09'; 15 import { ZhSingleColumn09 } from './compview/ZhSingleColumn09';
16 import { ZhGridLayout03 } from './compview/ZhGridLayout03'; 16 import { ZhGridLayout03 } from './compview/ZhGridLayout03';
17 -import { ZhCarouselLayout01 } from './compview/ZhCarouselLayout01';  
18 import { CardParser } from './CardParser'; 17 import { CardParser } from './CardParser';
19 import { ZhGridLayout02 } from './compview/ZhGridLayout02'; 18 import { ZhGridLayout02 } from './compview/ZhGridLayout02';
20 import { Card2Component } from './cardview/Card2Component'; 19 import { Card2Component } from './cardview/Card2Component';
@@ -23,6 +22,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; @@ -23,6 +22,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
23 import { AdvCardParser } from './cardViewAdv/AdvCardParser'; 22 import { AdvCardParser } from './cardViewAdv/AdvCardParser';
24 import PageModel from '../viewmodel/PageModel'; 23 import PageModel from '../viewmodel/PageModel';
25 import { LiveHorizontalCardComponent } from './view/LiveHorizontalCardComponent'; 24 import { LiveHorizontalCardComponent } from './view/LiveHorizontalCardComponent';
  25 +import { ZhCarouselLayout01 } from './compview/ZhCarouselLayout01';
26 26
27 /** 27 /**
28 * comp适配器. 28 * comp适配器.
@@ -32,12 +32,12 @@ import { LiveHorizontalCardComponent } from './view/LiveHorizontalCardComponent' @@ -32,12 +32,12 @@ import { LiveHorizontalCardComponent } from './view/LiveHorizontalCardComponent'
32 @Component 32 @Component
33 export struct CompParser { 33 export struct CompParser {
34 @State compDTO: CompDTO = {} as CompDTO 34 @State compDTO: CompDTO = {} as CompDTO
35 - @State private pageModel: PageModel = new PageModel();  
36 @State compIndex: number = 0; 35 @State compIndex: number = 0;
  36 + @State private pageModel: PageModel = new PageModel();
37 37
38 build() { 38 build() {
39 Column() { 39 Column() {
40 - if (this.compDTO.name !="月度排行卡") { 40 + if (this.compDTO.name != "月度排行卡") {
41 41
42 this.componentBuilder(this.compDTO, this.compIndex); 42 this.componentBuilder(this.compDTO, this.compIndex);
43 } 43 }
@@ -53,7 +53,8 @@ export struct CompParser { @@ -53,7 +53,8 @@ export struct CompParser {
53 } else if (compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { 53 } else if (compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
54 ZhCarouselLayout01({ compDTO: compDTO }) 54 ZhCarouselLayout01({ compDTO: compDTO })
55 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 55 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
56 - } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_01 && compDTO.imageScale === 2) {// && compDTO.name ==="横划卡" 56 + } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_01 &&
  57 + compDTO.imageScale === 2) { // && compDTO.name ==="横划卡"
57 58
58 LiveHorizontalCardComponent({ compDTO: compDTO }) 59 LiveHorizontalCardComponent({ compDTO: compDTO })
59 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 60 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
@@ -87,7 +88,7 @@ export struct CompParser { @@ -87,7 +88,7 @@ export struct CompParser {
87 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 88 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
88 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) { 89 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
89 //头图卡 和comStyle 2相同, 90 //头图卡 和comStyle 2相同,
90 - Card5Component({ contentDTO: compDTO.operDataList[0] }) 91 + Card5Component({ contentDTO: compDTO.operDataList[0], titleShowPolicy: compDTO.titleShowPolicy })
91 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 92 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
92 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_03) { 93 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
93 // 大图卡 94 // 大图卡
@@ -107,10 +108,9 @@ export struct CompParser { @@ -107,10 +108,9 @@ export struct CompParser {
107 //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 16, right: 16 }) 108 //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 16, right: 16 })
108 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 109 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
109 } else if (!Number.isNaN(Number(compDTO.compStyle))) { 110 } else if (!Number.isNaN(Number(compDTO.compStyle))) {
110 - CardParser({ contentDTO: compDTO.operDataList[0] }); 111 + CardParser({ contentDTO: compDTO.operDataList[0], compDTO });
111 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 112 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
112 - }  
113 - else { 113 + } else {
114 Text(compDTO.compStyle) 114 Text(compDTO.compStyle)
115 .width(CommonConstants.FULL_PARENT) 115 .width(CommonConstants.FULL_PARENT)
116 .padding(10) 116 .padding(10)
1 -import { AccountManagerUtils, Logger, DateTimeUtils, SPHelper, NumberFormatterUtils, DisplayUtils,  
2 - NetworkUtil } from 'wdKit'; 1 +import {
  2 + AccountManagerUtils,
  3 + Logger,
  4 + DateTimeUtils,
  5 + SPHelper,
  6 + NumberFormatterUtils,
  7 + DisplayUtils,
  8 + NetworkUtil,
  9 + FastClickUtil
  10 +} from 'wdKit';
3 import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; 11 import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel';
4 -import { ContentDetailDTO,postBatchAttentionStatusParams, 12 +import {
  13 + ContentDetailDTO,
  14 + postBatchAttentionStatusParams,
5 PhotoListBean, 15 PhotoListBean,
6 ContentDTO, 16 ContentDTO,
7 batchLikeAndCollectResult, 17 batchLikeAndCollectResult,
8 RmhInfoDTO, 18 RmhInfoDTO,
9 - InteractDataDTO, } from 'wdBean'; 19 + InteractDataDTO,
  20 +} from 'wdBean';
10 import media from '@ohos.multimedia.media'; 21 import media from '@ohos.multimedia.media';
11 import { OperRowListView } from './view/OperRowListView'; 22 import { OperRowListView } from './view/OperRowListView';
12 import { WDPlayerController } from 'wdPlayer/Index'; 23 import { WDPlayerController } from 'wdPlayer/Index';
@@ -33,6 +44,7 @@ import { detailedSkeleton } from './skeleton/detailSkeleton'; @@ -33,6 +44,7 @@ import { detailedSkeleton } from './skeleton/detailSkeleton';
33 44
34 const TAG = 'DynamicDetailComponent' 45 const TAG = 'DynamicDetailComponent'
35 const PATTERN_DATE_CN_RN: string = 'yyyy年MM月dd日 HH:mm'; 46 const PATTERN_DATE_CN_RN: string = 'yyyy年MM月dd日 HH:mm';
  47 +
36 // @Preview 48 // @Preview
37 @Component 49 @Component
38 export struct DynamicDetailComponent { 50 export struct DynamicDetailComponent {
@@ -40,39 +52,35 @@ export struct DynamicDetailComponent { @@ -40,39 +52,35 @@ export struct DynamicDetailComponent {
40 private relId: string = '' 52 private relId: string = ''
41 private contentId: string = '' 53 private contentId: string = ''
42 private relType: string = '' 54 private relType: string = ''
43 -  
44 //出参 55 //出参
45 - @State contentDetailData: ContentDetailDTO = {} as ContentDetailDTO 56 + @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
46 //UI 57 //UI
47 scroller: Scroller = new Scroller(); 58 scroller: Scroller = new Scroller();
48 -  
49 //点赞 收藏 评论 数量 59 //点赞 收藏 评论 数量
50 - @State interactDataDTO: InteractDataDTO = {likeNum:0} as InteractDataDTO 60 + @State interactDataDTO: InteractDataDTO = { likeNum: 0 } as InteractDataDTO
51 /** 61 /**
52 * 关注状态:默认未关注 点击去关注 62 * 关注状态:默认未关注 点击去关注
53 */ 63 */
54 @State followStatus: String = ''; 64 @State followStatus: String = '';
55 -  
56 - @State newsStatusOfUser: batchLikeAndCollectResult = {} as batchLikeAndCollectResult// 点赞、收藏状态 65 + @State newsStatusOfUser: batchLikeAndCollectResult = {} as batchLikeAndCollectResult // 点赞、收藏状态
57 //跳转 66 //跳转
58 private mJumpInfo: ContentDTO = new ContentDTO(); 67 private mJumpInfo: ContentDTO = new ContentDTO();
59 -  
60 @State publishTime: string = '' 68 @State publishTime: string = ''
61 @State isNetConnected: boolean = true 69 @State isNetConnected: boolean = true
62 @State isPageEnd: boolean = false 70 @State isPageEnd: boolean = false
63 -  
64 @State publishCommentModel: publishCommentModel = new publishCommentModel() 71 @State publishCommentModel: publishCommentModel = new publishCommentModel()
65 - 72 + @State reachEndIncreament: number = 0
66 73
67 async aboutToAppear() { 74 async aboutToAppear() {
68 await this.getContentDetailData() 75 await this.getContentDetailData()
69 } 76 }
  77 +
70 onPageHide() { 78 onPageHide() {
71 79
72 } 80 }
73 81
74 build() { 82 build() {
75 - Column(){ 83 + Column() {
76 //logo、日期 84 //logo、日期
77 Row() { 85 Row() {
78 Image($r('app.media.ic_article_rmh')) 86 Image($r('app.media.ic_article_rmh'))
@@ -89,12 +97,13 @@ export struct DynamicDetailComponent { @@ -89,12 +97,13 @@ export struct DynamicDetailComponent {
89 .height($r('app.float.margin_48')) 97 .height($r('app.float.margin_48'))
90 .width('100%') 98 .width('100%')
91 .alignItems(VerticalAlign.Bottom) 99 .alignItems(VerticalAlign.Bottom)
92 - .padding({bottom:5}) 100 + .padding({ bottom: 5 })
  101 +
93 //分割线 102 //分割线
94 Image($r('app.media.ic_news_detail_division')) 103 Image($r('app.media.ic_news_detail_division'))
95 .width('100%') 104 .width('100%')
96 .height($r('app.float.margin_7')) 105 .height($r('app.float.margin_7'))
97 - .padding({left: $r('app.float.margin_16'), right: $r('app.float.margin_16')} ) 106 + .padding({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') })
98 Stack({ alignContent: Alignment.Bottom }) { 107 Stack({ alignContent: Alignment.Bottom }) {
99 if (!this.isNetConnected) { 108 if (!this.isNetConnected) {
100 EmptyComponent({ 109 EmptyComponent({
@@ -107,7 +116,7 @@ export struct DynamicDetailComponent { @@ -107,7 +116,7 @@ export struct DynamicDetailComponent {
107 } else { 116 } else {
108 if (!this.isPageEnd) { 117 if (!this.isPageEnd) {
109 detailedSkeleton() 118 detailedSkeleton()
110 - }else{ 119 + } else {
111 Scroll(this.scroller) { 120 Scroll(this.scroller) {
112 Column() { 121 Column() {
113 //号主信息 122 //号主信息
@@ -115,7 +124,8 @@ export struct DynamicDetailComponent { @@ -115,7 +124,8 @@ export struct DynamicDetailComponent {
115 //头像 124 //头像
116 Stack() { 125 Stack() {
117 Image(this.contentDetailData.rmhInfo?.rmhHeadUrl) 126 Image(this.contentDetailData.rmhInfo?.rmhHeadUrl)
118 - .alt(this.contentDetailData.rmhInfo?.userType=='1'?$r('app.media.default_head'):$r('app.media.icon_default_head_mater')) 127 + .alt(this.contentDetailData.rmhInfo?.userType == '1' ? $r('app.media.default_head') :
  128 + $r('app.media.icon_default_head_mater'))
119 .width($r('app.float.margin_32')) 129 .width($r('app.float.margin_32'))
120 .height($r('app.float.margin_32')) 130 .height($r('app.float.margin_32'))
121 .objectFit(ImageFit.Cover) 131 .objectFit(ImageFit.Cover)
@@ -125,7 +135,7 @@ export struct DynamicDetailComponent { @@ -125,7 +135,7 @@ export struct DynamicDetailComponent {
125 .height($r('app.float.margin_48')) 135 .height($r('app.float.margin_48'))
126 .objectFit(ImageFit.Cover) 136 .objectFit(ImageFit.Cover)
127 .borderRadius($r('app.float.margin_24')) 137 .borderRadius($r('app.float.margin_24'))
128 - if(!StringUtils.isEmpty(this.contentDetailData.rmhInfo?.authIcon)){ 138 + if (!StringUtils.isEmpty(this.contentDetailData.rmhInfo?.authIcon)) {
129 Stack() { 139 Stack() {
130 Image(this.contentDetailData.rmhInfo?.authIcon) 140 Image(this.contentDetailData.rmhInfo?.authIcon)
131 .width($r('app.float.vp_12')) 141 .width($r('app.float.vp_12'))
@@ -140,10 +150,16 @@ export struct DynamicDetailComponent { @@ -140,10 +150,16 @@ export struct DynamicDetailComponent {
140 .width($r('app.float.margin_48')) 150 .width($r('app.float.margin_48'))
141 .height($r('app.float.margin_48')) 151 .height($r('app.float.margin_48'))
142 .alignContent(Alignment.Center) 152 .alignContent(Alignment.Center)
143 - .onClick(() => {  
144 - ProcessUtils.gotoPeopleShipHomePage(this.contentDetailData.rmhInfo == null ?"":this.contentDetailData.rmhInfo.rmhId) 153 + .onClick(async () => {
  154 + let retvalue = await FastClickUtil.isMinDelayTime()
  155 + if(retvalue){
  156 + return
  157 + }
  158 + ProcessUtils.gotoPeopleShipHomePage(this.contentDetailData.rmhInfo == null ? "" :
  159 + this.contentDetailData.rmhInfo.rmhId)
145 }) 160 })
146 - Column(){ 161 +
  162 + Column() {
147 //昵称 163 //昵称
148 Text(this.contentDetailData.rmhInfo?.rmhName) 164 Text(this.contentDetailData.rmhInfo?.rmhName)
149 .fontSize($r('app.float.font_size_14')) 165 .fontSize($r('app.float.font_size_14'))
@@ -162,15 +178,16 @@ export struct DynamicDetailComponent { @@ -162,15 +178,16 @@ export struct DynamicDetailComponent {
162 .alignSelf(ItemAlign.Start) 178 .alignSelf(ItemAlign.Start)
163 } 179 }
164 .width('63%') 180 .width('63%')
165 - .margin({right: $r('app.float.margin_6')})  
166 - if(!StringUtils.isEmpty(this.followStatus)){ 181 + .margin({ right: $r('app.float.margin_6') })
  182 +
  183 + if (!StringUtils.isEmpty(this.followStatus)) {
167 if (this.followStatus == '0') { 184 if (this.followStatus == '0') {
168 Row() { 185 Row() {
169 Blank().layoutWeight(1) 186 Blank().layoutWeight(1)
170 Image($r('app.media.icon_add_attention')) 187 Image($r('app.media.icon_add_attention'))
171 .width($r('app.float.vp_12')) 188 .width($r('app.float.vp_12'))
172 .height($r('app.float.vp_12')) 189 .height($r('app.float.vp_12'))
173 - .margin({right:2}) 190 + .margin({ right: 2 })
174 Text('关注') 191 Text('关注')
175 .textAlign(TextAlign.Center) 192 .textAlign(TextAlign.Center)
176 .fontSize($r('app.float.font_size_12')) 193 .fontSize($r('app.float.font_size_12'))
@@ -181,7 +198,11 @@ export struct DynamicDetailComponent { @@ -181,7 +198,11 @@ export struct DynamicDetailComponent {
181 .height($r('app.float.margin_24')) 198 .height($r('app.float.margin_24'))
182 .borderRadius($r('app.float.vp_3')) 199 .borderRadius($r('app.float.vp_3'))
183 .backgroundColor($r('app.color.color_ED2800')) 200 .backgroundColor($r('app.color.color_ED2800'))
184 - .onClick(() => { 201 + .onClick(async () => {
  202 + let retvalue = await FastClickUtil.isMinDelayTime()
  203 + if(retvalue){
  204 + return
  205 + }
185 this.handleAccention() 206 this.handleAccention()
186 }) 207 })
187 } else { 208 } else {
@@ -195,30 +216,37 @@ export struct DynamicDetailComponent { @@ -195,30 +216,37 @@ export struct DynamicDetailComponent {
195 .borderColor($r('app.color.color_CCCCCC_1A')) 216 .borderColor($r('app.color.color_CCCCCC_1A'))
196 .backgroundColor($r('app.color.color_CCCCCC_1A')) 217 .backgroundColor($r('app.color.color_CCCCCC_1A'))
197 .fontColor($r('app.color.color_CCCCCC')) 218 .fontColor($r('app.color.color_CCCCCC'))
198 - .onClick(() => { 219 + .onClick(async () => {
  220 + let retvalue = await FastClickUtil.isMinDelayTime()
  221 + if(retvalue){
  222 + return
  223 + }
199 this.handleAccention() 224 this.handleAccention()
200 }) 225 })
201 } 226 }
202 } 227 }
203 } 228 }
204 .width('100%') 229 .width('100%')
205 - .margin({ left: $r('app.float.margin_16')}) 230 + .margin({ left: $r('app.float.margin_16') })
  231 +
206 //内容 232 //内容
207 Text(StringUtils.isEmpty(this.contentDetailData.newsContent) 233 Text(StringUtils.isEmpty(this.contentDetailData.newsContent)
208 - ?StringUtils.isEmpty(this.contentDetailData.newsSummary)  
209 - ?this.contentDetailData.newsTitle  
210 - :this.contentDetailData.newsSummary  
211 - :this.contentDetailData.newsContent) 234 + ? StringUtils.isEmpty(this.contentDetailData.newsSummary)
  235 + ? this.contentDetailData.newsTitle
  236 + : this.contentDetailData.newsSummary
  237 + : this.contentDetailData.newsContent)
212 .fontColor($r('app.color.color_222222')) 238 .fontColor($r('app.color.color_222222'))
213 .fontSize($r('app.float.font_size_18')) 239 .fontSize($r('app.float.font_size_18'))
214 .lineHeight($r('app.float.margin_25')) 240 .lineHeight($r('app.float.margin_25'))
215 - .margin({ top: $r('app.float.margin_6')  
216 - ,left: $r('app.float.margin_16')  
217 - ,right: $r('app.float.margin_16') }) 241 + .margin({
  242 + top: $r('app.float.margin_6')
  243 + , left: $r('app.float.margin_16')
  244 + , right: $r('app.float.margin_16')
  245 + })
218 .alignSelf(ItemAlign.Start) 246 .alignSelf(ItemAlign.Start)
219 - if(this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN){ 247 + if (this.contentDetailData.newsType + "" == ContentConstants.TYPE_FOURTEEN) {
220 //附件内容:图片/视频 248 //附件内容:图片/视频
221 - if(this.contentDetailData.photoList!= null && this.contentDetailData.photoList.length>0){ 249 + if (this.contentDetailData.photoList != null && this.contentDetailData.photoList.length > 0) {
222 // 图片-从无图到9图展示 250 // 图片-从无图到9图展示
223 GridRow({ 251 GridRow({
224 gutter: { x: 2, y: 2 } 252 gutter: { x: 2, y: 2 }
@@ -228,7 +256,7 @@ export struct DynamicDetailComponent { @@ -228,7 +256,7 @@ export struct DynamicDetailComponent {
228 if (this.getPicType(item) !== 3) { 256 if (this.getPicType(item) !== 3) {
229 GridCol({ 257 GridCol({
230 span: this.getPicType(item) === 1 ? 12 : 8 258 span: this.getPicType(item) === 1 ? 12 : 8
231 - }){ 259 + }) {
232 Stack({ 260 Stack({
233 alignContent: Alignment.BottomEnd 261 alignContent: Alignment.BottomEnd
234 }) { 262 }) {
@@ -249,7 +277,7 @@ export struct DynamicDetailComponent { @@ -249,7 +277,7 @@ export struct DynamicDetailComponent {
249 Image($r('app.media.icon_long_pic')) 277 Image($r('app.media.icon_long_pic'))
250 .width(14) 278 .width(14)
251 .height(14) 279 .height(14)
252 - .margin({right: 4}) 280 + .margin({ right: 4 })
253 Text('长图') 281 Text('长图')
254 .fontSize(12) 282 .fontSize(12)
255 .fontWeight(400) 283 .fontWeight(400)
@@ -257,12 +285,16 @@ export struct DynamicDetailComponent { @@ -257,12 +285,16 @@ export struct DynamicDetailComponent {
257 .fontFamily('PingFang SC') 285 .fontFamily('PingFang SC')
258 } 286 }
259 .width(48) 287 .width(48)
260 - .padding({bottom: 9}) 288 + .padding({ bottom: 9 })
261 289
262 } 290 }
263 } 291 }
264 - .onClick((event: ClickEvent) => {  
265 - ProcessUtils.gotoMultiPictureListPage(this.contentDetailData.photoList,index) 292 + .onClick(async (event: ClickEvent) => {
  293 + let retvalue = await FastClickUtil.isMinDelayTime()
  294 + if(retvalue){
  295 + return
  296 + }
  297 + ProcessUtils.gotoMultiPictureListPage(this.contentDetailData.photoList, index)
266 }) 298 })
267 } else { 299 } else {
268 GridCol({ 300 GridCol({
@@ -278,8 +310,12 @@ export struct DynamicDetailComponent { @@ -278,8 +310,12 @@ export struct DynamicDetailComponent {
278 item.height = callback?.height || 0; 310 item.height = callback?.height || 0;
279 }) 311 })
280 } 312 }
281 - .onClick((event: ClickEvent) => {  
282 - ProcessUtils.gotoMultiPictureListPage(this.contentDetailData.photoList,index) 313 + .onClick(async (event: ClickEvent) => {
  314 + let retvalue = await FastClickUtil.isMinDelayTime()
  315 + if(retvalue){
  316 + return
  317 + }
  318 + ProcessUtils.gotoMultiPictureListPage(this.contentDetailData.photoList, index)
283 }) 319 })
284 } 320 }
285 } else if (this.contentDetailData.photoList.length === 4) { 321 } else if (this.contentDetailData.photoList.length === 4) {
@@ -290,8 +326,12 @@ export struct DynamicDetailComponent { @@ -290,8 +326,12 @@ export struct DynamicDetailComponent {
290 .aspectRatio(1) 326 .aspectRatio(1)
291 .borderRadius(this.caclImageRadius(index)) 327 .borderRadius(this.caclImageRadius(index))
292 } 328 }
293 - .onClick((event: ClickEvent) => {  
294 - ProcessUtils.gotoMultiPictureListPage(this.contentDetailData.photoList,index) 329 + .onClick(async (event: ClickEvent) => {
  330 + let retvalue = await FastClickUtil.isMinDelayTime()
  331 + if(retvalue){
  332 + return
  333 + }
  334 + ProcessUtils.gotoMultiPictureListPage(this.contentDetailData.photoList, index)
295 }) 335 })
296 } else { 336 } else {
297 GridCol({ 337 GridCol({
@@ -301,16 +341,24 @@ export struct DynamicDetailComponent { @@ -301,16 +341,24 @@ export struct DynamicDetailComponent {
301 .aspectRatio(1) 341 .aspectRatio(1)
302 .borderRadius(this.caclImageRadius(index)) 342 .borderRadius(this.caclImageRadius(index))
303 } 343 }
304 - .onClick((event: ClickEvent) => {  
305 - ProcessUtils.gotoMultiPictureListPage(this.contentDetailData.photoList,index) 344 + .onClick(async (event: ClickEvent) => {
  345 + let retvalue = await FastClickUtil.isMinDelayTime()
  346 + if(retvalue){
  347 + return
  348 + }
  349 + ProcessUtils.gotoMultiPictureListPage(this.contentDetailData.photoList, index)
306 }) 350 })
307 } 351 }
308 }) 352 })
309 } 353 }
310 - .margin({ left: $r('app.float.margin_16'),right: $r('app.float.margin_16'),top: $r('app.float.margin_8')}) 354 + .margin({
  355 + left: $r('app.float.margin_16'),
  356 + right: $r('app.float.margin_16'),
  357 + top: $r('app.float.margin_8')
  358 + })
311 } 359 }
312 - }else{  
313 - if(this.contentDetailData.videoInfo!= null && this.contentDetailData.videoInfo.length>0){ 360 + } else {
  361 + if (this.contentDetailData.videoInfo != null && this.contentDetailData.videoInfo.length > 0) {
314 GridRow() { 362 GridRow() {
315 if (this.contentDetailData.videoInfo[0].videoLandScape === 1) { 363 if (this.contentDetailData.videoInfo[0].videoLandScape === 1) {
316 // 横屏 364 // 横屏
@@ -318,11 +366,13 @@ export struct DynamicDetailComponent { @@ -318,11 +366,13 @@ export struct DynamicDetailComponent {
318 span: { xs: 12 } 366 span: { xs: 12 }
319 }) { 367 }) {
320 Stack() { 368 Stack() {
321 - Image(this.contentDetailData.fullColumnImgUrls!= null && this.contentDetailData.fullColumnImgUrls.length>0&&!StringUtils.isEmpty(this.contentDetailData.fullColumnImgUrls[0].url)?  
322 - this.contentDetailData.fullColumnImgUrls[0].url: 369 + Image(this.contentDetailData.fullColumnImgUrls != null &&
  370 + this.contentDetailData.fullColumnImgUrls.length > 0 &&
  371 + !StringUtils.isEmpty(this.contentDetailData.fullColumnImgUrls[0].url) ?
  372 + this.contentDetailData.fullColumnImgUrls[0].url :
323 this.contentDetailData.videoInfo[0].firstFrameImageUri) 373 this.contentDetailData.videoInfo[0].firstFrameImageUri)
324 - .width(DisplayUtils.getDeviceWidth()- 32)  
325 - .height((DisplayUtils.getDeviceWidth()-32)* 9 / 16) 374 + .width(DisplayUtils.getDeviceWidth() - 32)
  375 + .height((DisplayUtils.getDeviceWidth() - 32) * 9 / 16)
326 .borderRadius($r('app.float.image_border_radius')) 376 .borderRadius($r('app.float.image_border_radius'))
327 CardMediaInfo({ contentDTO: this.mJumpInfo }) 377 CardMediaInfo({ contentDTO: this.mJumpInfo })
328 } 378 }
@@ -334,11 +384,13 @@ export struct DynamicDetailComponent { @@ -334,11 +384,13 @@ export struct DynamicDetailComponent {
334 span: { xs: 6 } 384 span: { xs: 6 }
335 }) { 385 }) {
336 Stack() { 386 Stack() {
337 - Image(this.contentDetailData.fullColumnImgUrls!= null && this.contentDetailData.fullColumnImgUrls.length>0&&!StringUtils.isEmpty(this.contentDetailData.fullColumnImgUrls[0].url)?  
338 - this.contentDetailData.fullColumnImgUrls[0].url: 387 + Image(this.contentDetailData.fullColumnImgUrls != null &&
  388 + this.contentDetailData.fullColumnImgUrls.length > 0 &&
  389 + !StringUtils.isEmpty(this.contentDetailData.fullColumnImgUrls[0].url) ?
  390 + this.contentDetailData.fullColumnImgUrls[0].url :
339 this.contentDetailData.videoInfo[0].firstFrameImageUri) 391 this.contentDetailData.videoInfo[0].firstFrameImageUri)
340 - .width(DisplayUtils.getDeviceWidth()/2)  
341 - .height(DisplayUtils.getDeviceWidth()/2* 4 / 3) 392 + .width(DisplayUtils.getDeviceWidth() / 2)
  393 + .height(DisplayUtils.getDeviceWidth() / 2 * 4 / 3)
342 .borderRadius($r('app.float.image_border_radius')) 394 .borderRadius($r('app.float.image_border_radius'))
343 CardMediaInfo({ contentDTO: this.mJumpInfo }) 395 CardMediaInfo({ contentDTO: this.mJumpInfo })
344 } 396 }
@@ -346,8 +398,15 @@ export struct DynamicDetailComponent { @@ -346,8 +398,15 @@ export struct DynamicDetailComponent {
346 } 398 }
347 } 399 }
348 } 400 }
349 - .padding({ left: this.contentDetailData.videoInfo[0].videoLandScape === 1?0: 25,top: $r('app.float.margin_8')})  
350 - .onClick((event: ClickEvent) => { 401 + .padding({
  402 + left: this.contentDetailData.videoInfo[0].videoLandScape === 1 ? 0 : 25,
  403 + top: $r('app.float.margin_8')
  404 + })
  405 + .onClick(async (event: ClickEvent) => {
  406 + let retvalue = await FastClickUtil.isMinDelayTime()
  407 + if(retvalue){
  408 + return
  409 + }
351 ProcessUtils.processPage(this.mJumpInfo) 410 ProcessUtils.processPage(this.mJumpInfo)
352 }) 411 })
353 } 412 }
@@ -357,9 +416,11 @@ export struct DynamicDetailComponent { @@ -357,9 +416,11 @@ export struct DynamicDetailComponent {
357 .fontColor($r('app.color.color_CCCCCC')) 416 .fontColor($r('app.color.color_CCCCCC'))
358 .fontSize($r('app.float.font_size_12')) 417 .fontSize($r('app.float.font_size_12'))
359 .lineHeight($r('app.float.margin_16')) 418 .lineHeight($r('app.float.margin_16'))
360 - .margin({ top: $r('app.float.margin_16')  
361 - ,left: $r('app.float.vp_12')  
362 - ,right: $r('app.float.vp_12') }) 419 + .margin({
  420 + top: $r('app.float.margin_16')
  421 + , left: $r('app.float.vp_12')
  422 + , right: $r('app.float.vp_12')
  423 + })
363 //微信/朋友圈/微博 424 //微信/朋友圈/微博
364 // Row(){ 425 // Row(){
365 // Image($r('app.media.xxhdpi_pic_wechat')) 426 // Image($r('app.media.xxhdpi_pic_wechat'))
@@ -379,37 +440,42 @@ export struct DynamicDetailComponent { @@ -379,37 +440,42 @@ export struct DynamicDetailComponent {
379 // } 440 // }
380 // .margin({ top: $r('app.float.margin_24')}) 441 // .margin({ top: $r('app.float.margin_24')})
381 //点赞 442 //点赞
382 - Row(){ 443 + Row() {
383 Blank().layoutWeight(1) 444 Blank().layoutWeight(1)
384 - Image(this.newsStatusOfUser?.likeStatus == '1'? 445 + Image(this.newsStatusOfUser?.likeStatus == '1' ?
385 $r('app.media.icon_like_selected_redheart') 446 $r('app.media.icon_like_selected_redheart')
386 - :$r('app.media.icon_like_unselect_grey_redheart')) 447 + : $r('app.media.icon_like_unselect_grey_redheart'))
387 .width($r('app.float.margin_36')) 448 .width($r('app.float.margin_36'))
388 .height($r('app.float.margin_36')) 449 .height($r('app.float.margin_36'))
389 .objectFit(ImageFit.Cover) 450 .objectFit(ImageFit.Cover)
390 - .margin({ left: $r('app.float.margin_6_negative'),right: $r('app.float.margin_6_negative')})  
391 - if(this.interactDataDTO?.likeNum != 0){ 451 + .margin({ left: $r('app.float.margin_6_negative'), right: $r('app.float.margin_6_negative') })
  452 + if (this.interactDataDTO?.likeNum != 0) {
392 Text(NumberFormatterUtils.formatNumberWithWan(this.interactDataDTO?.likeNum)) 453 Text(NumberFormatterUtils.formatNumberWithWan(this.interactDataDTO?.likeNum))
393 .fontColor($r('app.color.color_999999')) 454 .fontColor($r('app.color.color_999999'))
394 .fontSize($r('app.float.font_size_16')) 455 .fontSize($r('app.float.font_size_16'))
395 .lineHeight($r('app.float.margin_20')) 456 .lineHeight($r('app.float.margin_20'))
396 - .margin({ left: $r('app.float.margin_2')}) 457 + .margin({ left: $r('app.float.margin_2') })
397 } 458 }
398 Blank().layoutWeight(1) 459 Blank().layoutWeight(1)
399 } 460 }
400 .width($r('app.float.margin_154')) 461 .width($r('app.float.margin_154'))
401 .height($r('app.float.margin_40')) 462 .height($r('app.float.margin_40'))
402 - .margin({top:$r('app.float.margin_16')}) 463 + .margin({ top: $r('app.float.margin_16') })
403 .borderWidth($r('app.float.margin_1')) 464 .borderWidth($r('app.float.margin_1'))
404 .borderColor($r('app.color.color_EDEDED')) 465 .borderColor($r('app.color.color_EDEDED'))
405 .borderRadius($r('app.float.margin_20')) 466 .borderRadius($r('app.float.margin_20'))
406 - .onClick((event: ClickEvent) => { 467 + .onClick(async (event: ClickEvent) => {
  468 + let retvalue = await FastClickUtil.isMinDelayTime()
  469 + if(retvalue){
  470 + return
  471 + }
407 //点赞操作 472 //点赞操作
408 this.toggleLikeStatus() 473 this.toggleLikeStatus()
409 }) 474 })
  475 +
410 // 评论 476 // 评论
411 if (this.contentDetailData?.openComment) { 477 if (this.contentDetailData?.openComment) {
412 - Divider().strokeWidth(6).color('#f5f5f5').margin({top:$r('app.float.margin_24')}) 478 + Divider().strokeWidth(6).color('#f5f5f5').margin({ top: $r('app.float.margin_24') })
413 CommentComponent({ 479 CommentComponent({
414 publishCommentModel: { 480 publishCommentModel: {
415 targetId: String(this.contentDetailData?.newsId || ''), 481 targetId: String(this.contentDetailData?.newsId || ''),
@@ -447,11 +513,19 @@ export struct DynamicDetailComponent { @@ -447,11 +513,19 @@ export struct DynamicDetailComponent {
447 .width('100%') 513 .width('100%')
448 .height('100%') 514 .height('100%')
449 } 515 }
  516 +
450 /** 517 /**
451 * 请求(动态)详情页数据 518 * 请求(动态)详情页数据
452 * */ 519 * */
453 private async getContentDetailData() { 520 private async getContentDetailData() {
454 this.isNetConnected = NetworkUtil.isNetConnected() 521 this.isNetConnected = NetworkUtil.isNetConnected()
  522 + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
  523 + this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
  524 + this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
  525 + this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
  526 + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
  527 + this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
  528 + this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
455 try { 529 try {
456 let data = await MultiPictureDetailViewModel.getDetailData(this.relId, this.contentId, this.relType) 530 let data = await MultiPictureDetailViewModel.getDetailData(this.relId, this.contentId, this.relType)
457 this.isPageEnd = true; 531 this.isPageEnd = true;
@@ -460,9 +534,9 @@ export struct DynamicDetailComponent { @@ -460,9 +534,9 @@ export struct DynamicDetailComponent {
460 DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN); 534 DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN);
461 let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN) 535 let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN)
462 this.publishTime = DateTimeUtils.removeTrailingZeros(_publishTime) 536 this.publishTime = DateTimeUtils.removeTrailingZeros(_publishTime)
463 - console.log('动态详情',JSON.stringify(this.contentDetailData)) 537 + console.log('动态详情', JSON.stringify(this.contentDetailData))
464 } catch (exception) { 538 } catch (exception) {
465 - console.log('请求失败',JSON.stringify(exception)) 539 + console.log('请求失败', JSON.stringify(exception))
466 this.isPageEnd = true; 540 this.isPageEnd = true;
467 } 541 }
468 this.getBatchAttentionStatus() 542 this.getBatchAttentionStatus()
@@ -471,10 +545,11 @@ export struct DynamicDetailComponent { @@ -471,10 +545,11 @@ export struct DynamicDetailComponent {
471 this.interactDataV2() 545 this.interactDataV2()
472 } 546 }
473 547
474 -  
475 private async interactDataV2() { 548 private async interactDataV2() {
476 this.interactDataDTO = await MultiPictureDetailViewModel.interactDataV2( 549 this.interactDataDTO = await MultiPictureDetailViewModel.interactDataV2(
477 - this.contentDetailData?.newsId+'',this.contentDetailData?.newsType+'',this.contentDetailData.reLInfo == null ?'':this.contentDetailData.reLInfo?.relId,this.contentDetailData.rmhPlatform) 550 + this.contentDetailData?.newsId + '', this.contentDetailData?.newsType + '',
  551 + this.contentDetailData.reLInfo == null ? '' : this.contentDetailData.reLInfo?.relId,
  552 + this.contentDetailData.rmhPlatform)
478 } 553 }
479 554
480 // 已登录->查询用户对作品点赞、收藏状态 555 // 已登录->查询用户对作品点赞、收藏状态
@@ -526,18 +601,19 @@ export struct DynamicDetailComponent { @@ -526,18 +601,19 @@ export struct DynamicDetailComponent {
526 } 601 }
527 602
528 //创建跳转信息 603 //创建跳转信息
529 - makeJumpInfo(){ 604 + makeJumpInfo() {
530 this.mJumpInfo.pageId = 'dynamicDetailPage' 605 this.mJumpInfo.pageId = 'dynamicDetailPage'
531 - this.mJumpInfo.objectId = this.contentDetailData.newsId+""  
532 - this.mJumpInfo.relType = this.contentDetailData.reLInfo?.relType+""  
533 - this.mJumpInfo.relId = this.contentDetailData.reLInfo?.relId+""  
534 - this.mJumpInfo.objectType = (this.contentDetailData.newsType+"") == ContentConstants.TYPE_FOURTEEN?this.contentDetailData.newsType+"":ContentConstants.TYPE_VOD  
535 - if(this.contentDetailData.videoInfo!= null && this.contentDetailData.videoInfo.length>0){ 606 + this.mJumpInfo.objectId = this.contentDetailData.newsId + ""
  607 + this.mJumpInfo.relType = this.contentDetailData.reLInfo?.relType + ""
  608 + this.mJumpInfo.relId = this.contentDetailData.reLInfo?.relId + ""
  609 + this.mJumpInfo.objectType =
  610 + (this.contentDetailData.newsType + "") == ContentConstants.TYPE_FOURTEEN ? this.contentDetailData.newsType + "" :
  611 + ContentConstants.TYPE_VOD
  612 + if (this.contentDetailData.videoInfo != null && this.contentDetailData.videoInfo.length > 0) {
536 this.mJumpInfo.videoInfo = this.contentDetailData.videoInfo[0] 613 this.mJumpInfo.videoInfo = this.contentDetailData.videoInfo[0]
537 } 614 }
538 } 615 }
539 616
540 -  
541 caclImageRadius(index: number) { 617 caclImageRadius(index: number) {
542 let radius: radiusType = { 618 let radius: radiusType = {
543 topLeft: index === 0 ? $r('app.float.image_border_radius') : 0, 619 topLeft: index === 0 ? $r('app.float.image_border_radius') : 0,
@@ -561,11 +637,11 @@ export struct DynamicDetailComponent { @@ -561,11 +637,11 @@ export struct DynamicDetailComponent {
561 return radius 637 return radius
562 } 638 }
563 639
564 - getPicType(item: PhotoListBean){ 640 + getPicType(item: PhotoListBean) {
565 if (item.width && item.width) { 641 if (item.width && item.width) {
566 - if (item.width / item.height > 343/172) { 642 + if (item.width / item.height > 343 / 172) {
567 return 1; //横长图 643 return 1; //横长图
568 - } else if (item.height / item.width > 305/228) { 644 + } else if (item.height / item.width > 305 / 228) {
569 return 2; //竖长图 645 return 2; //竖长图
570 } else { 646 } else {
571 return 3 647 return 3
@@ -590,7 +666,7 @@ export struct DynamicDetailComponent { @@ -590,7 +666,7 @@ export struct DynamicDetailComponent {
590 attentionUserType: this.contentDetailData?.rmhInfo?.userType || '', //被关注用户类型(1 普通用户 2 视频号 3 矩阵号) 666 attentionUserType: this.contentDetailData?.rmhInfo?.userType || '', //被关注用户类型(1 普通用户 2 视频号 3 矩阵号)
591 attentionUserId: this.contentDetailData?.rmhInfo?.userId || '', // 被关注用户号主id 667 attentionUserId: this.contentDetailData?.rmhInfo?.userId || '', // 被关注用户号主id
592 attentionCreatorId: this.contentDetailData?.rmhInfo?.rmhId || '', // 被关注用户号主id 668 attentionCreatorId: this.contentDetailData?.rmhInfo?.rmhId || '', // 被关注用户号主id
593 - status: this.followStatus == '0'? 1:0, 669 + status: this.followStatus == '0' ? 1 : 0,
594 } 670 }
595 ContentDetailRequest.postInteractAccentionOperate(params2).then(res => { 671 ContentDetailRequest.postInteractAccentionOperate(params2).then(res => {
596 console.log('关注号主==', JSON.stringify(res.data)) 672 console.log('关注号主==', JSON.stringify(res.data))
@@ -9,7 +9,7 @@ import font from '@ohos.font'; @@ -9,7 +9,7 @@ import font from '@ohos.font';
9 import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog'; 9 import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog';
10 import { RMCalendarBean } from './calendar/RMCalendarBean'; 10 import { RMCalendarBean } from './calendar/RMCalendarBean';
11 import { newsSkeleton } from './skeleton/newsSkeleton'; 11 import { newsSkeleton } from './skeleton/newsSkeleton';
12 -import { Logger, ToastUtils } from 'wdKit/Index'; 12 +import { Logger, ToastUtils, NetworkUtil } from 'wdKit/Index';
13 13
14 @Component 14 @Component
15 export struct ENewspaperPageComponent { 15 export struct ENewspaperPageComponent {
@@ -82,6 +82,12 @@ export struct ENewspaperPageComponent { @@ -82,6 +82,12 @@ export struct ENewspaperPageComponent {
82 this.screenWidth = this.displayTool.width 82 this.screenWidth = this.displayTool.width
83 this.picWidth = this.screenWidth - vp2px(52) 83 this.picWidth = this.screenWidth - vp2px(52)
84 this.picHeight = this.picWidth * 566 / 378 84 this.picHeight = this.picWidth * 566 / 378
  85 + // 默认日期
  86 + const date = new Date()
  87 + const month = date.getMonth() + 1
  88 + const day = date.getDate()
  89 + this.calendarDate =
  90 + `${date.getFullYear()}-${month > 9 ? month : '0' + month}-${day > 9 ? day : '0' + day}`
85 //注册字体 91 //注册字体
86 font.registerFont({ 92 font.registerFont({
87 familyName: 'BebasNeueBold', 93 familyName: 'BebasNeueBold',
@@ -142,7 +148,7 @@ export struct ENewspaperPageComponent { @@ -142,7 +148,7 @@ export struct ENewspaperPageComponent {
142 this.calendarDialogController.close() 148 this.calendarDialogController.close()
143 } 149 }
144 }) 150 })
145 - 151 + if (this.newspaperListBean && this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
146 Image($r('app.media.icon_share')) 152 Image($r('app.media.icon_share'))
147 .height($r('app.float.top_arrow_size')) 153 .height($r('app.float.top_arrow_size'))
148 .width($r('app.float.top_arrow_size')) 154 .width($r('app.float.top_arrow_size'))
@@ -155,6 +161,7 @@ export struct ENewspaperPageComponent { @@ -155,6 +161,7 @@ export struct ENewspaperPageComponent {
155 ToastUtils.showToast('分享为公共方法,待开发', 1000); 161 ToastUtils.showToast('分享为公共方法,待开发', 1000);
156 }) 162 })
157 } 163 }
  164 + }
158 .margin({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') }) 165 .margin({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') })
159 .height($r('app.float.top_bar_height')) 166 .height($r('app.float.top_bar_height'))
160 .alignRules({ 167 .alignRules({
@@ -260,12 +267,16 @@ export struct ENewspaperPageComponent { @@ -260,12 +267,16 @@ export struct ENewspaperPageComponent {
260 }) 267 })
261 .id('e_newspaper_page_num') 268 .id('e_newspaper_page_num')
262 .onClick((event: ClickEvent) => { 269 .onClick((event: ClickEvent) => {
  270 + if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
263 this.pageDialogShow = !this.pageDialogShow 271 this.pageDialogShow = !this.pageDialogShow
264 if (this.pageDialogShow) { 272 if (this.pageDialogShow) {
265 this.pageDialogController.open() 273 this.pageDialogController.open()
266 } else { 274 } else {
267 this.pageDialogController.close() 275 this.pageDialogController.close()
268 } 276 }
  277 + }else {
  278 + ToastUtils.showToast('暂无数据', 1000)
  279 + }
269 }) 280 })
270 281
271 // .bindPopup(this.pageNumPopup, { 282 // .bindPopup(this.pageNumPopup, {
@@ -291,12 +302,17 @@ export struct ENewspaperPageComponent { @@ -291,12 +302,17 @@ export struct ENewspaperPageComponent {
291 }) 302 })
292 .id('e_newspaper_read') 303 .id('e_newspaper_read')
293 .onClick((event: ClickEvent) => { 304 .onClick((event: ClickEvent) => {
  305 + if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
294 this.isOpenListDialog = true 306 this.isOpenListDialog = true
  307 + }else {
  308 + ToastUtils.showToast('暂无数据', 1000)
  309 + }
295 }) 310 })
296 } 311 }
297 .width('100%') 312 .width('100%')
298 .height('100%') 313 .height('100%')
299 .backgroundColor($r('app.color.color_80000000')) 314 .backgroundColor($r('app.color.color_80000000'))
  315 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
300 .id('e_newspaper_container') 316 .id('e_newspaper_container')
301 317
302 if (this.isOpenListDialog) { 318 if (this.isOpenListDialog) {
@@ -322,8 +338,12 @@ export struct ENewspaperPageComponent { @@ -322,8 +338,12 @@ export struct ENewspaperPageComponent {
322 338
323 private async getNewspaperList() { 339 private async getNewspaperList() {
324 try { 340 try {
  341 + if (NetworkUtil.isNetConnected()) {
325 let listBean = await NewspaperViewModel.getNewspaperList(this.calendarDate, this.picWidth + 'x' + this.picHeight) 342 let listBean = await NewspaperViewModel.getNewspaperList(this.calendarDate, this.picWidth + 'x' + this.picHeight)
326 this.newspaperListBean = listBean; 343 this.newspaperListBean = listBean;
  344 + } else {
  345 + ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
  346 + }
327 } catch (exception) { 347 } catch (exception) {
328 348
329 } 349 }
  1 +import { FeedbackTypeBean } from 'wdBean/Index';
  2 +import { NetworkUtil } from 'wdKit/Index';
  3 +import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel';
  4 +import { CustomTitleUI } from './reusable/CustomTitleUI'
  5 +import { ArrayList } from '@kit.ArkTS';
  6 +
  7 +const TAG = 'FeedBackActivity'
  8 +// 意见反馈页面
  9 +@Entry
  10 +@Component
  11 +export struct FeedBackActivity {
  12 + //UI
  13 + scroller: Scroller = new Scroller();
  14 +
  15 + @State isNetConnected: boolean = true
  16 +
  17 + @State feedbackTypeBeans: FeedbackTypeBean[] = [] as FeedbackTypeBean[]
  18 +
  19 + async aboutToAppear() {
  20 + await this.getContentDetailData()
  21 + }
  22 +
  23 + build() {
  24 + Column() {
  25 + //标题栏目
  26 + CustomTitleUI({ titleName: "意见反馈" })
  27 + Stack({ alignContent: Alignment.Bottom }) {
  28 + Scroll(this.scroller) {
  29 + Column() {
  30 + Text('请选择问题类型')
  31 + .fontColor($r('app.color.color_222222'))
  32 + .fontSize($r('app.float.font_size_16'))
  33 + .fontWeight(FontWeight.Bold)
  34 + .margin({ left: $r('app.float.vp_15'), top: $r('app.float.vp_14') })
  35 + GridRow({
  36 + gutter: { x: 2, y: 2 }
  37 + }) {
  38 + ForEach(this.feedbackTypeBeans, (item: FeedbackTypeBean, index: number) => {
  39 + GridCol({
  40 + span: 12
  41 + }) {
  42 + Row(){
  43 + Toggle({ type: ToggleType.Checkbox, isOn: false })
  44 + Text(item.classifyName)
  45 + .fontColor($r('app.color.color_222222'))
  46 + .fontSize($r('app.float.font_size_14'))
  47 + .fontWeight(FontWeight.Bold)
  48 + .margin({ left: $r('app.float.vp_4') })
  49 + }
  50 + .width(115)
  51 + .height(22)
  52 + .backgroundColor($r('app.color.color_fff'))
  53 + }
  54 + })
  55 + }
  56 +
  57 + Blank()
  58 + .height(0.5)
  59 + .margin({ left: $r('app.float.vp_16'), top: $r('app.float.vp_12'), right: $r('app.float.vp_16') })
  60 + .backgroundColor($r('app.color.color_EDEDED'))
  61 + Text('描述您的问题')
  62 + .fontColor($r('app.color.color_222222'))
  63 + .fontSize($r('app.float.font_size_16'))
  64 + .fontWeight(FontWeight.Bold)
  65 + .margin({ left: $r('app.float.vp_16'), top: $r('app.float.vp_12') })
  66 + Stack() {
  67 + TextInput({ placeholder: '您的宝贵意见是我们前行的动力' })
  68 + GridRow({
  69 + gutter: { x: 2, y: 2 }
  70 + }) {
  71 + ForEach(this.feedbackTypeBeans, (item: FeedbackTypeBean, index: number) => {
  72 + GridCol({
  73 + span: 12
  74 + }) {
  75 + }
  76 + })
  77 + }
  78 +
  79 + Text('0/500')
  80 + }
  81 + .height(200)
  82 + .width('100%')
  83 + .margin({ left: $r('app.float.vp_16'), top: $r('app.float.vp_12'), right: $r('app.float.vp_16') })
  84 + .backgroundColor($r('app.color.color_F5F5F5'))
  85 + .borderRadius(4)
  86 +
  87 + Text('期待您留下联系方式,我们将提供更好的服务')
  88 + .fontColor($r('app.color.color_222222'))
  89 + .fontSize($r('app.float.font_size_14'))
  90 + .fontWeight(FontWeight.Bold)
  91 + .margin({ left: $r('app.float.vp_16'), top: $r('app.float.margin_24') })
  92 + Row() {
  93 + Text('电话或者邮箱')
  94 + .fontColor($r('app.color.color_222222'))
  95 + .fontSize($r('app.float.font_size_14'))
  96 + .fontWeight(FontWeight.Bold)
  97 + .margin({ left: $r('app.float.vp_12') })
  98 + TextInput({ placeholder: '请输入电话或者邮箱' })
  99 + }
  100 + .height(44)
  101 + .margin({ left: $r('app.float.vp_16'), right: $r('app.float.vp_12'), top: $r('app.float.margin_16') })
  102 + .backgroundColor($r('app.color.color_F5F5F5'))
  103 + .borderRadius(4)
  104 + }
  105 + }
  106 +
  107 + Text($r('app.string.submit'))
  108 + .height(44)
  109 + .fontColor($r('app.color.color_9E9E9E_40'))
  110 + .fontSize($r('app.float.font_size_18'))
  111 + .margin({ left: $r('app.float.vp_16'), right: $r('app.float.vp_16'), top: $r('app.float.vp_15') })
  112 + .backgroundColor($r('app.color.color_ED2800_99'))
  113 + .borderRadius(4)
  114 + }
  115 + }
  116 + }
  117 + /**
  118 + * 请求接口数据
  119 + * */
  120 + private async getContentDetailData() {
  121 + this.isNetConnected = NetworkUtil.isNetConnected()
  122 + try {
  123 + this.feedbackTypeBeans = await MultiPictureDetailViewModel.getFeedbackTypeList()
  124 +
  125 + } catch (exception) {
  126 + console.log('请求失败',JSON.stringify(exception))
  127 + }
  128 + }
  129 +}
@@ -40,7 +40,7 @@ const TAG: string = 'ImageAndTextPageComponent' @@ -40,7 +40,7 @@ const TAG: string = 'ImageAndTextPageComponent'
40 export struct ImageAndTextPageComponent { 40 export struct ImageAndTextPageComponent {
41 scroller: Scroller = new Scroller(); 41 scroller: Scroller = new Scroller();
42 action: Action = {} as Action 42 action: Action = {} as Action
43 - @State contentDetailData: ContentDetailDTO [] = [] as ContentDetailDTO [] 43 + @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
44 @State recommendList: ContentDTO[] = [] 44 @State recommendList: ContentDTO[] = []
45 @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态 45 @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
46 @State interactData: InteractDataDTO = {} as InteractDataDTO 46 @State interactData: InteractDataDTO = {} as InteractDataDTO
@@ -52,57 +52,35 @@ export struct ImageAndTextPageComponent { @@ -52,57 +52,35 @@ export struct ImageAndTextPageComponent {
52 @State isNetConnected: boolean = true 52 @State isNetConnected: boolean = true
53 @State info: Area | null = null 53 @State info: Area | null = null
54 @State likeNum: number = 0 54 @State likeNum: number = 0
55 - build() {  
56 - Column() {  
57 - // 发布时间  
58 - Row() {  
59 - Image(this.contentDetailData[0]?.rmhInfo ? $r('app.media.logo_rmh') : $r('app.media.logo_rmrb'))  
60 - .width(80)  
61 - .height(28)  
62 - Text(this.publishTime)  
63 - .fontColor($r('app.color.color_B0B0B0'))  
64 - .fontSize(13)  
65 - }  
66 - .width(CommonConstants.FULL_WIDTH)  
67 - .height(32)  
68 - .padding({ left: 15, right: 15, })  
69 - .justifyContent(FlexAlign.SpaceBetween)  
70 - .alignItems(VerticalAlign.Bottom)  
71 -  
72 - Row() {  
73 - Image($r('app.media.line'))  
74 - .width('100%')  
75 - .height(6)  
76 - .objectFit(ImageFit.Cover)  
77 - .margin({ top: 10 })  
78 - }  
79 - .padding({ left: 15, right: 15 })  
80 - .backgroundColor(Color.White) 55 + @State reachEndIncreament: number = 0
  56 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
81 57
  58 + build() {
  59 + Stack({ alignContent: Alignment.Top }) {
82 Stack({ alignContent: Alignment.Bottom }) { 60 Stack({ alignContent: Alignment.Bottom }) {
83 Scroll(this.scroller) { 61 Scroll(this.scroller) {
84 Column() { 62 Column() {
85 ImageAndTextWebComponent({ 63 ImageAndTextWebComponent({
86 - contentDetailData: this.contentDetailData, 64 + contentDetailData: [this.contentDetailData],
87 action: this.action, 65 action: this.action,
88 isPageEnd: $isPageEnd 66 isPageEnd: $isPageEnd
89 }) 67 })
90 - .padding({bottom:10}) 68 + .padding({ top: 15, bottom: 10 })
91 Column() { 69 Column() {
92 // 点赞 70 // 点赞
93 - if (this.contentDetailData[0]?.openLikes && this.contentDetailData[0]?.likesStyle !== 4) { 71 + if (this.contentDetailData?.openLikes && this.contentDetailData?.likesStyle !== 4) {
94 Row() { 72 Row() {
95 Row() { 73 Row() {
96 if (this.newsStatusOfUser?.likeStatus === '1') { 74 if (this.newsStatusOfUser?.likeStatus === '1') {
97 - Image(this.contentDetailData[0]?.likesStyle === 1 ? $r('app.media.ic_like_check') :  
98 - (this.contentDetailData[0]?.likesStyle === 2 ? $r('app.media.icon_prayer_active') : 75 + Image(this.contentDetailData?.likesStyle === 1 ? $r('app.media.ic_like_check') :
  76 + (this.contentDetailData?.likesStyle === 2 ? $r('app.media.icon_prayer_active') :
99 $r('app.media.icon_candle_active'))) 77 $r('app.media.icon_candle_active')))
100 .width(24) 78 .width(24)
101 .height(24) 79 .height(24)
102 .margin({ right: 5 }) 80 .margin({ right: 5 })
103 } else { 81 } else {
104 - Image(this.contentDetailData[0]?.likesStyle === 1 ? $r('app.media.icon_like') :  
105 - (this.contentDetailData[0]?.likesStyle === 2 ? $r('app.media.icon_prayer') : 82 + Image(this.contentDetailData?.likesStyle === 1 ? $r('app.media.icon_like') :
  83 + (this.contentDetailData?.likesStyle === 2 ? $r('app.media.icon_prayer') :
106 $r('app.media.icon_candle'))) 84 $r('app.media.icon_candle')))
107 .width(24) 85 .width(24)
108 .height(24) 86 .height(24)
@@ -129,7 +107,7 @@ export struct ImageAndTextPageComponent { @@ -129,7 +107,7 @@ export struct ImageAndTextPageComponent {
129 }) 107 })
130 108
131 }.width(CommonConstants.FULL_WIDTH) 109 }.width(CommonConstants.FULL_WIDTH)
132 - .padding({top:14,bottom:24}) 110 + .padding({ top: 14, bottom: 24 })
133 .justifyContent(FlexAlign.Center) 111 .justifyContent(FlexAlign.Center)
134 } 112 }
135 if (this.recommendList.length > 0) { 113 if (this.recommendList.length > 0) {
@@ -137,10 +115,15 @@ export struct ImageAndTextPageComponent { @@ -137,10 +115,15 @@ export struct ImageAndTextPageComponent {
137 RecommendList({ recommendList: this.recommendList }) 115 RecommendList({ recommendList: this.recommendList })
138 } 116 }
139 // 评论 117 // 评论
140 - if (this.contentDetailData[0]?.openComment) { 118 + if (this.contentDetailData?.openComment) {
141 Divider().strokeWidth(6).color('#f5f5f5') 119 Divider().strokeWidth(6).color('#f5f5f5')
142 CommentComponent({ 120 CommentComponent({
143 - publishCommentModel: this.publishCommentModel 121 + publishCommentModel: this.publishCommentModel,
  122 + fixedHeightMode: false,
  123 + reachEndIncreament: this.reachEndIncreament,
  124 + reachEndLoadMoreFinish: () => {
  125 +
  126 + }
144 }).onAreaChange((oldValue: Area, newValue: Area) => { 127 }).onAreaChange((oldValue: Area, newValue: Area) => {
145 this.info = newValue 128 this.info = newValue
146 }) 129 })
@@ -149,13 +132,14 @@ export struct ImageAndTextPageComponent { @@ -149,13 +132,14 @@ export struct ImageAndTextPageComponent {
149 } 132 }
150 } 133 }
151 } 134 }
152 -  
153 } 135 }
154 .width(CommonConstants.FULL_WIDTH) 136 .width(CommonConstants.FULL_WIDTH)
155 - // .height(CommonConstants.FULL_HEIGHT)  
156 - .padding({ bottom: 76 }) 137 + .height(CommonConstants.FULL_HEIGHT)
157 .scrollBar(BarState.Off) 138 .scrollBar(BarState.Off)
158 .align(Alignment.Top) 139 .align(Alignment.Top)
  140 + .onReachEnd(() => {
  141 + this.reachEndIncreament += 1
  142 + })
159 143
160 if (!this.isNetConnected) { 144 if (!this.isNetConnected) {
161 EmptyComponent({ 145 EmptyComponent({
@@ -167,24 +151,52 @@ export struct ImageAndTextPageComponent { @@ -167,24 +151,52 @@ export struct ImageAndTextPageComponent {
167 }).padding({ bottom: 200 }) 151 }).padding({ bottom: 200 })
168 } else { 152 } else {
169 if (!this.isPageEnd) { 153 if (!this.isPageEnd) {
170 - detailedSkeleton() 154 + detailedSkeleton().padding({ bottom: this.bottomSafeHeight })
171 } 155 }
172 } 156 }
173 - //底部交互区  
174 - if (this.operationButtonList.length) { 157 + // 底部交互区
175 OperRowListView({ 158 OperRowListView({
176 - contentDetailData: this.contentDetailData[0], 159 + contentDetailData: this.contentDetailData,
177 publishCommentModel: this.publishCommentModel, 160 publishCommentModel: this.publishCommentModel,
178 operationButtonList: this.operationButtonList, 161 operationButtonList: this.operationButtonList,
179 styleType: 1, 162 styleType: 1,
180 }) 163 })
181 } 164 }
  165 + .width(CommonConstants.FULL_WIDTH)
  166 + .height(CommonConstants.FULL_HEIGHT)
  167 + .padding({ top: 38 })
  168 +
  169 + // 发布时间
  170 + Column() {
  171 + Row() {
  172 + Image(this.contentDetailData?.rmhInfo ? $r('app.media.logo_rmh') : $r('app.media.logo_rmrb'))
  173 + .width(80)
  174 + .height(28)
  175 + Text(this.publishTime)
  176 + .fontColor($r('app.color.color_B0B0B0'))
  177 + .fontSize(13)
182 } 178 }
  179 + .width(CommonConstants.FULL_WIDTH)
  180 + .height(32)
  181 + .padding({ left: 15, right: 15, })
  182 + .justifyContent(FlexAlign.SpaceBetween)
  183 + .alignItems(VerticalAlign.Bottom)
183 184
  185 + Row() {
  186 + Image($r('app.media.line'))
  187 + .width('100%')
  188 + .height(6)
  189 + .objectFit(ImageFit.Cover)
  190 + .margin({ top: 10 })
  191 + }
  192 + .padding({ left: 15, right: 15 })
  193 + .backgroundColor(Color.White)
  194 + }.backgroundColor(Color.White)
184 } 195 }
185 .width(CommonConstants.FULL_WIDTH) 196 .width(CommonConstants.FULL_WIDTH)
186 .height(CommonConstants.FULL_HEIGHT) 197 .height(CommonConstants.FULL_HEIGHT)
187 .backgroundColor(Color.White) 198 .backgroundColor(Color.White)
  199 +
188 } 200 }
189 201
190 private async getDetail() { 202 private async getDetail() {
@@ -207,29 +219,30 @@ export struct ImageAndTextPageComponent { @@ -207,29 +219,30 @@ export struct ImageAndTextPageComponent {
207 } 219 }
208 let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) 220 let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)
209 if (detailBeans && detailBeans.length > 0) { 221 if (detailBeans && detailBeans.length > 0) {
210 - this.contentDetailData = detailBeans; 222 + this.contentDetailData = detailBeans[0];
211 let dateTime = 223 let dateTime =
212 - DateTimeUtils.parseDate(this.contentDetailData[0]?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN); 224 + DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN);
213 let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN) 225 let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN)
214 this.publishTime = DateTimeUtils.removeTrailingZeros(_publishTime) 226 this.publishTime = DateTimeUtils.removeTrailingZeros(_publishTime)
215 - if (this.contentDetailData[0]?.recommendShow === 1) { 227 + if (this.contentDetailData?.recommendShow === 1) {
216 this.getRecommend() 228 this.getRecommend()
217 } 229 }
218 - if (this.contentDetailData[0]?.openLikes === 1) { 230 + if (this.contentDetailData?.openLikes === 1) {
219 this.getInteractDataStatus() 231 this.getInteractDataStatus()
220 this.queryContentInteractCount() 232 this.queryContentInteractCount()
221 } 233 }
222 - if (this.contentDetailData[0]?.openComment) {  
223 - this.publishCommentModel.targetId = String(this.contentDetailData[0]?.newsId || '')  
224 - this.publishCommentModel.targetRelId = String(this.contentDetailData[0]?.reLInfo?.relId)  
225 - this.publishCommentModel.targetTitle = this.contentDetailData[0]?.newsTitle  
226 - this.publishCommentModel.targetRelType = String(this.contentDetailData[0]?.reLInfo?.relType)  
227 - this.publishCommentModel.targetRelObjectId = String(this.contentDetailData[0]?.reLInfo?.relObjectId)  
228 - this.publishCommentModel.keyArticle = String(this.contentDetailData[0]?.keyArticle)  
229 - this.publishCommentModel.targetType = String(this.contentDetailData[0]?.newsType)  
230 - }  
231 - if (this.contentDetailData[0]?.openAudio && this.contentDetailData[0]?.audioList?.length &&  
232 - this.contentDetailData[0]?.audioList[0].audioUrl) { 234 + if (this.contentDetailData?.openComment) {
  235 + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
  236 + this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
  237 + this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
  238 + this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
  239 + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
  240 + this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
  241 + this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
  242 + this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
  243 + }
  244 + if (this.contentDetailData?.openAudio && this.contentDetailData?.audioList?.length &&
  245 + this.contentDetailData?.audioList[0].audioUrl) {
233 this.operationButtonList = ['comment', 'collect', 'listen', 'share'] 246 this.operationButtonList = ['comment', 'collect', 'listen', 'share']
234 } else { 247 } else {
235 this.operationButtonList = ['comment', 'collect', 'share'] 248 this.operationButtonList = ['comment', 'collect', 'share']
@@ -242,14 +255,18 @@ export struct ImageAndTextPageComponent { @@ -242,14 +255,18 @@ export struct ImageAndTextPageComponent {
242 let params: postRecommendListParams = { 255 let params: postRecommendListParams = {
243 imei: HttpUtils.getImei(), 256 imei: HttpUtils.getImei(),
244 userId: HttpUtils.getUserId(), 257 userId: HttpUtils.getUserId(),
245 - contentId: String(this.contentDetailData[0]?.newsId),  
246 - recType: Number(this.contentDetailData[0]?.reLInfo?.relType),  
247 - contentType: this.contentDetailData[0]?.newsType,  
248 - relId: this.contentDetailData[0]?.reLInfo?.relId,  
249 - channelId: String(this.contentDetailData[0]?.reLInfo?.channelId) 258 + contentId: String(this.contentDetailData?.newsId),
  259 + recType: Number(this.contentDetailData?.reLInfo?.relType),
  260 + contentType: this.contentDetailData?.newsType,
  261 + relId: this.contentDetailData?.reLInfo?.relId,
  262 + channelId: String(this.contentDetailData?.reLInfo?.channelId)
250 } 263 }
251 let recommendList = await DetailViewModel.postRecommendList(params) 264 let recommendList = await DetailViewModel.postRecommendList(params)
252 - this.recommendList = recommendList; 265 + if (recommendList.length > 0) {
  266 + //推荐列表过滤音频和活动入口
  267 + this.recommendList = recommendList.filter(item => item.objectType !== '3' && item.objectType !== '13');
  268 + }
  269 +
253 } 270 }
254 271
255 // 已登录->查询用户对作品点赞、收藏状态 272 // 已登录->查询用户对作品点赞、收藏状态
@@ -258,8 +275,8 @@ export struct ImageAndTextPageComponent { @@ -258,8 +275,8 @@ export struct ImageAndTextPageComponent {
258 const params: batchLikeAndCollectParams = { 275 const params: batchLikeAndCollectParams = {
259 contentList: [ 276 contentList: [
260 { 277 {
261 - contentId: this.contentDetailData[0]?.newsId + '',  
262 - contentType: this.contentDetailData[0]?.newsType + '', 278 + contentId: this.contentDetailData?.newsId + '',
  279 + contentType: this.contentDetailData?.newsType + '',
263 } 280 }
264 ] 281 ]
265 } 282 }
@@ -284,8 +301,8 @@ export struct ImageAndTextPageComponent { @@ -284,8 +301,8 @@ export struct ImageAndTextPageComponent {
284 } 301 }
285 const params: postExecuteLikeParams = { 302 const params: postExecuteLikeParams = {
286 status: this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1', 303 status: this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1',
287 - contentId: this.contentDetailData[0]?.newsId + '',  
288 - contentType: this.contentDetailData[0]?.newsType + '', 304 + contentId: this.contentDetailData?.newsId + '',
  305 + contentType: this.contentDetailData?.newsType + '',
289 } 306 }
290 PageRepository.postExecuteLike(params).then(res => { 307 PageRepository.postExecuteLike(params).then(res => {
291 console.log(TAG, '点赞、取消点赞', 'toggleLikeStatus==',) 308 console.log(TAG, '点赞、取消点赞', 'toggleLikeStatus==',)
@@ -304,8 +321,8 @@ export struct ImageAndTextPageComponent { @@ -304,8 +321,8 @@ export struct ImageAndTextPageComponent {
304 console.error(TAG, 'contentDetailData2222', JSON.stringify(this.contentDetailData)) 321 console.error(TAG, 'contentDetailData2222', JSON.stringify(this.contentDetailData))
305 const params: contentListParams = { 322 const params: contentListParams = {
306 contentList: [{ 323 contentList: [{
307 - contentId: this.contentDetailData[0]?.newsId + '',  
308 - contentType: this.contentDetailData[0]?.newsType, 324 + contentId: this.contentDetailData?.newsId + '',
  325 + contentType: this.contentDetailData?.newsType,
309 }] 326 }]
310 } 327 }
311 PageRepository.getContentInteract(params).then(res => { 328 PageRepository.getContentInteract(params).then(res => {
  1 +import { ContentDTO } from 'wdBean/Index';
  2 +import { ProcessUtils } from 'wdRouter/Index';
  3 +import { InteractMessageModel } from '../../model/InteractMessageModel'
1 4
2 @Component 5 @Component
3 export struct InteractMComponent { 6 export struct InteractMComponent {
  7 + messageModel:InteractMessageModel = new InteractMessageModel;
  8 +///"remark": "{"beReply":"乐事薯片,大家的最爱!!",
  9 + // "headUrl":"https: //uatjdcdnphoto.aikan.pdnews.cn//zhbj/img/user/2023122211/2A59F725E69849A38CEE8823B0D9D141.jpg",
  10 + // "contentId":"30035774121","contentRelObjectid":"2012","contentTitle":"乐事推出华夏风光限定罐七款城市地标包装让出游“有滋有味”",
  11 + // "commentContent":"大家都爱吃!!","userName":"人民日报网友a8dKCV","userId":"504964178466309","contentRelId":"500002866426",
  12 + // "shareUrl":"https: //pd-people-uat.pdnews.cn/column/30035774121-500002866426","userType":"1",
  13 + // "contentRelType":"1","visitor":"0","contentType":"8"}",
  14 +
4 build() { 15 build() {
5 Row(){ 16 Row(){
6 - Image('')  
7 - .backgroundColor(Color.Red) 17 + Image(this.messageModel.InteractMsubM.headUrl)
8 .width(36) 18 .width(36)
9 .height(36) 19 .height(36)
10 .borderRadius(18) 20 .borderRadius(18)
11 21
12 Column(){ 22 Column(){
13 Row(){ 23 Row(){
14 - Text('用户名') 24 + Text(this.messageModel.InteractMsubM.userName)
15 .fontSize('14fp').fontColor('#222222') 25 .fontSize('14fp').fontColor('#222222')
16 26
17 - Text('回复了你的评论') 27 + Text(this.buildContentString())
18 .fontSize('14fp').fontColor('#999999') 28 .fontSize('14fp').fontColor('#999999')
19 .margin({left:5}) 29 .margin({left:5})
20 }.width('100%') 30 }.width('100%')
21 31
22 - Text('两天前') 32 + Text(this.messageModel.time)
23 .margin({top:2}) 33 .margin({top:2})
24 - .fontSize('12fp').fontColor('#B0B0B0') 34 + .fontSize('12fp').fontColor('#B0B0B0').margin({top:10,bottom:10})
25 35
26 - Text('评论内容')  
27 - .margin({top:8,bottom:10}) 36 + if (this.messageModel.contentType === '208' || this.messageModel.contentType === '209'){
  37 + Text(this.messageModel.message)
  38 + .margin({bottom:10})
28 .fontSize('16fp').fontColor('#222222') 39 .fontSize('16fp').fontColor('#222222')
29 .width('100%') 40 .width('100%')
30 .constraintSize({maxHeight:500}) 41 .constraintSize({maxHeight:500})
  42 + }
31 43
32 Column(){ 44 Column(){
33 - Text('[你的评论]乐事薯片,大家的最爱').fontSize('14fp').fontColor('#666666').constraintSize({maxHeight:500})  
34 - .margin({top:5,bottom:5}) 45 + if (this.messageModel.contentType === '207' || this.messageModel.contentType === '209'){
  46 + Text('[你的评论]'+this.buildCommentContent()).fontSize('14fp').fontColor('#666666').constraintSize({maxHeight:500})
  47 + .margin({top:15,bottom:10})
35 .width('100%') 48 .width('100%')
36 49
37 Divider() 50 Divider()
38 - .color('#f5f5f5')  
39 - .backgroundColor('#f5f5f5') 51 + .color('#EDEDED')
  52 + .backgroundColor('#EDEDED')
40 .width('100%') 53 .width('100%')
41 .height(1) 54 .height(1)
42 - 55 + }
43 Row(){ 56 Row(){
44 - Text('乐事薯片,大家的最爱!!!!').fontSize('12fp').fontColor('#666666').constraintSize({maxHeight:500}) 57 + Image($r('app.media.MessageOriginTextIcon'))
  58 + .width('12')
  59 + .height('12')
  60 + Text(this.messageModel.InteractMsubM.contentTitle)
  61 + .fontSize('12fp')
  62 + .fontColor('#666666')
  63 + .maxLines(1)
  64 + .width('90%')
  65 + .textOverflow({overflow:TextOverflow.Ellipsis})
45 66
46 Blank() 67 Blank()
47 68
48 Image($r('app.media.mine_user_edit')) 69 Image($r('app.media.mine_user_edit'))
49 .width('12') 70 .width('12')
50 .height('12') 71 .height('12')
51 - }.margin({top:5,bottom:5}).width('100%')  
52 - }.alignItems(HorizontalAlign.Start).backgroundColor('#f5f5f5').borderRadius(5)  
53 - }.padding({left:5}).alignItems(HorizontalAlign.Start)  
54 - }.padding({top:5,left:16,right:16}).width('100%').height(160).alignItems(VerticalAlign.Top).backgroundColor(Color.Red) 72 + }.margin({top:10,bottom:15})
  73 + }.padding({left:10,right:10}).alignItems(HorizontalAlign.Start).backgroundColor('#f5f5f5').borderRadius(5)
  74 + .onClick(()=>{
  75 + let contentDTO :ContentDTO = new ContentDTO();
  76 + contentDTO.objectType = this.messageModel.InteractMsubM.contentType
  77 + contentDTO.objectId = this.messageModel.InteractMsubM.contentId
  78 + ProcessUtils.processPage(contentDTO)
  79 + })
  80 + }.padding({left:5,right:5}).alignItems(HorizontalAlign.Start).width('90%')
  81 + }.padding({top:10,left:16,right:16}).width('100%').alignItems(VerticalAlign.Top)
  82 + }
  83 +
  84 + buildContentString(): string {
  85 + let contentString: string = ''
  86 + if (this.messageModel.contentType === '206') {
  87 + contentString = '赞了你的作品'
  88 + }else if(this.messageModel.contentType === '207'){
  89 + contentString = '赞了你的评论'
  90 + }else if(this.messageModel.contentType === '208'){
  91 + contentString = '评论了你的作品'
  92 + }else if(this.messageModel.contentType === '209'){
  93 + contentString = '回复了你的评论'
  94 + }else if(this.messageModel.contentType === '210'){
  95 + contentString = '转发了您的作品'
  96 + }else if(this.messageModel.contentType === '211'){
  97 + contentString = '关注了你'
  98 + }
  99 + return contentString;
  100 + }
  101 + buildCommentContent(): string {
  102 + let contentString : string = this.messageModel.contentType === '207'?this.messageModel.message:this.messageModel.InteractMsubM.beReply;
  103 + return contentString;
55 } 104 }
56 } 105 }
@@ -61,6 +61,8 @@ export struct MorningEveningPaperComponent { @@ -61,6 +61,8 @@ export struct MorningEveningPaperComponent {
61 @State mixedBgColor: string = '' 61 @State mixedBgColor: string = ''
62 // 顶部安全高度赋值 62 // 顶部安全高度赋值
63 @State topSafeHeight: number = 0; 63 @State topSafeHeight: number = 0;
  64 + @State bottomSafeHeight: number = 0;
  65 +
64 private audioDataList: AudioDataList[] = [] 66 private audioDataList: AudioDataList[] = []
65 private playerController: WDPlayerController = new WDPlayerController(); 67 private playerController: WDPlayerController = new WDPlayerController();
66 simpleAudioDialog: CustomDialogController = new CustomDialogController({ 68 simpleAudioDialog: CustomDialogController = new CustomDialogController({
@@ -112,6 +114,7 @@ export struct MorningEveningPaperComponent { @@ -112,6 +114,7 @@ export struct MorningEveningPaperComponent {
112 // await windowHight.setWindowLayoutFullScreen(true); 114 // await windowHight.setWindowLayoutFullScreen(true);
113 // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) 115 // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
114 this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height) 116 this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)
  117 + this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
115 118
116 const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String 119 const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String
117 console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId) 120 console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId)
@@ -248,14 +251,15 @@ export struct MorningEveningPaperComponent { @@ -248,14 +251,15 @@ export struct MorningEveningPaperComponent {
248 }) 251 })
249 } 252 }
250 } 253 }
251 - .height('100%') 254 + .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`)
252 255
253 PaperTitleComponent() 256 PaperTitleComponent()
254 } 257 }
255 .width('100%') 258 .width('100%')
256 .height('100%') 259 .height('100%')
257 .padding({ 260 .padding({
258 - top: this.topSafeHeight 261 + top: this.topSafeHeight,
  262 + bottom: this.bottomSafeHeight
259 }) 263 })
260 // .backgroundColor(Color.Black) 264 // .backgroundColor(Color.Black)
261 // .backgroundColor(this.pageInfoBean?.backgroundColor ?? Color.Black) 265 // .backgroundColor(this.pageInfoBean?.backgroundColor ?? Color.Black)
@@ -114,7 +114,7 @@ export struct SingleColumn999Component { @@ -114,7 +114,7 @@ export struct SingleColumn999Component {
114 build() { 114 build() {
115 // if (this.compDTO && this.compDTO?.operDataList?.length > 0) { 115 // if (this.compDTO && this.compDTO?.operDataList?.length > 0) {
116 if (this.compListItem && this.compListItem?.operDataList?.length > 0) { 116 if (this.compListItem && this.compListItem?.operDataList?.length > 0) {
117 - List({ space: 2, initialIndex: 0 }) { 117 + List({ initialIndex: 0 }) {
118 // ListItemGroup({ 118 // ListItemGroup({
119 // // footer: this.itemFooter("") 119 // // footer: this.itemFooter("")
120 // }) { 120 // }) {
1 -import { NetworkUtil, Logger, NetworkType, SPHelper, WindowModel, StringUtils} from 'wdKit'; 1 +import { NetworkUtil, Logger, NetworkType, SPHelper, WindowModel, StringUtils } from 'wdKit';
2 import { ResponseDTO } from 'wdNetwork'; 2 import { ResponseDTO } from 'wdNetwork';
3 import { 3 import {
4 ContentDetailDTO, 4 ContentDetailDTO,
@@ -35,7 +35,7 @@ export struct MultiPictureDetailPageComponent { @@ -35,7 +35,7 @@ export struct MultiPictureDetailPageComponent {
35 private picWidth: number = 0 35 private picWidth: number = 0
36 @State picHeight: number = 0 36 @State picHeight: number = 0
37 @State titleHeight: number = 0 37 @State titleHeight: number = 0
38 - @State contentDetailData: ContentDetailDTO = {} as ContentDetailDTO 38 + @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
39 @Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01' 39 @Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01'
40 private swiperController: SwiperController = new SwiperController() 40 private swiperController: SwiperController = new SwiperController()
41 private swiperControllerItem: SwiperController = new SwiperController() 41 private swiperControllerItem: SwiperController = new SwiperController()
@@ -49,8 +49,8 @@ export struct MultiPictureDetailPageComponent { @@ -49,8 +49,8 @@ export struct MultiPictureDetailPageComponent {
49 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; 49 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
50 @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') as number; 50 @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') as number;
51 @State windowHeight: number = AppStorage.get<number>('windowHeight') as number; 51 @State windowHeight: number = AppStorage.get<number>('windowHeight') as number;
52 - @State currentOffset:number = 0  
53 - @State duration:number = 0 52 + @State currentOffset: number = 0
  53 + @State duration: number = 0
54 54
55 //watch监听页码回调 55 //watch监听页码回调
56 onCurrentPageNumUpdated(): void { 56 onCurrentPageNumUpdated(): void {
@@ -83,7 +83,6 @@ export struct MultiPictureDetailPageComponent { @@ -83,7 +83,6 @@ export struct MultiPictureDetailPageComponent {
83 } 83 }
84 } 84 }
85 85
86 -  
87 aboutToDisappear() { 86 aboutToDisappear() {
88 87
89 } 88 }
@@ -101,10 +100,10 @@ export struct MultiPictureDetailPageComponent { @@ -101,10 +100,10 @@ export struct MultiPictureDetailPageComponent {
101 @Builder 100 @Builder
102 init() { 101 init() {
103 if (this.contentDetailData.rmhPlatform == 1) { 102 if (this.contentDetailData.rmhPlatform == 1) {
104 - if(!this.showDownload) { 103 + if (!this.showDownload) {
105 Row() { 104 Row() {
106 Row({ space: 8 }) { 105 Row({ space: 8 }) {
107 - if (this.getImgUrl()){ 106 + if (this.getImgUrl()) {
108 Row() { 107 Row() {
109 Stack() { 108 Stack() {
110 Image(this.getImgUrl()) 109 Image(this.getImgUrl())
@@ -115,7 +114,7 @@ export struct MultiPictureDetailPageComponent { @@ -115,7 +114,7 @@ export struct MultiPictureDetailPageComponent {
115 .height(36) 114 .height(36)
116 .objectFit(ImageFit.Fill) 115 .objectFit(ImageFit.Fill)
117 .interpolation(ImageInterpolation.High) 116 .interpolation(ImageInterpolation.High)
118 - if(!StringUtils.isEmpty(this.contentDetailData.rmhInfo?.authIcon)){ 117 + if (!StringUtils.isEmpty(this.contentDetailData.rmhInfo?.authIcon)) {
119 Stack() { 118 Stack() {
120 Image(this.contentDetailData.rmhInfo?.authIcon) 119 Image(this.contentDetailData.rmhInfo?.authIcon)
121 .width($r('app.float.vp_13')) 120 .width($r('app.float.vp_13'))
@@ -219,7 +218,7 @@ export struct MultiPictureDetailPageComponent { @@ -219,7 +218,7 @@ export struct MultiPictureDetailPageComponent {
219 .width('100%') 218 .width('100%')
220 .height(44) 219 .height(44)
221 .zIndex(10) 220 .zIndex(10)
222 - .margin({top:`${this.topSafeHeight + 12}px`}) 221 + .margin({ top: `${this.topSafeHeight + 12}px` })
223 .alignRules({ 222 .alignRules({
224 top: { anchor: "__container__", align: VerticalAlign.Top }, 223 top: { anchor: "__container__", align: VerticalAlign.Top },
225 middle: { anchor: "__container__", align: HorizontalAlign.Center } 224 middle: { anchor: "__container__", align: HorizontalAlign.Center }
@@ -249,12 +248,12 @@ export struct MultiPictureDetailPageComponent { @@ -249,12 +248,12 @@ export struct MultiPictureDetailPageComponent {
249 this.currentOffset = Math.abs(extraInfo.currentOffset) 248 this.currentOffset = Math.abs(extraInfo.currentOffset)
250 }) 249 })
251 .onTouch((event: TouchEvent) => { 250 .onTouch((event: TouchEvent) => {
252 - if(this.duration === 0) { 251 + if (this.duration === 0) {
253 this.duration = 500 252 this.duration = 500
254 } 253 }
255 - if(event.type === 1) { 254 + if (event.type === 1) {
256 // if(this.currentOffset > px2vp((this.windowHeight - item.height)/2 - 100)) { 255 // if(this.currentOffset > px2vp((this.windowHeight - item.height)/2 - 100)) {
257 - if(this.currentOffset > 160) { 256 + if (this.currentOffset > 160) {
258 router.back() 257 router.back()
259 } 258 }
260 } 259 }
@@ -296,9 +295,9 @@ export struct MultiPictureDetailPageComponent { @@ -296,9 +295,9 @@ export struct MultiPictureDetailPageComponent {
296 middle: { anchor: "__container__", align: HorizontalAlign.Center } 295 middle: { anchor: "__container__", align: HorizontalAlign.Center }
297 }) 296 })
298 } 297 }
299 - Column(){  
300 - if(!this.showDownload) {  
301 - Column(){ 298 + Column() {
  299 + if (!this.showDownload) {
  300 + Column() {
302 Row() { 301 Row() {
303 Scroll(this.scroller) { 302 Scroll(this.scroller) {
304 Row() { 303 Row() {
@@ -306,7 +305,7 @@ export struct MultiPictureDetailPageComponent { @@ -306,7 +305,7 @@ export struct MultiPictureDetailPageComponent {
306 direction: FlexDirection.Column, 305 direction: FlexDirection.Column,
307 justifyContent: FlexAlign.Start 306 justifyContent: FlexAlign.Start
308 }) { 307 }) {
309 - if(this.contentDetailData?.photoList?.length) { 308 + if (this.contentDetailData?.photoList?.length) {
310 Text() { 309 Text() {
311 Span(`${this.swiperIndex + 1}`) 310 Span(`${this.swiperIndex + 1}`)
312 .fontSize(24) 311 .fontSize(24)
@@ -322,7 +321,7 @@ export struct MultiPictureDetailPageComponent { @@ -322,7 +321,7 @@ export struct MultiPictureDetailPageComponent {
322 .fontColor(Color.White) 321 .fontColor(Color.White)
323 .margin(4) 322 .margin(4)
324 } 323 }
325 - if(this.contentDetailData.newsTitle) { 324 + if (this.contentDetailData.newsTitle) {
326 Text(`${this.contentDetailData.newsTitle}`) 325 Text(`${this.contentDetailData.newsTitle}`)
327 .fontColor(Color.White) 326 .fontColor(Color.White)
328 .fontSize(16) 327 .fontSize(16)
@@ -336,7 +335,7 @@ export struct MultiPictureDetailPageComponent { @@ -336,7 +335,7 @@ export struct MultiPictureDetailPageComponent {
336 right: 0 335 right: 0
337 }) 336 })
338 } 337 }
339 - if(this.contentDetailData.photoList?.[this.swiperIndex].picDesc) { 338 + if (this.contentDetailData.photoList?.[this.swiperIndex].picDesc) {
340 Text(`${this.contentDetailData.photoList?.[this.swiperIndex].picDesc}`) 339 Text(`${this.contentDetailData.photoList?.[this.swiperIndex].picDesc}`)
341 .fontColor(Color.White) 340 .fontColor(Color.White)
342 .fontSize(14) 341 .fontSize(14)
@@ -361,25 +360,27 @@ export struct MultiPictureDetailPageComponent { @@ -361,25 +360,27 @@ export struct MultiPictureDetailPageComponent {
361 .height(px2vp(this.titleHeight)) 360 .height(px2vp(this.titleHeight))
362 .align(Alignment.Bottom) 361 .align(Alignment.Bottom)
363 } 362 }
  363 +
364 OperRowListView({ 364 OperRowListView({
365 contentDetailData: this.contentDetailData, 365 contentDetailData: this.contentDetailData,
366 publishCommentModel: this.publishCommentModel, 366 publishCommentModel: this.publishCommentModel,
367 operationButtonList: this.operationButtonList, 367 operationButtonList: this.operationButtonList,
368 styleType: 2, 368 styleType: 2,
  369 + componentType:5,
369 }) 370 })
370 } 371 }
371 .transition(TransitionEffect.OPACITY.animation({ duration: this.duration, curve: Curve.Ease }).combine( 372 .transition(TransitionEffect.OPACITY.animation({ duration: this.duration, curve: Curve.Ease }).combine(
372 TransitionEffect.translate({ x: 0, y: `-${this.bottomSafeHeight}px` }) 373 TransitionEffect.translate({ x: 0, y: `-${this.bottomSafeHeight}px` })
373 )) 374 ))
374 } 375 }
375 - if(this.showDownload) {  
376 - Column(){ 376 + if (this.showDownload) {
  377 + Column() {
377 Row() { 378 Row() {
378 Flex({ 379 Flex({
379 direction: FlexDirection.Row, 380 direction: FlexDirection.Row,
380 justifyContent: FlexAlign.SpaceBetween 381 justifyContent: FlexAlign.SpaceBetween
381 }) { 382 }) {
382 - if(this.contentDetailData?.photoList?.length) { 383 + if (this.contentDetailData?.photoList?.length) {
383 Text() { 384 Text() {
384 Span(`${this.swiperIndex + 1}`) 385 Span(`${this.swiperIndex + 1}`)
385 .fontSize(24) 386 .fontSize(24)
@@ -396,7 +397,7 @@ export struct MultiPictureDetailPageComponent { @@ -396,7 +397,7 @@ export struct MultiPictureDetailPageComponent {
396 .margin(4) 397 .margin(4)
397 } 398 }
398 399
399 - if(this.contentDetailData.photoList?.[this.swiperIndex].picPath) { 400 + if (this.contentDetailData.photoList?.[this.swiperIndex].picPath) {
400 ImageDownloadComponent({ url: this.contentDetailData.photoList?.[this.swiperIndex].picPath }) 401 ImageDownloadComponent({ url: this.contentDetailData.photoList?.[this.swiperIndex].picPath })
401 .margin({ 402 .margin({
402 top: 8, 403 top: 8,
@@ -449,6 +450,7 @@ export struct MultiPictureDetailPageComponent { @@ -449,6 +450,7 @@ export struct MultiPictureDetailPageComponent {
449 this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId) 450 this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
450 this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle) 451 this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
451 this.publishCommentModel.targetType = String(this.contentDetailData?.newsType) 452 this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
  453 + this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
452 } 454 }
453 // this.contentDetailData.photoList = [] 455 // this.contentDetailData.photoList = []
454 if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length === 0) { 456 if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length === 0) {
@@ -8,6 +8,8 @@ import { NativeCallH5Type } from 'wdWebComponent/src/main/ets/pages/NativeCallH5 @@ -8,6 +8,8 @@ import { NativeCallH5Type } from 'wdWebComponent/src/main/ets/pages/NativeCallH5
8 import { OperRowListView } from './view/OperRowListView'; 8 import { OperRowListView } from './view/OperRowListView';
9 import DetailViewModel from '../viewmodel/DetailViewModel'; 9 import DetailViewModel from '../viewmodel/DetailViewModel';
10 import { publishCommentModel } from '../components/comment/model/PublishCommentModel'; 10 import { publishCommentModel } from '../components/comment/model/PublishCommentModel';
  11 +import { EmptyComponent } from '../components/view/EmptyComponent';
  12 +import { NetworkUtil } from 'wdKit';
11 13
12 const TAG: string = 'SpacialTopicPageComponent' 14 const TAG: string = 'SpacialTopicPageComponent'
13 15
@@ -18,12 +20,14 @@ export struct SpacialTopicPageComponent { @@ -18,12 +20,14 @@ export struct SpacialTopicPageComponent {
18 action: Action = {} as Action 20 action: Action = {} as Action
19 @State webUrl: string = ''; 21 @State webUrl: string = '';
20 @State isPageEnd: boolean = false 22 @State isPageEnd: boolean = false
21 - @State contentDetailData: ContentDetailDTO [] = [] as ContentDetailDTO [] 23 + @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
22 private h5ReceiveAppData: H5ReceiveDetailBean = { dataSource: '2' } as H5ReceiveDetailBean 24 private h5ReceiveAppData: H5ReceiveDetailBean = { dataSource: '2' } as H5ReceiveDetailBean
23 private webPrepared = false; 25 private webPrepared = false;
24 private dataPrepared = false; 26 private dataPrepared = false;
25 @State publishCommentModel: publishCommentModel = new publishCommentModel() 27 @State publishCommentModel: publishCommentModel = new publishCommentModel()
26 @State operationButtonList: string[] = ['comment', 'collect', 'share'] 28 @State operationButtonList: string[] = ['comment', 'collect', 'share']
  29 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
  30 + @State isNetConnected: boolean = true
27 31
28 private trySendData2H5() { 32 private trySendData2H5() {
29 if (!this.webPrepared || !this.dataPrepared) { 33 if (!this.webPrepared || !this.dataPrepared) {
@@ -45,6 +49,8 @@ export struct SpacialTopicPageComponent { @@ -45,6 +49,8 @@ export struct SpacialTopicPageComponent {
45 } 49 }
46 50
47 private async getDetail() { 51 private async getDetail() {
  52 + this.isNetConnected = NetworkUtil.isNetConnected()
  53 +
48 let contentId: string = '' 54 let contentId: string = ''
49 let relId: string = '' 55 let relId: string = ''
50 let relType: string = '' 56 let relType: string = ''
@@ -63,15 +69,16 @@ export struct SpacialTopicPageComponent { @@ -63,15 +69,16 @@ export struct SpacialTopicPageComponent {
63 } 69 }
64 let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) 70 let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)
65 if (detailBeans && detailBeans.length > 0) { 71 if (detailBeans && detailBeans.length > 0) {
66 - this.contentDetailData = detailBeans; 72 + this.contentDetailData = detailBeans[0];
67 // if (this.contentDetailData[0]?.openComment) { 73 // if (this.contentDetailData[0]?.openComment) {
68 - this.publishCommentModel.targetId = String(this.contentDetailData[0]?.newsId || '')  
69 - this.publishCommentModel.targetRelId = String(this.contentDetailData[0]?.reLInfo?.relId)  
70 - this.publishCommentModel.targetTitle = this.contentDetailData[0]?.newsTitle  
71 - this.publishCommentModel.targetRelType = String(this.contentDetailData[0]?.reLInfo?.relType)  
72 - this.publishCommentModel.targetRelObjectId = String(this.contentDetailData[0]?.reLInfo?.relObjectId)  
73 - this.publishCommentModel.keyArticle = String(this.contentDetailData[0]?.keyArticle)  
74 - this.publishCommentModel.targetType = String(this.contentDetailData[0]?.newsType) 74 + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
  75 + this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
  76 + this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
  77 + this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
  78 + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
  79 + this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
  80 + this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
  81 + this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
75 // } 82 // }
76 this.trySendData2H5() 83 this.trySendData2H5()
77 } 84 }
@@ -92,17 +99,30 @@ export struct SpacialTopicPageComponent { @@ -92,17 +99,30 @@ export struct SpacialTopicPageComponent {
92 } 99 }
93 .width(CommonConstants.FULL_WIDTH) 100 .width(CommonConstants.FULL_WIDTH)
94 .height(CommonConstants.FULL_HEIGHT) 101 .height(CommonConstants.FULL_HEIGHT)
95 - .padding({bottom:75}) 102 + .padding({ bottom: 75 })
96 103
  104 + if (!this.isNetConnected) {
  105 + EmptyComponent({
  106 + emptyType: 1,
  107 + emptyButton: true,
  108 + retry: () => {
  109 + this.getDetail()
  110 + }
  111 + }).padding({ bottom: 200 })
  112 + } else {
97 if (!this.isPageEnd) { 113 if (!this.isPageEnd) {
98 detailedSkeleton() 114 detailedSkeleton()
99 } 115 }
  116 + }
100 //底部交互区 117 //底部交互区
101 OperRowListView({ 118 OperRowListView({
102 - contentDetailData: this.contentDetailData[0], 119 + contentDetailData: this.contentDetailData,
103 publishCommentModel: this.publishCommentModel, 120 publishCommentModel: this.publishCommentModel,
104 operationButtonList: this.operationButtonList, 121 operationButtonList: this.operationButtonList,
105 }) 122 })
  123 + .padding({
  124 + bottom: `${this.bottomSafeHeight}px`
  125 + })
106 } 126 }
107 }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT) 127 }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT)
108 } 128 }
1 import { RMCalendarBean } from './RMCalendarBean' 1 import { RMCalendarBean } from './RMCalendarBean'
2 import { RMCalenderCell } from './RMCalendarCell' 2 import { RMCalenderCell } from './RMCalendarCell'
  3 +import { ToastUtils, NetworkUtil } from 'wdKit/Index';
3 4
4 @Component 5 @Component
5 export struct RMCalendar { 6 export struct RMCalendar {
@@ -166,6 +167,9 @@ export struct RMCalendar { @@ -166,6 +167,9 @@ export struct RMCalendar {
166 * 下一个月 167 * 下一个月
167 */ 168 */
168 private nextMonth() { 169 private nextMonth() {
  170 + if (!NetworkUtil.isNetConnected()) {
  171 + ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
  172 + }
169 // this.dates.slice(0, this.dates.length) 173 // this.dates.slice(0, this.dates.length)
170 this.dates = [] 174 this.dates = []
171 const beforDate = new Date(this.selectDay.getFullYear(), this.selectDay.getMonth()) 175 const beforDate = new Date(this.selectDay.getFullYear(), this.selectDay.getMonth())
@@ -180,6 +184,9 @@ export struct RMCalendar { @@ -180,6 +184,9 @@ export struct RMCalendar {
180 * 上一个月 184 * 上一个月
181 */ 185 */
182 private preMonth() { 186 private preMonth() {
  187 + if (!NetworkUtil.isNetConnected()) {
  188 + ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
  189 + }
183 // this.dates.slice(0, this.dates.length) 190 // this.dates.slice(0, this.dates.length)
184 this.dates = [] 191 this.dates = []
185 const beforDate = new Date(this.selectDay.getFullYear(), this.selectDay.getMonth()) 192 const beforDate = new Date(this.selectDay.getFullYear(), this.selectDay.getMonth())
1 /** 1 /**
2 * 这里是人民号动态中的顶部信息:人民号logo,名字,描述,关注等 2 * 这里是人民号动态中的顶部信息:人民号logo,名字,描述,关注等
3 */ 3 */
  4 +import {
  5 + ContentDetailRequest,
  6 + postInteractAccentionOperateParams
  7 +} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
4 import { RmhInfoDTO } from 'wdBean' 8 import { RmhInfoDTO } from 'wdBean'
5 import { CommonConstants } from 'wdConstant/Index'; 9 import { CommonConstants } from 'wdConstant/Index';
6 -import { DateTimeUtils, SPHelper } from 'wdKit'; 10 +import { DateTimeUtils, SPHelper, Logger, ToastUtils } from 'wdKit';
7 import { SpConstants } from 'wdConstant/Index' 11 import { SpConstants } from 'wdConstant/Index'
8 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 12 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
9 import router from '@ohos.router' 13 import router from '@ohos.router'
  14 +import { postBatchAttentionStatusParams } from 'wdBean/Index';
  15 +import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel'
10 16
11 @Component 17 @Component
12 export struct RmhTitle { 18 export struct RmhTitle {
13 @Prop rmhInfo: RmhInfoDTO 19 @Prop rmhInfo: RmhInfoDTO
14 @Prop publishTime: string | undefined 20 @Prop publishTime: string | undefined
  21 + /**
  22 + * 是否需要隐藏发布时间超过2天的时间展示,默认不隐藏
  23 + */
15 @Prop hideTime: boolean 24 @Prop hideTime: boolean
  25 + /**
  26 + * 默认未关注 点击去关注
  27 + */
  28 + @State followStatus: string = '0';
16 29
17 - async appointReq() { 30 + /**
  31 + * 关注号主
  32 + */
  33 + async handleAccention() {
18 // 未登录,跳转登录 34 // 未登录,跳转登录
19 const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') 35 const user_id = await SPHelper.default.get(SpConstants.USER_ID, '')
20 if (!user_id) { 36 if (!user_id) {
21 WDRouterRule.jumpWithPage(WDRouterPage.loginPage) 37 WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
22 return 38 return
23 } 39 }
  40 +
  41 + const params2: postInteractAccentionOperateParams = {
  42 + attentionUserType: this.rmhInfo?.userType || '', //被关注用户类型(1 普通用户 2 视频号 3 矩阵号)
  43 + attentionUserId: this.rmhInfo?.userId || '', // 被关注用户号主id
  44 + attentionCreatorId: this.rmhInfo?.rmhId || '', // 被关注用户号主id
  45 + status: this.followStatus == '0' ? 1 : 0,
  46 + }
  47 + ContentDetailRequest.postInteractAccentionOperate(params2).then(res => {
  48 + console.log('rmhTitle-data', JSON.stringify(res.data))
  49 + if (this.followStatus == '1') {
  50 + this.followStatus = '0'
  51 + } else {
  52 + this.followStatus = '1'
  53 + // 弹窗样式与何时调用待确认
  54 + ContentDetailRequest.postPointLevelOperate({ operateType: 6 }).then((res) => {
  55 + console.log('关注号主获取积分==', JSON.stringify(res.data))
  56 + if (res.data?.showToast) {
  57 + ToastUtils.showToast(res.data.ruleName + '+' + res.data.rulePoint + '积分', 1000);
  58 + }
  59 + })
  60 + }
  61 + })
  62 + }
  63 + /**
  64 + * 查询当前登录用户是否关注作品号主
  65 + * */
  66 + async getBatchAttentionStatus() {
  67 + try {
  68 + const params: postBatchAttentionStatusParams = {
  69 + creatorIds: [{ creatorId: this.rmhInfo?.rmhId ?? '' }]
  70 + }
  71 + let data = await MultiPictureDetailViewModel.getBatchAttentionStatus(params)
  72 + this.followStatus = data[0]?.status;
  73 + Logger.info(`rmhTitle-followStatus:${JSON.stringify(this.followStatus)}`)
  74 + } catch (exception) {
  75 + Logger.info(`rmhTitle-followStatus:${JSON.stringify(exception)}`)
  76 + }
24 } 77 }
25 78
26 aboutToAppear(): void { 79 aboutToAppear(): void {
  80 + this.getBatchAttentionStatus()
  81 +
27 let page = router.getState(); 82 let page = router.getState();
28 if (page.path.includes('/page/PeopleShipHomePage') || page.path.includes('/pages/MainPage')) { 83 if (page.path.includes('/page/PeopleShipHomePage') || page.path.includes('/pages/MainPage')) {
29 this.hideTime = true; 84 this.hideTime = true;
@@ -88,17 +143,20 @@ export struct RmhTitle { @@ -88,17 +143,20 @@ export struct RmhTitle {
88 Blank() 143 Blank()
89 if (this.rmhInfo.cnIsAttention) { 144 if (this.rmhInfo.cnIsAttention) {
90 Row() { 145 Row() {
  146 + if (Number(this.followStatus) === 0) {
91 Image($r('app.media.rmh_follow')) 147 Image($r('app.media.rmh_follow'))
92 .width(16) 148 .width(16)
93 .height(16) 149 .height(16)
94 - Text('关注') 150 + }
  151 +
  152 + Text(Number(this.followStatus) === 0 ? '关注' : '已关注')
95 .fontSize($r('app.float.font_size_13')) 153 .fontSize($r('app.float.font_size_13'))
96 .fontColor($r('app.color.color_ED2800')) 154 .fontColor($r('app.color.color_ED2800'))
97 } 155 }
98 .flexShrink(0) 156 .flexShrink(0)
99 .alignSelf(ItemAlign.Center) 157 .alignSelf(ItemAlign.Center)
100 .onClick(() => { 158 .onClick(() => {
101 - this.appointReq(); 159 + this.handleAccention();
102 }) 160 })
103 } 161 }
104 } 162 }
1 import { CompDTO } from 'wdBean/Index'; 1 import { CompDTO } from 'wdBean/Index';
2 -import { Logger } from 'wdKit/Index'; 2 +import { DateTimeUtils, Logger } from 'wdKit/Index';
3 import PageModel from '../../viewmodel/PageModel'; 3 import PageModel from '../../viewmodel/PageModel';
4 4
5 /** 5 /**
@@ -59,9 +59,9 @@ export struct CardAdvBottom { @@ -59,9 +59,9 @@ export struct CardAdvBottom {
59 break; 59 break;
60 } 60 }
61 } 61 }
62 - Logger.error("ZZZXXXXX","currentIndex====>"+currentIndex);  
63 if (currentIndex >= 0) { 62 if (currentIndex >= 0) {
64 this.pageModel.compList.deleteItem(currentIndex) 63 this.pageModel.compList.deleteItem(currentIndex)
  64 + this.pageModel.timestamp = DateTimeUtils.getTimeStamp().toString()
65 } 65 }
66 } 66 }
67 } 67 }
1 import { CompDTO } from 'wdBean/Index'; 1 import { CompDTO } from 'wdBean/Index';
2 -import { Logger } from 'wdKit/Index'; 2 +import { DateTimeUtils, Logger } from 'wdKit/Index';
3 import PageModel from '../../viewmodel/PageModel'; 3 import PageModel from '../../viewmodel/PageModel';
4 4
5 /** 5 /**
@@ -71,10 +71,9 @@ export struct CardAdvTop { @@ -71,10 +71,9 @@ export struct CardAdvTop {
71 break; 71 break;
72 } 72 }
73 } 73 }
74 -  
75 - Logger.error("ZZZXXXXX","currentIndex====>"+currentIndex);  
76 if (currentIndex >= 0) { 74 if (currentIndex >= 0) {
77 this.pageModel.compList.deleteItem(currentIndex) 75 this.pageModel.compList.deleteItem(currentIndex)
  76 + this.pageModel.timestamp = DateTimeUtils.getTimeStamp().toString()
78 } 77 }
79 } 78 }
80 } 79 }
@@ -48,8 +48,9 @@ export struct Card10Component { @@ -48,8 +48,9 @@ export struct Card10Component {
48 .onClick((event: ClickEvent) => { 48 .onClick((event: ClickEvent) => {
49 ProcessUtils.processPage(this.contentDTO) 49 ProcessUtils.processPage(this.contentDTO)
50 }) 50 })
51 - 51 + if (this.contentDTO.objectType == '5') {
52 Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 }) 52 Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 })
  53 + }
53 }.alignContent(Alignment.BottomStart) 54 }.alignContent(Alignment.BottomStart)
54 55
55 // 专题列表--后端返回三个, 56 // 专题列表--后端返回三个,
@@ -106,7 +107,7 @@ export struct Card10Component { @@ -106,7 +107,7 @@ export struct Card10Component {
106 .fontColor($r('app.color.color_222222')) 107 .fontColor($r('app.color.color_222222'))
107 .maxLines(2) 108 .maxLines(2)
108 .textOverflow({ overflow: TextOverflow.Ellipsis }) 109 .textOverflow({ overflow: TextOverflow.Ellipsis })
109 - .textIndent(item.objectType == '5' ? 40 : 0) 110 + .textIndent(item.objectType == '5' ? 38 : 0)
110 }.alignContent(Alignment.TopStart) 111 }.alignContent(Alignment.TopStart)
111 112
112 CardSourceInfo( 113 CardSourceInfo(
1 import { Action, CompDTO, ContentDTO, Params } from 'wdBean'; 1 import { Action, CompDTO, ContentDTO, Params } from 'wdBean';
2 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'; 2 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO';
3 import { CommonConstants } from 'wdConstant/Index'; 3 import { CommonConstants } from 'wdConstant/Index';
4 -import { DateTimeUtils } from 'wdKit';  
5 import { WDRouterRule } from 'wdRouter'; 4 import { WDRouterRule } from 'wdRouter';
6 -import { CardMediaInfo } from '../cardCommon/CardMediaInfo'  
7 -import { CardSourceInfo } from '../cardCommon/CardSourceInfo' 5 +import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
8 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
  7 +import { CardMediaInfo } from '../cardCommon/CardMediaInfo';
9 8
10 const TAG = 'Card17Component'; 9 const TAG = 'Card17Component';
11 10
@@ -23,7 +22,6 @@ export struct Card17Component { @@ -23,7 +22,6 @@ export struct Card17Component {
23 this.loadImg = await onlyWifiLoadImg(); 22 this.loadImg = await onlyWifiLoadImg();
24 } 23 }
25 24
26 -  
27 build() { 25 build() {
28 Column({ space: 8 }) { 26 Column({ space: 8 }) {
29 Text(this.contentDTO.newsTitle) 27 Text(this.contentDTO.newsTitle)
@@ -38,7 +36,8 @@ export struct Card17Component { @@ -38,7 +36,8 @@ export struct Card17Component {
38 // 三个图, 36 // 三个图,
39 GridRow({ gutter: 2 }) { 37 GridRow({ gutter: 2 }) {
40 GridCol({ span: { xs: 8 } }) { 38 GridCol({ span: { xs: 8 } }) {
41 - Image(this.loadImg ? this.contentDTO.fullColumnImgUrls.length > 0 ?this.contentDTO.fullColumnImgUrls[0].url:'' : '') 39 + Image(this.loadImg ?
  40 + this.contentDTO.fullColumnImgUrls.length > 0 ? this.contentDTO.fullColumnImgUrls[0].url : '' : '')
42 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5) 41 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
43 .width(CommonConstants.FULL_WIDTH) 42 .width(CommonConstants.FULL_WIDTH)
44 .aspectRatio(16 / 9) 43 .aspectRatio(16 / 9)
@@ -49,7 +48,8 @@ export struct Card17Component { @@ -49,7 +48,8 @@ export struct Card17Component {
49 } 48 }
50 49
51 GridCol({ span: { xs: 4 } }) { 50 GridCol({ span: { xs: 4 } }) {
52 - Image(this.loadImg ? this.contentDTO.fullColumnImgUrls.length > 1? this.contentDTO.fullColumnImgUrls[1].url:'' : '') 51 + Image(this.loadImg ?
  52 + this.contentDTO.fullColumnImgUrls.length > 1 ? this.contentDTO.fullColumnImgUrls[1].url : '' : '')
53 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5) 53 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
54 .width(CommonConstants.FULL_WIDTH) 54 .width(CommonConstants.FULL_WIDTH)
55 .aspectRatio(16 / 9) 55 .aspectRatio(16 / 9)
@@ -65,7 +65,8 @@ export struct Card17Component { @@ -65,7 +65,8 @@ export struct Card17Component {
65 } 65 }
66 66
67 GridCol({ span: { xs: 4 } }) { 67 GridCol({ span: { xs: 4 } }) {
68 - Image(this.loadImg ? this.contentDTO.fullColumnImgUrls.length > 2? this.contentDTO.fullColumnImgUrls[2].url:'' : '') 68 + Image(this.loadImg ?
  69 + this.contentDTO.fullColumnImgUrls.length > 2 ? this.contentDTO.fullColumnImgUrls[2].url : '' : '')
69 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5) 70 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
70 .width(CommonConstants.FULL_WIDTH) 71 .width(CommonConstants.FULL_WIDTH)
71 .aspectRatio(16 / 9) 72 .aspectRatio(16 / 9)
@@ -94,6 +95,7 @@ export struct Card17Component { @@ -94,6 +95,7 @@ export struct Card17Component {
94 }; 95 };
95 WDRouterRule.jumpWithAction(taskAction) 96 WDRouterRule.jumpWithAction(taskAction)
96 }) 97 })
  98 +
97 // 评论等信息 99 // 评论等信息
98 CardSourceInfo({ contentDTO: this.contentDTO }) 100 CardSourceInfo({ contentDTO: this.contentDTO })
99 } 101 }
@@ -27,6 +27,7 @@ export struct Card19Component { @@ -27,6 +27,7 @@ export struct Card19Component {
27 .textOverflowStyle(3) 27 .textOverflowStyle(3)
28 .margin({ bottom: 8 }) 28 .margin({ bottom: 8 })
29 .width(CommonConstants.FULL_WIDTH) 29 .width(CommonConstants.FULL_WIDTH)
  30 + .lineHeight(22)
30 .onClick((event: ClickEvent) => { 31 .onClick((event: ClickEvent) => {
31 this.clicked = true; 32 this.clicked = true;
32 ProcessUtils.processPage(this.contentDTO) 33 ProcessUtils.processPage(this.contentDTO)
@@ -31,7 +31,7 @@ export struct Card20Component { @@ -31,7 +31,7 @@ export struct Card20Component {
31 .width(CommonConstants.FULL_WIDTH) 31 .width(CommonConstants.FULL_WIDTH)
32 .textOverflowStyle(3) 32 .textOverflowStyle(3)
33 .margin({ bottom: 8 }) 33 .margin({ bottom: 8 })
34 - .lineHeight(20) 34 + .lineHeight(22)
35 } 35 }
36 if (this.contentDTO.fullColumnImgUrls[0]) { 36 if (this.contentDTO.fullColumnImgUrls[0]) {
37 createImg({ contentDTO: this.contentDTO }) 37 createImg({ contentDTO: this.contentDTO })
@@ -102,6 +102,9 @@ struct createImg { @@ -102,6 +102,9 @@ struct createImg {
102 CardMediaInfo({ contentDTO: this.contentDTO }) 102 CardMediaInfo({ contentDTO: this.contentDTO })
103 } 103 }
104 .align(Alignment.BottomEnd) 104 .align(Alignment.BottomEnd)
  105 + .onClick((event: ClickEvent) => {
  106 + ProcessUtils.gotoVod(this.contentDTO)
  107 + })
105 } 108 }
106 } 109 }
107 } 110 }
@@ -40,7 +40,7 @@ export struct Card2Component { @@ -40,7 +40,7 @@ export struct Card2Component {
40 .maxLines(2) 40 .maxLines(2)
41 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 41 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
42 .align(Alignment.Start) 42 .align(Alignment.Start)
43 - .textIndent(this.contentDTO.objectType == '5' ? 40 : 0) 43 + .textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
44 } 44 }
45 .alignContent(Alignment.TopStart) 45 .alignContent(Alignment.TopStart)
46 46
@@ -12,7 +12,7 @@ const TAG: string = 'Card5Component'; @@ -12,7 +12,7 @@ const TAG: string = 'Card5Component';
12 @Component 12 @Component
13 export struct Card5Component { 13 export struct Card5Component {
14 @State contentDTO: ContentDTO = new ContentDTO(); 14 @State contentDTO: ContentDTO = new ContentDTO();
15 - @State titleShowPolicy: number | string = 1 15 + @Prop titleShowPolicy: number | string
16 @State loadImg: boolean = false; 16 @State loadImg: boolean = false;
17 @State clicked: boolean = false; 17 @State clicked: boolean = false;
18 18
@@ -22,12 +22,13 @@ export struct Card5Component { @@ -22,12 +22,13 @@ export struct Card5Component {
22 22
23 build() { 23 build() {
24 Stack() { 24 Stack() {
  25 +
25 Image(this.loadImg ? this.contentDTO.coverUrl : '') 26 Image(this.loadImg ? this.contentDTO.coverUrl : '')
26 .backgroundColor(0xf5f5f5) 27 .backgroundColor(0xf5f5f5)
27 .width(CommonConstants.FULL_WIDTH) 28 .width(CommonConstants.FULL_WIDTH)
28 .autoResize(true) 29 .autoResize(true)
29 .borderRadius($r('app.float.image_border_radius')) 30 .borderRadius($r('app.float.image_border_radius'))
30 - // if ((this.titleShowPolicy === 1 || this.contentDTO.titleShow === 1) && this.contentDTO.newsTitle) { 31 + if (this.titleShowPolicy === 1) {
31 Row() 32 Row()
32 .width(CommonConstants.FULL_WIDTH) 33 .width(CommonConstants.FULL_WIDTH)
33 .height(59) 34 .height(59)
@@ -41,20 +42,21 @@ export struct Card5Component { @@ -41,20 +42,21 @@ export struct Card5Component {
41 if (this.contentDTO.objectType == '5') { 42 if (this.contentDTO.objectType == '5') {
42 Notes({ objectType: this.contentDTO.objectType }) 43 Notes({ objectType: this.contentDTO.objectType })
43 } 44 }
  45 +
44 Text(this.contentDTO.newsTitle) 46 Text(this.contentDTO.newsTitle)
45 - .width(CommonConstants.FULL_WIDTH)// .height(CommonConstants.FULL_HEIGHT) 47 + .width(CommonConstants.FULL_WIDTH)
46 .fontColor(Color.White) 48 .fontColor(Color.White)
47 .fontSize($r('app.float.normal_text_size')) 49 .fontSize($r('app.float.normal_text_size'))
48 .fontWeight(FontWeight.Bold) 50 .fontWeight(FontWeight.Bold)
49 .maxLines(2) 51 .maxLines(2)
50 .align(Alignment.TopStart) 52 .align(Alignment.TopStart)
51 - .textIndent(this.contentDTO.objectType == '5' ? 40 : 0) 53 + .textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
52 }.alignContent(Alignment.TopStart) 54 }.alignContent(Alignment.TopStart)
53 } 55 }
54 .justifyContent(FlexAlign.Start) 56 .justifyContent(FlexAlign.Start)
55 - // .height(40)  
56 .margin({ left: 12, bottom: 10, right: 12 }) 57 .margin({ left: 12, bottom: 10, right: 12 })
57 - // } 58 +
  59 + }
58 } 60 }
59 .alignContent(Alignment.Bottom) 61 .alignContent(Alignment.Bottom)
60 .width(CommonConstants.FULL_WIDTH) 62 .width(CommonConstants.FULL_WIDTH)
@@ -45,11 +45,12 @@ export struct Card6Component { @@ -45,11 +45,12 @@ export struct Card6Component {
45 Text(`${this.contentDTO.newsTitle}`) 45 Text(`${this.contentDTO.newsTitle}`)
46 .fontColor(this.clicked ? 0x848484 : 0x222222) 46 .fontColor(this.clicked ? 0x848484 : 0x222222)
47 .fontSize(16) 47 .fontSize(16)
  48 + .lineHeight(24)
48 .fontWeight(FontWeight.Normal) 49 .fontWeight(FontWeight.Normal)
49 .maxLines(3) 50 .maxLines(3)
50 .alignSelf(ItemAlign.Start) 51 .alignSelf(ItemAlign.Start)
51 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 52 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
52 - .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 60 : 53 + .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
53 (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) || 54 (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
54 this.contentDTO.objectType == '5' ? 30 : 0) 55 this.contentDTO.objectType == '5' ? 30 : 0)
55 }.alignContent(Alignment.TopStart) 56 }.alignContent(Alignment.TopStart)
@@ -70,7 +71,7 @@ export struct Card6Component { @@ -70,7 +71,7 @@ export struct Card6Component {
70 .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5) 71 .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5)
71 .borderRadius(5) 72 .borderRadius(5)
72 .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4) 73 .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4)
73 - .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 80 : 180) 74 + .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156)
74 CardMediaInfo({ contentDTO: this.contentDTO }) 75 CardMediaInfo({ contentDTO: this.contentDTO })
75 } 76 }
76 .alignContent(Alignment.BottomEnd) 77 .alignContent(Alignment.BottomEnd)
@@ -43,8 +43,11 @@ export struct Card9Component { @@ -43,8 +43,11 @@ export struct Card9Component {
43 topRight: $r('app.float.image_border_radius') 43 topRight: $r('app.float.image_border_radius')
44 }) 44 })
45 45
  46 + if (this.contentDTO.objectType == '5') {
46 Notes({ objectType: 5 }) 47 Notes({ objectType: 5 })
47 .margin({ left: 5, bottom: 5 }) 48 .margin({ left: 5, bottom: 5 })
  49 + }
  50 +
48 }.alignContent(Alignment.BottomStart) 51 }.alignContent(Alignment.BottomStart)
49 52
50 // 时间线--后端返回三个, 53 // 时间线--后端返回三个,
@@ -13,10 +13,10 @@ export struct Notes { @@ -13,10 +13,10 @@ export struct Notes {
13 build() { 13 build() {
14 if (this.returnTypeTitleFn()) { 14 if (this.returnTypeTitleFn()) {
15 Text(this.returnTypeTitleFn()) 15 Text(this.returnTypeTitleFn())
16 - .fontSize($r('app.float.font_size_12')) 16 + .fontSize($r('app.float.font_size_11'))
17 .padding({ 17 .padding({
18 - left: 5,  
19 - right: 5, 18 + left: 4,
  19 + right: 4,
20 top: 3, 20 top: 3,
21 bottom: 3 21 bottom: 3
22 }) 22 })
@@ -20,6 +20,8 @@ export class publishCommentModel { @@ -20,6 +20,8 @@ export class publishCommentModel {
20 targetType: string = '' 20 targetType: string = ''
21 /*评论总数*/ 21 /*评论总数*/
22 totalCommentNumer: string = '0' 22 totalCommentNumer: string = '0'
  23 + /// 游客评论开关:visitorComment 1:打开;0:关闭
  24 + visitorComment: string = "0"
23 25
24 //评论传参 26 //评论传参
25 /*评论图片url,多个逗号隔开*/ 27 /*评论图片url,多个逗号隔开*/
@@ -8,9 +8,11 @@ import { HttpUtils } from 'wdNetwork/Index'; @@ -8,9 +8,11 @@ import { HttpUtils } from 'wdNetwork/Index';
8 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 8 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
9 import NoMoreLayout from '../../page/NoMoreLayout'; 9 import NoMoreLayout from '../../page/NoMoreLayout';
10 import { EmptyComponent } from '../../view/EmptyComponent'; 10 import { EmptyComponent } from '../../view/EmptyComponent';
  11 +import { ContentDetailDTO, Params } from 'wdBean/Index';
11 12
12 const TAG = 'CommentComponent'; 13 const TAG = 'CommentComponent';
13 14
  15 +
14 const testString = '因为读书的人\n是低着头向上看的人\n身处一隅,却能放眼世界\n2,因为读书的人\n总是比不读书的人\n活得有趣一点\n3,因为读书的人\n即使平凡,绝不平庸' 16 const testString = '因为读书的人\n是低着头向上看的人\n身处一隅,却能放眼世界\n2,因为读书的人\n总是比不读书的人\n活得有趣一点\n3,因为读书的人\n即使平凡,绝不平庸'
15 17
16 // @Entry 18 // @Entry
@@ -22,14 +24,20 @@ export struct CommentComponent { @@ -22,14 +24,20 @@ export struct CommentComponent {
22 @State isComments: boolean = true 24 @State isComments: boolean = true
23 /*必传*/ 25 /*必传*/
24 @ObjectLink publishCommentModel: publishCommentModel 26 @ObjectLink publishCommentModel: publishCommentModel
  27 + @Consume contentDetailData: ContentDetailDTO
25 listScroller: ListScroller = new ListScroller(); // scroller控制器 28 listScroller: ListScroller = new ListScroller(); // scroller控制器
26 historyOffset: number = 0; // 上次浏览到列表距离顶端的偏移量offset 29 historyOffset: number = 0; // 上次浏览到列表距离顶端的偏移量offset
27 - isloading: boolean = false  
28 @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource(); 30 @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource();
29 @State dialogController: CustomDialogController | null = null; 31 @State dialogController: CustomDialogController | null = null;
30 32
31 // @State private browSingModel: commentListModel = new commentListModel() 33 // @State private browSingModel: commentListModel = new commentListModel()
32 34
  35 + // 是否为固定高度模式。true时,里面上拉加载更多生效,外层不能包Scroll。
  36 + // false时,外层实现加载更多,并通过reachEndIncreament通知开发加载更多,reachEndLoadMoreFinish 通知上层加载更多完成
  37 + fixedHeightMode: boolean = false
  38 + @Prop @Watch("parentOnReachEnd") reachEndIncreament : number = 0
  39 + reachEndLoadMoreFinish?: () => void
  40 +
33 // 在自定义组件即将析构销毁时将dialogControlle置空 41 // 在自定义组件即将析构销毁时将dialogControlle置空
34 aboutToDisappear() { 42 aboutToDisappear() {
35 this.dialogController = null // 将dialogController置空 43 this.dialogController = null // 将dialogController置空
@@ -183,28 +191,49 @@ export struct CommentComponent { @@ -183,28 +191,49 @@ export struct CommentComponent {
183 191
184 // 加载更多 192 // 加载更多
185 ListItem() { 193 ListItem() {
186 - if (this.hasMore === false) { 194 + if (this.hasMore == false) {
187 NoMoreLayout() 195 NoMoreLayout()
188 } 196 }
189 } 197 }
190 } 198 }
191 -  
192 } 199 }
  200 + .margin({bottom: 10})
193 .onReachEnd(() => { 201 .onReachEnd(() => {
  202 + if (!this.fixedHeightMode) {
  203 + return
  204 + }
194 if (this.hasMore) { 205 if (this.hasMore) {
195 this.getData() 206 this.getData()
196 } 207 }
197 }) 208 })
198 - .enableScrollInteraction(false) 209 + .enableScrollInteraction(this.fixedHeightMode ? true: false)
  210 + // .nestedScroll({
  211 + // scrollForward: NestedScrollMode.PARENT_FIRST,
  212 + // scrollBackward: NestedScrollMode.SELF_FIRST
  213 + // })
199 } 214 }
200 215
201 } 216 }
202 217
  218 + parentOnReachEnd() {
  219 + if (this.fixedHeightMode) {
  220 + return
  221 + }
  222 + if (this.hasMore) {
  223 + this.getData()
  224 + } else {
  225 + if (this.reachEndLoadMoreFinish) {
  226 + this.reachEndLoadMoreFinish()
  227 + }
  228 + }
  229 + }
  230 +
203 //获取数据 231 //获取数据
204 async getData() { 232 async getData() {
205 commentViewModel.fetchContentCommentList(this.currentPage + '', this.publishCommentModel.targetId, 233 commentViewModel.fetchContentCommentList(this.currentPage + '', this.publishCommentModel.targetId,
206 this.publishCommentModel.targetType) 234 this.publishCommentModel.targetType)
207 .then(commentListModel => { 235 .then(commentListModel => {
  236 + console.log('评论:', JSON.stringify(commentListModel.list))
208 this.currentPage++ 237 this.currentPage++
209 238
210 if (Number.parseInt(commentListModel.totalCommentNum) > 239 if (Number.parseInt(commentListModel.totalCommentNum) >
@@ -237,6 +266,9 @@ export struct CommentComponent { @@ -237,6 +266,9 @@ export struct CommentComponent {
237 } else { 266 } else {
238 this.hasMore = false 267 this.hasMore = false
239 } 268 }
  269 + if (!this.fixedHeightMode && this.reachEndLoadMoreFinish) {
  270 + this.reachEndLoadMoreFinish()
  271 + }
240 }) 272 })
241 } 273 }
242 } 274 }
@@ -247,6 +279,7 @@ struct ChildCommentItem { @@ -247,6 +279,7 @@ struct ChildCommentItem {
247 @Link publishCommentModel: publishCommentModel 279 @Link publishCommentModel: publishCommentModel
248 @Link dialogController: CustomDialogController | null 280 @Link dialogController: CustomDialogController | null
249 @ObjectLink item: commentItemModel 281 @ObjectLink item: commentItemModel
  282 + @Consume contentDetailData: ContentDetailDTO
250 283
251 build() { 284 build() {
252 Column() { 285 Column() {
@@ -271,6 +304,14 @@ struct ChildCommentItem { @@ -271,6 +304,14 @@ struct ChildCommentItem {
271 .alignContent(Alignment.Center) 304 .alignContent(Alignment.Center)
272 .onClick(() => { 305 .onClick(() => {
273 // TODO 跳转个人详情 306 // TODO 跳转个人详情
  307 + // 跳转到号主页
  308 + if (this.contentDetailData.rmhInfo?.cnMainControl === 1) {
  309 + const params: Params = {
  310 + creatorId: this.contentDetailData.rmhInfo.rmhId,
  311 + pageID: ''
  312 + }
  313 + WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params)
  314 + }
274 }) 315 })
275 316
276 //昵称 317 //昵称
@@ -455,7 +496,7 @@ struct commentHeaderView { @@ -455,7 +496,7 @@ struct commentHeaderView {
455 .margin({ left: 8 }) 496 .margin({ left: 8 })
456 .alignContent(Alignment.Center) 497 .alignContent(Alignment.Center)
457 .onClick(() => { 498 .onClick(() => {
458 - // TODO 跳转个人详情 499 + commentViewModel.jumpToAccountPage(this.item)
459 }) 500 })
460 501
461 //昵称 502 //昵称
  1 +import { ContentDetailDTO, PageInfoDTO } from 'wdBean/Index'
  2 +import { publishCommentModel } from '../model/PublishCommentModel'
  3 +
  4 +@CustomDialog
  5 +export struct CommentListDialog {
  6 +
  7 + /// 内部使用
  8 + private publishCommentModel: publishCommentModel = new publishCommentModel()
  9 + controller?: CustomDialogController
  10 +
  11 + /// 外部初始化
  12 + contentDetail?: ContentDetailDTO
  13 + pageInfo?: PageInfoDTO
  14 +
  15 + build() {
  16 + }
  17 +
  18 +
  19 +}
@@ -11,11 +11,12 @@ export struct CommentTabComponent { @@ -11,11 +11,12 @@ export struct CommentTabComponent {
11 } 11 }
12 @ObjectLink publishCommentModel: publishCommentModel 12 @ObjectLink publishCommentModel: publishCommentModel
13 @Prop contentDetail: ContentDetailDTO 13 @Prop contentDetail: ContentDetailDTO
  14 + @Prop pageComponentType: number = -1 //1:视频详情页
14 /*展示类型*/ 15 /*展示类型*/
15 @State type: number = 1 16 @State type: number = 1
16 @State placeHolder: string = '说两句...' 17 @State placeHolder: string = '说两句...'
17 @State dialogController: CustomDialogController | null = null; 18 @State dialogController: CustomDialogController | null = null;
18 - styleType : number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏) 19 + styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏)
19 /*回调方法*/ 20 /*回调方法*/
20 dialogControllerConfirm: () => void = () => { 21 dialogControllerConfirm: () => void = () => {
21 } 22 }
@@ -46,9 +47,36 @@ export struct CommentTabComponent { @@ -46,9 +47,36 @@ export struct CommentTabComponent {
46 Row() { 47 Row() {
47 Stack({ alignContent: Alignment.Start }) { 48 Stack({ alignContent: Alignment.Start }) {
48 RelativeContainer() { 49 RelativeContainer() {
  50 +
  51 + if (this.pageComponentType === 1) {
  52 + Row() {
  53 +
  54 + }
  55 + .width('100%')
  56 + .height(30)
  57 + .borderRadius(2)
  58 + .backgroundColor(this.pageComponentType === 1 ? '#1a1a1a' : Color.Transparent)
  59 + .margin({
  60 + right: 16,
  61 + })
  62 + .alignRules({
  63 + top: { anchor: "__container__", align: VerticalAlign.Top },
  64 + left: { anchor: "__container__", align: HorizontalAlign.Start },
  65 + right: { anchor: "__container__", align: HorizontalAlign.End },
  66 + bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
  67 + })
  68 + .id("RowBg")
  69 + } else {
49 Image($r('app.media.comment_img_input_hui')) 70 Image($r('app.media.comment_img_input_hui'))
50 .objectFit(ImageFit.Fill) 71 .objectFit(ImageFit.Fill)
51 - .resizable({ slice: { top: 1, left: 1, right: 20, bottom: 1 } }) 72 + .resizable({
  73 + slice: {
  74 + top: 1,
  75 + left: 1,
  76 + right: 20,
  77 + bottom: 1
  78 + }
  79 + })
52 .alignRules({ 80 .alignRules({
53 top: { anchor: "__container__", align: VerticalAlign.Top }, 81 top: { anchor: "__container__", align: VerticalAlign.Top },
54 left: { anchor: "__container__", align: HorizontalAlign.Start }, 82 left: { anchor: "__container__", align: HorizontalAlign.Start },
@@ -56,6 +84,7 @@ export struct CommentTabComponent { @@ -56,6 +84,7 @@ export struct CommentTabComponent {
56 bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, 84 bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
57 }) 85 })
58 .id("Image") 86 .id("Image")
  87 + }
59 Text(this.placeHolder) 88 Text(this.placeHolder)
60 .fontSize(12) 89 .fontSize(12)
61 .fontColor('#999999') 90 .fontColor('#999999')
@@ -91,7 +120,7 @@ export struct CommentIconComponent { @@ -91,7 +120,7 @@ export struct CommentIconComponent {
91 @ObjectLink publishCommentModel: publishCommentModel 120 @ObjectLink publishCommentModel: publishCommentModel
92 /*展示类型*/ 121 /*展示类型*/
93 @State type: number = 1 122 @State type: number = 1
94 - styleType : number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏) 123 + styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏)
95 // aboutToAppear(): void { 124 // aboutToAppear(): void {
96 // setTimeout(() => { 125 // setTimeout(() => {
97 // this.publishCommentModel.totalCommentNumer = '444' 126 // this.publishCommentModel.totalCommentNumer = '444'
@@ -412,33 +412,7 @@ struct QualityCommentItem { @@ -412,33 +412,7 @@ struct QualityCommentItem {
412 412
413 jumpToAccountOwner() { 413 jumpToAccountOwner() {
414 414
415 - let url = HttpUrlUtils.getOtherUserDetailDataUrl()  
416 - let item : Record<string, string >= {  
417 - "creatorId": this.item.fromCreatorId || "",  
418 - "userType": `${this.item.fromUserType}`,  
419 - "userId": this.item.fromUserId || "-1",  
420 - }  
421 - HttpBizUtil.post<ResponseDTO<MasterDetailRes>>(url, item).then((result) => {  
422 - if (!result.data || result.data.mainControl != 1) {  
423 - ToastUtils.longToast("暂时无法查看该创作者主页")  
424 - return  
425 - }  
426 -  
427 - if (result.data.banControl == 1) {  
428 - ToastUtils.longToast("该账号已封禁,不予访问")  
429 - return  
430 - }  
431 -  
432 - if (result.data.userType === "1") { // 普通用户  
433 - let params: Record<string, string> = {'userId': result.data.userId};  
434 - WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params)  
435 - } else { // 非普通用户  
436 - ProcessUtils.gotoPeopleShipHomePage(result.data.creatorId)  
437 - }  
438 -  
439 - }).catch(() => {  
440 - ToastUtils.longToast("暂时无法查看该创作者主页")  
441 - }) 415 + commentViewModel.jumpToAccountPage(this.item)
442 } 416 }
443 417
444 jumpToDetail() { 418 jumpToDetail() {
  1 +import { MasterDetailRes } from 'wdBean/Index';
1 import { SpConstants } from 'wdConstant/Index'; 2 import { SpConstants } from 'wdConstant/Index';
2 -import { DateTimeUtils, Logger, SPHelper, ToastUtils, UserDataLocal } from 'wdKit/Index'; 3 +import {
  4 + AccountManagerUtils,
  5 + DateTimeUtils, DeviceUtil, Logger, SPHelper, ToastUtils, UserDataLocal } from 'wdKit/Index';
3 import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO } from 'wdNetwork/Index'; 6 import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO } from 'wdNetwork/Index';
4 import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; 7 import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest';
  8 +import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index';
5 import { 9 import {
6 commentItemModel, 10 commentItemModel,
7 commentListModel, 11 commentListModel,
@@ -160,7 +164,9 @@ class CommentViewModel { @@ -160,7 +164,9 @@ class CommentViewModel {
160 publishComment(model: publishCommentModel) { 164 publishComment(model: publishCommentModel) {
161 165
162 return new Promise<commentItemModel>((success, fail) => { 166 return new Promise<commentItemModel>((success, fail) => {
163 - let url = HttpUrlUtils.getPublishCommentUrl() 167 + const visitorMode = model.visitorComment == "1" && AccountManagerUtils.isLoginSync() == false
  168 + let url = visitorMode ? HttpUrlUtils.getNoUserPublishCommentUrl() : HttpUrlUtils.getPublishCommentUrl()
  169 +
164 let bean: Record<string, string> = {}; 170 let bean: Record<string, string> = {};
165 171
166 bean['targetId'] = model.targetId; 172 bean['targetId'] = model.targetId;
@@ -176,6 +182,11 @@ class CommentViewModel { @@ -176,6 +182,11 @@ class CommentViewModel {
176 bean['targetType'] = model.targetType 182 bean['targetType'] = model.targetType
177 bean['parentId'] = model.parentId 183 bean['parentId'] = model.parentId
178 184
  185 + if (visitorMode) {
  186 + bean['deviceId'] = DeviceUtil.clientId()
  187 + bean['userName'] = SPHelper.default.getSync(SpConstants.TOURIST_NICK_NAME, "") as string
  188 + }
  189 +
179 HttpRequest.post<ResponseDTO<commentItemModel>>(url, bean).then((data: ResponseDTO<commentItemModel>) => { 190 HttpRequest.post<ResponseDTO<commentItemModel>>(url, bean).then((data: ResponseDTO<commentItemModel>) => {
180 if (data.code != 0) { 191 if (data.code != 0) {
181 ToastUtils.showToast(data.message, 1000); 192 ToastUtils.showToast(data.message, 1000);
@@ -185,10 +196,9 @@ class CommentViewModel { @@ -185,10 +196,9 @@ class CommentViewModel {
185 ToastUtils.showToast(data.message, 1000); 196 ToastUtils.showToast(data.message, 1000);
186 let model = data.data as commentItemModel 197 let model = data.data as commentItemModel
187 198
188 - let userId = HttpUtils.getUserId()  
189 - let FIRSTCOMMENTTIME = SPHelper.default.getSync(SpConstants.FIRSTCOMMENTTIME, '') 199 + let firstCommentTime = SPHelper.default.getSync(SpConstants.FIRSTCOMMENTTIME, '') as string
190 200
191 - if (!userId && !FIRSTCOMMENTTIME) { 201 + if (visitorMode && firstCommentTime.length == 0) {
192 //保存首次评论时间 202 //保存首次评论时间
193 SPHelper.default.saveSync(SpConstants.FIRSTCOMMENTTIME, DateTimeUtils.formatDate(data.timestamp, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) 203 SPHelper.default.saveSync(SpConstants.FIRSTCOMMENTTIME, DateTimeUtils.formatDate(data.timestamp, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
194 } 204 }
@@ -472,6 +482,36 @@ class CommentViewModel { @@ -472,6 +482,36 @@ class CommentViewModel {
472 } 482 }
473 return false 483 return false
474 } 484 }
  485 +
  486 + jumpToAccountPage(commentItem: commentItemModel) {
  487 + let url = HttpUrlUtils.getOtherUserDetailDataUrl()
  488 + let item : Record<string, string >= {
  489 + "creatorId": commentItem.fromCreatorId || "",
  490 + "userType": `${commentItem.fromUserType}`,
  491 + "userId": commentItem.fromUserId || "-1",
  492 + }
  493 + HttpBizUtil.post<ResponseDTO<MasterDetailRes>>(url, item).then((result) => {
  494 + if (!result.data || result.data.mainControl != 1) {
  495 + ToastUtils.longToast("暂时无法查看该创作者主页")
  496 + return
  497 + }
  498 +
  499 + if (result.data.banControl == 1) {
  500 + ToastUtils.longToast("该账号已封禁,不予访问")
  501 + return
  502 + }
  503 +
  504 + if (result.data.userType === "1") { // 普通用户
  505 + let params: Record<string, string> = {'userId': result.data.userId};
  506 + WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params)
  507 + } else { // 非普通用户
  508 + ProcessUtils.gotoPeopleShipHomePage(result.data.creatorId)
  509 + }
  510 +
  511 + }).catch(() => {
  512 + ToastUtils.longToast("暂时无法查看该创作者主页")
  513 + })
  514 + }
475 } 515 }
476 516
477 517
@@ -214,7 +214,7 @@ struct CarouselLayout01CardView { @@ -214,7 +214,7 @@ struct CarouselLayout01CardView {
214 .align(Alignment.Bottom) 214 .align(Alignment.Bottom)
215 .maxLines(CompUtils.MAX_LINES_2) 215 .maxLines(CompUtils.MAX_LINES_2)
216 .textOverflow({ overflow: TextOverflow.Ellipsis }) 216 .textOverflow({ overflow: TextOverflow.Ellipsis })
217 - .textIndent(this.item.objectType == '5' ? 40 : 0) 217 + .textIndent(this.item.objectType == '5' ? 35 : 0)
218 } 218 }
219 // .height(39) 219 // .height(39)
220 .padding({ 220 .padding({
@@ -231,7 +231,7 @@ struct CarouselLayout01CardView { @@ -231,7 +231,7 @@ struct CarouselLayout01CardView {
231 .height(CommonConstants.FULL_PARENT) 231 .height(CommonConstants.FULL_PARENT)
232 } 232 }
233 .width(CommonConstants.FULL_WIDTH) 233 .width(CommonConstants.FULL_WIDTH)
234 - .aspectRatio(CompUtils.ASPECT_RATIO_2_1) 234 + .aspectRatio(CompUtils.ASPECT_RATIO_16_9)
235 .alignContent(Alignment.BottomStart) 235 .alignContent(Alignment.BottomStart)
236 .hoverEffect(HoverEffect.Scale) 236 .hoverEffect(HoverEffect.Scale)
237 } 237 }
@@ -40,6 +40,7 @@ export struct ZhSingleRow03 { @@ -40,6 +40,7 @@ export struct ZhSingleRow03 {
40 40
41 // 请求所有预约状态 41 // 请求所有预约状态
42 async getReserveState() { 42 async getReserveState() {
  43 + this.reservedIds = []
43 const reserveBean: reserveReqItem[] = this.compDTO.operDataList.map((item: ContentDTO) => { 44 const reserveBean: reserveReqItem[] = this.compDTO.operDataList.map((item: ContentDTO) => {
44 const reqItem: reserveReqItem = { 45 const reqItem: reserveReqItem = {
45 liveId: item.objectId.toString(), 46 liveId: item.objectId.toString(),
1 -import { commentInfo, CompDTO, ContentDTO, Params } from 'wdBean'; 1 +import { commentInfo, CompDTO, ContentDTO, Params, batchLikeAndCollectResult } from 'wdBean';
2 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 2 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
3 -import { DateTimeUtils, SPHelper } from 'wdKit/Index'; 3 +import { DateTimeUtils, SPHelper, Logger } from 'wdKit/Index';
4 import { ProcessUtils } from 'wdRouter'; 4 import { ProcessUtils } from 'wdRouter';
5 import { SpConstants } from 'wdConstant/Index' 5 import { SpConstants } from 'wdConstant/Index'
  6 +import {
  7 + batchLikeAndCollectParams,
  8 +} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
  9 +import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel';
  10 +import commentViewModel from '../../components/comment/viewmodel/CommentViewModel';
  11 +import { commentItemModel } from '../../components/comment/model/CommentModel'
6 12
7 /** 13 /**
8 * 精选评论卡 14 * 精选评论卡
9 * Zh_Single_Row-06 15 * Zh_Single_Row-06
10 */ 16 */
11 const TAG = 'Zh_Single_Row-06' 17 const TAG = 'Zh_Single_Row-06'
12 -  
13 -// interface commentInfo {  
14 -// commentTitle: string,  
15 -// newsTitle: string,  
16 -// userName: string,  
17 -// userHeaderUrl: string,  
18 -// publishTime: number  
19 -// }  
20 -// interface operDataListItem {  
21 -// commentInfo: commentInfo  
22 -// }  
23 -// interface CommentData{  
24 -// operDataList: Array<operDataListItem>  
25 -// }  
26 -  
27 @Entry 18 @Entry
28 @Component 19 @Component
29 export struct ZhSingleRow06 { 20 export struct ZhSingleRow06 {
30 @State compDTO: CompDTO = {} as CompDTO 21 @State compDTO: CompDTO = {} as CompDTO
31 - @State likeBl: boolean = false; 22 + @State newsStatusOfUser: batchLikeAndCollectResult = {
  23 + likeStatus: '0'
  24 + } as batchLikeAndCollectResult // 点赞、收藏状态
  25 +
  26 + aboutToAppear(): void {
  27 + this.getInteractDataStatus()
  28 + }
32 29
33 - async likeAction() { 30 + /**
  31 + * 点赞、取消点赞
  32 + */
  33 + async toggleLikeStatus() {
  34 + // 未登录,跳转登录
34 const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') 35 const user_id = await SPHelper.default.get(SpConstants.USER_ID, '')
35 if (!user_id) { 36 if (!user_id) {
36 WDRouterRule.jumpWithPage(WDRouterPage.loginPage) 37 WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
37 return 38 return
38 } 39 }
39 40
40 - if (this.likeBl) {  
41 - this.likeBl = false;  
42 - } else {  
43 - this.likeBl = true; 41 + const commentInfo = this.compDTO.operDataList[0]?.commentInfo as commentInfo;
  42 + // commentLikeChange(this.item)
  43 + this.newsStatusOfUser.likeStatus = this.newsStatusOfUser.likeStatus === '1' ? '0' : '1';
  44 + const commentLikeParam = {
  45 + targetId: commentInfo.newsId || '',
  46 + id: commentInfo.commentId,
  47 + targetType: commentInfo?.objectType || '',
  48 + api_status: this.newsStatusOfUser?.likeStatus == '1' ? false : true
  49 + } as commentItemModel;
  50 + commentViewModel.commentLike(commentLikeParam).then(() => {
  51 + }).catch(() => {
  52 + this.newsStatusOfUser.likeStatus = this.newsStatusOfUser.likeStatus === '1' ? '0' : '1';
  53 + })
  54 + }
  55 +
  56 + // 已登录->查询用户对作品点赞、收藏状态
  57 + async getInteractDataStatus() {
  58 + // 未登录,跳转登录
  59 + const user_id = await SPHelper.default.get(SpConstants.USER_ID, '')
  60 + if (!user_id) {
  61 + return
  62 + }
  63 + try {
  64 + const params: batchLikeAndCollectParams = {
  65 + contentList: [
  66 + {
  67 + contentId: this.compDTO.operDataList[0]?.commentInfo?.newsId + '',
  68 + contentType: this.compDTO.operDataList[0]?.commentInfo?.newsType + '',
  69 + }
  70 + ]
  71 + }
  72 + let data = await MultiPictureDetailViewModel.getInteractDataStatus(params)
  73 + Logger.info(TAG, 'ZhSingleRow06-data', JSON.stringify(data))
  74 + this.newsStatusOfUser = data[0];
  75 + Logger.info(TAG, `ZhSingleRow06-newsStatusOfUser:${JSON.stringify(this.newsStatusOfUser)}`)
  76 + } catch (exception) {
  77 + console.error(TAG, JSON.stringify(exception))
44 } 78 }
45 } 79 }
46 80
@@ -95,7 +129,7 @@ export struct ZhSingleRow06 { @@ -95,7 +129,7 @@ export struct ZhSingleRow06 {
95 .fontColor(0x999999) 129 .fontColor(0x999999)
96 130
97 Row(){ 131 Row(){
98 - Image(this.likeBl ? $r('app.media.icon_like_select') : $r('app.media.icon_like')) 132 + Image(Number(this.newsStatusOfUser?.likeStatus) == 1 ? $r('app.media.icon_like_select') : $r('app.media.icon_like'))
99 .width(16) 133 .width(16)
100 .height(16) 134 .height(16)
101 .margin({right: 3}) 135 .margin({right: 3})
@@ -103,9 +137,11 @@ export struct ZhSingleRow06 { @@ -103,9 +137,11 @@ export struct ZhSingleRow06 {
103 Text('点赞') 137 Text('点赞')
104 .fontSize(15) 138 .fontSize(15)
105 .fontColor(0x999999) 139 .fontColor(0x999999)
  140 + .onClick(() => {
  141 + })
106 } 142 }
107 .onClick(() => { 143 .onClick(() => {
108 - this.likeAction() 144 + this.toggleLikeStatus()
109 }) 145 })
110 } 146 }
111 .justifyContent(FlexAlign.SpaceBetween) 147 .justifyContent(FlexAlign.SpaceBetween)
  1 +/**
  2 + * 直播页面点赞动画
  3 + */
  4 +
  5 +interface animationItem {
  6 + x: string | number;
  7 + y: string | number;
  8 + opacity: number;
  9 + name: string;
  10 + key: string;
  11 + url: Resource
  12 +}
  13 +
  14 +@Component
  15 +export struct LikeAnimationView {
  16 + @State @Watch('countChange') count: number = 0
  17 + @State imgList: Resource[] =
  18 + [$r('app.media.like_animation_1'), $r('app.media.like_animation_2'), $r('app.media.like_animation_3')]
  19 + @State animationList: animationItem[] = []
  20 +
  21 + countChange() {
  22 + this.animationList.push({
  23 + name: 'xxxx',
  24 + x: 0,
  25 + y: 0,
  26 + opacity: 1,
  27 + key: Math.random() + '',
  28 + url: this.getRandomUrl()
  29 +
  30 + })
  31 + }
  32 +
  33 + getRandomUrl(): Resource {
  34 + if (Math.random() >= 0 && Math.random() >= 0.33) {
  35 + return this.imgList[0]
  36 + } else if (Math.random() >= 0.33 && Math.random() >= 0.66) {
  37 + return this.imgList[1]
  38 + } else {
  39 + return this.imgList[2]
  40 + }
  41 + }
  42 +
  43 + startAnimation() {
  44 +
  45 + }
  46 +
  47 + stopAnimation() {
  48 +
  49 + }
  50 +
  51 + aboutToAppear(): void {
  52 + }
  53 +
  54 + aboutToDisappear(): void {
  55 + }
  56 +
  57 + build() {
  58 + Stack() {
  59 + ForEach(this.animationList, (item: animationItem) => {
  60 + Image(item.url)
  61 + .width(48)
  62 + .height(48)
  63 + }, (item: animationItem) => item.key)
  64 + }
  65 +
  66 + }
  67 +}
1 -import lottie, { AnimationSegment } from '@ohos/lottie'; 1 +import lottie, { AnimationItem, AnimationSegment } from '@ohos/lottie';
2 2
3 @Component 3 @Component
4 export struct LottieView { 4 export struct LottieView {
5 - @Prop name: string = ''  
6 - @Prop path: string = ''  
7 - @Prop lottieWidth?: number = 30  
8 - @Prop lottieHeight?: number = 30  
9 - @Prop autoplay?: boolean = false  
10 - @Prop loop?: boolean = false 5 + @Prop name: string
  6 + @Prop path: string
  7 + @Prop lottieWidth: number = 30
  8 + @Prop lottieHeight: number = 30
  9 + @Prop autoplay: boolean = false
  10 + @Prop loop: boolean = false
11 @Prop initialSegment?: AnimationSegment = [0, 120] // 动画起始帧 11 @Prop initialSegment?: AnimationSegment = [0, 120] // 动画起始帧
12 - @Prop onReady: (animateItem: ESObject) => void // 动画初始化完成事件 12 + @Prop onReady: (animateItem: AnimationItem | null) => void // 动画初始化完成事件
13 @Prop onComplete?: () => void // 动画完成事件 13 @Prop onComplete?: () => void // 动画完成事件
14 - private politeChickyController: CanvasRenderingContext2D = new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象  
15 - private animateItem: ESObject = null; // 初始化loadAnimation接口的返回对象 14 + private politeChickyController: CanvasRenderingContext2D =
  15 + new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象
  16 + private animateItem: AnimationItem | null = null; // 初始化loadAnimation接口的返回对象
16 17
17 // 页面隐藏销毁动画 18 // 页面隐藏销毁动画
18 onPageHide(): void { 19 onPageHide(): void {
19 - this.animateItem.destroy() 20 + this.animateItem?.destroy()
20 21
21 if (this.onComplete) { 22 if (this.onComplete) {
22 - this.animateItem.removeEventListener('complete', this.onComplete) 23 + this.animateItem?.removeEventListener('complete', this.onComplete)
23 } 24 }
24 } 25 }
25 26
@@ -44,7 +45,7 @@ export struct LottieView { @@ -44,7 +45,7 @@ export struct LottieView {
44 // initialSegment: this.initialSegment 45 // initialSegment: this.initialSegment
45 }) 46 })
46 if (this.initialSegment) { 47 if (this.initialSegment) {
47 - this.animateItem.initialSegment = this.initialSegment 48 + this.animateItem.segments = this.initialSegment
48 } 49 }
49 50
50 if (this.onComplete) { 51 if (this.onComplete) {
@@ -57,7 +58,7 @@ export struct LottieView { @@ -57,7 +58,7 @@ export struct LottieView {
57 Stack({ alignContent: Alignment.TopStart }) { 58 Stack({ alignContent: Alignment.TopStart }) {
58 Canvas(this.politeChickyController) 59 Canvas(this.politeChickyController)
59 .width(this.lottieWidth) 60 .width(this.lottieWidth)
60 - .height(this.lottieHeight) 61 + .height(this.lottieHeight)// .backgroundColor(Color.Black)
61 .onReady(() => { 62 .onReady(() => {
62 this.loadAnimation(); 63 this.loadAnimation();
63 if (this.onReady) { 64 if (this.onReady) {
@@ -65,7 +66,7 @@ export struct LottieView { @@ -65,7 +66,7 @@ export struct LottieView {
65 } 66 }
66 }) 67 })
67 .onClick(() => { 68 .onClick(() => {
68 - this.animateItem.play() 69 + this.animateItem?.play()
69 }) 70 })
70 } 71 }
71 } 72 }
1 import MinePageMoreFunctionModel from '../../viewmodel/MinePageMoreFunctionModel' 1 import MinePageMoreFunctionModel from '../../viewmodel/MinePageMoreFunctionModel'
2 -import { WDRouterRule, WDRouterPage } from 'wdRouter' 2 +import { WDRouterRule, WDRouterPage, ProcessUtils } from 'wdRouter'
3 import { Params } from 'wdBean'; 3 import { Params } from 'wdBean';
4 import { ToastUtils } from 'wdKit/Index'; 4 import { ToastUtils } from 'wdKit/Index';
5 5
@@ -77,7 +77,7 @@ export default struct MinePageMoreFunctionUI { @@ -77,7 +77,7 @@ export default struct MinePageMoreFunctionUI {
77 }else if (item.msg == "关于") { // 关于 77 }else if (item.msg == "关于") { // 关于
78 WDRouterRule.jumpWithPage(WDRouterPage.aboutPage) 78 WDRouterRule.jumpWithPage(WDRouterPage.aboutPage)
79 }else if (item.msg == "意见反馈") { // 关于 79 }else if (item.msg == "意见反馈") { // 关于
80 - ToastUtils.shortToast("待开发") 80 + ProcessUtils.gotoFeedBackActivity()
81 } 81 }
82 }) 82 })
83 .height('117lpx') 83 .height('117lpx')
1 import { WDRouterRule, WDRouterPage } from 'wdRouter' 1 import { WDRouterRule, WDRouterPage } from 'wdRouter'
  2 +import MinePageDatasModel from '../../model/MinePageDatasModel'
2 import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem' 3 import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem'
  4 +import { PagePersonFunction } from './PagePersonFunction'
3 5
  6 +
  7 +const TAG = "MinePagePersonFunctionUI"
4 @Component 8 @Component
5 export default struct MinePagePersonFunctionUI { 9 export default struct MinePagePersonFunctionUI {
6 @Link personalData:MinePagePersonalFunctionsItem[] 10 @Link personalData:MinePagePersonalFunctionsItem[]
@@ -10,30 +14,7 @@ export default struct MinePagePersonFunctionUI { @@ -10,30 +14,7 @@ export default struct MinePagePersonFunctionUI {
10 Grid(){ 14 Grid(){
11 ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{ 15 ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{
12 GridItem(){ 16 GridItem(){
13 - Row(){  
14 - Column(){  
15 - Image(item.imgSrc)  
16 - .width('46lpx')  
17 - .height('46lpx')  
18 - .objectFit(ImageFit.Auto)  
19 - .interpolation(ImageInterpolation.High)  
20 - Text(`${item.msg}`)  
21 - .margin({top:'8lpx'})  
22 - .height('23lpx')  
23 - .fontColor($r('app.color.color_222222'))  
24 - .fontSize('23lpx')  
25 - }  
26 - .alignItems(HorizontalAlign.Center)  
27 - .width('100%')  
28 - Blank()  
29 - .layoutWeight(1)  
30 - if(index % 4 < 3 && index != this.personalData.length-1){  
31 - Text().backgroundColor($r('app.color.color_222222'))  
32 - .opacity(0.1)  
33 - .width('2lpx')  
34 - .height('29lpx')  
35 - }  
36 - } 17 + PagePersonFunction({ item: item, noDivider : (index % 4 < 3 && index != this.personalData.length-1) ? false : true})
37 }.onClick(()=>{ 18 }.onClick(()=>{
38 console.log(index+"") 19 console.log(index+"")
39 switch (item.msg){ 20 switch (item.msg){
@@ -42,7 +23,8 @@ export default struct MinePagePersonFunctionUI { @@ -42,7 +23,8 @@ export default struct MinePagePersonFunctionUI {
42 WDRouterRule.jumpWithPage(WDRouterPage.loginPage) 23 WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
43 return 24 return
44 }else { 25 }else {
45 - WDRouterRule.jumpWithPage(WDRouterPage.mineHomePage) 26 + let params: Record<string, string> = {'comment': "1"};
  27 + WDRouterRule.jumpWithPage(WDRouterPage.mineHomePage,params)
46 } 28 }
47 break; 29 break;
48 } 30 }
@@ -83,6 +65,7 @@ export default struct MinePagePersonFunctionUI { @@ -83,6 +65,7 @@ export default struct MinePagePersonFunctionUI {
83 WDRouterRule.jumpWithPage(WDRouterPage.loginPage) 65 WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
84 return 66 return
85 } 67 }
  68 + this.messageClick()
86 WDRouterRule.jumpWithPage(WDRouterPage.mineMessagePage) 69 WDRouterRule.jumpWithPage(WDRouterPage.mineMessagePage)
87 break; 70 break;
88 } 71 }
@@ -91,11 +74,18 @@ export default struct MinePagePersonFunctionUI { @@ -91,11 +74,18 @@ export default struct MinePagePersonFunctionUI {
91 .height('117lpx') 74 .height('117lpx')
92 }) 75 })
93 } 76 }
94 - // .rowsTemplate('1fr 1fr')  
95 - .rowsTemplate('1fr') 77 + .rowsTemplate('1fr 1fr')
96 .columnsTemplate('1fr 1fr 1fr 1fr') 78 .columnsTemplate('1fr 1fr 1fr 1fr')
97 - // .height('234lpx')  
98 - .height('167lpx') 79 + .height('234lpx')
99 .margin({top:'31lpx',left:'23lpx',right:'23lpx' }) 80 .margin({top:'31lpx',left:'23lpx',right:'23lpx' })
100 } 81 }
  82 +
  83 + messageClick(){
  84 + MinePageDatasModel.sendClickMessageData().then((value) => {
  85 + console.log(TAG, "进入消息页面")
  86 + }).catch((err: Error) => {
  87 + console.log(TAG, JSON.stringify(err))
  88 + })
  89 + }
101 } 90 }
  91 +
  1 +import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem'
  2 +
  3 +@Component
  4 +export struct PagePersonFunction{
  5 + @ObjectLink item: MinePagePersonalFunctionsItem
  6 + @State noDivider:boolean = false
  7 +
  8 + build() {
  9 + Row(){
  10 + Column(){
  11 + Stack({ alignContent: Alignment.TopEnd }){
  12 + Image(this.item.imgSrc)
  13 + .objectFit(ImageFit.Auto)
  14 + .interpolation(ImageInterpolation.High)
  15 + if (this.item.isShowRedPoint) {
  16 + Button()
  17 + .type(ButtonType.Circle)
  18 + .width("12lpx")
  19 + .height("12lpx")
  20 + .backgroundColor($r('app.color.color_ED2800'))
  21 + }
  22 + }.width('46lpx')
  23 + .height('46lpx')
  24 +
  25 + Text(`${this.item.msg}`)
  26 + .margin({top:'8lpx'})
  27 + .height('23lpx')
  28 + .fontColor($r('app.color.color_222222'))
  29 + .fontSize('23lpx')
  30 + }
  31 + .alignItems(HorizontalAlign.Center)
  32 + .width('100%')
  33 + Blank()
  34 + .layoutWeight(1)
  35 + if(!this.noDivider){
  36 + Text().backgroundColor($r('app.color.color_222222'))
  37 + .opacity(0.1)
  38 + .width('2lpx')
  39 + .height('29lpx')
  40 + }
  41 + }
  42 + }
  43 +
  44 +}
1 import { SpConstants } from 'wdConstant/Index' 1 import { SpConstants } from 'wdConstant/Index'
2 -import { DateTimeUtils, SPHelper, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index' 2 +import { SPHelper, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index'
3 import { HttpUtils } from 'wdNetwork/Index' 3 import { HttpUtils } from 'wdNetwork/Index'
4 import { WDRouterRule, WDRouterPage } from 'wdRouter/Index' 4 import { WDRouterRule, WDRouterPage } from 'wdRouter/Index'
5 import MinePageDatasModel from '../../../model/MinePageDatasModel' 5 import MinePageDatasModel from '../../../model/MinePageDatasModel'
@@ -116,9 +116,14 @@ export struct FollowChildComponent{ @@ -116,9 +116,14 @@ export struct FollowChildComponent{
116 }.height('202lpx') 116 }.height('202lpx')
117 .justifyContent(FlexAlign.Start) 117 .justifyContent(FlexAlign.Start)
118 118
119 - Text().backgroundColor($r('app.color.color_EDEDED')) 119 + // Text().backgroundColor($r('app.color.color_EDEDED'))
  120 + // .width('100%')
  121 + // .height('2lpx')
  122 + Divider()
120 .width('100%') 123 .width('100%')
121 .height('2lpx') 124 .height('2lpx')
  125 + .color($r('app.color.color_F5F5F5'))
  126 + .strokeWidth('1lpx')
122 }.width('100%') 127 }.width('100%')
123 128
124 }else { 129 }else {
@@ -230,9 +235,15 @@ export struct FollowChildComponent{ @@ -230,9 +235,15 @@ export struct FollowChildComponent{
230 }.height('146lpx') 235 }.height('146lpx')
231 .justifyContent(FlexAlign.Center) 236 .justifyContent(FlexAlign.Center)
232 237
233 - Text().backgroundColor($r('app.color.color_EDEDED')) 238 + // Text().backgroundColor($r('app.color.color_EDEDED'))
  239 + // .width('100%')
  240 + // .height('2lpx')
  241 +
  242 + Divider()
234 .width('100%') 243 .width('100%')
235 .height('2lpx') 244 .height('2lpx')
  245 + .color($r('app.color.color_F5F5F5'))
  246 + .strokeWidth('1lpx')
236 }.width('100%') 247 }.width('100%')
237 248
238 } 249 }
@@ -255,12 +266,6 @@ export struct FollowChildComponent{ @@ -255,12 +266,6 @@ export struct FollowChildComponent{
255 this.data.status = this.data.status ==="0"?"1":"0" 266 this.data.status = this.data.status ==="0"?"1":"0"
256 267
257 UserDataLocal.setUserFollowOperation(this.data.creatorId+","+this.data.status) 268 UserDataLocal.setUserFollowOperation(this.data.creatorId+","+this.data.status)
258 -  
259 - // if(this.data.status === "1"){  
260 - // UserDataLocal.setUserFollowOperation(DateTimeUtils.getTimeStamp()+"")  
261 - // }else{  
262 - // UserDataLocal.setUserFollowOperation(DateTimeUtils.getTimeStamp()+","+this.data.creatorId)  
263 - // }  
264 } 269 }
265 } 270 }
266 }) 271 })
@@ -30,10 +30,9 @@ export struct HomePageBottomCommentComponent { @@ -30,10 +30,9 @@ export struct HomePageBottomCommentComponent {
30 build() { 30 build() {
31 Column() { 31 Column() {
32 if (this.isGetRequest == true) { 32 if (this.isGetRequest == true) {
33 - Divider().width('100%') 33 + Text().backgroundColor($r('app.color.color_EDEDED'))
  34 + .width('100%')
34 .height('2lpx') 35 .height('2lpx')
35 - .strokeWidth('1lpx')  
36 - .backgroundColor($r('app.color.color_EDEDED'))  
37 } 36 }
38 if (this.count === 0) { 37 if (this.count === 0) {
39 if (this.isGetRequest == true) { 38 if (this.isGetRequest == true) {
@@ -65,10 +65,9 @@ export struct HomePageBottomFollowComponent { @@ -65,10 +65,9 @@ export struct HomePageBottomFollowComponent {
65 65
66 Column() { 66 Column() {
67 if (this.isGetRequest == true) { 67 if (this.isGetRequest == true) {
68 - Divider().width('100%') 68 + Text().backgroundColor($r('app.color.color_EDEDED'))
  69 + .width('100%')
69 .height('2lpx') 70 .height('2lpx')
70 - .strokeWidth('1lpx')  
71 - .backgroundColor($r('app.color.color_EDEDED'))  
72 } 71 }
73 72
74 if (this.count === 0) { 73 if (this.count === 0) {
@@ -30,10 +30,9 @@ export struct OtherHomePageBottomCommentComponent { @@ -30,10 +30,9 @@ export struct OtherHomePageBottomCommentComponent {
30 30
31 build() { 31 build() {
32 Column() { 32 Column() {
33 - Divider().width('100%') 33 + Text().backgroundColor($r('app.color.color_EDEDED'))
  34 + .width('100%')
34 .height('2lpx') 35 .height('2lpx')
35 - .strokeWidth('1lpx')  
36 - .backgroundColor($r('app.color.color_EDEDED'))  
37 36
38 if (this.count === 0) { 37 if (this.count === 0) {
39 if (this.isGetRequest == true) { 38 if (this.isGetRequest == true) {
@@ -30,10 +30,9 @@ export struct OtherHomePageBottomFollowComponent{ @@ -30,10 +30,9 @@ export struct OtherHomePageBottomFollowComponent{
30 30
31 build(){ 31 build(){
32 Column(){ 32 Column(){
33 - Divider().width('100%') 33 + Text().backgroundColor($r('app.color.color_EDEDED'))
  34 + .width('100%')
34 .height('2lpx') 35 .height('2lpx')
35 - .strokeWidth('1lpx')  
36 - .backgroundColor($r('app.color.color_EDEDED'))  
37 36
38 if(this.count === 0){ 37 if(this.count === 0){
39 Column(){ 38 Column(){
  1 +import { StringUtils } from 'wdKit/Index'
  2 +import { MessageItem } from '../../../viewmodel/MessageItem'
  3 +
  4 +const TAG = "MessageListUI"
  5 +
  6 +@Component
  7 +export struct MessageListItemUI {
  8 + @ObjectLink item: MessageItem
  9 + @State index:number = -1
  10 +
  11 + build() {
  12 + Column(){
  13 + Column() {
  14 + Row() {
  15 + Row() {
  16 + Image(this.item.imgSrc)
  17 + .objectFit(ImageFit.Auto)
  18 + .width('92lpx')
  19 + .height('92lpx')
  20 + .margin({ right: '15lpx' })
  21 +
  22 + Column() {
  23 + Text(this.item.title)
  24 + .fontWeight(500)
  25 + .fontSize('31lpx')
  26 + .lineHeight('42lpx')
  27 + .fontColor($r('app.color.color_222222'))
  28 + .maxLines(1)
  29 + .margin({ bottom: StringUtils.isNotEmpty(this.item.desc)?'8lpx':0 })
  30 +
  31 + if(StringUtils.isNotEmpty(this.item.desc)){
  32 + Text(`${this.item.desc}`)
  33 + .fontColor($r('app.color.color_999999'))
  34 + .fontSize('27lpx')
  35 + .lineHeight('38lpx')
  36 + .fontWeight(400)
  37 + .maxLines(1)
  38 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  39 + }
  40 + }
  41 + .height('92lpx')
  42 + .layoutWeight(1)
  43 + .alignItems(HorizontalAlign.Start)
  44 + .justifyContent(StringUtils.isNotEmpty(this.item.desc)?FlexAlign.Start:FlexAlign.Center)
  45 + }.layoutWeight(1)
  46 +
  47 + Column() {
  48 + Text(`${this.item.time}`)
  49 + .fontColor($r('app.color.color_999999'))
  50 + .fontSize('23lpx')
  51 + .fontWeight(500)
  52 + .lineHeight('35lpx')
  53 + .margin({ bottom: this.item.unReadCount > 0 ?'8lpx':0 })
  54 +
  55 + if(this.item.unReadCount > 0){
  56 + Button(){
  57 + Text(`${this.item.unReadCount}`)
  58 + .fontWeight(400)
  59 + .fontSize("18lpx")
  60 + .fontColor($r('app.color.white'))
  61 + }
  62 + .type((this.item.unReadCount>0 && this.item.unReadCount < 10 ? ButtonType.Circle:ButtonType.Capsule))
  63 + .backgroundColor($r("app.color.color_ED2800"))
  64 + .stateEffect(false)
  65 + .height("27lpx")
  66 + .constraintSize({minWidth:"27lpx"})
  67 + }
  68 + }
  69 + .justifyContent(FlexAlign.Start)
  70 + .alignItems(HorizontalAlign.End)
  71 + .height('92lpx')
  72 + }
  73 + .width('100%')
  74 + .height('92lpx')
  75 + .justifyContent(FlexAlign.SpaceBetween)
  76 +
  77 + }.height('154lpx')
  78 + .width("100%")
  79 + .justifyContent(FlexAlign.Center)
  80 +
  81 + Text().backgroundColor($r('app.color.color_EDEDED'))
  82 + .width('100%')
  83 + .height('1lpx')
  84 + .visibility(this.index != 3 ?Visibility.Visible:Visibility.None)
  85 + }
  86 + }
  87 +
  88 +
  89 +}
1 -import { StringUtils, ToastUtils } from 'wdKit/Index' 1 +import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index'
  2 +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
  3 +import { WDMessageCenterMessageType } from '../../../model/InteractMessageModel'
2 import MinePageDatasModel from '../../../model/MinePageDatasModel' 4 import MinePageDatasModel from '../../../model/MinePageDatasModel'
3 import { MessageItem } from '../../../viewmodel/MessageItem' 5 import { MessageItem } from '../../../viewmodel/MessageItem'
4 import { CustomTitleUI } from '../../reusable/CustomTitleUI' 6 import { CustomTitleUI } from '../../reusable/CustomTitleUI'
  7 +import { MessageListItemUI } from './MessageListItemUI'
5 8
6 const TAG = "MessageListUI" 9 const TAG = "MessageListUI"
7 10
@@ -11,83 +14,149 @@ export struct MessageListUI { @@ -11,83 +14,149 @@ export struct MessageListUI {
11 14
12 aboutToAppear() { 15 aboutToAppear() {
13 this.msgData = MinePageDatasModel.getMessageData() 16 this.msgData = MinePageDatasModel.getMessageData()
  17 + this.getHistoryPush()
  18 + this.getMessagePush()
14 } 19 }
15 20
16 - build() {  
17 - Column() {  
18 - //标题栏目  
19 - CustomTitleUI({ titleName: "消息" }) 21 + //历史推送
  22 + getHistoryPush() {
  23 + MinePageDatasModel.getHistoryPushData("1", "1").then((value) => {
  24 + if (value != null && value.list != null && value.list.length > 0) {
  25 + this.msgData.forEach((item) => {
  26 + if (item.title == "历史推送") {
  27 + if (value.list != null && value.list[0] != null) {
  28 + if (value.list[0].newsTitle) {
  29 + item.desc = value.list[0].newsTitle
  30 + }
  31 + if (value.list[0].publishTime) {
  32 + item.time = this.getPublishTime("",value.list[0].publishTime)
  33 + }
  34 + }
  35 + }
  36 + })
  37 + }
  38 + }).catch((err: Error) => {
  39 + console.log(TAG, JSON.stringify(err))
  40 + })
  41 + }
20 42
21 - List() {  
22 - ForEach(this.msgData, (item: MessageItem, index: number) => {  
23 - ListItem() {  
24 - Column(){  
25 - Column() {  
26 - Row() {  
27 - Row() {  
28 - Image(item.imgSrc)  
29 - .objectFit(ImageFit.Auto)  
30 - .width('92lpx')  
31 - .height('92lpx')  
32 - .margin({ right: '15lpx' }) 43 + //互动消息 预约消息 系统消息
  44 + getMessagePush() {
  45 + MinePageDatasModel.getMessageUnReadData().then((value) => {
  46 + this.msgData.forEach((item) => {
  47 + if (item.title == "预约消息") {
  48 + if (value.subscribeInfo != null) {
  49 + if (value.subscribeInfo.title) {
  50 + item.desc = value.subscribeInfo.title
  51 + }
  52 + if (value.subscribeInfo.time) {
  53 + item.time = this.getPublishTime(value.subscribeInfo.time,DateTimeUtils.getDateTimestamp(value.subscribeInfo.time)+"")
  54 + }
  55 + }
  56 + if(value.subscribeCount > 0){
  57 + item.unReadCount = value.subscribeCount
  58 + }
  59 + } else if (item.title == "系统消息") {
  60 + if (value.systemInfo != null) {
  61 + if (value.systemInfo.title) {
  62 + item.desc = value.systemInfo.title
  63 + }
  64 + if (value.systemInfo.time) {
  65 + item.time = this.getPublishTime(value.subscribeInfo.time,DateTimeUtils.getDateTimestamp(value.systemInfo.time) + "")
  66 + }
  67 + }
  68 + if(value.systemCount > 0){
  69 + item.unReadCount = value.systemCount
  70 + }
  71 + }else if(item.title == "互动消息"){
  72 + if(value.activeCount > 0){
  73 + item.unReadCount = value.activeCount
  74 + }
  75 + if (value.activeInfo != null) {
  76 + if (value.activeInfo.title) {
  77 + item.desc = value.activeInfo.title
  78 + }
  79 + if (value.activeInfo.time) {
  80 + item.time = this.getPublishTime(value.subscribeInfo.time,DateTimeUtils.getDateTimestamp(value.activeInfo.time) + "")
  81 + }
  82 + }
  83 + }
  84 + })
  85 + }).catch((err: Error) => {
  86 + console.log(TAG, JSON.stringify(err))
  87 + })
  88 + }
33 89
34 - Column() {  
35 - Text(item.title)  
36 - .fontWeight(500)  
37 - .fontSize('31lpx')  
38 - .lineHeight('42lpx')  
39 - .fontColor($r('app.color.color_222222'))  
40 - .maxLines(1)  
41 - .margin({ bottom: StringUtils.isNotEmpty(item.desc)?'8lpx':0 }) 90 + getPublishTime(data:string,publishTime: string): string {
  91 + const publishTimestamp = parseInt(publishTime)
  92 + const currentTime = Date.now(); // 当前时间戳
42 93
43 - if(StringUtils.isNotEmpty(item.desc)){  
44 - Text(`${item.desc}`)  
45 - .fontColor($r('app.color.color_B0B0B0'))  
46 - .fontSize('23lpx')  
47 - .lineHeight('38lpx')  
48 - .fontWeight(400)  
49 - .maxLines(1)  
50 - .textOverflow({ overflow: TextOverflow.Ellipsis })  
51 - }  
52 - }  
53 - .height('92lpx')  
54 - .layoutWeight(1)  
55 - .alignItems(HorizontalAlign.Start)  
56 - .justifyContent(StringUtils.isNotEmpty(item.desc)?FlexAlign.Start:FlexAlign.Center)  
57 - }.layoutWeight(1) 94 + // 计算差异
  95 + const timeDifference = currentTime - publishTimestamp;
58 96
59 - Row() {  
60 - Text(`${item.time}`)  
61 - .fontColor($r('app.color.color_999999'))  
62 - .fontSize('23lpx')  
63 - .fontWeight(500)  
64 - .lineHeight('35lpx') 97 + // 转换为分钟、小时和天
  98 + const minutes = Math.floor(timeDifference / (1000 * 60));
  99 + const hours = Math.floor(timeDifference / (1000 * 60 * 60));
  100 + const days = Math.floor(timeDifference / (1000 * 60 * 60 * 24));
  101 +
  102 + // 根据时间差返回对应的字符串
  103 + let result: string;
  104 +
  105 + if (minutes < 60) {
  106 + result = `${minutes}分钟前`;
  107 + if(minutes === 0){
  108 + result = `刚刚`;
  109 + }
  110 + } else if (hours < 24) {
  111 + result = `${hours}小时前`;
  112 + } else {
  113 + result = `${days}天前`;
  114 + if(days > 1){
  115 + let arr = data.split(" ")
  116 + if(arr.length === 2){
  117 + let arr2 = arr[0].split("-")
  118 + if(arr2.length === 3){
  119 + result = `${arr2[1]}-${arr2[2]}`
  120 + }
  121 + }else{
  122 + //原始数据是时间戳 需要转成dateString
  123 + let time = DateTimeUtils.formatDate(Number(publishTime))
  124 + let arr = time.split("-")
  125 + if(arr.length === 3){
  126 + result = `${arr[1]}-${arr[2]}`
  127 + }
  128 + }
65 } 129 }
66 - .justifyContent(FlexAlign.Start)  
67 - .alignItems(VerticalAlign.Top)  
68 - .height('92lpx')  
69 } 130 }
70 - .width('100%')  
71 - .height('92lpx')  
72 - .justifyContent(FlexAlign.SpaceBetween)  
73 -  
74 - }.height('154lpx')  
75 - .width("100%")  
76 - .justifyContent(FlexAlign.Center)  
77 131
78 - Text().backgroundColor($r('app.color.color_EDEDED'))  
79 - .width('100%')  
80 - .height('1lpx')  
81 - .visibility(index != 3 ?Visibility.Visible:Visibility.None) 132 + console.log(result);
  133 + return result
82 } 134 }
  135 +
  136 + build() {
  137 + Column() {
  138 + //标题栏目
  139 + CustomTitleUI({ titleName: "消息" })
  140 +
  141 + List() {
  142 + ForEach(this.msgData, (item: MessageItem, index: number) => {
  143 + ListItem() {
  144 + MessageListItemUI({ item: item, index: index })
83 } 145 }
84 - .padding({left:"31lpx",right:"31lpx"}) 146 + .padding({ left: "31lpx", right: "31lpx" })
85 .onClick(() => { 147 .onClick(() => {
86 - ToastUtils.shortToast(index+"")  
87 switch (index) { 148 switch (index) {
88 case 0: //互动消息 149 case 0: //互动消息
  150 + if(item.unReadCount > 0){
  151 + this.sendEnterEvent(WDMessageCenterMessageType.WDMessageCenterMessageType_Interact)
  152 + }
  153 + WDRouterRule.jumpWithPage(WDRouterPage.interactMessagePage)
89 break; 154 break;
90 case 1: //预约消息 155 case 1: //预约消息
  156 + if(item.unReadCount > 0){
  157 + this.sendEnterEvent(WDMessageCenterMessageType.WDMessageCenterMessageType_Subscribe)
  158 + }
  159 + WDRouterRule.jumpWithPage(WDRouterPage.subscribeMessagePage)
91 break; 160 break;
92 case 2: //历史推送 161 case 2: //历史推送
93 break; 162 break;
@@ -104,4 +173,12 @@ export struct MessageListUI { @@ -104,4 +173,12 @@ export struct MessageListUI {
104 .height('100%') 173 .height('100%')
105 .width('100%') 174 .width('100%')
106 } 175 }
  176 +
  177 + sendEnterEvent(type:number){
  178 + MinePageDatasModel.sendEnterMessageData(type).then((value) => {
  179 + console.log(TAG, "消息已读")
  180 + }).catch((err: Error) => {
  181 + console.log(TAG, JSON.stringify(err))
  182 + })
  183 + }
107 } 184 }
  1 +import { SubscribeMessageModel } from '../../../../model/InteractMessageModel'
  2 +
  3 +@Component
  4 +export struct SubscribeListChildComponent{
  5 + @ObjectLink item: SubscribeMessageModel
  6 +
  7 + build() {
  8 + Column(){
  9 + Row(){
  10 + Text(`${this.item.dealTime}`)
  11 + .margin({top:"31lpx",bottom:"23lpx"})
  12 + .fontWeight(400)
  13 + .fontSize("23lpx")
  14 + .lineHeight("33lpx")
  15 + .fontColor($r('app.color.color_999999'))
  16 + }.width('100%')
  17 + .backgroundColor($r('app.color.color_F5F5F5'))
  18 + .justifyContent(FlexAlign.Center)
  19 +
  20 + Column(){
  21 + Column(){
  22 + Text(`${this.item.title}`)
  23 + .fontSize("31lpx")
  24 + .lineHeight("46lpx")
  25 + .fontWeight(500)
  26 + .fontColor($r('app.color.color_333333'))
  27 + .margin({top:"27lpx",bottom:"25lpx"})
  28 + .maxLines(1)
  29 +
  30 + Text().backgroundColor($r('app.color.color_F5F5F5'))
  31 + .width('100%')
  32 + .height('1lpx')
  33 + }.alignItems(HorizontalAlign.Start)
  34 + .width("100%")
  35 + .height("98lpx")
  36 +
  37 + Row(){
  38 + Image(`${this.item.imgUrl}`)
  39 + .width('204lpx')
  40 + .height('115lpx')
  41 + .borderRadius("6lpx")
  42 + .objectFit(ImageFit.Auto)
  43 + .margin({right:"23lpx"})
  44 +
  45 + Text(`${this.item.desc}`)
  46 + .fontSize("27lpx")
  47 + .lineHeight("38lpx")
  48 + .fontWeight(400)
  49 + .fontColor($r('app.color.color_222222'))
  50 + .layoutWeight(1)
  51 + }.alignItems(VerticalAlign.Center)
  52 + .width("100%")
  53 + .height("160lpx")
  54 +
  55 + Text().backgroundColor($r('app.color.color_F5F5F5'))
  56 + .width('100%')
  57 + .height('1lpx')
  58 +
  59 + Row(){
  60 + Text(`${this.item.time}开始`)
  61 + .fontSize("23lpx")
  62 + .fontWeight(600)
  63 + .lineHeight("31lpx")
  64 +
  65 + Row(){
  66 + Text("查看详情")
  67 + .fontSize("23lpx")
  68 + .lineHeight("38lpx")
  69 + .fontWeight(400)
  70 + .fontColor($r('app.color.color_666666'))
  71 + .margin({right:"8lpx"})
  72 +
  73 + Image($r('app.media.subscribe_arrow_icon'))
  74 + .width('23lpx')
  75 + .height('13lpx')
  76 + .objectFit(ImageFit.Auto)
  77 + .interpolation(ImageInterpolation.High)
  78 + .margin({right:"4lpx"})
  79 + }
  80 + }.alignItems(VerticalAlign.Center)
  81 + .justifyContent(FlexAlign.SpaceBetween)
  82 + .width("100%")
  83 + .height("73lpx")
  84 +
  85 + }.backgroundColor($r('app.color.white'))
  86 + .borderRadius("8lpx")
  87 + .width("100%")
  88 + .padding({left:"23lpx",right:"23lpx"})
  89 + }
  90 + .backgroundColor($r('app.color.color_F5F5F5'))
  91 + .width("100%")
  92 + .padding({left:"31lpx",right:"31lpx"})
  93 + .alignItems(HorizontalAlign.Center)
  94 + }
  95 +
  96 +
  97 +}
  1 +import { LazyDataSource, StringUtils } from 'wdKit/Index';
  2 +import { Remark, SubscribeMessageModel,
  3 + WDMessageCenterMessageType } from '../../../../model/InteractMessageModel';
  4 +import MinePageDatasModel from '../../../../model/MinePageDatasModel';
  5 +import { CustomTitleUI } from '../../../reusable/CustomTitleUI';
  6 +import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
  7 +import { EmptyComponent } from '../../../view/EmptyComponent';
  8 +import { SubscribeListChildComponent } from './SubscribeListChildComponent';
  9 +
  10 +const TAG = "SubscribeMessageComponent"
  11 +
  12 +@Component
  13 +export struct SubscribeMessageComponent{
  14 + @State data: LazyDataSource<SubscribeMessageModel> = new LazyDataSource();
  15 + @State count: number = 0;
  16 + @State isLoading: boolean = false
  17 + @State hasMore: boolean = true
  18 + curPageNum: number = 1;
  19 + @State isGetRequest: boolean = false
  20 +
  21 + aboutToAppear() {
  22 + this.getNewPageData()
  23 + }
  24 +
  25 + build() {
  26 + Column() {
  27 + //标题栏目
  28 + CustomTitleUI({ titleName: "预约消息" })
  29 + if (this.count == 0) {
  30 + if (this.isGetRequest == true) {
  31 + EmptyComponent({ emptyType: 5 })
  32 + .height('100%')
  33 + .width('100%')
  34 + }
  35 +
  36 + } else {
  37 + //刷新控件 TODO
  38 + //List
  39 + List() {
  40 + LazyForEach(this.data, (item: SubscribeMessageModel, index: number) => {
  41 + ListItem() {
  42 + SubscribeListChildComponent({ item: item })
  43 + }.width('100%')
  44 + .onClick(() => {
  45 + })
  46 + })
  47 +
  48 + //没有更多数据 显示提示
  49 + if (!this.hasMore) {
  50 + ListItem() {
  51 + ListHasNoMoreDataUI()
  52 + }
  53 + }
  54 + }.width('100%')
  55 + .cachedCount(4)
  56 + .scrollBar(BarState.Off)
  57 + .layoutWeight(1)
  58 + .onReachEnd(() => {
  59 + if (!this.isLoading) {
  60 + //加载分页数据
  61 + this.getNewPageData()
  62 + }
  63 + })
  64 + }
  65 + }
  66 + .backgroundColor($r('app.color.color_F9F9F9'))
  67 + .height('100%')
  68 + .width('100%')
  69 + }
  70 +
  71 + getNewPageData() {
  72 + this.isLoading = true
  73 + if (this.hasMore) {
  74 + MinePageDatasModel.getSubscribeMessageData(WDMessageCenterMessageType.WDMessageCenterMessageType_Subscribe,"20",`${this.curPageNum}`).then((value) => {
  75 + if (!this.data || value.list.length == 0) {
  76 + this.hasMore = false
  77 + } else {
  78 + value.list.forEach((value) => {
  79 + let dealTime = this.DealStartTime(value.time,1)
  80 + let dealTime2 = this.DealStartTime(value.time,2)
  81 +
  82 + let remark = JSON.parse(value.remark) as Remark
  83 +
  84 + this.data.push(new SubscribeMessageModel(dealTime,value.message,remark.coverImageUrl,value.title,dealTime2,value.contentId))
  85 + })
  86 + this.data.notifyDataReload()
  87 + this.count = this.data.totalCount()
  88 + if (this.data.totalCount() < value.totalCount) {
  89 + this.curPageNum++
  90 + } else {
  91 + this.hasMore = false
  92 + }
  93 + }
  94 + this.isGetRequest = true
  95 + this.isLoading = false
  96 + }).catch((err: Error) => {
  97 + console.log(TAG, JSON.stringify(err))
  98 + this.isGetRequest = true
  99 + this.isLoading = false
  100 + })
  101 + }
  102 + }
  103 +
  104 +
  105 + DealStartTime(planStartTime: string,type:number): string {
  106 + let dealData: string = ""
  107 +
  108 + if (StringUtils.isEmpty(planStartTime)) {
  109 + console.log(TAG, "格式有误")
  110 + return planStartTime
  111 + }
  112 +
  113 + if (planStartTime.indexOf(" ") === -1) {
  114 + console.log(TAG, "格式有误")
  115 + return planStartTime
  116 + }
  117 +
  118 + let arr = planStartTime.split(" ")
  119 + if (arr != null && StringUtils.isNotEmpty(arr[0])) { //处理年月日
  120 + let time = arr[0].split("-");
  121 + if (time.length === 3) {
  122 + dealData = `${time[1]}-${time[2]}`
  123 + if(type === 1){
  124 + return dealData
  125 + }
  126 + }
  127 + }
  128 +
  129 + if (arr != null && StringUtils.isNotEmpty(arr[1])) { //处理时分
  130 + let time = arr[1].split(":");
  131 + if (time.length === 3) {
  132 + dealData = `${dealData} ${time[0]}:${time[1]}`
  133 + }
  134 + }
  135 + console.log(TAG, JSON.stringify(dealData))
  136 + return dealData
  137 + }
  138 +
  139 +
  140 +}
@@ -85,6 +85,7 @@ export struct BottomNavigationComponent { @@ -85,6 +85,7 @@ export struct BottomNavigationComponent {
85 VideoChannelPage({ 85 VideoChannelPage({
86 topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073), 86 topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),
87 _currentNavIndex: $currentNavIndex, 87 _currentNavIndex: $currentNavIndex,
  88 + autoRefresh: this.autoRefresh
88 }) 89 })
89 } else { 90 } else {
90 TopNavigationComponent({ 91 TopNavigationComponent({
@@ -487,12 +487,7 @@ export struct PaperSingleColumn999CardView { @@ -487,12 +487,7 @@ export struct PaperSingleColumn999CardView {
487 Text(this.getPublishTime()) 487 Text(this.getPublishTime())
488 .fontSize(12) 488 .fontSize(12)
489 .fontColor(Color.Gray) 489 .fontColor(Color.Gray)
490 - if (this.interactData && this.interactData.commentNum) {  
491 - Text(this.interactData.commentNum + "评")  
492 - .fontSize(12)  
493 - .fontColor(Color.Gray)  
494 - .margin({ left: 6 })  
495 - }else if (this.commentList && this.commentList.length) { 490 + if (this.interactData && this.interactData.commentNum && Number(this.interactData.collectNum) > 0) {
496 Text(this.interactData.commentNum + "评") 491 Text(this.interactData.commentNum + "评")
497 .fontSize(12) 492 .fontSize(12)
498 .fontColor(Color.Gray) 493 .fontColor(Color.Gray)
@@ -517,7 +512,7 @@ export struct PaperSingleColumn999CardView { @@ -517,7 +512,7 @@ export struct PaperSingleColumn999CardView {
517 } 512 }
518 } 513 }
519 .backgroundColor(Color.White) 514 .backgroundColor(Color.White)
520 - .margin({ bottom: 14, left: 12, right: 12 }) 515 + .margin({ bottom: 10, left: 12, right: 12 })
521 .borderRadius(4) 516 .borderRadius(4)
522 .onClick(() => { 517 .onClick(() => {
523 ProcessUtils.processPage(this.item) 518 ProcessUtils.processPage(this.item)
@@ -19,19 +19,25 @@ struct EditUserIntroductionPage { @@ -19,19 +19,25 @@ struct EditUserIntroductionPage {
19 .width('100%') 19 .width('100%')
20 .height(80) 20 .height(80)
21 .backgroundColor(Color.White) 21 .backgroundColor(Color.White)
  22 + .placeholderColor('#999999')
22 .onChange(value => { 23 .onChange(value => {
23 this.numCount = value.length 24 this.numCount = value.length
24 if (this.numCount === 60) { 25 if (this.numCount === 60) {
25 this.textColor = '#ED2800' 26 this.textColor = '#ED2800'
  27 + }else if(this.numCount === 0){
  28 + this.textColor = '#999999'
26 }else { 29 }else {
27 this.textColor = '#222222' 30 this.textColor = '#222222'
28 } 31 }
29 this.introduction = value 32 this.introduction = value
30 }) 33 })
31 34
32 - Text(this.numCount.toString() + '/60') 35 + Row(){
  36 + Text(this.numCount.toString())
33 .fontColor(this.textColor) 37 .fontColor(this.textColor)
34 - .margin({left: -50}) 38 + Text('/60')
  39 + .fontColor('#999999')
  40 + }.margin({left: -50})
35 } 41 }
36 .alignItems(VerticalAlign.Bottom) 42 .alignItems(VerticalAlign.Bottom)
37 43
@@ -42,7 +48,7 @@ struct EditUserIntroductionPage { @@ -42,7 +48,7 @@ struct EditUserIntroductionPage {
42 Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多60个字,只能输入中文、数字、英文字母。') 48 Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多60个字,只能输入中文、数字、英文字母。')
43 .fontSize(13) 49 .fontSize(13)
44 .padding(12) 50 .padding(12)
45 - .fontColor(Color.Gray) 51 + .fontColor(Color.Gray).lineHeight(25)
46 52
47 Button('保存') 53 Button('保存')
48 .type(ButtonType.Normal) 54 .type(ButtonType.Normal)
@@ -22,19 +22,25 @@ struct EditUserNikeNamePage { @@ -22,19 +22,25 @@ struct EditUserNikeNamePage {
22 .maxLength(16) 22 .maxLength(16)
23 .height(50) 23 .height(50)
24 .backgroundColor(Color.White) 24 .backgroundColor(Color.White)
  25 + .placeholderColor('#999999')
25 .onChange(value => { 26 .onChange(value => {
26 this.numCount = value.length 27 this.numCount = value.length
27 if (this.numCount === 16) { 28 if (this.numCount === 16) {
28 this.textColor = '#ED2800' 29 this.textColor = '#ED2800'
  30 + }else if(this.numCount === 0){
  31 + this.textColor = '#999999'
29 }else { 32 }else {
30 this.textColor = '#222222' 33 this.textColor = '#222222'
31 } 34 }
32 this.nikeName = value 35 this.nikeName = value
33 }) 36 })
34 37
35 - Text(this.numCount.toString() + '/16') 38 + Row(){
  39 + Text(this.numCount.toString())
36 .fontColor(this.textColor) 40 .fontColor(this.textColor)
37 - .margin({left: -50}) 41 + Text('/16')
  42 + .fontColor('#999999')
  43 + }.margin({left: -50})
38 } 44 }
39 .alignItems(VerticalAlign.Center) 45 .alignItems(VerticalAlign.Center)
40 46
@@ -44,7 +50,7 @@ struct EditUserNikeNamePage { @@ -44,7 +50,7 @@ struct EditUserNikeNamePage {
44 Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多16个字,只能输入中文、数字、英文字母。') 50 Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多16个字,只能输入中文、数字、英文字母。')
45 .fontSize(13) 51 .fontSize(13)
46 .padding(12) 52 .padding(12)
47 - .fontColor(Color.Gray) 53 + .fontColor(Color.Gray).lineHeight(25)
48 54
49 Button('保存') 55 Button('保存')
50 .type(ButtonType.Normal) 56 .type(ButtonType.Normal)
1 1
2 -import MyCollectionViewModel from '../../viewmodel/MyCollectionViewModel'; 2 +import InteractMessageViewModel from '../../viewmodel/InteractMessageViewModel';
3 import PageModel from '../../viewmodel/PageModel'; 3 import PageModel from '../../viewmodel/PageModel';
4 import { CommonConstants, ViewType } from 'wdConstant' 4 import { CommonConstants, ViewType } from 'wdConstant'
5 import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent' 5 import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'
6 -import { ContentDTO } from 'wdBean'  
7 import NoMoreLayout from './NoMoreLayout' 6 import NoMoreLayout from './NoMoreLayout'
8 -import CustomRefreshLoadLayout from './CustomRefreshLoadLayout';  
9 -import { CustomSelectUI } from '../view/CustomSelectUI';  
10 -import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI';  
11 -import { BigPicCardComponent } from '../view/BigPicCardComponent';  
12 -  
13 import { CustomTitleUI } from '../reusable/CustomTitleUI'; 7 import { CustomTitleUI } from '../reusable/CustomTitleUI';
14 -import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';  
15 import { InteractMComponent } from '../InteractMessage/InteractMComponent'; 8 import { InteractMComponent } from '../InteractMessage/InteractMComponent';
  9 +import { InteractMessageModel, WDMessageCenterMessageType } from '../../model/InteractMessageModel';
  10 +import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';
16 11
17 @Entry 12 @Entry
18 @Component 13 @Component
@@ -20,39 +15,40 @@ struct InteractMessagePage { @@ -20,39 +15,40 @@ struct InteractMessagePage {
20 @State private browSingModel: PageModel = new PageModel() 15 @State private browSingModel: PageModel = new PageModel()
21 isloading : boolean = false 16 isloading : boolean = false
22 @Provide isEditState:boolean = false 17 @Provide isEditState:boolean = false
23 - @State allDatas :ContentDTO[] = []; 18 + @State allDatas :InteractMessageModel[] = [];
24 private scroller: Scroller = new Scroller(); 19 private scroller: Scroller = new Scroller();
25 - @State likeNum: number = 20 20 + @State likeNum: number = 0
  21 + @State currentPage: number = 1;
26 22
27 aboutToAppear(){ 23 aboutToAppear(){
28 this.getData() 24 this.getData()
  25 + this.getMessageLikeCount()
29 } 26 }
30 27
31 build() { 28 build() {
32 Column(){ 29 Column(){
33 CustomTitleUI({titleName:'互动消息'}) 30 CustomTitleUI({titleName:'互动消息'})
  31 + if(this.browSingModel.viewType == ViewType.ERROR){
  32 + EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NetworkFailed})
  33 + }else if(this.browSingModel.viewType == ViewType.EMPTY){
  34 + EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoHistory})
  35 + }else {
  36 + CustomPullToRefresh({
  37 + alldata:this.allDatas,
  38 + scroller:this.scroller,
  39 + customList:()=>{
34 this.ListLayout() 40 this.ListLayout()
35 - // if(this.browSingModel.viewType == ViewType.ERROR){  
36 - // EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NetworkFailed})  
37 - // }else if(this.browSingModel.viewType == ViewType.EMPTY){  
38 - // EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoHistory})  
39 - // }else {  
40 - // CustomPullToRefresh({  
41 - // alldata:this.allDatas,  
42 - // scroller:this.scroller,  
43 - // customList:()=>{  
44 - // this.ListLayout()  
45 - // },  
46 - // onRefresh:(resolve)=>{  
47 - // this.browSingModel.currentPage = 0  
48 - // this.getData(resolve)  
49 - // },  
50 - // onLoadMore:(resolve)=> {  
51 - // this.browSingModel.currentPage++  
52 - // this.getData()  
53 - // }  
54 - // })  
55 - // } 41 + },
  42 + onRefresh:(resolve)=>{
  43 + this.browSingModel.currentPage = 0
  44 + this.getData(resolve)
  45 + },
  46 + onLoadMore:(resolve)=> {
  47 + this.browSingModel.currentPage++
  48 + this.getData()
  49 + }
  50 + })
  51 + }
56 52
57 } 53 }
58 .width(CommonConstants.FULL_WIDTH) 54 .width(CommonConstants.FULL_WIDTH)
@@ -66,9 +62,9 @@ struct InteractMessagePage { @@ -66,9 +62,9 @@ struct InteractMessagePage {
66 } 62 }
67 63
68 // 下拉刷新 64 // 下拉刷新
69 - ForEach(this.allDatas, (compDTO: ContentDTO, compIndex: number) => { 65 + ForEach(this.allDatas, (InteractM: InteractMessageModel, compIndex: number) => {
70 ListItem() { 66 ListItem() {
71 - InteractMComponent() 67 + InteractMComponent({messageModel:InteractM})
72 } 68 }
73 }) 69 })
74 // 加载更多 70 // 加载更多
@@ -112,12 +108,22 @@ struct InteractMessagePage { @@ -112,12 +108,22 @@ struct InteractMessagePage {
112 } 108 }
113 109
114 async getData(resolve?: (value: string | PromiseLike<string>) => void){ 110 async getData(resolve?: (value: string | PromiseLike<string>) => void){
115 - MyCollectionViewModel.fetchMyCollectList(2,'1',this.browSingModel.currentPage,getContext(this)).then(collectionItem => { 111 + InteractMessageViewModel.fetchMessageList(WDMessageCenterMessageType.WDMessageCenterMessageType_Interact,this.currentPage).then(InteractMessageMItem => {
116 if(resolve) resolve('刷新成功') 112 if(resolve) resolve('刷新成功')
117 - if (collectionItem && collectionItem.list && collectionItem.list.length > 0) { 113 + if (InteractMessageMItem && InteractMessageMItem.list && InteractMessageMItem.list.length > 0) {
118 this.browSingModel.viewType = ViewType.LOADED; 114 this.browSingModel.viewType = ViewType.LOADED;
119 - this.allDatas.push(...collectionItem.list)  
120 - if (collectionItem.list.length === this.browSingModel.pageSize) { 115 +
  116 + if (this.currentPage === 1) {
  117 + this.allDatas = []
  118 + }
  119 +
  120 + for (let index = 0; index < InteractMessageMItem.list.length; index++) {
  121 + const element = InteractMessageMItem.list[index];
  122 + element.InteractMsubM = JSON.parse(element.remark)
  123 + }
  124 +
  125 + this.allDatas.push(...InteractMessageMItem.list)
  126 + if (InteractMessageMItem.list.length === this.browSingModel.pageSize) {
121 this.browSingModel.currentPage++; 127 this.browSingModel.currentPage++;
122 this.browSingModel.hasMore = true; 128 this.browSingModel.hasMore = true;
123 } else { 129 } else {
@@ -129,4 +135,11 @@ struct InteractMessagePage { @@ -129,4 +135,11 @@ struct InteractMessagePage {
129 }) 135 })
130 } 136 }
131 137
  138 + async getMessageLikeCount(){
  139 + InteractMessageViewModel.getMessageLikeCount().then(num => {
  140 + this.likeNum = num
  141 + })
  142 + }
  143 +
  144 +
132 } 145 }
1 -import { ContentDTO } from 'wdBean'; 1 +import { ContentDTO, LiveRoomDataBean } from 'wdBean';
2 import { ProcessUtils } from 'wdRouter'; 2 import { ProcessUtils } from 'wdRouter';
3 import { CommonConstants } from 'wdConstant/Index'; 3 import { CommonConstants } from 'wdConstant/Index';
4 import PageViewModel from '../../viewmodel/PageViewModel'; 4 import PageViewModel from '../../viewmodel/PageViewModel';
5 -import RefreshLayout from '../page/RefreshLayout';  
6 -import { RefreshLayoutBean } from '../page/RefreshLayoutBean';  
7 -import PageModel from '../../viewmodel/PageModel';  
8 -import { DateTimeUtils, LazyDataSource } from 'wdKit/Index'; 5 +import { DateTimeUtils, LazyDataSource, Logger } from 'wdKit/Index';
9 import { router } from '@kit.ArkUI'; 6 import { router } from '@kit.ArkUI';
  7 +import { ViewType } from 'wdConstant/src/main/ets/enum/ViewType';
  8 +import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';
  9 +import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData';
  10 +import { EmptyComponent } from '../view/EmptyComponent';
  11 +import { ErrorComponent } from '../view/ErrorComponent';
  12 +import LoadMoreLayout from '../page/LoadMoreLayout'
10 13
11 const TAG: string = 'LiveMorePage'; 14 const TAG: string = 'LiveMorePage';
12 15
@@ -21,60 +24,22 @@ const TAG: string = 'LiveMorePage'; @@ -21,60 +24,22 @@ const TAG: string = 'LiveMorePage';
21 @Entry 24 @Entry
22 @Component 25 @Component
23 struct LiveMorePage { 26 struct LiveMorePage {
24 - @State private pageModel: PageModel = new PageModel();  
25 @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); 27 @State data: LazyDataSource<ContentDTO> = new LazyDataSource();
26 topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; 28 topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
27 type: number = 1; 29 type: number = 1;
28 - currentPage: number = 1;  
29 pageSize: number = 20; 30 pageSize: number = 20;
30 operDataList: ContentDTO[] = []; 31 operDataList: ContentDTO[] = [];
31 title: string = '直播列表' 32 title: string = '直播列表'
32 @State contentDTO: ContentDTO = new ContentDTO(); 33 @State contentDTO: ContentDTO = new ContentDTO();
33 - // appStyle: '15',  
34 - // coverType: 1,  
35 - // objectType: '9',  
36 - // coverUrl: 'https://rmrbcmsonline.peopleapp.com/rb_recsys/img/2024/0413/VL20Z09ISBEKXZU_963672030241091584.jpeg?x-oss-process=image/resize,m_fill,h_450,w_800/quality,q_90',  
37 - // fullColumnImgUrls: [  
38 - // {  
39 - // landscape: 2,  
40 - // size: 1,  
41 - // url: 'https://rmrbcmsonline.peopleapp.com/rb_recsys/img/2024/0413/VL20Z09ISBEKXZU_963672030241091584.jpeg?x-oss-process=image/resize,m_fill,h_450,w_800/quality,q_90',  
42 - // weight: 1170  
43 - // }  
44 - // ],  
45 - // newsTitle: '押解画面公开!被湖北民警从柬埔寨押解回国被湖北民警从柬埔寨押解回国的130名涉赌诈嫌疑人是他们被湖北民警从柬埔寨押解回国的130名涉赌诈嫌疑人是他们的130名涉赌诈嫌疑人是他们',  
46 - // publishTime: '1712993333000',  
47 - // rmhInfo: {  
48 - // authIcon: '',  
49 - // authTitle: '',  
50 - // authTitle2: '',  
51 - // banControl: 0,  
52 - // cnIsAttention: 1,  
53 - // rmhDesc: '中共武汉市委机关报长江日报官方人民号',  
54 - // rmhHeadUrl: 'https://uatjdcdnphoto.aikan.pdnews.cn/vod/content/202302/202302Sa121448724/TUw.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg',  
55 - // rmhId: '4255270',  
56 - // rmhName: '长江日报',  
57 - // userId: '513696944662469',  
58 - // userType: '3'  
59 - // },  
60 - // videoInfo: {  
61 - // firstFrameImageUri: '',  
62 - // videoDuration: 12,  
63 - // // videoLandscape: 2,  
64 - // videoUrl: 'https://rmrbcmsonline.peopleapp.com/rb_recsys/video/2024/0413/VL20Z09ISBEKXZU_963672027208609792.mp4'  
65 - // },  
66 - // photoNum: '9',  
67 - // voiceInfo: {  
68 - // voiceDuration: 12  
69 - // }  
70 - // } as ContentDTO;  
71 - 34 + @State private hasMore: boolean = true
  35 + @State private currentPage: number = 1
  36 + @State private isLoading: boolean = false
  37 + @State viewType: ViewType = ViewType.LOADING
  38 + private scroller: Scroller = new Scroller()
  39 + @State liveRoomList: LiveRoomDataBean[] = []
72 aboutToAppear(): void { 40 aboutToAppear(): void {
73 - PageViewModel.getLiveMoreUrl(this.type, this.currentPage, this.pageSize).then((liveReviewDTO) => {  
74 - // this.operDataList = []  
75 - // this.operDataList.push(...liveReviewDTO.list)  
76 - this.data.push(...liveReviewDTO.list)  
77 - }) 41 + this.currentPage = 1
  42 + this.getData()
78 } 43 }
79 44
80 build() { 45 build() {
@@ -88,48 +53,78 @@ struct LiveMorePage { @@ -88,48 +53,78 @@ struct LiveMorePage {
88 Column() { 53 Column() {
89 this.TabbarNormal() 54 this.TabbarNormal()
90 55
  56 + if (this.viewType == ViewType.LOADING) {
  57 + this.LoadingLayout()
  58 + } else if (this.viewType == ViewType.ERROR) {
  59 + ErrorComponent()
  60 + .onTouch(() => {
  61 + if (this.viewType === ViewType.ERROR) {
  62 + this.getData()
  63 + }
  64 + })
  65 + } else if (this.viewType == ViewType.EMPTY) {
  66 + EmptyComponent()
  67 + } else {
  68 + CustomPullToRefresh({
  69 + alldata: this.data,
  70 + scroller: this.scroller,
  71 + hasMore: false,
  72 + customList: () => {
91 this.ListLayout() 73 this.ListLayout()
  74 + },
  75 + onRefresh: (resolve) => {
  76 + this.currentPage = 1
  77 + this.getData(resolve)
  78 + },
  79 + })
  80 + }
92 } 81 }
93 .padding({ 82 .padding({
94 left: $r('app.float.card_comp_pagePadding_lf'), 83 left: $r('app.float.card_comp_pagePadding_lf'),
95 right: $r('app.float.card_comp_pagePadding_lf'), 84 right: $r('app.float.card_comp_pagePadding_lf'),
96 bottom: $r('app.float.card_comp_pagePadding_tb') 85 bottom: $r('app.float.card_comp_pagePadding_tb')
97 }) 86 })
98 - .onClick((event: ClickEvent) => { 87 + .onClick(() => {
99 ProcessUtils.processPage(this.contentDTO) 88 ProcessUtils.processPage(this.contentDTO)
100 }) 89 })
101 } 90 }
102 91
103 @Builder 92 @Builder
104 - ListLayout() {  
105 - List() {  
106 - // 下拉刷新  
107 - ListItem() {  
108 - RefreshLayout({  
109 - refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullDown, this.pageModel.pullDownRefreshImage,  
110 - this.pageModel.pullDownRefreshText, this.pageModel.pullDownRefreshHeight)  
111 - }) 93 + LoadingLayout() {
112 } 94 }
113 95
114 - LazyForEach(this.data, (contentDTO: ContentDTO, contentIndex: number) => { 96 +
  97 + @Builder
  98 + ListLayout() {
  99 + List({scroller: this.scroller}) {
  100 + // 下拉刷新
  101 + LazyForEach(this.data, (contentDTO: ContentDTO) => {
115 ListItem() { 102 ListItem() {
116 - // Column() {  
117 - // CompParser({ compDTO: compDTO, compIndex: compIndex });  
118 - // }  
119 this.buildItem(contentDTO) 103 this.buildItem(contentDTO)
120 } 104 }
121 }, 105 },
122 (contentDTO: ContentDTO, contentIndex: number) => contentDTO.pageId + contentIndex.toString() 106 (contentDTO: ContentDTO, contentIndex: number) => contentDTO.pageId + contentIndex.toString()
123 ) 107 )
  108 + // 加载更多
  109 + ListItem() {
  110 + if (this.hasMore && this.data && this.data.totalCount() > 0) {
  111 + LoadMoreLayout({ isVisible: this.hasMore })
  112 + } else if (!this.hasMore && !this.isLoading) {
  113 + PeopleShipNoMoreData()
  114 + }
  115 + }
124 } 116 }
125 .scrollBar(BarState.Off) 117 .scrollBar(BarState.Off)
  118 + .edgeEffect(EdgeEffect.None)
126 .cachedCount(8) 119 .cachedCount(8)
127 - .height(CommonConstants.FULL_PARENT)  
128 - .onScrollIndex((start: number, end: number) => {  
129 - // Listen to the first index of the current list.  
130 - this.pageModel.startIndex = start;  
131 - // 包含了 头尾item,判断时需要考虑+2  
132 - this.pageModel.endIndex = end; 120 + .height('calc(100% - 44vp)')
  121 + .onReachEnd(() => {
  122 + Logger.debug(TAG, "触底了");
  123 + if(!this.isLoading && this.hasMore){
  124 + //加载分页数据
  125 + this.currentPage++;
  126 + this.getData()
  127 + }
133 }) 128 })
134 } 129 }
135 130
@@ -148,22 +143,45 @@ struct LiveMorePage { @@ -148,22 +143,45 @@ struct LiveMorePage {
148 .margin({ top: 16, bottom: 8 }) 143 .margin({ top: 16, bottom: 8 })
149 .alignSelf(ItemAlign.Start) 144 .alignSelf(ItemAlign.Start)
150 Stack() { 145 Stack() {
  146 + if (item.fullColumnImgUrls && item.fullColumnImgUrls.length > 0) {
151 Image(item.fullColumnImgUrls[0].url) 147 Image(item.fullColumnImgUrls[0].url)
152 .width('100%') 148 .width('100%')
153 .height(196) 149 .height(196)
154 .borderRadius(4) 150 .borderRadius(4)
155 - this.LiveImage()  
156 - 151 + }
  152 + this.LiveImage(item)
157 } 153 }
158 .alignContent(Alignment.BottomEnd) 154 .alignContent(Alignment.BottomEnd)
159 155
  156 + Row() {
  157 + if (item.rmhInfo && item.rmhInfo.rmhName) {
  158 + Text(item.rmhInfo.rmhName)
  159 + .fontSize(12)
  160 + .fontWeight(400)
  161 + .fontColor($r('app.color.color_B0B0B0'))
  162 + .fontFamily('PingFang SC-Medium')
  163 + .maxLines(1)
  164 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  165 + .align(Alignment.Start)
  166 +
  167 + Image($r('app.media.point_live_icon'))
  168 + .objectFit(ImageFit.Auto)
  169 + .interpolation(ImageInterpolation.High)
  170 + .width(16)
  171 + .height(16)
  172 + .margin(2)
  173 + }
  174 +
160 Text(DateTimeUtils.getCommentTime(Number.parseFloat(item.publishTimestamp))) 175 Text(DateTimeUtils.getCommentTime(Number.parseFloat(item.publishTimestamp)))
161 - .fontSize(13) 176 + .fontSize(12)
162 .maxLines(1) 177 .maxLines(1)
163 .textOverflow({ overflow: TextOverflow.Ellipsis }) 178 .textOverflow({ overflow: TextOverflow.Ellipsis })
164 - .margin({ top: 8, bottom: 8 })  
165 .align(Alignment.Start) 179 .align(Alignment.Start)
166 .width('100%') 180 .width('100%')
  181 + .fontColor($r('app.color.color_B0B0B0'))
  182 + }
  183 + .margin({ top: 8, bottom: 8 })
  184 +
167 185
168 Divider() 186 Divider()
169 .strokeWidth(1) 187 .strokeWidth(1)
@@ -198,10 +216,10 @@ struct LiveMorePage { @@ -198,10 +216,10 @@ struct LiveMorePage {
198 Text(this.title)// .height('42lpx') 216 Text(this.title)// .height('42lpx')
199 .maxLines(1) 217 .maxLines(1)
200 .id("title") 218 .id("title")
201 - .fontSize('35lpx') 219 + .fontSize('18vp')
202 .fontWeight(400) 220 .fontWeight(400)
203 .fontColor($r('app.color.color_222222')) 221 .fontColor($r('app.color.color_222222'))
204 - .lineHeight('42lpx') 222 + .lineHeight('22vp')
205 .alignRules({ 223 .alignRules({
206 center: { anchor: "__container__", align: VerticalAlign.Center }, 224 center: { anchor: "__container__", align: VerticalAlign.Center },
207 middle: { anchor: "__container__", align: HorizontalAlign.Center } 225 middle: { anchor: "__container__", align: HorizontalAlign.Center }
@@ -212,17 +230,141 @@ struct LiveMorePage { @@ -212,17 +230,141 @@ struct LiveMorePage {
212 } 230 }
213 231
214 @Builder 232 @Builder
215 - LiveImage() { 233 + LiveImage(item: ContentDTO) {
216 Row() { 234 Row() {
217 - Image($r('app.media.icon_live_status_running'))  
218 - .width(22)  
219 - .height(18) 235 + Image($r('app.media.icon_live_new_running'))
  236 + .width(14)
  237 + .height(14)
  238 + .margin({
  239 + right: '2vp'
  240 + })
220 Text('直播中') 241 Text('直播中')
221 - .fontSize('11fp') 242 + .fontSize('12vp')
  243 + .fontWeight(400)
  244 + .fontColor(Color.White)
  245 + .margin({
  246 + right: '5vp'
  247 + })
  248 + Divider()
  249 + .vertical(true)
  250 + .strokeWidth(1)
  251 + .height('12vp')
  252 + .margin({ top: 2, bottom: 2 })
  253 + .color(Color.White)
  254 + if (this.getLiveRoomNumber(item).length > 0) {
  255 + Text(this.getLiveRoomNumber(item))
  256 + .fontSize('12vp')
222 .fontWeight(400) 257 .fontWeight(400)
223 .fontColor(Color.White) 258 .fontColor(Color.White)
  259 + .margin({
  260 + left: '5vp'
  261 + })
  262 + }
224 } 263 }
225 - .backgroundColor('#4D000000') 264 + .justifyContent(FlexAlign.End)
226 .margin({ right: 8, bottom: 8 }) 265 .margin({ right: 8, bottom: 8 })
227 } 266 }
  267 +
  268 + private async getData(resolve?: (value: string | PromiseLike<string>) => void) {
  269 + if (this.isLoading) {
  270 + if (resolve) {
  271 + resolve('已更新至最新')
  272 + }
  273 + return
  274 + }
  275 + this.isLoading = true
  276 + try {
  277 + const liveReviewDTO = await PageViewModel.getLiveMoreUrl(this.type, this.currentPage, this.pageSize)
  278 +
  279 + if (liveReviewDTO && liveReviewDTO.list && liveReviewDTO.list.length > 0) {
  280 + if (liveReviewDTO.list.length === this.pageSize) {
  281 + this.hasMore = true;
  282 + } else {
  283 + this.hasMore = false;
  284 + }
  285 + if (this.currentPage == 1) {
  286 + this.data.clear()
  287 + }
  288 + this.data.push(...liveReviewDTO.list)
  289 + this.getLiveRoomDataInfo(liveReviewDTO.list)
  290 + } else {
  291 + this.hasMore = false;
  292 + }
  293 + this.resolveEnd(true, resolve)
  294 + if (liveReviewDTO.list.length == 0 && this.currentPage == 1) {
  295 + this.viewType = ViewType.EMPTY
  296 + }
  297 + }catch (exception) {
  298 + this.resolveEnd(false, resolve)
  299 + }
  300 + // PageViewModel.getLiveMoreUrl(this.type, this.currentPage, this.pageSize).then(async (liveReviewDTO) => {
  301 + // // this.operDataList = []
  302 + // // this.operDataList.push(...liveReviewDTO.list)
  303 + // this.data.push(...liveReviewDTO.list)
  304 + //
  305 + // // this.getAppointmentInfo()
  306 + // })
  307 + }
  308 +
  309 + private resolveEnd(isTop: boolean, resolve?: (value: string | PromiseLike<string>) => void) {
  310 + if (resolve) {
  311 + if (this.currentPage == 1 && isTop) {
  312 + resolve('已更新至最新')
  313 + }else {
  314 + resolve('')
  315 + }
  316 + }
  317 + if (this.currentPage == 1 && !isTop) {
  318 + this.viewType = ViewType.ERROR
  319 + } else {
  320 + this.viewType = ViewType.LOADED
  321 + }
  322 + this.isLoading = false
  323 + }
  324 +
  325 + private getLiveDetailIds(list: ContentDTO[]): string {
  326 + let idList: string[] = []
  327 + list.forEach(item => {
  328 + idList.push(item.objectId)
  329 + });
  330 + return idList.join(',')
  331 + }
  332 + // 获取评论数
  333 + async getLiveRoomDataInfo(list: ContentDTO[]) {
  334 + const reserveIds = this.getLiveDetailIds(list)
  335 + Logger.debug(TAG,'是否预约数据:' +` ${reserveIds}`)
  336 + PageViewModel.getLiveRoomBatchInfo(reserveIds).then((result) => {
  337 + Logger.debug(TAG,'是否预约数据:' +` ${JSON.stringify(result)}`)
  338 + if (result && result.length > 0) {
  339 + this.liveRoomList.push(...result)
  340 + this.data.reloadData()
  341 + }
  342 + }).catch(() =>{
  343 + // this.data.push(...list)
  344 + })
  345 + }
  346 +
  347 + // 判断是否预约
  348 + getLiveRoomNumber(item: ContentDTO): string {
  349 + const objc = this.liveRoomList.find((element: LiveRoomDataBean) => {
  350 + return element.liveId.toString() == item.objectId
  351 + })
  352 + if (objc && objc.pv && objc.pv > 0) {
  353 + return this.computeShowNum(objc.pv)
  354 + }
  355 + return ''
  356 + }
  357 +
  358 + private computeShowNum(count: number): string {
  359 + if (count >= 10000) {
  360 + let num = ( count / 10000).toFixed(1)
  361 + if (Number(num.substring(num.length-1)) == 0) {
  362 + num = num.substring(0, num.length-2)
  363 + }
  364 + return num + '万人参加'
  365 + }
  366 + return `${count}人参加`
  367 + }
  368 +
  369 +
228 } 370 }
@@ -32,6 +32,9 @@ export struct MinePageComponent { @@ -32,6 +32,9 @@ export struct MinePageComponent {
32 }else { 32 }else {
33 this.isLogin = true 33 this.isLogin = true
34 this.addRecordDialog() 34 this.addRecordDialog()
  35 + if(this.personalData.length > 0){
  36 + this.getMessageData()
  37 + }
35 } 38 }
36 } 39 }
37 } 40 }
@@ -53,7 +56,24 @@ export struct MinePageComponent { @@ -53,7 +56,24 @@ export struct MinePageComponent {
53 this.getUserLogin() 56 this.getUserLogin()
54 this.getFunctionData() 57 this.getFunctionData()
55 this.addLoginStatusObserver() 58 this.addLoginStatusObserver()
  59 + this.getMessageData()
  60 + }
  61 +
  62 + getMessageData(){
  63 + MinePageDatasModel.getMessageUnReadData().then((value) => {
  64 + if(value !=null) {
  65 + if(value.activeCount >0 ||value.subscribeCount > 0 || value.systemCount > 0){
  66 + this.personalData.forEach((value) => {
  67 + if(value.msg == "消息")
  68 + value.isShowRedPoint = true
  69 + })
56 } 70 }
  71 + }
  72 + }).catch((err: Error) => {
  73 + console.log(TAG, JSON.stringify(err))
  74 + })
  75 + }
  76 +
57 77
58 async addLoginStatusObserver(){ 78 async addLoginStatusObserver(){
59 this.preferences = await SPHelper.default.getPreferences(); 79 this.preferences = await SPHelper.default.getPreferences();
@@ -21,6 +21,7 @@ const TAG = 'PageComponent'; @@ -21,6 +21,7 @@ const TAG = 'PageComponent';
21 export struct PageComponent { 21 export struct PageComponent {
22 @State private pageModel: PageModel = new PageModel(); 22 @State private pageModel: PageModel = new PageModel();
23 @State private pageAdvModel: PageAdModel = new PageAdModel(); 23 @State private pageAdvModel: PageAdModel = new PageAdModel();
  24 + @State timer: number = -1
24 navIndex: number = 0; 25 navIndex: number = 0;
25 pageId: string = ""; 26 pageId: string = "";
26 channelId: string = ""; 27 channelId: string = "";
@@ -29,6 +30,7 @@ export struct PageComponent { @@ -29,6 +30,7 @@ export struct PageComponent {
29 @Prop @Watch('onAutoRefresh') autoRefresh: number = 0 30 @Prop @Watch('onAutoRefresh') autoRefresh: number = 0
30 private listScroller: Scroller = new Scroller(); 31 private listScroller: Scroller = new Scroller();
31 needload: boolean = true; 32 needload: boolean = true;
  33 +
32 build() { 34 build() {
33 Column() { 35 Column() {
34 if (this.pageModel.viewType == ViewType.LOADING) { 36 if (this.pageModel.viewType == ViewType.LOADING) {
@@ -222,9 +224,10 @@ export struct PageComponent { @@ -222,9 +224,10 @@ export struct PageComponent {
222 } 224 }
223 225
224 onChange() { 226 onChange() {
225 - Logger.info(TAG, `onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`); 227 + Logger.info(TAG,
  228 + `onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`);
226 if (this.navIndex === this.currentTopNavSelectedIndex) { 229 if (this.navIndex === this.currentTopNavSelectedIndex) {
227 - if(this.needload){ 230 + if (this.needload) {
228 this.getData(); 231 this.getData();
229 } 232 }
230 this.needload = false; 233 this.needload = false;
@@ -242,6 +245,10 @@ export struct PageComponent { @@ -242,6 +245,10 @@ export struct PageComponent {
242 } 245 }
243 246
244 async getData() { 247 async getData() {
  248 + if (this.timer) {
  249 + clearTimeout(this.timer)
  250 + }
  251 + this.timer = setTimeout(() => {
245 Logger.info(TAG, `getData id: ${this.pageId} , ${this.channelId} , navIndex: ${this.currentTopNavSelectedIndex}`); 252 Logger.info(TAG, `getData id: ${this.pageId} , ${this.channelId} , navIndex: ${this.currentTopNavSelectedIndex}`);
246 this.pageModel.pageId = this.pageId; 253 this.pageModel.pageId = this.pageId;
247 this.pageModel.groupId = this.pageId; 254 this.pageModel.groupId = this.pageId;
@@ -249,6 +256,8 @@ export struct PageComponent { @@ -249,6 +256,8 @@ export struct PageComponent {
249 this.pageModel.currentPage = 1; 256 this.pageModel.currentPage = 1;
250 this.pageModel.pageTotalCompSize = 0; 257 this.pageModel.pageTotalCompSize = 0;
251 PageHelper.getInitData(this.pageModel, this.pageAdvModel) 258 PageHelper.getInitData(this.pageModel, this.pageAdvModel)
  259 + }, 100)
  260 +
252 } 261 }
253 } 262 }
254 263
@@ -27,6 +27,5 @@ export default struct PageNoMoreLayout { @@ -27,6 +27,5 @@ export default struct PageNoMoreLayout {
27 .width(RefreshConstants.FULL_WIDTH) 27 .width(RefreshConstants.FULL_WIDTH)
28 .justifyContent(FlexAlign.Center) 28 .justifyContent(FlexAlign.Center)
29 .height(RefreshConstants.CUSTOM_LAYOUT_HEIGHT) 29 .height(RefreshConstants.CUSTOM_LAYOUT_HEIGHT)
30 - .margin({bottom:RefreshConstants.NoMoreLayoutConstant_MARGIN_BOTTOM})  
31 } 30 }
32 } 31 }
@@ -13,6 +13,7 @@ import { @@ -13,6 +13,7 @@ import {
13 PeopleShipUserDetailData, 13 PeopleShipUserDetailData,
14 ArticleCountData 14 ArticleCountData
15 } from 'wdBean' 15 } from 'wdBean'
  16 +import { EmptyComponent } from '../view/EmptyComponent'
16 17
17 @Entry 18 @Entry
18 @Component 19 @Component
@@ -35,11 +36,20 @@ struct PeopleShipHomePage { @@ -35,11 +36,20 @@ struct PeopleShipHomePage {
35 @Provide @Watch('handleChangeAttentionStata') isLoadingAttention: boolean = false 36 @Provide @Watch('handleChangeAttentionStata') isLoadingAttention: boolean = false
36 //关注显示 37 //关注显示
37 @State attentionOpacity: boolean = false 38 @State attentionOpacity: boolean = false
38 - @Provide topHeight: number = 400 39 + @Provide topHeight: number = 286
  40 + @State isLoading: boolean = true
39 41
40 build() { 42 build() {
41 -  
42 Stack({ alignContent: Alignment.TopStart }) { 43 Stack({ alignContent: Alignment.TopStart }) {
  44 + // 顶部图片
  45 + Image($r('app.media.home_page_bg'))
  46 + .width('100%')
  47 + .height('120vp')
  48 + .objectFit(ImageFit.Fill)
  49 + .backgroundColor(Color.White)
  50 + .visibility(this.isLoading ? Visibility.None : Visibility.Visible)
  51 +
  52 + Column(){
43 // 头部返回 53 // 头部返回
44 PeopleShipHomePageNavComponent({ 54 PeopleShipHomePageNavComponent({
45 attentionOpacity: this.attentionOpacity, 55 attentionOpacity: this.attentionOpacity,
@@ -47,9 +57,7 @@ struct PeopleShipHomePage { @@ -47,9 +57,7 @@ struct PeopleShipHomePage {
47 detailModel: this.detailModel 57 detailModel: this.detailModel
48 }) 58 })
49 .height($r('app.float.top_bar_height')) 59 .height($r('app.float.top_bar_height'))
50 - .zIndex(100)  
51 .backgroundColor(Color.Transparent) 60 .backgroundColor(Color.Transparent)
52 -  
53 if (this.detailModel && this.detailModel.userName) { 61 if (this.detailModel && this.detailModel.userName) {
54 Scroll(this.scroller) { 62 Scroll(this.scroller) {
55 Column() { 63 Column() {
@@ -62,24 +70,32 @@ struct PeopleShipHomePage { @@ -62,24 +70,32 @@ struct PeopleShipHomePage {
62 }) 70 })
63 .width("100%") 71 .width("100%")
64 .height(this.topHeight) 72 .height(this.topHeight)
65 -  
66 // 列表 73 // 列表
  74 + Column(){
67 PeopleShipHomeListComponent({ 75 PeopleShipHomeListComponent({
68 publishCount: this.publishCount, 76 publishCount: this.publishCount,
69 creatorId: this.creatorId 77 creatorId: this.creatorId
70 }) 78 })
  79 + }.height('100%')
  80 +
71 81
72 } 82 }
73 .width("100%") 83 .width("100%")
74 .justifyContent(FlexAlign.Start) 84 .justifyContent(FlexAlign.Start)
  85 + .alignItems(HorizontalAlign.Start)
  86 + // .height('100%')
75 // .height(this.publishCount == 0 ? '100%' : '') 87 // .height(this.publishCount == 0 ? '100%' : '')
76 } 88 }
  89 + .scrollable(ScrollDirection.Vertical)
  90 + // .alignSelf(ItemAlign.Start)
  91 + // .align(Alignment.Start)
77 .edgeEffect(EdgeEffect.None) 92 .edgeEffect(EdgeEffect.None)
78 - .friction(0.6) 93 + .friction(0.7)
79 .backgroundColor(Color.White) 94 .backgroundColor(Color.White)
80 .scrollBar(BarState.Off) 95 .scrollBar(BarState.Off)
81 .width('100%') 96 .width('100%')
82 - .height('100%') 97 + .height('calc(100% - 44vp)')
  98 + // .layoutWeight(1)
83 .onDidScroll(() => { 99 .onDidScroll(() => {
84 // this.topOpacity = yOffset / (this.getDeviceHeight() * 0.2) 100 // this.topOpacity = yOffset / (this.getDeviceHeight() * 0.2)
85 this.topOpacity = this.scroller.currentOffset().yOffset / 100 101 this.topOpacity = this.scroller.currentOffset().yOffset / 100
@@ -94,6 +110,13 @@ struct PeopleShipHomePage { @@ -94,6 +110,13 @@ struct PeopleShipHomePage {
94 } 110 }
95 111
96 } 112 }
  113 + .alignItems(HorizontalAlign.Start)
  114 + .justifyContent(FlexAlign.Start)
  115 + .width('100%')
  116 + // .height('100%')
  117 + }
  118 + // .height('100%')
  119 + .width('100%')
97 120
98 } 121 }
99 122
@@ -104,9 +127,11 @@ struct PeopleShipHomePage { @@ -104,9 +127,11 @@ struct PeopleShipHomePage {
104 127
105 private async getData() { 128 private async getData() {
106 try { 129 try {
  130 + this.isLoading = true
107 // 获取页面信息 131 // 获取页面信息
108 this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '') 132 this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '')
109 Logger.debug('PeopleShipHomePage', '获取页面信息' + `${JSON.stringify(this.detailModel)}`) 133 Logger.debug('PeopleShipHomePage', '获取页面信息' + `${JSON.stringify(this.detailModel)}`)
  134 + this.isLoading = false
110 135
111 // 获取关注 136 // 获取关注
112 // 登录后获取,是否关注 137 // 登录后获取,是否关注
@@ -117,7 +142,7 @@ struct PeopleShipHomePage { @@ -117,7 +142,7 @@ struct PeopleShipHomePage {
117 } 142 }
118 143
119 } catch (exception) { 144 } catch (exception) {
120 - 145 + this.isLoading = false
121 } 146 }
122 } 147 }
123 148
  1 +import { insightIntent } from '@kit.IntentsKit';
1 import { BottomNavDTO, CompDTO, TopNavDTO } from 'wdBean'; 2 import { BottomNavDTO, CompDTO, TopNavDTO } from 'wdBean';
2 import { SpConstants } from 'wdConstant'; 3 import { SpConstants } from 'wdConstant';
3 -import { DisplayUtils, LazyDataSource, Logger, SPHelper, NetworkUtil, ToastUtils } from 'wdKit'; 4 +import { DisplayUtils, LazyDataSource, Logger, NetworkUtil, SPHelper, ToastUtils } from 'wdKit';
4 import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter'; 5 import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter';
5 import { PageComponent } from './PageComponent'; 6 import { PageComponent } from './PageComponent';
6 import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout'; 7 import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout';
@@ -8,6 +9,7 @@ import { FirstTabTopSearchComponent } from '../search/FirstTabTopSearchComponent @@ -8,6 +9,7 @@ import { FirstTabTopSearchComponent } from '../search/FirstTabTopSearchComponent
8 import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils'; 9 import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils';
9 import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent'; 10 import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent';
10 import { channelSkeleton } from '../skeleton/channelSkeleton'; 11 import { channelSkeleton } from '../skeleton/channelSkeleton';
  12 +import { common } from '@kit.AbilityKit';
11 13
12 14
13 const TAG = 'TopNavigationComponent'; 15 const TAG = 'TopNavigationComponent';
@@ -37,6 +39,7 @@ export struct TopNavigationComponent { @@ -37,6 +39,7 @@ export struct TopNavigationComponent {
37 // 顶导当前选中/焦点下标 39 // 顶导当前选中/焦点下标
38 @State currentTopNavSelectedIndex: number = 0; 40 @State currentTopNavSelectedIndex: number = 0;
39 @State currentTopNavName: string = ''; 41 @State currentTopNavName: string = '';
  42 + @State currentTopNavItem: TopNavDTO = {} as TopNavDTO
40 // 顶导数据 43 // 顶导数据
41 @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = [] 44 @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = []
42 @State compList: LazyDataSource<CompDTO> = new LazyDataSource(); 45 @State compList: LazyDataSource<CompDTO> = new LazyDataSource();
@@ -58,6 +61,8 @@ export struct TopNavigationComponent { @@ -58,6 +61,8 @@ export struct TopNavigationComponent {
58 @Prop @Watch('onAutoRefresh') autoRefresh: number = 0 61 @Prop @Watch('onAutoRefresh') autoRefresh: number = 0
59 // 传递给page的自动刷新通知 62 // 传递给page的自动刷新通知
60 @State autoRefresh2Page: number = 0 63 @State autoRefresh2Page: number = 0
  64 + //保存当前导航选中时的时间戳 意图开始时间
  65 + @State executedStartTime: number = new Date().getTime()
61 // 当前底导index 66 // 当前底导index
62 @State navIndex: number = 0 67 @State navIndex: number = 0
63 @State animationDuration: number = 0 68 @State animationDuration: number = 0
@@ -167,6 +172,7 @@ export struct TopNavigationComponent { @@ -167,6 +172,7 @@ export struct TopNavigationComponent {
167 this.currentTopNavSelectedIndex = index 172 this.currentTopNavSelectedIndex = index
168 this.currentTopNavName = this.myChannelList[index].name 173 this.currentTopNavName = this.myChannelList[index].name
169 } 174 }
  175 + this.currentTopNavItem = this.myChannelList[this.currentTopNavSelectedIndex]
170 } 176 }
171 177
172 isBroadcast(item: TopNavDTO) { 178 isBroadcast(item: TopNavDTO) {
@@ -184,6 +190,49 @@ export struct TopNavigationComponent { @@ -184,6 +190,49 @@ export struct TopNavigationComponent {
184 return item.channelType === 3 190 return item.channelType === 3
185 } 191 }
186 192
  193 + //意图共享
  194 + topNavInsightIntentShare(item: TopNavDTO){
  195 + let tapNavIntent: insightIntent.InsightIntent = {
  196 + intentName: 'ViewColumn',
  197 + intentVersion: '1.0.1',
  198 + identifier: '52dac3b0-6520-4974-81e5-25f0879449b5',
  199 + intentActionInfo: {
  200 + actionMode: 'EXPECTED',
  201 + currentPercentage: 50,
  202 + executedTimeSlots: {
  203 + executedEndTime: new Date().getTime(),
  204 + executedStartTime: this.executedStartTime
  205 + }
  206 + },
  207 + intentEntityInfo: {
  208 + entityName: 'ViewColumn',
  209 + entityId: String(item.pageId) || '',
  210 + displayName: item.name,
  211 + logoURL: 'https://www-file.huawei.com/-/media/corporate/images/home/logo/huawei_logo.png',
  212 + rankingHint: 99,
  213 + isPublicData: true
  214 + }
  215 + }
  216 +
  217 + try {
  218 + let context = getContext(this) as common.UIAbilityContext;
  219 + // 共享数据
  220 + insightIntent.shareIntent(context, [tapNavIntent], (error) => {
  221 + if (error?.code) {
  222 + // 处理业务逻辑错误
  223 + console.error(`shareIntent failed, error.code: ${error?.code}, error.message: ${error?.message}`);
  224 + return;
  225 + }
  226 + // 执行正常业务
  227 + console.log('shareIntent succeed');
  228 + });
  229 + } catch (error) {
  230 + // 处理异常
  231 + console.error(`error.code: ${error?.code}, error.message: ${error?.message}`);
  232 + }
  233 + }
  234 +
  235 +
187 build() { 236 build() {
188 Column() { 237 Column() {
189 // 顶部搜索、日报logo、早晚报 238 // 顶部搜索、日报logo、早晚报
@@ -278,7 +327,11 @@ export struct TopNavigationComponent { @@ -278,7 +327,11 @@ export struct TopNavigationComponent {
278 if (!this.isBroadcast(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index]) && 327 if (!this.isBroadcast(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index]) &&
279 !this.isLayout(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index]) 328 !this.isLayout(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index])
280 ) { 329 ) {
  330 + //在 tab 切换之前意图共享
  331 + // this.topNavInsightIntentShare(this.currentTopNavItem)
  332 +
281 this.currentTopNavSelectedIndex = index; 333 this.currentTopNavSelectedIndex = index;
  334 + this.currentTopNavItem = this.myChannelList[index]
282 } 335 }
283 if (this.isBroadcast(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index])) { 336 if (this.isBroadcast(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index])) {
284 // 跳转到播报页面 337 // 跳转到播报页面
@@ -416,9 +469,11 @@ export struct TopNavigationComponent { @@ -416,9 +469,11 @@ export struct TopNavigationComponent {
416 this.changeByClick = true 469 this.changeByClick = true
417 this.tabsController.changeIndex(index) 470 this.tabsController.changeIndex(index)
418 } 471 }
  472 +
419 }) 473 })
420 } 474 }
421 475
  476 +
422 aboutToAppear() { 477 aboutToAppear() {
423 //处理新闻tab顶导频道数据 478 //处理新闻tab顶导频道数据
424 this.topNavListHandle() 479 this.topNavListHandle()
@@ -13,6 +13,8 @@ export struct VideoChannelPage { @@ -13,6 +13,8 @@ export struct VideoChannelPage {
13 readonly MAX_LINE: number = 1; 13 readonly MAX_LINE: number = 1;
14 private groupId: number = 0 14 private groupId: number = 0
15 private swiperController: SwiperController = new SwiperController() 15 private swiperController: SwiperController = new SwiperController()
  16 + // 自动刷新触发(双击tab自动刷新)
  17 + @Prop autoRefresh: number = 0
16 @Prop topNavList: TopNavDTO[] 18 @Prop topNavList: TopNavDTO[]
17 @Link _currentNavIndex?: number; 19 @Link _currentNavIndex?: number;
18 @Consume barBackgroundColor: Color 20 @Consume barBackgroundColor: Color
@@ -91,8 +93,12 @@ export struct VideoChannelPage { @@ -91,8 +93,12 @@ export struct VideoChannelPage {
91 right: $r('app.float.top_tab_item_padding_horizontal'), 93 right: $r('app.float.top_tab_item_padding_horizontal'),
92 }) 94 })
93 .onClick(() => { 95 .onClick(() => {
  96 + if (this.currentTopNavSelectedIndex === index) {
  97 + this.autoRefresh++
  98 + }
94 this.currentTopNavSelectedIndex = index 99 this.currentTopNavSelectedIndex = index
95 this.swiperController.changeIndex(index, true) 100 this.swiperController.changeIndex(index, true)
  101 +
96 }) 102 })
97 }, (item: TopNavDTO) => item.channelId + '') 103 }, (item: TopNavDTO) => item.channelId + '')
98 } 104 }
@@ -113,6 +119,7 @@ export struct VideoChannelPage { @@ -113,6 +119,7 @@ export struct VideoChannelPage {
113 groupId: this.groupId + '', 119 groupId: this.groupId + '',
114 pageId: item.pageId + '', 120 pageId: item.pageId + '',
115 channelId: item.channelId + '', 121 channelId: item.channelId + '',
  122 + autoRefresh: this.autoRefresh,
116 }) 123 })
117 } else { 124 } else {
118 // 直播 125 // 直播
@@ -121,7 +128,7 @@ export struct VideoChannelPage { @@ -121,7 +128,7 @@ export struct VideoChannelPage {
121 navIndex: index, 128 navIndex: index,
122 pageId: item.pageId + '', 129 pageId: item.pageId + '',
123 channelId: item.channelId + '', 130 channelId: item.channelId + '',
124 - autoRefresh: this.autoRefresh2Page 131 + autoRefresh: this.autoRefresh
125 }).margin({ top: 40 }) 132 }).margin({ top: 40 })
126 } 133 }
127 }, (item: TopNavDTO) => item.channelId + '') 134 }, (item: TopNavDTO) => item.channelId + '')
1 import { PeopleShipRecommendHeadComponent } from './PeopleShipRecommendHeadComponent' 1 import { PeopleShipRecommendHeadComponent } from './PeopleShipRecommendHeadComponent'
2 import { RmhRecommendDTO } from 'wdBean'; 2 import { RmhRecommendDTO } from 'wdBean';
  3 +import { faceDetector } from '@kit.CoreVisionKit';
3 4
4 @Component 5 @Component
5 export struct PeopleShipRecommendComponent { 6 export struct PeopleShipRecommendComponent {
@@ -29,7 +30,7 @@ export struct PeopleShipRecommendComponent { @@ -29,7 +30,7 @@ export struct PeopleShipRecommendComponent {
29 .fontSize($r('app.float.vp_18')) 30 .fontSize($r('app.float.vp_18'))
30 31
31 Blank() 32 Blank()
32 - Button({ type: ButtonType.Normal, stateEffect: true }) { 33 + Button({ type: ButtonType.Normal, stateEffect: false }) {
33 Row() { 34 Row() {
34 Text('换一换') 35 Text('换一换')
35 .height('30vp') 36 .height('30vp')
1 -import { Logger, DisplayUtils} from 'wdKit' 1 +import { Logger} from 'wdKit'
2 import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel' 2 import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel'
3 import { 3 import {
4 ContentDTO, 4 ContentDTO,
@@ -16,11 +16,11 @@ import { @@ -16,11 +16,11 @@ import {
16 } from 'wdBean' 16 } from 'wdBean'
17 import { CardParser } from '../CardParser' 17 import { CardParser } from '../CardParser'
18 import { PageRepository } from '../../repository/PageRepository' 18 import { PageRepository } from '../../repository/PageRepository'
19 -import { RefreshLayoutBean } from '../page/RefreshLayoutBean'  
20 import CustomRefreshLoadLayout from '../page/CustomRefreshLoadLayout' 19 import CustomRefreshLoadLayout from '../page/CustomRefreshLoadLayout'
21 import { ErrorComponent } from '../view/ErrorComponent' 20 import { ErrorComponent } from '../view/ErrorComponent'
22 import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh' 21 import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh'
23 import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData' 22 import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'
  23 +import LoadMoreLayout from '../page/LoadMoreLayout'
24 24
25 const TAG = 'PeopleShipHomeArticleListComponent'; 25 const TAG = 'PeopleShipHomeArticleListComponent';
26 26
@@ -47,45 +47,29 @@ export struct PeopleShipHomeArticleListComponent { @@ -47,45 +47,29 @@ export struct PeopleShipHomeArticleListComponent {
47 } else if (this.viewType == 2) { 47 } else if (this.viewType == 2) {
48 ErrorComponent() 48 ErrorComponent()
49 } else { 49 } else {
50 - CustomPullToRefresh({  
51 - alldata:this.arr,  
52 - scroller:this.scroller,  
53 - hasMore: this.hasMore,  
54 - customList:()=>{  
55 this.ListLayout() 50 this.ListLayout()
56 - },  
57 - onRefresh:(resolve)=>{  
58 - this.currentPage = 1  
59 - this.getPeopleShipPageArticleList(resolve)  
60 - },  
61 - onLoadMore:(resolve)=> {  
62 - if (this.hasMore === false) {  
63 - if(resolve) {  
64 - resolve('')  
65 - }  
66 - return  
67 - }  
68 - if(!this.isLoading && this.hasMore){  
69 - //加载分页数据  
70 - this.currentPage++;  
71 - this.getPeopleShipPageArticleList(resolve)  
72 - }else {  
73 - if(resolve) {  
74 - resolve('')  
75 - }  
76 - }  
77 - },  
78 - }) 51 + // CustomPullToRefresh({
  52 + // alldata:this.arr,
  53 + // scroller:this.scroller,
  54 + // hasMore: false,
  55 + // customList:()=>{
  56 + // this.ListLayout()
  57 + // },
  58 + // onRefresh:(resolve)=>{
  59 + // this.currentPage = 1
  60 + // this.getPeopleShipPageArticleList(resolve)
  61 + // },
  62 + // })
79 } 63 }
80 64
81 } 65 }
82 66
83 @Builder 67 @Builder
84 LoadingLayout() { 68 LoadingLayout() {
85 - CustomRefreshLoadLayout({  
86 - refreshBean: new RefreshLayoutBean(true,  
87 - $r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), 20)  
88 - }).height(DisplayUtils.getDeviceHeight() - this.topHeight) 69 + // CustomRefreshLoadLayout({
  70 + // refreshBean: new RefreshLayoutBean(true,
  71 + // $r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), 20)
  72 + // }).height(DisplayUtils.getDeviceHeight() - this.topHeight)
89 } 73 }
90 74
91 @Builder 75 @Builder
@@ -93,7 +77,6 @@ export struct PeopleShipHomeArticleListComponent { @@ -93,7 +77,6 @@ export struct PeopleShipHomeArticleListComponent {
93 77
94 List({scroller: this.scroller}) { 78 List({scroller: this.scroller}) {
95 // 下拉刷新 79 // 下拉刷新
96 -  
97 ForEach(this.arr, (item: ContentDTO) => { 80 ForEach(this.arr, (item: ContentDTO) => {
98 ListItem() { 81 ListItem() {
99 CardParser({ contentDTO: item }) 82 CardParser({ contentDTO: item })
@@ -103,11 +86,14 @@ export struct PeopleShipHomeArticleListComponent { @@ -103,11 +86,14 @@ export struct PeopleShipHomeArticleListComponent {
103 86
104 // 加载更多 87 // 加载更多
105 ListItem() { 88 ListItem() {
106 - if (!this.hasMore && !this.isLoading) { 89 + if (this.hasMore && this.arr && this.arr.length > 0) {
  90 + LoadMoreLayout({ isVisible: this.hasMore })
  91 + } else if (!this.hasMore && !this.isLoading) {
107 PeopleShipNoMoreData() 92 PeopleShipNoMoreData()
108 } 93 }
109 } 94 }
110 } 95 }
  96 + .backgroundColor(Color.Transparent)
111 .width("100%") 97 .width("100%")
112 .height("100%") 98 .height("100%")
113 .edgeEffect(EdgeEffect.None) 99 .edgeEffect(EdgeEffect.None)
@@ -115,13 +101,13 @@ export struct PeopleShipHomeArticleListComponent { @@ -115,13 +101,13 @@ export struct PeopleShipHomeArticleListComponent {
115 scrollForward: NestedScrollMode.PARENT_FIRST, 101 scrollForward: NestedScrollMode.PARENT_FIRST,
116 scrollBackward: NestedScrollMode.SELF_FIRST 102 scrollBackward: NestedScrollMode.SELF_FIRST
117 }) 103 })
118 -  
119 - // .onReachEnd(() => {  
120 - // if(!this.isLoading && this.hasMore){  
121 - // //加载分页数据  
122 - // this.getPeopleShipPageArticleList()  
123 - // }  
124 - // }) 104 + .onReachEnd(() => {
  105 + if(!this.isLoading && this.hasMore){
  106 + //加载分页数据
  107 + this.currentPage++;
  108 + this.getPeopleShipPageArticleList()
  109 + }
  110 + })
125 } 111 }
126 112
127 aboutToAppear() { 113 aboutToAppear() {
@@ -313,7 +299,6 @@ export struct PeopleShipHomeArticleListComponent { @@ -313,7 +299,6 @@ export struct PeopleShipHomeArticleListComponent {
313 } 299 }
314 300
315 } 301 }
316 -  
317 // this.arr = listData.list 302 // this.arr = listData.list
318 } 303 }
319 304
@@ -24,10 +24,10 @@ export struct PeopleShipHomeListComponent { @@ -24,10 +24,10 @@ export struct PeopleShipHomeListComponent {
24 // 列表 24 // 列表
25 else if (this.publishCount == 0) { 25 else if (this.publishCount == 0) {
26 // 无数据展示 26 // 无数据展示
27 - EmptyComponent({emptyType: 12}).height(DisplayUtils.getDeviceHeight() - this.topHeight) 27 + EmptyComponent({emptyType: 12}).height('100%')
28 } else { 28 } else {
29 Column() { 29 Column() {
30 - Column() { 30 + Stack({ alignContent: Alignment.Top }){
31 // 页签 31 // 页签
32 Row() { 32 Row() {
33 Scroll() { 33 Scroll() {
@@ -44,13 +44,10 @@ export struct PeopleShipHomeListComponent { @@ -44,13 +44,10 @@ export struct PeopleShipHomeListComponent {
44 .scrollBar(BarState.Off) 44 .scrollBar(BarState.Off)
45 .width('100%') 45 .width('100%')
46 } 46 }
  47 + .zIndex(10)
47 .backgroundColor(Color.White) 48 .backgroundColor(Color.White)
48 - .alignItems(VerticalAlign.Bottom)  
49 - .width('100%')  
50 - }  
51 - .justifyContent(FlexAlign.Start)  
52 .height('44vp') 49 .height('44vp')
53 - .alignItems(HorizontalAlign.Start) 50 + .alignItems(VerticalAlign.Bottom)
54 .width('100%') 51 .width('100%')
55 52
56 Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { 53 Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
@@ -63,15 +60,15 @@ export struct PeopleShipHomeListComponent { @@ -63,15 +60,15 @@ export struct PeopleShipHomeListComponent {
63 currentIndex: index 60 currentIndex: index
64 }) 61 })
65 } 62 }
66 - // }.tabBar(this.tabBuilder(index, item.name ?? '')) 63 + // .tabBar(this.Tab(index, item.name ?? ''))
67 }) 64 })
68 65
69 } 66 }
70 .backgroundColor(Color.White) 67 .backgroundColor(Color.White)
71 .barWidth('100%') 68 .barWidth('100%')
72 - .barHeight(0)  
73 .vertical(false) 69 .vertical(false)
74 - .height(DisplayUtils.getDeviceHeight() - 144) 70 + .barHeight('44vp')
  71 + .height('100% ')
75 .animationDuration(0) 72 .animationDuration(0)
76 .divider({ 73 .divider({
77 strokeWidth: '0.5vp', 74 strokeWidth: '0.5vp',
@@ -82,16 +79,19 @@ export struct PeopleShipHomeListComponent { @@ -82,16 +79,19 @@ export struct PeopleShipHomeListComponent {
82 .onChange((index: number) => { 79 .onChange((index: number) => {
83 this.currentIndex = index 80 this.currentIndex = index
84 }) 81 })
  82 +
  83 + }
  84 +
85 } 85 }
86 } 86 }
87 } 87 }
88 88
89 @Builder 89 @Builder
90 LoadingLayout() { 90 LoadingLayout() {
91 - CustomRefreshLoadLayout({  
92 - refreshBean: new RefreshLayoutBean(true,  
93 - $r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), DisplayUtils.getDeviceHeight() - this.topHeight)  
94 - }).height(DisplayUtils.getDeviceHeight() - this.topHeight) 91 + // CustomRefreshLoadLayout({
  92 + // refreshBean: new RefreshLayoutBean(true,
  93 + // $r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), DisplayUtils.getDeviceHeight() - this.topHeight)
  94 + // }).height('100%')
95 } 95 }
96 96
97 // 单独的页签 97 // 单独的页签
@@ -43,9 +43,8 @@ export struct PeopleShipHomePageNavComponent { @@ -43,9 +43,8 @@ export struct PeopleShipHomePageNavComponent {
43 }).onClick(()=>{ 43 }).onClick(()=>{
44 let params = { 44 let params = {
45 'headPhotoUrl': this.detailModel.headPhotoUrl, 45 'headPhotoUrl': this.detailModel.headPhotoUrl,
46 - 'headType': '1'  
47 } as Record<string, string>; 46 } as Record<string, string>;
48 - WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params) 47 + WDRouterRule.jumpWithPage(WDRouterPage.showHomePageHeaderPage,params)
49 }).margin({ 48 }).margin({
50 left: '10vp', 49 left: '10vp',
51 }) 50 })
@@ -56,9 +56,8 @@ export struct PeopleShipHomePageTopComponent { @@ -56,9 +56,8 @@ export struct PeopleShipHomePageTopComponent {
56 }).onClick(() => { 56 }).onClick(() => {
57 let params = { 57 let params = {
58 'headPhotoUrl': this.detailModel.headPhotoUrl, 58 'headPhotoUrl': this.detailModel.headPhotoUrl,
59 - 'headType': '1'  
60 } as Record<string, string>; 59 } as Record<string, string>;
61 - WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage, params) 60 + WDRouterRule.jumpWithPage(WDRouterPage.showHomePageHeaderPage, params)
62 }) 61 })
63 62
64 63
@@ -369,7 +368,11 @@ export struct PeopleShipHomePageTopComponent { @@ -369,7 +368,11 @@ export struct PeopleShipHomePageTopComponent {
369 368
370 private computeShowNum(count: number) { 369 private computeShowNum(count: number) {
371 if (count >= 10000) { 370 if (count >= 10000) {
372 - return `${(count / 10000).toFixed(1)}万` 371 + let num = ( count / 10000).toFixed(1)
  372 + if (Number(num.substring(num.length-1)) == 0) {
  373 + num = num.substring(0, num.length-2)
  374 + }
  375 + return num + '万'
373 } 376 }
374 return `${count}` 377 return `${count}`
375 } 378 }
@@ -12,6 +12,7 @@ import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'; @@ -12,6 +12,7 @@ import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData';
12 import { HttpUtils } from 'wdNetwork/Index'; 12 import { HttpUtils } from 'wdNetwork/Index';
13 import { WDRouterPage, WDRouterRule } from 'wdRouter' 13 import { WDRouterPage, WDRouterRule } from 'wdRouter'
14 import { LazyDataSource } from 'wdKit/Index'; 14 import { LazyDataSource } from 'wdKit/Index';
  15 +import LoadMoreLayout from '../page/LoadMoreLayout'
15 16
16 const TAG: string = 'ReserveMorePage'; 17 const TAG: string = 'ReserveMorePage';
17 18
@@ -31,7 +32,7 @@ struct ReserveMorePage { @@ -31,7 +32,7 @@ struct ReserveMorePage {
31 topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; 32 topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
32 type: number = 2; 33 type: number = 2;
33 pageSize: number = 20; 34 pageSize: number = 20;
34 - title: string = '预约列表' 35 + title: string = '直播预告'
35 //是否预约过直播 36 //是否预约过直播
36 @State isAppointmentLive: boolean = false 37 @State isAppointmentLive: boolean = false
37 @State contentDTO: ContentDTO = {} as ContentDTO; 38 @State contentDTO: ContentDTO = {} as ContentDTO;
@@ -95,7 +96,9 @@ struct ReserveMorePage { @@ -95,7 +96,9 @@ struct ReserveMorePage {
95 ) 96 )
96 // 加载更多 97 // 加载更多
97 ListItem() { 98 ListItem() {
98 - if (!this.hasMore && !this.isLoading) { 99 + if (this.hasMore && this.data && this.data.totalCount() > 0) {
  100 + LoadMoreLayout({ isVisible: this.hasMore })
  101 + } else if (!this.hasMore && !this.isLoading) {
99 PeopleShipNoMoreData() 102 PeopleShipNoMoreData()
100 } 103 }
101 } 104 }
@@ -104,7 +107,7 @@ struct ReserveMorePage { @@ -104,7 +107,7 @@ struct ReserveMorePage {
104 .edgeEffect(EdgeEffect.None) 107 .edgeEffect(EdgeEffect.None)
105 .scrollBar(BarState.Off) 108 .scrollBar(BarState.Off)
106 .backgroundColor('#F5F5F5') 109 .backgroundColor('#F5F5F5')
107 - .layoutWeight(1) 110 + .height('calc(100% - 44vp)')
108 .onReachEnd(() => { 111 .onReachEnd(() => {
109 Logger.debug(TAG, "触底了"); 112 Logger.debug(TAG, "触底了");
110 if(!this.isLoading && this.hasMore){ 113 if(!this.isLoading && this.hasMore){
@@ -124,7 +127,7 @@ struct ReserveMorePage { @@ -124,7 +127,7 @@ struct ReserveMorePage {
124 buildItem(item: ContentDTO, index: number) { 127 buildItem(item: ContentDTO, index: number) {
125 Column() { 128 Column() {
126 Stack() { 129 Stack() {
127 - Image(item.fullColumnImgUrls[0].url) 130 + Image(item.fullColumnImgUrls[0]?.url)
128 .width('100%') 131 .width('100%')
129 .height(196) 132 .height(196)
130 .borderRadius(4) 133 .borderRadius(4)
@@ -136,16 +139,18 @@ struct ReserveMorePage { @@ -136,16 +139,18 @@ struct ReserveMorePage {
136 Text(item.newsTitle) 139 Text(item.newsTitle)
137 .fontSize(17) 140 .fontSize(17)
138 .maxLines(2) 141 .maxLines(2)
  142 + .lineHeight(25)
139 .textOverflow({ overflow: TextOverflow.Ellipsis }) 143 .textOverflow({ overflow: TextOverflow.Ellipsis })
140 - .margin({ top: 16, left: 12, right: 12 }) 144 + .margin({ top: 4, left: 12, right: 12 })
141 .alignSelf(ItemAlign.Start) 145 .alignSelf(ItemAlign.Start)
142 Row() { 146 Row() {
  147 + if (item.liveInfo && item.liveInfo.liveStartTime) {
143 Row() { 148 Row() {
144 Image($r('app.media.reserve_play_icon')) 149 Image($r('app.media.reserve_play_icon'))
145 .width(20) 150 .width(20)
146 .height(20) 151 .height(20)
147 .margin({ left: 10, top: 2, bottom: 2, right: 6 }) 152 .margin({ left: 10, top: 2, bottom: 2, right: 6 })
148 - // Text(DateTimeUtils.formatDate(item.liveInfo.liveStartTime, "MM月dd日 HH:mm")) 153 +
149 Text(this.getReserveDate(item.liveInfo.liveStartTime, 1)) 154 Text(this.getReserveDate(item.liveInfo.liveStartTime, 1))
150 .fontSize(12) 155 .fontSize(12)
151 .fontWeight(500) 156 .fontWeight(500)
@@ -175,25 +180,8 @@ struct ReserveMorePage { @@ -175,25 +180,8 @@ struct ReserveMorePage {
175 } 180 }
176 .backgroundColor('#F5F5F5') 181 .backgroundColor('#F5F5F5')
177 .margin(12) 182 .margin(12)
178 -  
179 - // Flex({ justifyContent: FlexAlign.Center }) {  
180 - // Text(this.isAppointmentLive ? '已预约' : '预约')  
181 - // .fontSize(12)  
182 - // .fontWeight(400)  
183 - // .fontFamily('PingFang SC-Regular')  
184 - // .width(52)  
185 - // .height(24)  
186 - // .fontColor(Color.White)  
187 - // .textAlign(TextAlign.Center)  
188 - // .onClick(() => {  
189 - // this.liveAppointment(item)  
190 - // })  
191 - // }  
192 - // .width(52)  
193 - // .backgroundColor('#ED2800')  
194 - // .borderRadius(3)  
195 - // ReserveMoreAttentionComponent({reserveItem: this.getAttentionItem(item), })  
196 - // .margin({ right: 12 }) 183 + }
  184 + // 预约
197 Row() { 185 Row() {
198 LoadingProgress() 186 LoadingProgress()
199 .width(20) 187 .width(20)
@@ -201,7 +189,7 @@ struct ReserveMorePage { @@ -201,7 +189,7 @@ struct ReserveMorePage {
201 .color(!this.isReserved(item) ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC')) 189 .color(!this.isReserved(item) ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC'))
202 .visibility((this.isLoadingAttention && this.liveId == item.objectId) ? Visibility.Visible : Visibility.None) 190 .visibility((this.isLoadingAttention && this.liveId == item.objectId) ? Visibility.Visible : Visibility.None)
203 191
204 - Text(!this.isReserved(item) ? '关注' : '已关注') 192 + Text(!this.isReserved(item) ? '预约' : '已预约')
205 .fontSize($r('app.float.vp_12')) 193 .fontSize($r('app.float.vp_12'))
206 .fontWeight(500) 194 .fontWeight(500)
207 .fontColor(!this.isReserved(item) ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC')) 195 .fontColor(!this.isReserved(item) ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC'))
@@ -253,6 +241,9 @@ struct ReserveMorePage { @@ -253,6 +241,9 @@ struct ReserveMorePage {
253 .height(24) 241 .height(24)
254 .objectFit(ImageFit.Auto) 242 .objectFit(ImageFit.Auto)
255 .id("back_icon") 243 .id("back_icon")
  244 + .margin({
  245 + left: '16vp'
  246 + })
256 .alignRules({ 247 .alignRules({
257 center: { anchor: "__container__", align: VerticalAlign.Center }, 248 center: { anchor: "__container__", align: VerticalAlign.Center },
258 left: { anchor: "__container__", align: HorizontalAlign.Start } 249 left: { anchor: "__container__", align: HorizontalAlign.Start }
@@ -264,10 +255,10 @@ struct ReserveMorePage { @@ -264,10 +255,10 @@ struct ReserveMorePage {
264 Text(this.title)// .height('42lpx') 255 Text(this.title)// .height('42lpx')
265 .maxLines(1) 256 .maxLines(1)
266 .id("title") 257 .id("title")
267 - .fontSize('35lpx') 258 + .fontSize('18vp')
268 .fontWeight(400) 259 .fontWeight(400)
269 .fontColor($r('app.color.color_222222')) 260 .fontColor($r('app.color.color_222222'))
270 - .lineHeight('42lpx') 261 + .lineHeight('22vp')
271 .alignRules({ 262 .alignRules({
272 center: { anchor: "__container__", align: VerticalAlign.Center }, 263 center: { anchor: "__container__", align: VerticalAlign.Center },
273 middle: { anchor: "__container__", align: HorizontalAlign.Center } 264 middle: { anchor: "__container__", align: HorizontalAlign.Center }
@@ -281,11 +272,14 @@ struct ReserveMorePage { @@ -281,11 +272,14 @@ struct ReserveMorePage {
281 @Builder 272 @Builder
282 LiveImage() { 273 LiveImage() {
283 Row() { 274 Row() {
284 - Image($r('app.media.reserve_icon'))  
285 - .width(22)  
286 - .height(18) 275 + Image($r('app.media.reserve_new_icon'))
  276 + .width(14)
  277 + .height(14)
  278 + .margin({
  279 + right: 3
  280 + })
287 Text('预约') 281 Text('预约')
288 - .fontSize('11fp') 282 + .fontSize('12vp')
289 .fontWeight(400) 283 .fontWeight(400)
290 .fontColor(Color.White) 284 .fontColor(Color.White)
291 } 285 }
@@ -511,9 +505,5 @@ struct ReserveMorePage { @@ -511,9 +505,5 @@ struct ReserveMorePage {
511 } 505 }
512 } 506 }
513 507
514 - async liveAppointment(item: ContentDTO) {  
515 - const liveDetail = await LiveModel.liveAppointment(item?.relId || '', item?.objectId || '', this.isAppointmentLive || false)  
516 - }  
517 -  
518 508
519 } 509 }
@@ -323,9 +323,10 @@ export struct SearchComponent { @@ -323,9 +323,10 @@ export struct SearchComponent {
323 if(value.videoTotal!=0){ 323 if(value.videoTotal!=0){
324 this.count.push("视频") 324 this.count.push("视频")
325 } 325 }
326 - if(value.activityTotal!=0){  
327 - this.count.push("活动")  
328 - } 326 + //屏蔽活动
  327 + // if(value.activityTotal!=0){
  328 + // this.count.push("活动")
  329 + // }
329 } 330 }
330 this.isGetRequest = true 331 this.isGetRequest = true
331 this.resetSearch() 332 this.resetSearch()
@@ -82,7 +82,7 @@ export struct SearchResultComponent { @@ -82,7 +82,7 @@ export struct SearchResultComponent {
82 .margin({ right: '10lpx' }) 82 .margin({ right: '10lpx' })
83 Text("为你推荐") 83 Text("为你推荐")
84 .textAlign(TextAlign.Start) 84 .textAlign(TextAlign.Start)
85 - .fontWeight('600lpx') 85 + .fontWeight(600)
86 .fontSize('33lpx') 86 .fontSize('33lpx')
87 .lineHeight('46lpx') 87 .lineHeight('46lpx')
88 .fontColor($r('app.color.color_222222')) 88 .fontColor($r('app.color.color_222222'))
@@ -131,10 +131,8 @@ export struct SearchResultComponent { @@ -131,10 +131,8 @@ export struct SearchResultComponent {
131 .barWidth('100%') 131 .barWidth('100%')
132 .barHeight('84lpx') 132 .barHeight('84lpx')
133 .animationDuration(0) 133 .animationDuration(0)
134 - .onChange((index: number) => {  
135 - this.currentIndex = index  
136 - })  
137 .width('100%') 134 .width('100%')
  135 + .scrollable(false)
138 .layoutWeight(1) 136 .layoutWeight(1)
139 } 137 }
140 }.width('100%') 138 }.width('100%')
1 -import { ContentDTO, 1 +import {
  2 + ContentDTO,
2 contentListParams, 3 contentListParams,
3 - FullColumnImgUrlDTO, InteractDataDTO, 4 + FullColumnImgUrlDTO,
  5 + InteractDataDTO,
4 Params, 6 Params,
5 - RmhInfoDTO, VideoInfoDTO } from 'wdBean/Index' 7 + RmhInfoDTO,
  8 + VideoInfoDTO
  9 +} from 'wdBean/Index'
6 import { LiveInfoDTO } from 'wdBean/src/main/ets/bean/detail/LiveInfoDTO' 10 import { LiveInfoDTO } from 'wdBean/src/main/ets/bean/detail/LiveInfoDTO'
7 import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO' 11 import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO'
8 -import { LazyDataSource, Logger, StringUtils, ToastUtils } from 'wdKit/Index' 12 +import { LazyDataSource, Logger, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index'
9 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' 13 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
  14 +import MinePageDatasModel from '../../model/MinePageDatasModel'
10 import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' 15 import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
11 import { CreatorDetailRequestItem } from '../../viewmodel/CreatorDetailRequestItem' 16 import { CreatorDetailRequestItem } from '../../viewmodel/CreatorDetailRequestItem'
  17 +import { FollowListDetailItem } from '../../viewmodel/FollowListDetailItem'
  18 +import { FollowListStatusRequestItem } from '../../viewmodel/FollowListStatusRequestItem'
  19 +import { QueryListIsFollowedItem } from '../../viewmodel/QueryListIsFollowedItem'
12 import { SearchResultContentData } from '../../viewmodel/SearchResultContentData' 20 import { SearchResultContentData } from '../../viewmodel/SearchResultContentData'
13 import { SearchResultContentItem, SearchRmhDescription } from '../../viewmodel/SearchResultContentItem' 21 import { SearchResultContentItem, SearchRmhDescription } from '../../viewmodel/SearchResultContentItem'
14 import { CardParser } from '../CardParser' 22 import { CardParser } from '../CardParser'
  23 +import { FollowChildComponent } from '../mine/follow/FollowChildComponent'
15 import { ListHasNoMoreDataUI } from '../reusable/ListHasNoMoreDataUI' 24 import { ListHasNoMoreDataUI } from '../reusable/ListHasNoMoreDataUI'
16 import { ActivityItemComponent } from './ActivityItemComponent' 25 import { ActivityItemComponent } from './ActivityItemComponent'
17 import { SearchCreatorComponent } from './SearchCreatorComponent' 26 import { SearchCreatorComponent } from './SearchCreatorComponent'
@@ -19,27 +28,28 @@ import { SearchCreatorComponent } from './SearchCreatorComponent' @@ -19,27 +28,28 @@ import { SearchCreatorComponent } from './SearchCreatorComponent'
19 const TAG = "SearchResultContentComponent" 28 const TAG = "SearchResultContentComponent"
20 29
21 @Component 30 @Component
22 -export struct SearchResultContentComponent{  
23 - @State keywords:string = ""  
24 - @State searchType:string = "" 31 +export struct SearchResultContentComponent {
  32 + @State keywords: string = ""
  33 + @State searchType: string = ""
25 @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); 34 @State data: LazyDataSource<ContentDTO> = new LazyDataSource();
26 @State data_rmh: SearchRmhDescription[] = [] 35 @State data_rmh: SearchRmhDescription[] = []
27 - @State count:number = -1;  
28 - @State isLoading:boolean = false  
29 - @State hasMore:boolean = true  
30 - curPageNum:number = 1;  
31 - 36 + @State count: number = -1;
  37 + @State isLoading: boolean = false
  38 + @State hasMore: boolean = true
  39 + curPageNum: number = 1;
  40 + @State bean: FollowListDetailItem = new FollowListDetailItem("", "", "", "", "", "", "", "", "", -1, -1, "")
  41 + scroller: Scroller = new Scroller()
32 42
33 aboutToAppear(): void { 43 aboutToAppear(): void {
34 - if(this.searchType == "全部"){ 44 + if (this.searchType == "全部") {
35 this.searchType = "all" 45 this.searchType = "all"
36 - }else if(this.searchType == "精选"){ 46 + } else if (this.searchType == "精选") {
37 this.searchType = "cms" 47 this.searchType = "cms"
38 - }else if(this.searchType == "人民号"){ 48 + } else if (this.searchType == "人民号") {
39 this.searchType = "rmh" 49 this.searchType = "rmh"
40 - }else if(this.searchType == "视频"){ 50 + } else if (this.searchType == "视频") {
41 this.searchType = "video" 51 this.searchType = "video"
42 - }else if(this.searchType == "活动"){ 52 + } else if (this.searchType == "活动") {
43 this.searchType = "activity" 53 this.searchType = "activity"
44 } 54 }
45 55
@@ -47,93 +57,135 @@ export struct SearchResultContentComponent{ @@ -47,93 +57,135 @@ export struct SearchResultContentComponent{
47 this.getNewSearchResultData() 57 this.getNewSearchResultData()
48 } 58 }
49 59
50 - getNewSearchResultData(){ 60 + getNewSearchResultData() {
51 this.isLoading = true 61 this.isLoading = true
52 - if(this.hasMore){  
53 - SearcherAboutDataModel.getSearchResultListData("20",`${this.curPageNum}`,this.searchType,this.keywords,getContext(this)).then((value)=>{  
54 - if (!this.data || value.list.length == 0){ 62 + if (this.hasMore) {
  63 + SearcherAboutDataModel.getSearchResultListData("15", `${this.curPageNum}`, this.searchType, this.keywords,
  64 + getContext(this)).then((value) => {
  65 + if (!this.data || value.list.length == 0) {
55 this.hasMore = false 66 this.hasMore = false
56 this.isLoading = false 67 this.isLoading = false
57 - this.count = this.count===-1?0:this.count  
58 - }else{  
59 - if(value.list[0].dataList!=null){ 68 + this.count = this.count === -1 ? 0 : this.count
  69 + } else {
  70 + if (value.list[0].dataList != null) {
60 let data_temp: SearchRmhDescription[] = [] 71 let data_temp: SearchRmhDescription[] = []
  72 +
61 data_temp = value.list[0].dataList 73 data_temp = value.list[0].dataList
62 74
63 //TODO 查询创作者详情接口 75 //TODO 查询创作者详情接口
64 let request = new CreatorDetailRequestItem() 76 let request = new CreatorDetailRequestItem()
65 77
66 - data_temp.forEach((data)=>{ 78 + data_temp.forEach((data) => {
67 request.creatorIdList.push(data.creatorId) 79 request.creatorIdList.push(data.creatorId)
68 }) 80 })
69 81
70 - SearcherAboutDataModel.getCreatorDetailListData(request).then((value)=>{  
71 - if(value!=null && value.length>0){  
72 - data_temp.forEach((data)=>{  
73 - value.forEach((item)=>{  
74 - if(data.creatorId == item.creatorId){ 82 + SearcherAboutDataModel.getCreatorDetailListData(request).then((value) => {
  83 + if (value != null && value.length > 0) {
  84 + data_temp.forEach((data) => {
  85 + value.forEach((item) => {
  86 + if (data.creatorId == item.creatorId) {
75 data.headerPhotoUrl = item.headPhotoUrl.split("?")[0] 87 data.headerPhotoUrl = item.headPhotoUrl.split("?")[0]
76 - data.mainControl = item.mainControl+"" 88 + data.mainControl = item.mainControl + ""
  89 +
  90 + if(data_temp.length === 1){
  91 + this.bean.headPhotoUrl = item.headPhotoUrl.split("?")[0]
  92 + this.bean.cnUserName = item.userName
  93 + this.bean.creatorId = item.creatorId
  94 + this.bean.authIcon = item.authIcon
  95 +
  96 + if (value[0].fansNum > 10000) {
  97 + let temp = (value[0].fansNum / 10000) + ""
  98 + let index = temp.indexOf('.')
  99 + if (index != -1) {
  100 + temp = temp.substring(0, index + 2)
  101 + } else {
  102 + temp = temp
  103 + }
  104 + this.bean.cnFansNum = temp + "万"
  105 + } else {
  106 + this.bean.cnFansNum = item.fansNum + ""
  107 + }
  108 + this.bean.introduction = item.introduction
  109 + this.bean.mainControl = item.mainControl
  110 + this.bean.banControl = item.banControl
  111 + this.bean.cnUserType = item.userType
  112 + this.bean.cnUserId = item.userId
  113 + }
77 } 114 }
78 }) 115 })
79 }) 116 })
80 } 117 }
81 - data_temp.forEach((data)=>{ 118 + data_temp.forEach((data) => {
82 this.data_rmh.push(data) 119 this.data_rmh.push(data)
83 }) 120 })
84 121
85 - }).catch((err:Error)=>{  
86 - console.log(TAG,JSON.stringify(err)) 122 + //只有一条创作者,获取 创作者信息
  123 + if (this.data_rmh.length === 1) {
  124 + if(StringUtils.isNotEmpty(UserDataLocal.getUserId())){
  125 + //查询是否被关注
  126 + let status = new FollowListStatusRequestItem()
  127 + status.creatorIds.push(new QueryListIsFollowedItem(this.data_rmh[0].creatorId))
  128 + MinePageDatasModel.getFollowListStatusData(status, getContext(this)).then((newValue) => {
  129 + this.bean.status = newValue[0].status
  130 + }).catch((err: Error) => {
  131 + console.log(TAG, "请求失败")
  132 + })
  133 + }else{
  134 + this.bean.status = ""
  135 + }
  136 + }
  137 + }).catch((err: Error) => {
  138 + console.log(TAG, JSON.stringify(err))
87 }) 139 })
88 } 140 }
89 this.getInteractData(value) 141 this.getInteractData(value)
90 } 142 }
91 - }).catch((err:Error)=>{  
92 - console.log(TAG,JSON.stringify(err)) 143 + }).catch((err: Error) => {
  144 + console.log(TAG, JSON.stringify(err))
93 this.isLoading = false 145 this.isLoading = false
94 - this.count = this.count===-1?0:this.count 146 + this.count = this.count === -1 ? 0 : this.count
95 }) 147 })
96 } 148 }
97 } 149 }
98 150
99 - getInteractData(resultData:SearchResultContentData){  
100 - if(resultData.list[0].dataList!=null){  
101 - resultData.list.splice(0,1) 151 + getInteractData(resultData: SearchResultContentData) {
  152 + if (resultData.list[0].dataList != null) {
  153 + resultData.list.splice(0, 1)
102 } 154 }
103 155
104 - let data : contentListParams = { 156 + let data: contentListParams = {
105 contentList: [] 157 contentList: []
106 } 158 }
107 - resultData.list.forEach((item)=>{ 159 + resultData.list.forEach((item) => {
108 data.contentList.push({ 160 data.contentList.push({
109 contentId: item.data.id + '', 161 contentId: item.data.id + '',
110 contentType: Number.parseInt(item.data.type) 162 contentType: Number.parseInt(item.data.type)
111 }) 163 })
112 }) 164 })
113 165
114 - SearcherAboutDataModel.getInteractListData(data,getContext(this)).then((newValue)=>{  
115 - newValue.forEach((item)=>{  
116 - resultData.list.forEach((data)=>{ 166 + SearcherAboutDataModel.getInteractListData(data, getContext(this)).then((newValue) => {
  167 + newValue.forEach((item) => {
  168 + resultData.list.forEach((data) => {
117 if (item.contentId == data.data.id) { 169 if (item.contentId == data.data.id) {
118 - data.data.collectNum = item.collectNum+""  
119 - data.data.commentNum = item.commentNum+""  
120 - data.data.likeNum = item.likeNum+""  
121 - data.data.readNum = item.readNum+""  
122 - data.data.shareNum = item.shareNum+"" 170 + data.data.collectNum = item.collectNum + ""
  171 + data.data.commentNum = item.commentNum + ""
  172 + data.data.likeNum = item.likeNum + ""
  173 + data.data.readNum = item.readNum + ""
  174 + data.data.shareNum = item.shareNum + ""
123 } 175 }
124 }) 176 })
125 }) 177 })
126 178
127 - resultData.list.forEach((value)=>{  
128 - let photos:FullColumnImgUrlDTO[] = []  
129 - if(value.data.appStyle === 4){  
130 - value.data.appStyleImages.split("&&").forEach((value)=>{  
131 - photos.push({url:value} as FullColumnImgUrlDTO) 179 + resultData.list.forEach((value) => {
  180 + let photos: FullColumnImgUrlDTO[] = []
  181 + if (value.data.appStyle === 4) {
  182 + value.data.appStyleImages.split("&&").forEach((value) => {
  183 + photos.push({ url: value } as FullColumnImgUrlDTO)
132 }) 184 })
133 } 185 }
134 186
135 - let contentDTO = this.dataTransform(value,photos);  
136 - if(contentDTO.appStyle != "13"){ 187 + let contentDTO = this.dataTransform(value, photos);
  188 + if (contentDTO.appStyle != "13") {
137 this.data.push(contentDTO) 189 this.data.push(contentDTO)
138 } 190 }
139 191
@@ -142,74 +194,128 @@ export struct SearchResultContentComponent{ @@ -142,74 +194,128 @@ export struct SearchResultContentComponent{
142 this.count = this.data.totalCount() 194 this.count = this.data.totalCount()
143 if (this.data.totalCount() < resultData.totalCount) { 195 if (this.data.totalCount() < resultData.totalCount) {
144 this.curPageNum++ 196 this.curPageNum++
145 - }else { 197 + } else {
146 this.hasMore = false 198 this.hasMore = false
147 } 199 }
148 this.isLoading = false 200 this.isLoading = false
149 201
150 - if(this.count === 0 && resultData.list.length > 0){ 202 + if (this.count === 0 && resultData.list.length > 0) {
151 this.count = -1 203 this.count = -1
152 - if(!this.isLoading){ 204 + if (!this.isLoading) {
153 //加载分页数据 205 //加载分页数据
154 this.getNewSearchResultData() 206 this.getNewSearchResultData()
155 } 207 }
156 - }else if(this.count <= 20 && resultData.list.length > 0){  
157 - if(!this.isLoading){ 208 + } else if (this.count <= 10 && resultData.list.length > 0) {
  209 + if (!this.isLoading) {
158 //加载分页数据 210 //加载分页数据
159 this.getNewSearchResultData() 211 this.getNewSearchResultData()
160 } 212 }
161 } 213 }
162 - }).catch((err:Error)=>{  
163 - console.log(TAG,"请求失败") 214 + }).catch((err: Error) => {
  215 + console.log(TAG, "请求失败")
164 this.isLoading = false 216 this.isLoading = false
165 - this.count = this.count===-1?0:this.count 217 + this.count = this.count === -1 ? 0 : this.count
166 }) 218 })
167 } 219 }
168 220
169 build() { 221 build() {
170 Column() { 222 Column() {
171 - if(this.count == 0){  
172 - ListHasNoMoreDataUI({style:2}) 223 + if (this.count == 0) {
  224 + ListHasNoMoreDataUI({ style: 2 })
  225 + } else {
  226 + List() {
  227 + if (this.data_rmh != null && this.data_rmh.length > 0){
  228 + if (this.data_rmh.length === 1){
  229 + ListItem(){
  230 + FollowChildComponent({ data: this.bean, type: 1 })
  231 + }.padding({left:"31lpx",right:"31lpx"})
173 }else{ 232 }else{
  233 + ListItem(){
174 Column(){ 234 Column(){
175 - if (this.data_rmh!=null && this.data_rmh.length > 0) {  
176 - //List  
177 - List({space:'8lpx'}) {  
178 - ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => { 235 + this.SearchListUI()
  236 + }
  237 + }
  238 + }
  239 + }
  240 + LazyForEach(this.data, (item: ContentDTO, index: number) => {
179 ListItem() { 241 ListItem() {
180 - SearchCreatorComponent({item:item})  
181 - }.onClick(()=>{  
182 - //TODO 跳转 242 + Column() {
  243 + if (this.searchType == "activity") {
  244 + ActivityItemComponent({ contentDTO: item })
  245 + } else {
  246 + CardParser({ contentDTO: item })
  247 + }
  248 + if (index != this.data.totalCount() - 1) {
  249 + Divider()
  250 + .width('100%')
  251 + .height('1lpx')
  252 + .color($r('app.color.color_F5F5F5'))
  253 + .strokeWidth('1lpx')
  254 + }
  255 + }
  256 + }
  257 + }, (item: ContentDTO, index: number) => index.toString())
  258 +
  259 + //没有更多数据 显示提示
  260 + if (!this.hasMore && this.data.totalCount() > 0) {
  261 + ListItem() {
  262 + ListHasNoMoreDataUI()
  263 + }
  264 + }
  265 + }.cachedCount(10)
  266 + .edgeEffect(EdgeEffect.None)
  267 + .scrollBar(BarState.Off)
  268 + .onReachEnd(() => {
  269 + console.log(TAG, "触底了");
  270 + if (!this.isLoading) {
  271 + //加载分页数据
  272 + this.getNewSearchResultData()
  273 + }
183 }) 274 })
  275 + }
  276 + }
  277 + .backgroundColor($r('app.color.white'))
  278 + .width('100%')
  279 + }
  280 +
  281 + @Builder
  282 + multiCreatorUI() {
  283 + Column() {
  284 + List() {
  285 + ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
  286 + ListItem() {
  287 + SearchCreatorComponent({ item: item })
  288 + }
184 .width('150lpx') 289 .width('150lpx')
185 .height('100%') 290 .height('100%')
186 }) 291 })
187 292
188 - ListItem(){  
189 - Column(){ 293 + ListItem() {
  294 + Column() {
190 Text("查看更多") 295 Text("查看更多")
191 .width('19lpx') 296 .width('19lpx')
192 .fontSize('19lpx') 297 .fontSize('19lpx')
193 .fontWeight('400lpx') 298 .fontWeight('400lpx')
194 .lineHeight('27lpx') 299 .lineHeight('27lpx')
195 .fontColor($r('app.color.color_9E9E9E')) 300 .fontColor($r('app.color.color_9E9E9E'))
196 - }.borderRadius({topLeft:'4lpx',bottomLeft:'4lpx'}) 301 + }
  302 + .borderRadius({ topLeft: '4lpx', bottomLeft: '4lpx' })
197 .height('180lpx') 303 .height('180lpx')
198 .width('77lpx') 304 .width('77lpx')
199 .backgroundColor($r('app.color.color_EDEDED')) 305 .backgroundColor($r('app.color.color_EDEDED'))
200 .justifyContent(FlexAlign.Center) 306 .justifyContent(FlexAlign.Center)
201 307
202 }.height('100%') 308 }.height('100%')
203 - .margin({left:'23lpx'})  
204 - .onClick(()=>{ 309 + .margin({ left: '23lpx' })
  310 + .onClick(() => {
205 let params: Params = { 311 let params: Params = {
206 pageID: this.keywords 312 pageID: this.keywords
207 } 313 }
208 - WDRouterRule.jumpWithPage(WDRouterPage.searchCreatorPage,params) 314 + WDRouterRule.jumpWithPage(WDRouterPage.searchCreatorPage, params)
209 }) 315 })
210 } 316 }
211 .cachedCount(6) 317 .cachedCount(6)
212 - .edgeEffect(EdgeEffect.Spring) 318 + .edgeEffect(EdgeEffect.None)
213 .scrollBar(BarState.Off) 319 .scrollBar(BarState.Off)
214 .listDirection(Axis.Horizontal) 320 .listDirection(Axis.Horizontal)
215 .width('100%') 321 .width('100%')
@@ -221,50 +327,54 @@ export struct SearchResultContentComponent{ @@ -221,50 +327,54 @@ export struct SearchResultContentComponent{
221 .color($r('app.color.color_F5F5F5')) 327 .color($r('app.color.color_F5F5F5'))
222 .strokeWidth('12lpx') 328 .strokeWidth('12lpx')
223 } 329 }
224 - //List  
225 - List({ space: '6lpx' }) {  
226 - LazyForEach(this.data, (item: ContentDTO, index: number) => {  
227 - ListItem() {  
228 - Column(){  
229 - if(this.searchType == "activity"){  
230 - ActivityItemComponent({contentDTO:item})  
231 - }else{  
232 - CardParser({contentDTO:item})  
233 - }  
234 - if(index != this.data.totalCount()-1 ){  
235 - Divider()  
236 - .width('100%')  
237 - .height('1lpx')  
238 - .color($r('app.color.color_F5F5F5'))  
239 - .strokeWidth('1lpx')  
240 - }  
241 } 330 }
  331 +
  332 + @Builder
  333 + SearchListUI() {
  334 + List({space:'8lpx'}) {
  335 + ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
  336 + ListItem() {
  337 + SearchCreatorComponent({item:item})
242 } 338 }
243 - }, (item: ContentDTO, index: number) => index.toString()) 339 + .width('150lpx')
  340 + .height('100%')
  341 + })
244 342
245 - //没有更多数据 显示提示  
246 - if(!this.hasMore && this.data.totalCount() > 0){  
247 ListItem(){ 343 ListItem(){
248 - ListHasNoMoreDataUI() 344 + Column(){
  345 + Text("查看更多")
  346 + .width('19lpx')
  347 + .fontSize('19lpx')
  348 + .fontWeight('400lpx')
  349 + .lineHeight('27lpx')
  350 + .fontColor($r('app.color.color_9E9E9E'))
  351 + }.borderRadius({topLeft:'4lpx',bottomLeft:'4lpx'})
  352 + .height('180lpx')
  353 + .width('77lpx')
  354 + .backgroundColor($r('app.color.color_EDEDED'))
  355 + .justifyContent(FlexAlign.Center)
  356 +
  357 + }.height('100%')
  358 + .margin({left:'23lpx'})
  359 + .onClick(()=>{
  360 + let params: Params = {
  361 + pageID: this.keywords
249 } 362 }
  363 + WDRouterRule.jumpWithPage(WDRouterPage.searchCreatorPage,params)
  364 + })
250 } 365 }
251 - }.cachedCount(6) 366 + .cachedCount(6)
252 .edgeEffect(EdgeEffect.None) 367 .edgeEffect(EdgeEffect.None)
253 .scrollBar(BarState.Off) 368 .scrollBar(BarState.Off)
254 - .layoutWeight(1)  
255 - .onReachEnd(()=>{  
256 - console.log(TAG,"触底了");  
257 - if(!this.isLoading){  
258 - //加载分页数据  
259 - this.getNewSearchResultData()  
260 - }  
261 - })  
262 - }.layoutWeight(1)  
263 - }  
264 - }  
265 - .backgroundColor($r('app.color.white'))  
266 - .layoutWeight(1) 369 + .listDirection(Axis.Horizontal)
267 .width('100%') 370 .width('100%')
  371 + .height('219lpx')
  372 +
  373 + Divider()
  374 + .width('100%')
  375 + .height('12lpx')
  376 + .color($r('app.color.color_F5F5F5'))
  377 + .strokeWidth('12lpx')
268 } 378 }
269 379
270 private dataTransform(value: SearchResultContentItem, photos: FullColumnImgUrlDTO[]): ContentDTO { 380 private dataTransform(value: SearchResultContentItem, photos: FullColumnImgUrlDTO[]): ContentDTO {
@@ -14,6 +14,7 @@ import { MineMainSettingFunctionItem } from '../../viewmodel/MineMainSettingFunc @@ -14,6 +14,7 @@ import { MineMainSettingFunctionItem } from '../../viewmodel/MineMainSettingFunc
14 import common from '@ohos.app.ability.common'; 14 import common from '@ohos.app.ability.common';
15 import dataPreferences from '@ohos.data.preferences'; 15 import dataPreferences from '@ohos.data.preferences';
16 import { TitleBackComponent } from './TitleBackComponent'; 16 import { TitleBackComponent } from './TitleBackComponent';
  17 +import { MyCustomDialog } from '../reusable/MyCustomDialog';
17 18
18 @Component 19 @Component
19 export struct MineSettingComponent { 20 export struct MineSettingComponent {
@@ -23,17 +24,22 @@ export struct MineSettingComponent { @@ -23,17 +24,22 @@ export struct MineSettingComponent {
23 @State cacheSize: number = 0 24 @State cacheSize: number = 0
24 @State accountState:boolean=false 25 @State accountState:boolean=false
25 preferences: dataPreferences.Preferences | null = null; 26 preferences: dataPreferences.Preferences | null = null;
  27 +
26 dialogController: CustomDialogController = new CustomDialogController({ 28 dialogController: CustomDialogController = new CustomDialogController({
27 - builder: CustomCacheDialog({ 29 + builder: MyCustomDialog({
28 cancel: () => { 30 cancel: () => {
29 -  
30 }, 31 },
31 confirm: () => { 32 confirm: () => {
32 this.deleteCache() 33 this.deleteCache()
33 - } 34 + },
  35 + title: "清理缓存",
  36 + tipValue:"是否确认清理此App的缓存",
  37 + tipShow:true,
  38 + leftTextColor:$r('app.color.color_648DF2')
34 }), 39 }),
35 - customStyle: true,  
36 - alignment: DialogAlignment.Center 40 + autoCancel: true,
  41 + alignment: DialogAlignment.Center,
  42 + customStyle: true
37 }) 43 })
38 aboutToAppear() { 44 aboutToAppear() {
39 // 获取设置页面数据 45 // 获取设置页面数据
@@ -15,7 +15,7 @@ export struct CustomBottomFuctionUI { @@ -15,7 +15,7 @@ export struct CustomBottomFuctionUI {
15 .height('20') 15 .height('20')
16 .margin({right:'31lpx' }) 16 .margin({right:'31lpx' })
17 17
18 - Text(this.isAllSelect?'取消':'全选') 18 + Text(this.isAllSelect?'取消全选':'全选')
19 .fontColor($r('app.color.color_222222')) 19 .fontColor($r('app.color.color_222222'))
20 .backgroundColor(Color.White) 20 .backgroundColor(Color.White)
21 } 21 }
@@ -70,7 +70,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -70,7 +70,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
70 .textAlign(TextAlign.Start) 70 .textAlign(TextAlign.Start)
71 .margin({ top: 8 }) 71 .margin({ top: 8 })
72 .width(150) 72 .width(150)
73 - .lineHeight(17) 73 + .lineHeight(19)
74 } 74 }
75 } 75 }
76 .padding({ left: (index == 0) ? 16 : 0, right: (index == this.compDTO.operDataList.length - 1) ? 16 : 0 }) 76 .padding({ left: (index == 0) ? 16 : 0, right: (index == this.compDTO.operDataList.length - 1) ? 16 : 0 })
1 -import { Logger } from 'wdKit/Index' 1 +import { Logger, NumberFormatterUtils } from 'wdKit/Index'
2 import { LikeViewModel } from '../../viewmodel/LikeViewModel' 2 import { LikeViewModel } from '../../viewmodel/LikeViewModel'
3 import { SPHelper } from 'wdKit'; 3 import { SPHelper } from 'wdKit';
4 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 4 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
5 import { SpConstants } from 'wdConstant/Index'; 5 import { SpConstants } from 'wdConstant/Index';
  6 +import { ContentDetailDTO } from 'wdBean/Index';
6 7
7 8
8 const TAG = 'LikeComponent'; 9 const TAG = 'LikeComponent';
9 10
  11 +interface ILikeStyleResp {
  12 + url: Resource;
  13 + name: string;
  14 +}
  15 +
10 @Component 16 @Component
11 export struct LikeComponent { 17 export struct LikeComponent {
  18 + @Consume contentDetailData: ContentDetailDTO
  19 + @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
12 @State likeStatus: boolean = false 20 @State likeStatus: boolean = false
13 viewModel: LikeViewModel = new LikeViewModel() 21 viewModel: LikeViewModel = new LikeViewModel()
14 @Prop data: Record<string, string> 22 @Prop data: Record<string, string>
15 enableBtn = true 23 enableBtn = true
16 - componentType : number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口  
17 - styleType : number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏) 24 + componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口
  25 + styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏) 3 透明背景
18 @State likeCount: number = 0 //点赞数 26 @State likeCount: number = 0 //点赞数
19 27
20 //上层传值 样例 28 //上层传值 样例
@@ -33,18 +41,64 @@ export struct LikeComponent { @@ -33,18 +41,64 @@ export struct LikeComponent {
33 //获取点赞数 41 //获取点赞数
34 this.getLikeCount() 42 this.getLikeCount()
35 } 43 }
36 -  
37 } 44 }
38 45
39 build() { 46 build() {
40 - if (this.componentType == 2){ 47 +
  48 + if (this.componentType == 2) {
41 //2: 新闻页中间位置样式 49 //2: 新闻页中间位置样式
42 - Column() { 50 + this.likeCompStyle2()
  51 + } else if (this.componentType == 3) {
  52 + //卡片底部互动样式
  53 + this.likeCompStyle3()
  54 + } else if (this.componentType == 4) {
  55 + // 直播,点赞按钮底测有灰色圆角背景+右上点赞数量
  56 + this.likeCompStyle4()
  57 + } else if (this.componentType == 5) {
  58 + // 图集点赞,展示标识
  59 + this.likeCompStyle5()
  60 + }else {
  61 + //1: 底部栏目样式 默认样式
  62 + this.likeCompStyle1()
  63 + }
  64 + }
43 65
44 - Button(){ 66 + /**
  67 + * 将点赞样式转换为icon
  68 + */
  69 + transLikeStyle(): ILikeStyleResp {
  70 + if (this.likesStyle === 1) {
  71 + return {
  72 + url: this.likeStatus ? $r(`app.media.ic_like_check`) :
  73 + this.styleType == 1 ? this.componentType == 3?$r(`app.media.CarderInteraction_like`):$r('app.media.icon_like_default') : $r(`app.media.ic_like_uncheck`),
  74 + name: '赞'
  75 + }
  76 + } else if (this.likesStyle === 2) {
  77 + return {
  78 + url: this.likeStatus ? $r(`app.media.ic_thub_check`) : $r(`app.media.ic_thub_uncheck`),
  79 + name: '祈祷'
  80 + }
  81 + } else if (this.likesStyle === 3) {
  82 + return {
  83 + url: this.likeStatus ? $r(`app.media.ic_candle_check`) :
  84 + $r(`app.media.ic_candle_uncheck`),
  85 + name: '默哀'
  86 + }
  87 + }
  88 + return {
  89 + url: this.likeStatus ? $r(`app.media.ic_like_check`) :
  90 + this.styleType == 1 ? $r('app.media.icon_like_default') : $r(`app.media.ic_like_uncheck`),
  91 + name: '点赞'
  92 + }
  93 + }
45 94
46 - Row(){  
47 - Image(this.likeStatus ? $r('app.media.icon_like_select') : $r('app.media.icon_like_default')) 95 + @Builder
  96 + likeCompStyle2() {
  97 + //2: 新闻页中间位置样式
  98 + Column() {
  99 + Button() {
  100 + Row() {
  101 + Image(this.transLikeStyle().url)
48 .width(20) 102 .width(20)
49 .height(20) 103 .height(20)
50 Text(this.likeCount.toString()) 104 Text(this.likeCount.toString())
@@ -68,20 +122,23 @@ export struct LikeComponent { @@ -68,20 +122,23 @@ export struct LikeComponent {
68 .borderColor('#EDEDED') 122 .borderColor('#EDEDED')
69 .borderRadius(20) 123 .borderRadius(20)
70 .borderWidth(1) 124 .borderWidth(1)
71 - .onClick(()=>{ 125 + .onClick(() => {
72 this.clickButtonEvent() 126 this.clickButtonEvent()
73 }) 127 })
74 } 128 }
75 .width(154) 129 .width(154)
76 .height(40) 130 .height(40)
77 - }else if(this.componentType == 3){  
78 - Row(){  
79 - Image(this.likeStatus ? $r('app.media.icon_like_select') : this.styleType == 1 ? $r('app.media.CarderInteraction_like') :  
80 - $r('app.media.icon_like_default_white')) 131 + }
  132 +
  133 + @Builder
  134 + likeCompStyle3() {
  135 + Row() {
  136 + Image(this.transLikeStyle().url)
81 .width(18) 137 .width(18)
82 .height(18) 138 .height(18)
83 - Text(this.likeCount >0?this.likeCount.toString(): '点赞')  
84 - .margin({left:4}) 139 + Text(this.likeStatus ? '已赞' : '点赞')
  140 + // Text(this.likeCount > 0 ? this.likeCount.toString() : '点赞')
  141 + .margin({ left: 4 })
85 .fontSize(14) 142 .fontSize(14)
86 .fontColor(this.likeStatus ? '#ED2800' : '#666666') 143 .fontColor(this.likeStatus ? '#ED2800' : '#666666')
87 } 144 }
@@ -89,12 +146,14 @@ export struct LikeComponent { @@ -89,12 +146,14 @@ export struct LikeComponent {
89 .onClick(() => { 146 .onClick(() => {
90 this.clickButtonEvent() 147 this.clickButtonEvent()
91 }) 148 })
92 - }else{ 149 + }
  150 +
  151 + @Builder
  152 + likeCompStyle1() {
93 //1: 底部栏目样式 默认样式 153 //1: 底部栏目样式 默认样式
94 Column() { 154 Column() {
95 // Image(this.likeStatus ? $r('app.media.icon_like_select') : $r('app.media.icon_like_default')) 155 // Image(this.likeStatus ? $r('app.media.icon_like_select') : $r('app.media.icon_like_default'))
96 - Image(this.likeStatus ? $r('app.media.icon_like_select') : this.styleType == 1 ? $r('app.media.icon_like_default') :  
97 - $r('app.media.icon_like_default_white')) 156 + Image(this.transLikeStyle().url)
98 .width(24) 157 .width(24)
99 .height(24) 158 .height(24)
100 .onClick(() => { 159 .onClick(() => {
@@ -103,39 +162,118 @@ export struct LikeComponent { @@ -103,39 +162,118 @@ export struct LikeComponent {
103 }.width(24).height(24) 162 }.width(24).height(24)
104 } 163 }
105 164
  165 + @Builder
  166 + likeCompStyle5() {
  167 + //1: 底部栏目样式 默认样式
  168 + Stack({ alignContent: Alignment.Bottom }) {
  169 + Column() {
  170 + // Image(this.likeStatus ? $r('app.media.icon_like_select') : $r('app.media.icon_like_default'))
  171 + Image(this.transLikeStyle().url)
  172 + .width(24)
  173 + .height(24)
  174 + .onClick(() => {
  175 + this.clickButtonEvent()
  176 + })
  177 + }
  178 +
  179 + Row() {
  180 + Text(NumberFormatterUtils.formatNumberWithWan(this.likeCount || ''))
  181 + .fontSize(8)
  182 + .fontColor(Color.White)
  183 + .padding({ left: 4, right: 2 })
  184 + }
  185 + .height(12)
  186 + .alignItems(VerticalAlign.Center)
  187 + .position({ x: '100%', })
  188 + .markAnchor({ x: '100%' })
  189 + .backgroundImage(this.likeStatus? $r('app.media.ic_like_back_Select'):$r('app.media.ic_like_back'))
  190 + .backgroundImageSize(ImageSize.Auto)
  191 + .visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
  192 + }.width(24).height(24)
106 } 193 }
107 194
108 - async clickButtonEvent(){ 195 + @Builder
  196 + likeCompStyle4() {
  197 + Stack({ alignContent: Alignment.Bottom }) {
  198 + Column() {
  199 + Image(this.transLikeStyle().url)
  200 + .width(24)
  201 + .height(24)
  202 + .onClick(() => {
  203 + this.clickButtonEvent()
  204 + })
  205 + }
  206 + .justifyContent(FlexAlign.Center)
  207 + .width(36)
  208 + .height(36)
  209 + .borderRadius(18)
  210 + .backgroundColor('#FFF5F5F5')
  211 +
  212 +
  213 + Row() {
  214 + Text(NumberFormatterUtils.formatNumberWithWan(this.likeCount || ''))
  215 + .fontSize(8)
  216 + .fontColor(Color.White)
  217 + .padding({ left: 4, right: 2 })
  218 + }
  219 + .height(12)
  220 + .alignItems(VerticalAlign.Center)
  221 + .position({ x: '100%', })
  222 + .markAnchor({ x: '100%' })
  223 + .backgroundImage($r('app.media.ic_like_back'))
  224 + .backgroundImageSize(ImageSize.Auto)
  225 + .visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
  226 + }
  227 + .width(36)
  228 + .height(42)
  229 +
  230 + }
  231 +
  232 + async clickButtonEvent() {
  233 + console.log(TAG, '点赞点击')
109 // 未登录,跳转登录 234 // 未登录,跳转登录
110 const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') 235 const user_id = await SPHelper.default.get(SpConstants.USER_ID, '')
111 if (!user_id) { 236 if (!user_id) {
  237 + console.log(TAG, '点赞点击,未登录')
112 WDRouterRule.jumpWithPage(WDRouterPage.loginPage) 238 WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
113 return 239 return
114 } 240 }
115 241
116 - if (!this.enableBtn) {  
117 - return  
118 - }  
119 - if (this.likeStatus) {  
120 - //1  
121 - this.executeLike('0')  
122 - } else {  
123 - //0  
124 - this.executeLike('1')  
125 - } 242 + // if (!this.enableBtn) {
  243 + // return
  244 + // }
  245 + this.executeLike(this.likeStatus ? '0' : '1')
126 246
127 } 247 }
128 248
129 executeLike(status: string) { 249 executeLike(status: string) {
  250 + console.log(TAG, '点赞接口调用', status)
130 this.data['status'] = status 251 this.data['status'] = status
  252 + this.data['contentId'] = this.contentDetailData?.newsId + ''
  253 + this.data['contentType'] = this.contentDetailData?.newsType + ''
  254 +
131 this.viewModel.executeLike2(this.data).then(() => { 255 this.viewModel.executeLike2(this.data).then(() => {
  256 +
  257 + console.log(TAG, '点赞接口调用成功')
  258 +
  259 + // 直播点赞一直增加
  260 + if (this.contentDetailData.liveInfo) {
  261 + this.likeStatus = true
  262 + this.likeCount++
  263 + } else {
132 this.likeStatus = !this.likeStatus 264 this.likeStatus = !this.likeStatus
133 //点赞和取消点赞成功后更新点赞数 265 //点赞和取消点赞成功后更新点赞数
134 - if(this.likeStatus){  
135 - this.likeCount ++  
136 - }else {  
137 - this.likeCount -- 266 + if (this.likeStatus) {
  267 + this.likeCount++
  268 + } else {
  269 + this.likeCount--
  270 + }
  271 + }
  272 +
  273 + if (this.likeCount <= 0) {
  274 + this.likeCount = 0
138 } 275 }
  276 +
139 this.enableBtn = true 277 this.enableBtn = true
140 }).catch(() => { 278 }).catch(() => {
141 this.enableBtn = true 279 this.enableBtn = true
@@ -146,7 +284,7 @@ export struct LikeComponent { @@ -146,7 +284,7 @@ export struct LikeComponent {
146 this.viewModel.getLikeStatus(this.data).then((data) => { 284 this.viewModel.getLikeStatus(this.data).then((data) => {
147 if (data && data['data'].length && data['data'][0]['likeStatus']) { 285 if (data && data['data'].length && data['data'][0]['likeStatus']) {
148 this.likeStatus = data['data'][0]['likeStatus'] 286 this.likeStatus = data['data'][0]['likeStatus']
149 - }else { 287 + } else {
150 this.likeStatus = false 288 this.likeStatus = false
151 } 289 }
152 }).catch(() => { 290 }).catch(() => {
@@ -159,14 +297,11 @@ export struct LikeComponent { @@ -159,14 +297,11 @@ export struct LikeComponent {
159 this.viewModel.getLikeCount(this.data).then((data) => { 297 this.viewModel.getLikeCount(this.data).then((data) => {
160 if (data && data['data']) { 298 if (data && data['data']) {
161 this.likeCount = data['data']['likeNum'] 299 this.likeCount = data['data']['likeNum']
162 - }else { 300 + } else {
163 this.likeCount = 0 301 this.likeCount = 0
164 } 302 }
165 }).catch(() => { 303 }).catch(() => {
166 this.likeCount = 0 304 this.likeCount = 0
167 }) 305 })
168 } 306 }
169 -  
170 -  
171 -  
172 } 307 }
@@ -33,7 +33,7 @@ const TAG = 'OperRowListView'; @@ -33,7 +33,7 @@ const TAG = 'OperRowListView';
33 * 2、(非必传) operationButtonList---组件展示条件, 33 * 2、(非必传) operationButtonList---组件展示条件,
34 * ['comment', 'like', 'collect', 'share'],需要展示什么传什么 34 * ['comment', 'like', 'collect', 'share'],需要展示什么传什么
35 * comment--评论;like--点赞;collect--收藏;listen--音频;share--分享; 35 * comment--评论;like--点赞;collect--收藏;listen--音频;share--分享;
36 - * 36 + * 注意:外层需注册 @Provide contentDetailData:contentDetailData = {} as contentDetailData
37 * 传值示例: 37 * 传值示例:
38 OperRowListView({ 38 OperRowListView({
39 contentDetailData: this.contentDetailData[0], 39 contentDetailData: this.contentDetailData[0],
@@ -48,22 +48,36 @@ export struct OperRowListView { @@ -48,22 +48,36 @@ export struct OperRowListView {
48 private onCommentFocus: () => void = () => { 48 private onCommentFocus: () => void = () => {
49 } 49 }
50 @Prop @Watch('onDetailUpdated') contentDetailData: ContentDetailDTO // 稿件详情 50 @Prop @Watch('onDetailUpdated') contentDetailData: ContentDetailDTO // 稿件详情
51 - @State operationButtonList: string[] = ['comment', 'collect', 'share'] // 组件展示条件 51 + /**
  52 + * 组件样式类型,根据详情页类型传值,组件内部根据样式展现类型做判断
  53 + * 1:底部栏目样式
  54 + * 2:新闻页中间位置样式
  55 + * 3:动态Tab内容下的互动入口
  56 + * 4:视频详情页
  57 + * 5:横屏直播详情页
  58 + * 6:竖屏直播详情页
  59 + * 7:图集详情页
  60 + */
  61 + @Prop componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口
  62 + @Prop pageComponentType: number = -1 //1:视频详情页
  63 + @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
  64 + @Prop operationButtonList?: string[] = ['comment', 'collect', 'share'] // 组件展示条件
  65 + @State needLike: boolean = true
52 @ObjectLink publishCommentModel: publishCommentModel 66 @ObjectLink publishCommentModel: publishCommentModel
53 @State styleType: number = 1 67 @State styleType: number = 1
  68 + @State showCommentIcon: boolean = true
  69 + @State bgColor: ResourceColor = Color.White
54 @State interactData: InteractDataDTO = {} as InteractDataDTO 70 @State interactData: InteractDataDTO = {} as InteractDataDTO
55 @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态 71 @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
56 @State likeBean: Record<string, string> = {} 72 @State likeBean: Record<string, string> = {}
57 @State audioUrl: string = '' 73 @State audioUrl: string = ''
58 - @State bgColor: ResourceColor = Color.White  
59 - @State showCommentIcon: boolean = true  
60 @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 74 @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
61 - needLike: boolean = true  
62 75
63 async aboutToAppear() { 76 async aboutToAppear() {
64 console.info(TAG, '22222----', this.styleType) 77 console.info(TAG, '22222----', this.styleType)
65 console.info(TAG, '3333----', this.needLike) 78 console.info(TAG, '3333----', this.needLike)
66 this.handleStyle() 79 this.handleStyle()
  80 + this.onDetailUpdated()
67 } 81 }
68 82
69 async onDetailUpdated() { 83 async onDetailUpdated() {
@@ -102,6 +116,8 @@ export struct OperRowListView { @@ -102,6 +116,8 @@ export struct OperRowListView {
102 } 116 }
103 117
104 build() { 118 build() {
  119 + // 视频详情页
  120 +
105 Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { 121 Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
106 // AudioDialog() 122 // AudioDialog()
107 Row() { 123 Row() {
@@ -122,7 +138,7 @@ export struct OperRowListView { @@ -122,7 +138,7 @@ export struct OperRowListView {
122 }) 138 })
123 .width(42) 139 .width(42)
124 140
125 - if (this.contentDetailData) { 141 + if (this.contentDetailData?.newsId) {
126 ForEach(this.operationButtonList, (item: string, index: number) => { 142 ForEach(this.operationButtonList, (item: string, index: number) => {
127 if (item == 'comment') { 143 if (item == 'comment') {
128 this.builderComment() 144 this.builderComment()
@@ -146,9 +162,11 @@ export struct OperRowListView { @@ -146,9 +162,11 @@ export struct OperRowListView {
146 .backgroundColor(this.bgColor) 162 .backgroundColor(this.bgColor)
147 .padding({ 163 .padding({
148 top: 10, 164 top: 10,
  165 + bottom: 10
149 // bottom: `${this.bottomSafeHeight}px` 166 // bottom: `${this.bottomSafeHeight}px`
150 - bottom: 50 167 + // bottom: 50
151 }) 168 })
  169 +
152 } 170 }
153 171
154 /** 172 /**
@@ -161,11 +179,15 @@ export struct OperRowListView { @@ -161,11 +179,15 @@ export struct OperRowListView {
161 CommentTabComponent({ 179 CommentTabComponent({
162 publishCommentModel: this.publishCommentModel, 180 publishCommentModel: this.publishCommentModel,
163 contentDetail: this.contentDetailData, 181 contentDetail: this.contentDetailData,
164 - onCommentFocus: this.onCommentFocus 182 + onCommentFocus: this.onCommentFocus,
  183 + pageComponentType: this.pageComponentType
165 }) 184 })
166 } 185 }
167 } 186 }
168 - .flexShrink(1) 187 + .layoutWeight(1)
  188 + .margin({
  189 + right: this.pageComponentType === 1 ? 16 : 0,
  190 + })
169 191
170 if (this.showCommentIcon) { 192 if (this.showCommentIcon) {
171 Column() { 193 Column() {
@@ -183,15 +205,18 @@ export struct OperRowListView { @@ -183,15 +205,18 @@ export struct OperRowListView {
183 */ 205 */
184 @Builder 206 @Builder
185 builderLike() { 207 builderLike() {
  208 + // 点赞根据字段判断是否显示待添加
186 Column() { 209 Column() {
187 - if (this.likeBean?.contentId) { 210 + // if (this.likeBean?.contentId) {
188 LikeComponent({ 211 LikeComponent({
189 data: this.likeBean, 212 data: this.likeBean,
190 - styleType: this.styleType 213 + styleType: this.styleType,
  214 + componentType: this.componentType
191 }) 215 })
192 - } 216 + // }
193 } 217 }
194 .width(42) 218 .width(42)
  219 + .visibility(this.likesStyle !== 4 ? Visibility.Visible : Visibility.None)
195 } 220 }
196 221
197 /** 222 /**
@@ -301,10 +326,11 @@ export struct OperRowListView { @@ -301,10 +326,11 @@ export struct OperRowListView {
301 * 收藏、取消收藏 326 * 收藏、取消收藏
302 */ 327 */
303 async toggleCollectStatus() { 328 async toggleCollectStatus() {
304 - // console.log(TAG, '收藏--') 329 + console.log(TAG, '收藏点击')
305 // 未登录,跳转登录 330 // 未登录,跳转登录
306 const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') 331 const user_id = await SPHelper.default.get(SpConstants.USER_ID, '')
307 if (!user_id) { 332 if (!user_id) {
  333 + console.log(TAG, '收藏点击,用户未登录')
308 WDRouterRule.jumpWithPage(WDRouterPage.loginPage) 334 WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
309 return 335 return
310 } 336 }
@@ -313,10 +339,14 @@ export struct OperRowListView { @@ -313,10 +339,14 @@ export struct OperRowListView {
313 contentList: [{ 339 contentList: [{
314 contentId: this.contentDetailData?.newsId + '', 340 contentId: this.contentDetailData?.newsId + '',
315 contentType: this.contentDetailData?.newsType + '', 341 contentType: this.contentDetailData?.newsType + '',
  342 + relType:this.contentDetailData?.reLInfo?.relType + '',
  343 + contentRelId:this.contentDetailData?.reLInfo?.relId + '',
316 }], 344 }],
317 345
318 } 346 }
  347 + console.log(TAG, '收藏点击', JSON.stringify(params))
319 PageRepository.postExecuteCollectRecord(params).then(res => { 348 PageRepository.postExecuteCollectRecord(params).then(res => {
  349 + console.log(TAG, '收藏点击 res', JSON.stringify(res))
320 if (this.newsStatusOfUser) { 350 if (this.newsStatusOfUser) {
321 this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 351 this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1
322 if (this.newsStatusOfUser.collectStatus === 1) { 352 if (this.newsStatusOfUser.collectStatus === 1) {
@@ -339,7 +369,9 @@ export struct OperRowListView { @@ -339,7 +369,9 @@ export struct OperRowListView {
339 contentType: this.contentDetailData?.newsType, 369 contentType: this.contentDetailData?.newsType,
340 }] 370 }]
341 } 371 }
  372 + console.log(TAG, '点赞点击', JSON.stringify(params))
342 PageRepository.getContentInteract(params).then(res => { 373 PageRepository.getContentInteract(params).then(res => {
  374 + console.log(TAG, '点赞点击 res', JSON.stringify(res))
343 if (res.data) { 375 if (res.data) {
344 this.interactData.likeNum = NumberFormatterUtils.formatNumberWithWan(res.data[0]?.likeNum) 376 this.interactData.likeNum = NumberFormatterUtils.formatNumberWithWan(res.data[0]?.likeNum)
345 this.interactData.collectNum = NumberFormatterUtils.formatNumberWithWan(res.data[0]?.collectNum) 377 this.interactData.collectNum = NumberFormatterUtils.formatNumberWithWan(res.data[0]?.collectNum)
@@ -8,7 +8,6 @@ export struct ENewspaperCalendarDialog { @@ -8,7 +8,6 @@ export struct ENewspaperCalendarDialog {
8 onDateChange?: (date: RMCalendarBean) => void 8 onDateChange?: (date: RMCalendarBean) => void
9 //当前选择的日期标记 9 //当前选择的日期标记
10 @Prop selectDate: Date = new Date() 10 @Prop selectDate: Date = new Date()
11 -  
12 build() { 11 build() {
13 RMCalendar({ 12 RMCalendar({
14 // 开始日期 13 // 开始日期
@@ -2,6 +2,8 @@ import { Action, NewspaperListBean, NewspaperListItemBean, NewspaperPositionItem @@ -2,6 +2,8 @@ import { Action, NewspaperListBean, NewspaperListItemBean, NewspaperPositionItem
2 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO' 2 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'
3 import { WDRouterRule } from 'wdRouter/Index' 3 import { WDRouterRule } from 'wdRouter/Index'
4 import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog' 4 import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog'
  5 +import { Logger } from 'wdKit';
  6 +import { window } from '@kit.ArkUI';
5 7
6 /** 8 /**
7 * 读报纸半屏弹窗 9 * 读报纸半屏弹窗
@@ -35,6 +37,12 @@ export struct ENewspaperListDialog { @@ -35,6 +37,12 @@ export struct ENewspaperListDialog {
35 // listDialogController: CustomDialogController 37 // listDialogController: CustomDialogController
36 public closeDialog?: () => void 38 public closeDialog?: () => void
37 39
  40 + // 手势滑动相关
  41 + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Up | PanDirection.Down })
  42 + private topFixedHeight = 124
  43 + @State topHeight: number = 124
  44 + private deviceHeight: number = 0
  45 +
38 //watch监听报纸页码回调 46 //watch监听报纸页码回调
39 onCurrentPageNumUpdated(): void { 47 onCurrentPageNumUpdated(): void {
40 console.log("ENewspaperListDialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum) 48 console.log("ENewspaperListDialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum)
@@ -46,7 +54,13 @@ export struct ENewspaperListDialog { @@ -46,7 +54,13 @@ export struct ENewspaperListDialog {
46 } 54 }
47 } 55 }
48 56
49 - aboutToAppear(): void { 57 + async aboutToAppear() {
  58 + // 屏幕高度 - 滑动高度计算
  59 + let windowClass: window.Window = await window.getLastWindow(getContext(this));
  60 + let changeHeight = 85 + 44 + px2vp(windowClass.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)
  61 + changeHeight += px2vp(windowClass.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
  62 + this.deviceHeight = px2vp(windowClass.getWindowProperties().windowRect.height) - changeHeight
  63 +
50 this.isCurrentViewOpen = true 64 this.isCurrentViewOpen = true
51 console.log("ENewspaperListDialog-aboutToAppear", "currentPageNum:", this.currentPageNum) 65 console.log("ENewspaperListDialog-aboutToAppear", "currentPageNum:", this.currentPageNum)
52 let _scrollIndex = Number.parseInt(this.currentPageNum) 66 let _scrollIndex = Number.parseInt(this.currentPageNum)
@@ -56,15 +70,13 @@ export struct ENewspaperListDialog { @@ -56,15 +70,13 @@ export struct ENewspaperListDialog {
56 } 70 }
57 71
58 aboutToDisappear() { 72 aboutToDisappear() {
59 - // if (this.pageListDialogController) {  
60 - // this.pageListDialogController = null  
61 - // }  
62 this.isCurrentViewOpen = false 73 this.isCurrentViewOpen = false
63 } 74 }
64 75
65 build() { 76 build() {
66 Stack() { 77 Stack() {
67 Column() { 78 Column() {
  79 + Column() {
68 Row() 80 Row()
69 .width(43) 81 .width(43)
70 .height(4) 82 .height(4)
@@ -110,6 +122,24 @@ export struct ENewspaperListDialog { @@ -110,6 +122,24 @@ export struct ENewspaperListDialog {
110 .height(6) 122 .height(6)
111 .margin({ top: 20, left: 16, right: 16 }) 123 .margin({ top: 20, left: 16, right: 16 })
112 .objectFit(ImageFit.Contain) 124 .objectFit(ImageFit.Contain)
  125 + }
  126 + .width('100%')
  127 + .gesture(
  128 + PanGesture(this.panOption)
  129 + .onActionStart((event: GestureEvent) => {
  130 + Logger.debug('ENewspaperListDialog','Pan start')
  131 + })
  132 + .onActionUpdate((event: GestureEvent) => {
  133 + if (this.topFixedHeight + event.offsetY >= this.topFixedHeight) {
  134 + this.topHeight = this.topFixedHeight + event.offsetY
  135 + }
  136 + Logger.debug('ENewspaperListDialog', 'topHeight:' + this.topHeight)
  137 + })
  138 + .onActionEnd(() => {
  139 + this.onCloseGestureDialog()
  140 + })
  141 + )
  142 +
113 143
114 List({ scroller: this.listScroller, initialIndex: this.scrollIndex }) { 144 List({ scroller: this.listScroller, initialIndex: this.scrollIndex }) {
115 ForEach(this.newspaperListBean?.list, (item: NewspaperListItemBean, index: number) => { 145 ForEach(this.newspaperListBean?.list, (item: NewspaperListItemBean, index: number) => {
@@ -137,7 +167,7 @@ export struct ENewspaperListDialog { @@ -137,7 +167,7 @@ export struct ENewspaperListDialog {
137 .fontSize($r('app.float.font_size_14')) 167 .fontSize($r('app.float.font_size_14'))
138 .fontColor($r('app.color.color_222222')) 168 .fontColor($r('app.color.color_222222'))
139 .fontWeight(600) 169 .fontWeight(600)
140 - .maxLines(2) 170 + // .maxLines(2)
141 .margin({ 171 .margin({
142 bottom: 8 172 bottom: 8
143 }) 173 })
@@ -151,7 +181,7 @@ export struct ENewspaperListDialog { @@ -151,7 +181,7 @@ export struct ENewspaperListDialog {
151 .margin({ 181 .margin({
152 bottom: 8 182 bottom: 8
153 }) 183 })
154 - .maxLines(2) 184 + // .maxLines(2)
155 } 185 }
156 186
157 if (positionItem.downTitle) { 187 if (positionItem.downTitle) {
@@ -162,7 +192,7 @@ export struct ENewspaperListDialog { @@ -162,7 +192,7 @@ export struct ENewspaperListDialog {
162 .margin({ 192 .margin({
163 bottom: 8 193 bottom: 8
164 }) 194 })
165 - .maxLines(2) 195 + // .maxLines(2)
166 } 196 }
167 if (positionItem.newsTxt) { 197 if (positionItem.newsTxt) {
168 Text(positionItem.newsTxt) 198 Text(positionItem.newsTxt)
@@ -251,16 +281,13 @@ export struct ENewspaperListDialog { @@ -251,16 +281,13 @@ export struct ENewspaperListDialog {
251 this.currentPageNum = `${firstIndex < 9 ? '0' + (firstIndex + 1) : firstIndex + 1}` 281 this.currentPageNum = `${firstIndex < 9 ? '0' + (firstIndex + 1) : firstIndex + 1}`
252 // } 282 // }
253 }) 283 })
254 - .onScroll((scrollOffset: number, scrollState: ScrollState) => {  
255 - // console.info(`onScroll scrollState = ScrollState` + scrollState + `, scrollOffset = ` + scrollOffset)  
256 - // if (this.scrollOffset == 0) {  
257 - // this.scrollOffset = 0  
258 - // }  
259 - })  
260 } 284 }
261 - .margin({ top: 124 }) 285 + // .margin({ top: 124 })
  286 + .margin({ top: this.topHeight })
  287 +
262 .width('100%') 288 .width('100%')
263 .backgroundColor(Color.White) 289 .backgroundColor(Color.White)
  290 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
264 .onClick(() => { 291 .onClick(() => {
265 292
266 }) 293 })
@@ -272,6 +299,33 @@ export struct ENewspaperListDialog { @@ -272,6 +299,33 @@ export struct ENewspaperListDialog {
272 this.closeDialog() 299 this.closeDialog()
273 } 300 }
274 }) 301 })
  302 + .gesture(
  303 + PanGesture(this.panOption)
  304 + .onActionStart((event: GestureEvent) => {
  305 + Logger.debug('ENewspaperListDialog','Pan start')
  306 + })
  307 + .onActionUpdate((event: GestureEvent) => {
  308 + if (event) {
  309 + if (this.topFixedHeight + event.offsetY >= this.topFixedHeight) {
  310 + this.topHeight = this.topFixedHeight + event.offsetY
  311 + }
  312 + Logger.debug('ENewspaperListDialog', 'topHeight:' + this.topHeight)
  313 + }
  314 + })
  315 + .onActionEnd(() => {
  316 + this.onCloseGestureDialog()
  317 + })
  318 + )
  319 + }
  320 +
  321 + onCloseGestureDialog() {
  322 + if (this.topHeight >= this.deviceHeight ) {
  323 + if (this.closeDialog) {
  324 + this.closeDialog()
  325 + }
  326 + } else {
  327 + this.topHeight = this.topFixedHeight
  328 + }
275 } 329 }
276 330
277 updateRecordsData() { 331 updateRecordsData() {
@@ -48,6 +48,7 @@ export struct ENewspaperPageDialog { @@ -48,6 +48,7 @@ export struct ENewspaperPageDialog {
48 .justifyContent(FlexAlign.Center) 48 .justifyContent(FlexAlign.Center)
49 .width(30) 49 .width(30)
50 .height(30) 50 .height(30)
  51 + .borderRadius(3)
51 .backgroundColor(this.currentPageNum != item.pageNum ? Color.White : $r('app.color.color_ED2800')) 52 .backgroundColor(this.currentPageNum != item.pageNum ? Color.White : $r('app.color.color_ED2800'))
52 .onClick((event: ClickEvent) => { 53 .onClick((event: ClickEvent) => {
53 this.currentPageNum = item.pageNum 54 this.currentPageNum = item.pageNum
1 -import lottie, { AnimationItem, AnimationSegment } from '@ohos/lottie';  
2 -  
3 -@Component  
4 -export struct LottieView {  
5 - @Prop name: string  
6 - @Prop path: string  
7 - @Prop lottieWidth: number = 30  
8 - @Prop lottieHeight: number = 30  
9 - @Prop autoplay: boolean = false  
10 - @Prop loop: boolean = false  
11 - @Prop initialSegment?: AnimationSegment = [0, 120] // 动画起始帧  
12 - @Prop onReady: (animateItem: AnimationItem | null) => void // 动画初始化完成事件  
13 - @Prop onComplete: () => void = () => {  
14 - } // 动画完成事件  
15 - private politeChickyController: CanvasRenderingContext2D = new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象  
16 - private animateItem: AnimationItem | null = null; // 初始化loadAnimation接口的返回对象  
17 -  
18 - // 页面隐藏销毁动画  
19 - onPageHide(): void {  
20 - this.animateItem?.destroy()  
21 -  
22 - if (this.onComplete) {  
23 - this.animateItem?.removeEventListener('complete', this.onComplete)  
24 - }  
25 - }  
26 -  
27 - /**  
28 - * 加载动画  
29 - * @param autoplay 控制动画是否自动播放参数  
30 - */  
31 - loadAnimation() {  
32 - // 销毁动画,减少缓存  
33 - if (this.animateItem !== null) {  
34 - this.animateItem.destroy();  
35 - this.animateItem = null;  
36 - }  
37 -  
38 - this.animateItem = lottie.loadAnimation({  
39 - container: this.politeChickyController,  
40 - renderer: 'canvas',  
41 - loop: this.loop,  
42 - autoplay: this.autoplay,  
43 - name: this.name, // 动画名称  
44 - path: this.path, // hap包内动画资源文件路径,仅支持json格式  
45 - // initialSegment: this.initialSegment  
46 - })  
47 - if (this.initialSegment) {  
48 - this.animateItem.segments = this.initialSegment  
49 - }  
50 -  
51 - if (this.onComplete) {  
52 - this.animateItem.addEventListener('complete', this.onComplete)  
53 - }  
54 -  
55 - }  
56 -  
57 - build() {  
58 - Stack({ alignContent: Alignment.TopStart }) {  
59 - Canvas(this.politeChickyController)  
60 - .width(this.lottieWidth)  
61 - .height(this.lottieHeight)  
62 - .backgroundColor(Color.Black)  
63 - .onReady(() => {  
64 - this.loadAnimation();  
65 - if (this.onReady) {  
66 - this.onReady(this.animateItem)  
67 - }  
68 - })  
69 - .onClick(() => {  
70 - this.animateItem?.play()  
71 - })  
72 - }  
73 - }  
74 -}  
  1 +
  2 +/**
  3 + * WDMessageCenterMessageType 拉取消息类型
  4 + */
  5 +export const enum WDMessageCenterMessageType {
  6 + WDMessageCenterMessageType_Interact = 1, //互动通知
  7 + WDMessageCenterMessageType_Subscribe = 2, //预约消息
  8 + WDMessageCenterMessageType_System, //系统消息
  9 +}
  10 +
  11 +
  12 +export interface InteractMessageListModel{
  13 + data: InteractMessageMItem
  14 + code: number
  15 + message: string
  16 + success: string
  17 + timestamp: number
  18 +}
  19 +
  20 +
  21 +export class InteractMessageMItem{
  22 + pageNum:number = 0
  23 + pageSize:number = 0
  24 + totalCount:number = 0
  25 + hasNext:number = 0
  26 + list:InteractMessageModel[] = []
  27 +
  28 + constructor(list?:InteractMessageModel[],pageNum?: number,pageSize?: number,totalCount?: number,hasNext?:number) {
  29 + }
  30 +}
  31 +
  32 +export class InteractMessageModel {
  33 + classify: string = '';
  34 + contentId: string = '';
  35 + contentType: string = '';
  36 + id: number = 0;
  37 + message: string = '';
  38 + platform: string = '';
  39 + privateMailId: number = 0;
  40 + privateMailIdList: number[] = [];
  41 + privateMailIds: string = '';
  42 + privateMailNum: number = 0;
  43 + read: boolean = true;
  44 + source: string = '';
  45 + time: string = '';
  46 + title: string = '';
  47 + userId: string = '';
  48 + remark: string = '';
  49 + InteractMsubM:InteractMsubModel = new InteractMsubModel;
  50 +}
  51 +
  52 +export class InteractMsubModel {
  53 + beReply: string = '';
  54 + headUrl: string = '';
  55 + contentId: string = '';
  56 + contentRelObjectid: string = '';
  57 + contentTitle: string = '';
  58 + commentContent: string = '';
  59 + userName: string = '';
  60 + userId: string = '';
  61 + contentRelId: string = '';
  62 + shareUrl: string = '';
  63 + userType: string = '';
  64 + contentRelType: string = '';
  65 + visitor: string = '';
  66 + contentType: string = '';
  67 +}
  68 +
  69 +export interface InteractMParams {
  70 + contentType?: string;
  71 + pageNum?: string;
  72 + pageSize?: string;
  73 + userId?: string;
  74 + createTime?: string;
  75 +}
  76 +
  77 +export interface InteractMDTO{
  78 + success: boolean;
  79 + code: number;
  80 + message: string;
  81 + data: number;
  82 + timestamp?: number;
  83 +}
  84 +
  85 +@Observed
  86 +export class SubscribeMessageModel{
  87 + dealTime:string = ""
  88 + title:string = ""
  89 + imgUrl:string = ""
  90 + desc:string = ""
  91 + time:string = ""
  92 + contentId:string = ""
  93 +
  94 + constructor(dealTime: string, title: string, imgUrl: string, desc: string , time: string, contentId: string) {
  95 + this.dealTime = dealTime
  96 + this.title = title
  97 + this.imgUrl = imgUrl
  98 + this.desc = desc
  99 + this.time = time
  100 + this.contentId = contentId
  101 + }
  102 +}
  103 +
  104 +export class Remark{
  105 + relationType:string = ""
  106 + coverImageUrl:string = ""
  107 + relationId:string = ""
  108 + status:string = ""
  109 +}
@@ -24,6 +24,10 @@ import { CommentLikeOperationRequestItem } from '../viewmodel/CommentLikeOperati @@ -24,6 +24,10 @@ import { CommentLikeOperationRequestItem } from '../viewmodel/CommentLikeOperati
24 import { FollowOperationRequestItem } from '../viewmodel/FollowOperationRequestItem'; 24 import { FollowOperationRequestItem } from '../viewmodel/FollowOperationRequestItem';
25 import { SpConstants } from 'wdConstant/Index'; 25 import { SpConstants } from 'wdConstant/Index';
26 import { MessageItem } from '../viewmodel/MessageItem'; 26 import { MessageItem } from '../viewmodel/MessageItem';
  27 +import { MessageUnReadItem } from '../viewmodel/MessageUnReadItem';
  28 +import { HistoryPushDataItem } from '../viewmodel/HistoryPushDataItem';
  29 +import { HashMap } from '@kit.ArkTS';
  30 +import { InteractMessageMItem } from './InteractMessageModel';
27 31
28 const TAG = "MinePageDatasModel" 32 const TAG = "MinePageDatasModel"
29 33
@@ -58,7 +62,7 @@ class MinePageDatasModel{ @@ -58,7 +62,7 @@ class MinePageDatasModel{
58 * 包含名字和图标 62 * 包含名字和图标
59 */ 63 */
60 getPersonalFunctionsData():MinePagePersonalFunctionsItem[]{ 64 getPersonalFunctionsData():MinePagePersonalFunctionsItem[]{
61 - if(this.personalData.length === 7){ 65 + if(this.personalData.length === 5){
62 return this.personalData 66 return this.personalData
63 } 67 }
64 this.personalData.push(new MinePagePersonalFunctionsItem("评论",$r('app.media.mine_comment_icon'))) 68 this.personalData.push(new MinePagePersonalFunctionsItem("评论",$r('app.media.mine_comment_icon')))
@@ -67,7 +71,7 @@ class MinePageDatasModel{ @@ -67,7 +71,7 @@ class MinePageDatasModel{
67 // this.personalData.push(new MinePagePersonalFunctionsItem("历史",$r('app.media.mine_history_icon'))) 71 // this.personalData.push(new MinePagePersonalFunctionsItem("历史",$r('app.media.mine_history_icon')))
68 this.personalData.push(new MinePagePersonalFunctionsItem("消息",$r('app.media.mine_msg_icon'))) 72 this.personalData.push(new MinePagePersonalFunctionsItem("消息",$r('app.media.mine_msg_icon')))
69 // this.personalData.push(new MinePagePersonalFunctionsItem("留言板",$r('app.media.mine_msgboard_icon'))) 73 // this.personalData.push(new MinePagePersonalFunctionsItem("留言板",$r('app.media.mine_msgboard_icon')))
70 - // this.personalData.push(new MinePagePersonalFunctionsItem("预约",$r('app.media.mine_order_icon'))) 74 + this.personalData.push(new MinePagePersonalFunctionsItem("预约",$r('app.media.mine_order_icon')))
71 return this.personalData 75 return this.personalData
72 } 76 }
73 77
@@ -597,6 +601,129 @@ class MinePageDatasModel{ @@ -597,6 +601,129 @@ class MinePageDatasModel{
597 }) 601 })
598 }) 602 })
599 } 603 }
  604 +
  605 + /**
  606 + * 获取消息未读数据
  607 + * @returns
  608 + */
  609 + getMessageUnReadData(): Promise<MessageUnReadItem> {
  610 + return new Promise<MessageUnReadItem>((success, error) => {
  611 + this.fetchMessageUnReadData().then((navResDTO: ResponseDTO<MessageUnReadItem>) => {
  612 + if (!navResDTO || navResDTO.code != 0) {
  613 + error(null)
  614 + return
  615 + }
  616 + let navigationBean = navResDTO.data as MessageUnReadItem
  617 + success(navigationBean);
  618 + }).catch((err: Error) => {
  619 + error(null)
  620 + })
  621 + })
  622 + }
  623 +
  624 + fetchMessageUnReadData() {
  625 + let url = HttpUrlUtils.getMessageUnReadDataUrl()
  626 + return WDHttp.get<ResponseDTO<MessageUnReadItem>>(url)
  627 + };
  628 +
  629 + /**
  630 + * 点击消息(进入消息页面)
  631 + * @returns
  632 + */
  633 + sendClickMessageData(): Promise<String> {
  634 + return new Promise<String>((success, error) => {
  635 + this.fetchClickMessageData().then((navResDTO: ResponseDTO<String>) => {
  636 + if (!navResDTO || navResDTO.code != 0) {
  637 + error(null)
  638 + return
  639 + }
  640 + success("1");
  641 + }).catch((err: Error) => {
  642 + error(err)
  643 + })
  644 + })
  645 + }
  646 +
  647 + fetchClickMessageData() {
  648 + let url = HttpUrlUtils.getSendClickMessageUrl()
  649 + return WDHttp.get<ResponseDTO<String>>(url)
  650 + };
  651 +
  652 + /**
  653 + * 历史推送消息
  654 + * @returns
  655 + */
  656 + getHistoryPushData(pageSize:string,pageNum:string): Promise<HistoryPushDataItem> {
  657 + return new Promise<HistoryPushDataItem>((success, error) => {
  658 + this.fetchHistoryPushData(pageSize,pageNum).then((navResDTO: ResponseDTO<HistoryPushDataItem>) => {
  659 + if (!navResDTO || navResDTO.code != 0) {
  660 + error(null)
  661 + return
  662 + }
  663 + let navigationBean = navResDTO.data as HistoryPushDataItem
  664 + success(navigationBean);
  665 + }).catch((err: Error) => {
  666 + error(err)
  667 + })
  668 + })
  669 + }
  670 +
  671 + fetchHistoryPushData(pageSize:string,pageNum:string) {
  672 + let url = HttpUrlUtils.getHistoryPushUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}`
  673 + let headers: HashMap<string, string> = new HashMap<string, string>();
  674 + headers.set('system', 'Android');
  675 + return WDHttp.get<ResponseDTO<HistoryPushDataItem>>(url, headers)
  676 + };
  677 +
  678 + /**
  679 + * 推送消息
  680 + * @returns
  681 + */
  682 + getSubscribeMessageData(contentType:number,pageSize:string,pageNum:string): Promise<InteractMessageMItem> {
  683 + return new Promise<InteractMessageMItem>((success, error) => {
  684 + this.fetchSubscribeMessageData(contentType,pageSize,pageNum).then((navResDTO: ResponseDTO<InteractMessageMItem>) => {
  685 + if (!navResDTO || navResDTO.code != 0) {
  686 + error(null)
  687 + return
  688 + }
  689 + let navigationBean = navResDTO.data as InteractMessageMItem
  690 + success(navigationBean);
  691 + }).catch((err: Error) => {
  692 + error(err)
  693 + })
  694 + })
  695 + }
  696 +
  697 + fetchSubscribeMessageData(contentType:number,pageSize:string,pageNum:string) {
  698 + let userID = HttpUtils.getUserId();
  699 + let url = HttpUrlUtils.getMessageListDataUrl()+`?createTime=${''}&contentType=${contentType}&userId=${userID}&pageSize=${pageSize}&pageNum=${pageNum}`
  700 + return WDHttp.get<ResponseDTO<InteractMessageMItem>>(url)
  701 + };
  702 +
  703 +
  704 + /**
  705 + * 点击预约消息(进入预约页面) 主要为了 未读 变出 已读
  706 + * @returns
  707 + */
  708 + sendEnterMessageData(type:number): Promise<String> {
  709 + return new Promise<String>((success, error) => {
  710 + this.fetchEnterMessageData(type).then((navResDTO: ResponseDTO<String>) => {
  711 + if (!navResDTO || navResDTO.code != 0) {
  712 + error(null)
  713 + return
  714 + }
  715 + success("1");
  716 + }).catch((err: Error) => {
  717 + error(err)
  718 + })
  719 + })
  720 + }
  721 +
  722 + fetchEnterMessageData(type:number) {
  723 + let url = HttpUrlUtils.getEnterClickMessageUrl() + `${type}`
  724 + return WDHttp.get<ResponseDTO<String>>(url)
  725 + };
  726 +
600 } 727 }
601 728
602 const minePageDatasModel = MinePageDatasModel.getInstance() 729 const minePageDatasModel = MinePageDatasModel.getInstance()
@@ -43,7 +43,6 @@ export interface MyCollectionListModel{ @@ -43,7 +43,6 @@ export interface MyCollectionListModel{
43 } 43 }
44 44
45 45
46 -  
47 export interface contentListItemParams{ 46 export interface contentListItemParams{
48 contentId?:string; 47 contentId?:string;
49 contentType?:string; 48 contentType?:string;
@@ -31,10 +31,19 @@ struct MineHomePage { @@ -31,10 +31,19 @@ struct MineHomePage {
31 registTime:number = 0//账号注册时间 31 registTime:number = 0//账号注册时间
32 @State registerTimeForDay:number = 0 32 @State registerTimeForDay:number = 0
33 scroller: Scroller = new Scroller(); 33 scroller: Scroller = new Scroller();
  34 + @State params:Record<string, string> = router.getParams() as Record<string, string>;
  35 + @State isCommentEnter:string = "";
34 36
35 onPageShow(): void { 37 onPageShow(): void {
36 this.getUserInfo() 38 this.getUserInfo()
37 39
  40 + let intervalID = setInterval(() => {
  41 + this.isCommentEnter = this.params?.['comment'];
  42 + if(StringUtils.isNotEmpty(this.isCommentEnter)){
  43 + this.scroller.scrollEdge(Edge.Bottom)
  44 + }
  45 + clearInterval(intervalID);
  46 + }, 200);
38 } 47 }
39 48
40 build() { 49 build() {
@@ -414,7 +423,7 @@ struct MineHomePage { @@ -414,7 +423,7 @@ struct MineHomePage {
414 this.isHasIntroduction = false 423 this.isHasIntroduction = false
415 } 424 }
416 this.browseNum = value.browseNum 425 this.browseNum = value.browseNum
417 - this.commentNum = value.commentNum 426 + // this.commentNum = value.commentNum
418 this.attentionNum = value.attentionNum 427 this.attentionNum = value.attentionNum
419 this.registTime = value.registTime 428 this.registTime = value.registTime
420 this.getRegisterDays() 429 this.getRegisterDays()
@@ -65,6 +65,8 @@ export struct MultiPictureListPage { @@ -65,6 +65,8 @@ export struct MultiPictureListPage {
65 .height(px2vp(this.picHeight) + 32) 65 .height(px2vp(this.picHeight) + 32)
66 .vertical(false) 66 .vertical(false)
67 .autoPlay(false) 67 .autoPlay(false)
  68 + .loop(false)
  69 + .effectMode(EdgeEffect.None)
68 .cachedCount(3) 70 .cachedCount(3)
69 .indicator(false) 71 .indicator(false)
70 .displayCount(1) 72 .displayCount(1)
@@ -8,5 +8,6 @@ struct SearchPage { @@ -8,5 +8,6 @@ struct SearchPage {
8 SearchComponent() 8 SearchComponent()
9 }.height('100%') 9 }.height('100%')
10 .width('100%') 10 .width('100%')
  11 + .backgroundColor($r('app.color.white'))
11 } 12 }
12 } 13 }
  1 +import { router } from '@kit.ArkUI';
  2 +
  3 +@Entry
  4 +@Component
  5 +struct ShowHomePageHeaderPage {
  6 + @State headPhotoUrl: string = '';
  7 + @State params:Record<string, string> = router.getParams() as Record<string, string>;
  8 +
  9 + onPageShow() {
  10 + this.headPhotoUrl = this.params?.['headPhotoUrl'];
  11 + }
  12 +
  13 + build() {
  14 + Row() {
  15 + Image(this.headPhotoUrl)
  16 + .alt( $r('app.media.WDAccountOwnerHedaerDefaultIcon') )
  17 + .width('100%')
  18 + .objectFit(ImageFit.Contain)
  19 + }
  20 + .width('100%')
  21 + .height('100%')
  22 + .alignItems(VerticalAlign.Center)
  23 + .backgroundColor($r('app.color.color_000000'))
  24 + .onClick(()=>{
  25 + router.back()
  26 + })
  27 + }
  28 +}
@@ -4,18 +4,16 @@ import { router } from '@kit.ArkUI'; @@ -4,18 +4,16 @@ import { router } from '@kit.ArkUI';
4 @Component 4 @Component
5 struct ShowUserHeaderPage { 5 struct ShowUserHeaderPage {
6 @State headPhotoUrl: string = ''; 6 @State headPhotoUrl: string = '';
7 - @State headType: string = ''  
8 @State params:Record<string, string> = router.getParams() as Record<string, string>; 7 @State params:Record<string, string> = router.getParams() as Record<string, string>;
9 8
10 onPageShow() { 9 onPageShow() {
11 this.headPhotoUrl = this.params?.['headPhotoUrl']; 10 this.headPhotoUrl = this.params?.['headPhotoUrl'];
12 - this.headType = this.params?.['headType'] ?? '';  
13 } 11 }
14 12
15 build() { 13 build() {
16 Row() { 14 Row() {
17 Image(this.headPhotoUrl) 15 Image(this.headPhotoUrl)
18 - .alt(this.headType.length > 0 ? $r('app.media.WDAccountOwnerHedaerDefaultIcon') : $r('app.media.default_head')) 16 + .alt($r('app.media.default_head'))
19 .width('720lpx') 17 .width('720lpx')
20 .height('720lpx') 18 .height('720lpx')
21 .objectFit(ImageFit.Auto) 19 .objectFit(ImageFit.Auto)
  1 +import { SubscribeMessageComponent } from '../components/mine/message/subscribe/SubscribeMessageComponent'
  2 +
  3 +const TAG = "SubscribeMessagePage"
  4 +//预约消息 页面
  5 +@Entry
  6 +@Component
  7 +struct SubscribeMessagePage {
  8 +
  9 + build() {
  10 + Column(){
  11 + SubscribeMessageComponent()
  12 + }
  13 + }
  14 +}
@@ -23,9 +23,12 @@ import { @@ -23,9 +23,12 @@ import {
23 postExecuteLikeParams, 23 postExecuteLikeParams,
24 postInteractAccentionOperateParams, 24 postInteractAccentionOperateParams,
25 postRecommendListParams, 25 postRecommendListParams,
26 - GoldenPositionExtraBean 26 + GoldenPositionExtraBean,
  27 + FeedbackTypeBean,
  28 + LiveRoomDataBean
27 } from 'wdBean'; 29 } from 'wdBean';
28 import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; 30 import { PageUIReqBean } from '../components/page/bean/PageUIReqBean';
  31 +import { ArrayList } from '@kit.ArkTS';
29 32
30 const TAG = 'HttpRequest'; 33 const TAG = 'HttpRequest';
31 34
@@ -462,4 +465,19 @@ export class PageRepository { @@ -462,4 +465,19 @@ export class PageRepository {
462 Logger.info(TAG, "postThemeList url = " + url + JSON.stringify(params)) 465 Logger.info(TAG, "postThemeList url = " + url + JSON.stringify(params))
463 return WDHttp.post<ResponseDTO<LiveReviewDTO>>(url, params) 466 return WDHttp.post<ResponseDTO<LiveReviewDTO>>(url, params)
464 }; 467 };
  468 +
  469 + static getFeedbackTypeList() {
  470 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.FEEDBACK_TYPE_PATH;
  471 + url = url + "?dictCode=" + "CN_OPINION_TYPE";
  472 + return WDHttp.get<ResponseDTO<FeedbackTypeBean[]>>(url)
  473 + };
  474 +
  475 + /**
  476 + * 获取更多直播间人数
  477 + * */
  478 + static fetchLiveRoomBatchAllUrl(ids: string) {
  479 + let url = HttpUrlUtils.getLiveRoomBatchAllDataUrl()
  480 + url = url + "?liveIdList=" + ids;
  481 + return WDHttp.get<ResponseDTO<LiveRoomDataBean[]>>(url)
  482 + };
465 } 483 }
@@ -49,7 +49,6 @@ export class RefreshConstants { @@ -49,7 +49,6 @@ export class RefreshConstants {
49 static readonly NoMoreLayoutConstant_NORMAL_PADDING: number = 8; 49 static readonly NoMoreLayoutConstant_NORMAL_PADDING: number = 8;
50 static readonly NoMoreLayoutConstant_TITLE_FONT: string = '16vp'; 50 static readonly NoMoreLayoutConstant_TITLE_FONT: string = '16vp';
51 static readonly NoMoreLayoutConstant_TITLE_COLOR: string = '#666666'; 51 static readonly NoMoreLayoutConstant_TITLE_COLOR: string = '#666666';
52 - static readonly NoMoreLayoutConstant_MARGIN_BOTTOM: number = 40;  
53 /** 52 /**
54 * The RefreshLayout constants. 53 * The RefreshLayout constants.
55 */ 54 */
  1 +export class HistoryPushDataItem{
  2 + hasNext: number = 0
  3 + list: Array< HistoryPushItem > = []
  4 + pageNum: number = 0
  5 + pageSize: number = 0
  6 + totalCount: number = 0
  7 +}
  8 +
  9 +export class HistoryPushItem{
  10 + activityExt?: null
  11 + appStyle: string = ""
  12 + askInfo?: null
  13 + axisColor: string = ""
  14 + bestNoticer?: null
  15 + bottomNavId?: null
  16 + cardItemId: string = ""
  17 + channelId: number= 0
  18 + commentInfo?: null
  19 + corner: string = ""
  20 + coverSize: string = ""
  21 + coverType?: number
  22 + coverUrl: string = ""
  23 + expIds: string = ""
  24 + extra: string = ""
  25 + fullColumnImgUrls: Array< FullColumnImgUrl > = []
  26 + hasMore?: null
  27 + itemId: string = ""
  28 + itemType: string = ""
  29 + itemTypeCode: string = ""
  30 + keyArticle: number= 0
  31 + landscape?: null
  32 + likeStyle?: null
  33 + linkUrl: string = ""
  34 + liveInfo?: null
  35 + menuShow: number = 0
  36 + newTags: string = ""
  37 + newsAuthor: string = ""
  38 + newsSubTitle: string = ""
  39 + newsSummary: string = ""
  40 + newsTitle: string = ""
  41 + newsTitleColor: string = ""
  42 + objectId: string = ""
  43 + objectLevel: string = ""
  44 + objectType: string = ""
  45 + openComment?: null
  46 + openLikes?: null
  47 + pageId: string = ""
  48 + photoNum?: null
  49 + position?: null
  50 + productNum?: null
  51 + publishTime: string = ""
  52 + pushTime: number = 0
  53 + pushUnqueId: number = 0
  54 + readFlag: number = 0
  55 + recommend?: null
  56 + relId: number = 0
  57 + relObjectId: string = ""
  58 + relType: number = 0
  59 + rmhInfo?: null
  60 + rmhPlatform: number = 0
  61 + sceneId: string = ""
  62 + shareInfo?: null
  63 + // slideShows: Array< unknown >
  64 + sortValue?: null
  65 + source: string = ""
  66 + subObjectType: string = ""
  67 + subSceneId: string = ""
  68 + // tagIds: Array< unknown >
  69 + tagWord?: null
  70 + titleShow?: null
  71 + titleShowPolicy?: null
  72 + topicTemplate?: null
  73 + traceId: string = ""
  74 + traceInfo: string = ""
  75 + userInfo?: null
  76 + videoInfo?: null
  77 + visitorComment: number = 0
  78 + voiceInfo?: null
  79 +}
  80 +
  81 +export class FullColumnImgUrl{
  82 +
  83 +}
  1 +// import { collcetRecordParams, MyCollectionItem, MyCollectionListModel } from '../model/MyCollectionModel';
  2 +import { HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork';
  3 +import { Logger } from 'wdKit';
  4 +import promptAction from '@ohos.promptAction';
  5 +import {
  6 + InteractMDTO,
  7 + InteractMessageListModel, InteractMessageMItem, InteractMParams } from '../model/InteractMessageModel';
  8 +
  9 +const TAG = "MyCollectionViewModel"
  10 +
  11 +class InteractMessageViewModel {
  12 + private static instance:InteractMessageViewModel
  13 + /**
  14 + * 单例模式
  15 + * @returns
  16 + */
  17 + public static getInstance(): InteractMessageViewModel {
  18 + if (!InteractMessageViewModel.instance) {
  19 + InteractMessageViewModel.instance = new InteractMessageViewModel();
  20 + }
  21 + return InteractMessageViewModel.instance;
  22 + }
  23 +
  24 + // ///互动通知
  25 + // WDMessageCenterMessageType_Interact = 1,
  26 + //
  27 + // ///预约消息
  28 + // WDMessageCenterMessageType_Subscribe = 2,
  29 + //
  30 + // ///系统消息
  31 + // WDMessageCenterMessageType_System = 3
  32 +
  33 + BaseGetRequest(contentType:number,pageNum:number){
  34 + let userID = HttpUtils.getUserId();
  35 + let url = HttpUrlUtils.getMessageListDataUrl()+`?contentType=${contentType}&userId=${userID}&pageSize=${20}&pageNum=${pageNum}`
  36 + return WDHttp.get<InteractMessageListModel>(url)
  37 + }
  38 +
  39 +
  40 + fetchMessageList(contentType:number,pageNum:number):Promise<InteractMessageMItem>{
  41 + return new Promise((success,error) => {
  42 + this.BaseGetRequest(contentType,pageNum).then((navResDTO: InteractMessageListModel) => {
  43 + if (!navResDTO || navResDTO.code != 0) {
  44 + return
  45 + }
  46 + Logger.info(TAG, "fetchMessageList then,navResDTO.timeStamp:" + navResDTO.timestamp);
  47 + success(navResDTO.data)
  48 + }).catch((err: Error) => {
  49 + Logger.error(TAG, `fetchMessageList catch, error.name : ${err.name}, error.message:${err.message}`);
  50 + error("page data invalid");
  51 + })
  52 + })
  53 + }
  54 +
  55 + getMessageLikeCount():Promise<number>{
  56 + return new Promise((success,error) => {
  57 + WDHttp.get<InteractMDTO>(HttpUrlUtils.getMessageLikeCount()).then((navResDTO: InteractMDTO) => {
  58 + if (navResDTO.code == 0) {
  59 + success(navResDTO.data)
  60 + }
  61 + })
  62 + .catch((error: Error) => {
  63 + Logger.info(TAG,'executeCollcet','ResponseDTO')
  64 + })
  65 + })
  66 + }
  67 +}
  68 +
  69 +const interactMViewModel = InteractMessageViewModel.getInstance();
  70 +
  71 +export default interactMViewModel as InteractMessageViewModel
@@ -9,7 +9,8 @@ export class LikeViewModel { @@ -9,7 +9,8 @@ export class LikeViewModel {
9 this.likeModel = new LikeModel(); 9 this.likeModel = new LikeModel();
10 } 10 }
11 11
12 - executeLike(contentId: string, userName: string, contentType: string, title: string, userHeaderUrl: string, channelId: string, status: string) { 12 + executeLike(contentId: string, userName: string, contentType: string, title: string, userHeaderUrl: string,
  13 + channelId: string, status: string) {
13 let bean: Record<string, string> = {} 14 let bean: Record<string, string> = {}
14 bean['contentId'] = contentId 15 bean['contentId'] = contentId
15 bean['userName'] = userName 16 bean['userName'] = userName
@@ -23,7 +24,6 @@ export class LikeViewModel { @@ -23,7 +24,6 @@ export class LikeViewModel {
23 24
24 //点赞 25 //点赞
25 executeLike2(bean: Record<string, string>) { 26 executeLike2(bean: Record<string, string>) {
26 -  
27 return new Promise<object>((success, fail) => { 27 return new Promise<object>((success, fail) => {
28 this.likeModel.executeLike(bean).then((data) => { 28 this.likeModel.executeLike(bean).then((data) => {
29 success(data) 29 success(data)
@@ -60,7 +60,4 @@ export class LikeViewModel { @@ -60,7 +60,4 @@ export class LikeViewModel {
60 }) 60 })
61 61
62 } 62 }
63 -  
64 -  
65 -  
66 } 63 }
@@ -49,9 +49,6 @@ export class LiveModel { @@ -49,9 +49,6 @@ export class LiveModel {
49 params['relationId'] = relationId 49 params['relationId'] = relationId
50 params['liveId'] = liveId 50 params['liveId'] = liveId
51 params['isSubscribe'] = `${isSubscribe}` 51 params['isSubscribe'] = `${isSubscribe}`
52 - Logger.info('relationId', relationId)  
53 - Logger.info('liveId', liveId)  
54 - Logger.info('isSubscribe', typeof isSubscribe)  
55 return new Promise<ResponseDTO<string>>((success, fail) => { 52 return new Promise<ResponseDTO<string>>((success, fail) => {
56 HttpRequest.post<ResponseDTO<string>>( 53 HttpRequest.post<ResponseDTO<string>>(
57 HttpUrlUtils.getLiveAppointmentUrl(), 54 HttpUrlUtils.getLiveAppointmentUrl(),
  1 +@Observed
1 export class MessageItem{ 2 export class MessageItem{
2 imgSrc:Resource = $r("app.media.xxhdpi_pic_wb") 3 imgSrc:Resource = $r("app.media.xxhdpi_pic_wb")
3 title:string = "" 4 title:string = ""
4 desc:string = "" 5 desc:string = ""
5 time:string = "" 6 time:string = ""
  7 + unReadCount:number = 0
6 8
7 constructor(imgSrc:Resource,title:string,desc:string,time:string){ 9 constructor(imgSrc:Resource,title:string,desc:string,time:string){
8 this.imgSrc = imgSrc 10 this.imgSrc = imgSrc
  1 +export class MessageUnReadItem{
  2 + activeCount: number = 0 //互动通知未读数
  3 + subscribeCount: number = 0 //预约消息未读数
  4 + systemCount: number = 0 //系统通知未读数
  5 +
  6 + subscribeInfo: SubscribeInfo = new SubscribeInfo()
  7 + systemInfo: SystemInfo = new SystemInfo()
  8 + activeInfo: ActiveInfo = new ActiveInfo
  9 +}
  10 +
  11 +class SubscribeInfo{
  12 + classify: string = ""
  13 + contentId: string = ""
  14 + contentType: string = ""
  15 + id: number = -1
  16 + message: string = ""
  17 + platform: string = ""
  18 + privateMailId: number = -1
  19 + privateMailIdList: Array< string > = []
  20 + privateMailIds: string = ""
  21 + privateMailNum: number = -1
  22 + read: boolean = false
  23 + source: string = ""
  24 + time: string = ""
  25 + title: string = ""
  26 + userId: number = -1
  27 + remark: string = ""
  28 +}
  29 +class SystemInfo{
  30 + classify: string = ""
  31 + contentType: string = ""
  32 + id: number = -1
  33 + message: string = ""
  34 + platform: string = ""
  35 + privateMailId: number = -1
  36 + privateMailIdList: Array< string > = []
  37 + privateMailIds: string = ""
  38 + privateMailNum: number = -1
  39 + read: boolean = false
  40 + source: string = ""
  41 + time: string = ""
  42 + title: string = ""
  43 + userId: number = -1
  44 +}
  45 +
  46 +class ActiveInfo{
  47 + id:string = ""
  48 + message: string = ""
  49 + time: string = ""
  50 + title: string = ""
  51 +}
1 1
2 import FunctionsItem from './FunctionsItem' 2 import FunctionsItem from './FunctionsItem'
3 3
  4 +@Observed
4 export default class MinePagePersonalFunctionsItem extends FunctionsItem { 5 export default class MinePagePersonalFunctionsItem extends FunctionsItem {
  6 + isShowRedPoint:boolean = false
5 } 7 }
@@ -6,9 +6,11 @@ import { ContentDetailDTO, @@ -6,9 +6,11 @@ import { ContentDetailDTO,
6 postBatchAttentionStatusParams, 6 postBatchAttentionStatusParams,
7 postBatchAttentionStatusResult, 7 postBatchAttentionStatusResult,
8 postInteractBrowsOperateParams, 8 postInteractBrowsOperateParams,
9 - InteractDataDTO 9 + InteractDataDTO,
  10 + FeedbackTypeBean
10 } from 'wdBean'; 11 } from 'wdBean';
11 import { PageRepository } from '../repository/PageRepository'; 12 import { PageRepository } from '../repository/PageRepository';
  13 +import { ArrayList } from '@kit.ArkTS';
12 14
13 const TAG = 'MultiPictureDetailViewModel'; 15 const TAG = 'MultiPictureDetailViewModel';
14 16
@@ -131,4 +133,27 @@ export class MultiPictureDetailViewModel { @@ -131,4 +133,27 @@ export class MultiPictureDetailViewModel {
131 }) 133 })
132 } 134 }
133 135
  136 +
  137 + static async getFeedbackTypeList(): Promise<FeedbackTypeBean[]> {
  138 + return new Promise<FeedbackTypeBean[]>((success, error) => {
  139 + Logger.info(TAG, `fetchDetailData start`);
  140 + PageRepository.getFeedbackTypeList().then((resDTO: ResponseDTO<FeedbackTypeBean[]>) => {
  141 + if (!resDTO || !resDTO.data) {
  142 + Logger.error(TAG, 'fetchDetailData is empty');
  143 + error('resDTO is empty');
  144 + return
  145 + }
  146 + if (resDTO.code != 0) {
  147 + Logger.error(TAG, `fetchDetailData then code:${resDTO.code}, message:${resDTO.message}`);
  148 + error('resDTO Response Code is failure');
  149 + return
  150 + }
  151 + Logger.info(TAG, "fetchDetailData then,navResDTO.timestamp:" + resDTO.timestamp);
  152 + success(resDTO.data);
  153 + }).catch((err: Error) => {
  154 + Logger.error(TAG, `fetchDetailData catch, error.name : ${err.name}, error.message:${err.message}`);
  155 + error(err);
  156 + })
  157 + })
  158 + }
134 } 159 }
@@ -10,7 +10,8 @@ import { @@ -10,7 +10,8 @@ import {
10 PageInfoBean, 10 PageInfoBean,
11 PageInfoDTO, 11 PageInfoDTO,
12 GoldenPositionExtraBean, 12 GoldenPositionExtraBean,
13 - NavigationDetailDTO 13 + NavigationDetailDTO,
  14 + LiveRoomDataBean
14 } from 'wdBean'; 15 } from 'wdBean';
15 16
16 import { CollectionUtils, Logger, ResourcesUtils, StringUtils } from 'wdKit'; 17 import { CollectionUtils, Logger, ResourcesUtils, StringUtils } from 'wdKit';
@@ -439,6 +440,31 @@ export class PageViewModel extends BaseViewModel { @@ -439,6 +440,31 @@ export class PageViewModel extends BaseViewModel {
439 }) 440 })
440 }) 441 })
441 } 442 }
  443 +
  444 + async getLiveRoomBatchInfo(ids: string): Promise<LiveRoomDataBean[]> {
  445 + return new Promise<LiveRoomDataBean[]>((success, error) => {
  446 + Logger.info(TAG, `getLiveRoomBatchInfo pageInfo start`);
  447 + PageRepository.fetchLiveRoomBatchAllUrl(ids).then((resDTO: ResponseDTO<LiveRoomDataBean[]>) => {
  448 + if (!resDTO || !resDTO.data) {
  449 + Logger.error(TAG, 'getLiveRoomBatchInfo then navResDTO is empty');
  450 + error('resDTO is empty');
  451 + return
  452 + }
  453 + if (resDTO.code != 0) {
  454 + Logger.error(TAG, `getLiveRoomBatchInfo then code:${resDTO.code}, message:${resDTO.message}`);
  455 + error('resDTO Response Code is failure');
  456 + return
  457 + }
  458 + // let navResStr = JSON.stringify(navResDTO);
  459 + Logger.info(TAG, "getLiveRoomBatchInfo then,navResDTO.timestamp:" + resDTO.timestamp);
  460 + success(resDTO.data);
  461 + }).catch((err: Error) => {
  462 + Logger.error(TAG, `getLiveRoomBatchInfo catch, error.name : ${err.name}, error.message:${err.message}`);
  463 + error(err);
  464 + })
  465 + })
  466 + }
  467 +
442 } 468 }
443 469
444 470
@@ -160,5 +160,15 @@ @@ -160,5 +160,15 @@
160 "name": "res_color_general_000000_30", 160 "name": "res_color_general_000000_30",
161 "value": "#4D000000" 161 "value": "#4D000000"
162 } 162 }
  163 + ,
  164 + {
  165 + "name": "color_9E9E9E_40",
  166 + "value": "#40FFFFFF"
  167 + }
  168 + ,
  169 + {
  170 + "name": "color_ED2800_99",
  171 + "value": "#99ED2800"
  172 + }
163 ] 173 ]
164 } 174 }
@@ -241,6 +241,10 @@ @@ -241,6 +241,10 @@
241 "value": "12vp" 241 "value": "12vp"
242 }, 242 },
243 { 243 {
  244 + "name": "vp_4",
  245 + "value": "4vp"
  246 + },
  247 + {
244 "name": "vp_8", 248 "name": "vp_8",
245 "value": "8vp" 249 "value": "8vp"
246 }, 250 },
@@ -281,6 +285,10 @@ @@ -281,6 +285,10 @@
281 "value": "14vp" 285 "value": "14vp"
282 }, 286 },
283 { 287 {
  288 + "name": "vp_15",
  289 + "value": "15vp"
  290 + },
  291 + {
284 "name": "vp_18", 292 "name": "vp_18",
285 "value": "18vp" 293 "value": "18vp"
286 }, 294 },
@@ -57,5 +57,15 @@ @@ -57,5 +57,15 @@
57 "name": "location_reason", 57 "name": "location_reason",
58 "value": " " 58 "value": " "
59 } 59 }
  60 + ,
  61 + {
  62 + "name": "submit",
  63 + "value": "提交"
  64 + }
  65 + ,
  66 + {
  67 + "name": "feedback",
  68 + "value": "意见反馈"
  69 + }
60 ] 70 ]
61 } 71 }
@@ -24,6 +24,8 @@ @@ -24,6 +24,8 @@
24 "components/page/ThemeListPage", 24 "components/page/ThemeListPage",
25 "pages/ShowUserHeaderPage", 25 "pages/ShowUserHeaderPage",
26 "pages/MineMessagePage", 26 "pages/MineMessagePage",
27 - "components/page/InteractMessagePage" 27 + "components/page/InteractMessagePage",
  28 + "pages/ShowHomePageHeaderPage",
  29 + "pages/SubscribeMessagePage"
28 ] 30 ]
29 } 31 }
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 "main": "Index.ets", 7 "main": "Index.ets",
8 "version": "1.0.0", 8 "version": "1.0.0",
9 "dependencies": { 9 "dependencies": {
  10 + "@ohos/lottie": "2.0.10",
10 "wdComponent": "file:../../features/wdComponent", 11 "wdComponent": "file:../../features/wdComponent",
11 "wdPlayer": "file:../../features/wdPlayer", 12 "wdPlayer": "file:../../features/wdPlayer",
12 "wdNetwork": "file:../../commons/wdNetwork", 13 "wdNetwork": "file:../../commons/wdNetwork",
@@ -70,6 +70,7 @@ export struct DetailPlayLiveCommon { @@ -70,6 +70,7 @@ export struct DetailPlayLiveCommon {
70 this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId) 70 this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
71 this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle) 71 this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
72 this.publishCommentModel.targetType = String(this.contentDetailData?.newsType) 72 this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
  73 + this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment)
73 this.publishCommentModel.commentContent = '' 74 this.publishCommentModel.commentContent = ''
74 // } 75 // }
75 } 76 }
@@ -61,8 +61,8 @@ export struct DetailPlayLivePage { @@ -61,8 +61,8 @@ export struct DetailPlayLivePage {
61 .layoutWeight(503) 61 .layoutWeight(503)
62 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) 62 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
63 63
64 - if (this.contentDetailData?.newsId) {  
65 OperRowListView({ 64 OperRowListView({
  65 + componentType: 4,
66 operationButtonList: ['comment', 'collect', 'share', 'like'], 66 operationButtonList: ['comment', 'collect', 'share', 'like'],
67 contentDetailData: this.contentDetailData, 67 contentDetailData: this.contentDetailData,
68 publishCommentModel: this.publishCommentModel, 68 publishCommentModel: this.publishCommentModel,
@@ -73,7 +73,7 @@ export struct DetailPlayLivePage { @@ -73,7 +73,7 @@ export struct DetailPlayLivePage {
73 } 73 }
74 }) 74 })
75 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) 75 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
76 - } 76 +
77 // LiveCommentComponent({ heartNum: this.liveRoomDataBean.likeNum }) 77 // LiveCommentComponent({ heartNum: this.liveRoomDataBean.likeNum })
78 // .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) 78 // .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
79 } 79 }
@@ -81,10 +81,10 @@ export struct DetailPlayLivePage { @@ -81,10 +81,10 @@ export struct DetailPlayLivePage {
81 .width('100%') 81 .width('100%')
82 } 82 }
83 83
84 - aboutToDisappear(): void { 84 + async aboutToDisappear() {
85 Logger.info(TAG, `wyj-aboutToDisappear`) 85 Logger.info(TAG, `wyj-aboutToDisappear`)
86 - this.playerController?.stop()  
87 - this.playerController?.release() 86 + await this.playerController?.stop()
  87 + await this.playerController?.release()
88 } 88 }
89 89
90 onPageShowCus(): void { 90 onPageShowCus(): void {
1 import { window } from '@kit.ArkUI' 1 import { window } from '@kit.ArkUI'
  2 +import lottie from '@ohos/lottie';
  3 +
2 import { NumberFormatterUtils, StringUtils, WindowModel } from 'wdKit/Index' 4 import { NumberFormatterUtils, StringUtils, WindowModel } from 'wdKit/Index'
3 import { DateFormatUtil, WDPlayerController } from 'wdPlayer/Index' 5 import { DateFormatUtil, WDPlayerController } from 'wdPlayer/Index'
4 import { LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index' 6 import { LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index'
5 import { DisplayDirection } from 'wdConstant/Index' 7 import { DisplayDirection } from 'wdConstant/Index'
6 -import { LiveFollowComponent } from 'wdComponent/Index' 8 +import { LiveFollowComponent, LottieView } from 'wdComponent/Index'
7 9
8 @Component 10 @Component
9 export struct PlayUIComponent { 11 export struct PlayUIComponent {
@@ -44,6 +46,12 @@ export struct PlayUIComponent { @@ -44,6 +46,12 @@ export struct PlayUIComponent {
44 } 46 }
45 } 47 }
46 48
  49 + aboutToDisappear(): void {
  50 + if (this.liveDetailsBean.liveInfo?.liveState == 'running') {
  51 + lottie.destroy('live_status_wait')
  52 + }
  53 + }
  54 +
47 build() { 55 build() {
48 Column() { 56 Column() {
49 if (this.liveDetailsBean && this.liveDetailsBean.liveInfo) { 57 if (this.liveDetailsBean && this.liveDetailsBean.liveInfo) {
@@ -113,11 +121,12 @@ export struct PlayUIComponent { @@ -113,11 +121,12 @@ export struct PlayUIComponent {
113 } 121 }
114 } 122 }
115 .width('100%') 123 .width('100%')
  124 + // .width(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 'calc(100% - 80vp)' : 'calc(100% - 32vp)')
116 .padding({ 125 .padding({
117 top: 15, 126 top: 15,
118 bottom: 6, 127 bottom: 6,
119 - left: 10,  
120 - right: 10 128 + left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp',
  129 + right: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp'
121 }) 130 })
122 .alignItems(HorizontalAlign.Start) 131 .alignItems(HorizontalAlign.Start)
123 .visibility(this.isMenuVisible ? Visibility.Visible : Visibility.None) 132 .visibility(this.isMenuVisible ? Visibility.Visible : Visibility.None)
@@ -130,6 +139,7 @@ export struct PlayUIComponent { @@ -130,6 +139,7 @@ export struct PlayUIComponent {
130 // 预约 139 // 预约
131 if (this.liveDetailsBean.liveInfo?.liveState == 'wait') { 140 if (this.liveDetailsBean.liveInfo?.liveState == 'wait') {
132 Row() { 141 Row() {
  142 +
133 Image($r('app.media.icon_live_status_wait')) 143 Image($r('app.media.icon_live_status_wait'))
134 .width(22) 144 .width(22)
135 .height(18) 145 .height(18)
@@ -148,9 +158,21 @@ export struct PlayUIComponent { @@ -148,9 +158,21 @@ export struct PlayUIComponent {
148 // 直播中 158 // 直播中
149 else if (this.liveDetailsBean.liveInfo?.liveState == 'running') { 159 else if (this.liveDetailsBean.liveInfo?.liveState == 'running') {
150 Row() { 160 Row() {
151 - Image($r('app.media.icon_live_status_running')) 161 + Stack() {
  162 + Image($r('app.media.icon_live_status_running_back'))
152 .width(22) 163 .width(22)
153 .height(18) 164 .height(18)
  165 + LottieView({
  166 + name: 'live_status_wait',
  167 + path: "lottie/live_detail_living.json",
  168 + lottieWidth: 9,
  169 + lottieHeight: 9,
  170 + autoplay: true,
  171 + loop: true,
  172 + })
  173 + .margin({ right: 2 })
  174 + }
  175 +
154 Text('直播中') 176 Text('直播中')
155 .fontSize('11fp') 177 .fontSize('11fp')
156 .fontWeight(400) 178 .fontWeight(400)
@@ -271,8 +293,8 @@ export struct PlayUIComponent { @@ -271,8 +293,8 @@ export struct PlayUIComponent {
271 .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] }) 293 .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] })
272 .width('100%') 294 .width('100%')
273 .padding({ 295 .padding({
274 - left: 10,  
275 - right: 10, 296 + left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp',
  297 + right: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp',
276 top: 15, 298 top: 15,
277 bottom: 15 299 bottom: 15
278 }) 300 })
@@ -28,11 +28,11 @@ export struct TopPlayComponent { @@ -28,11 +28,11 @@ export struct TopPlayComponent {
28 28
29 updateData() { 29 updateData() {
30 //直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 30 //直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停
31 - if (this.liveDetailsBean.liveInfo && this.liveDetailsBean.liveInfo.previewUrl && this.liveDetailsBean.liveInfo.previewUrl.length > 0) { 31 + if (this.liveDetailsBean.liveInfo && this.liveDetailsBean.liveInfo.previewUrl &&
  32 + this.liveDetailsBean.liveInfo.previewUrl.length > 0) {
32 this.imgUrl = this.liveDetailsBean.liveInfo.previewUrl 33 this.imgUrl = this.liveDetailsBean.liveInfo.previewUrl
33 Logger.debug(TAG, 'ok+' + `${this.imgUrl}`) 34 Logger.debug(TAG, 'ok+' + `${this.imgUrl}`)
34 - }  
35 - else if (this.liveDetailsBean.fullColumnImgUrls && this.liveDetailsBean.fullColumnImgUrls.length > 0) { 35 + } else if (this.liveDetailsBean.fullColumnImgUrls && this.liveDetailsBean.fullColumnImgUrls.length > 0) {
36 this.imgUrl = this.liveDetailsBean.fullColumnImgUrls[0].url 36 this.imgUrl = this.liveDetailsBean.fullColumnImgUrls[0].url
37 Logger.debug(TAG, 'ok-' + `${this.imgUrl}`) 37 Logger.debug(TAG, 'ok-' + `${this.imgUrl}`)
38 } 38 }
@@ -81,6 +81,7 @@ export struct TopPlayComponent { @@ -81,6 +81,7 @@ export struct TopPlayComponent {
81 .alignSelf(ItemAlign.Center) 81 .alignSelf(ItemAlign.Center)
82 } 82 }
83 83
84 - aboutToDisappear(): void { 84 + async aboutToDisappear(): Promise<void> {
  85 + await this.playerController?.release()
85 } 86 }
86 } 87 }
@@ -115,6 +115,7 @@ export struct PlayerCommentComponent { @@ -115,6 +115,7 @@ export struct PlayerCommentComponent {
115 // 收藏、分享、点赞是否需要根据字段显隐 115 // 收藏、分享、点赞是否需要根据字段显隐
116 OperRowListView({ 116 OperRowListView({
117 styleType: 3, 117 styleType: 3,
  118 + componentType: 4,
118 operationButtonList: ['comment', 'collect', 'share', 'like'], 119 operationButtonList: ['comment', 'collect', 'share', 'like'],
119 contentDetailData: this.contentDetailData, 120 contentDetailData: this.contentDetailData,
120 publishCommentModel: this.publishCommentModel, 121 publishCommentModel: this.publishCommentModel,
@@ -37,11 +37,10 @@ export struct PlayerComponent { @@ -37,11 +37,10 @@ export struct PlayerComponent {
37 } 37 }
38 } 38 }
39 39
40 - aboutToDisappear(): void {  
41 - 40 + async aboutToDisappear(): Promise<void> {
42 this.playerController?.pause() 41 this.playerController?.pause()
43 this.playerController?.stop() 42 this.playerController?.stop()
44 - this.playerController?.release() 43 + await this.playerController?.release()
45 } 44 }
46 45
47 updateData() { 46 updateData() {
  1 +import lottie from '@ohos/lottie'
1 import { LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index' 2 import { LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index'
2 -import { LiveFollowComponent } from 'wdComponent/Index' 3 +import { LiveFollowComponent, LottieView } from 'wdComponent/Index'
3 import { NumberFormatterUtils } from 'wdKit/Index' 4 import { NumberFormatterUtils } from 'wdKit/Index'
4 5
5 @Preview 6 @Preview
@@ -9,6 +10,12 @@ export struct PlayerTitleComponent { @@ -9,6 +10,12 @@ export struct PlayerTitleComponent {
9 @Consume liveRoomDataBean: LiveRoomDataBean 10 @Consume liveRoomDataBean: LiveRoomDataBean
10 @Consume liveState: string 11 @Consume liveState: string
11 12
  13 + aboutToDisappear(): void {
  14 + if (this.liveDetailsBean.liveInfo?.liveState == 'running') {
  15 + lottie.destroy('live_status_wait')
  16 + }
  17 + }
  18 +
12 build() { 19 build() {
13 Column() { 20 Column() {
14 Row() { 21 Row() {
@@ -47,10 +54,25 @@ export struct PlayerTitleComponent { @@ -47,10 +54,25 @@ export struct PlayerTitleComponent {
47 if (this.liveRoomDataBean.liveId) { 54 if (this.liveRoomDataBean.liveId) {
48 Row() { 55 Row() {
49 if (this.liveState == 'running') { 56 if (this.liveState == 'running') {
50 - Image($r('app.media.icon_live_status_running')) 57 + Stack() {
  58 + Image($r('app.media.icon_live_status_running_back'))
51 .width(22) 59 .width(22)
52 .height(18) 60 .height(18)
53 - .margin({ right: 1 }) 61 + LottieView({
  62 + name: 'live_status_wait',
  63 + path: "lottie/live_detail_living.json",
  64 + lottieWidth: 9,
  65 + lottieHeight: 9,
  66 + autoplay: true,
  67 + loop: true,
  68 + })
  69 + .margin({ right: 2 })
  70 + }.margin({ right: 1 })
  71 +
  72 + // Image($r('app.media.icon_live_status_running'))
  73 + // .width(22)
  74 + // .height(18)
  75 + // .margin({ right: 1 })
54 } 76 }
55 77
56 Text(this.liveState == 'running' ? '直播中' : '回看') 78 Text(this.liveState == 'running' ? '直播中' : '回看')
  1 +import { ContentDetailDTO } from 'wdBean/Index'
  2 +import {
  3 + publishCommentModel
  4 +} from '../../../../../wdComponent/src/main/ets/components/comment/model/PublishCommentModel'
  5 +import { CommentComponent } from '../../../../../wdComponent/src/main/ets/components/comment/view/CommentComponent'
  6 +
  7 +@Component
  8 +export struct CommentComponentPage {
  9 + scroller: Scroller = new Scroller()
  10 + @Consume contentDetailData: ContentDetailDTO
  11 + @Consume showCommentList: boolean
  12 + @State publishCommentModel: publishCommentModel = new publishCommentModel()
  13 +
  14 + aboutToAppear(): void {
  15 +
  16 + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
  17 + this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
  18 + this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
  19 + this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
  20 + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
  21 + this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
  22 + this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
  23 + }
  24 +
  25 + build() {
  26 + Scroll(this.scroller) {
  27 + Stack() {
  28 + CommentComponent({
  29 + publishCommentModel: this.publishCommentModel
  30 + })
  31 + Image($r("app.media.ic_close_black"))
  32 + .width(20)
  33 + .height(20)
  34 + .onClick(() => {
  35 + this.showCommentList = false
  36 + })
  37 + .margin({ top: 10, right: 20 })
  38 + .position({ x: '100%' })
  39 + .markAnchor({ x: '100%' })
  40 +
  41 + }
  42 + }
  43 + .zIndex(1000)
  44 + .backgroundColor(Color.White)
  45 +
  46 + }
  47 +}
1 import { ContentDetailDTO, InteractDataDTO } from 'wdBean'; 1 import { ContentDetailDTO, InteractDataDTO } from 'wdBean';
2 -import { PlayerConstants, WDPlayerController, WDPlayerRenderView } from 'wdPlayer'; 2 +import { WDPlayerController, WDPlayerRenderView } from 'wdPlayer';
3 import { ContentDetailRequest } from 'wdDetailPlayApi'; 3 import { ContentDetailRequest } from 'wdDetailPlayApi';
4 import { 4 import {
5 batchLikeAndCollectParams, 5 batchLikeAndCollectParams,
@@ -11,6 +11,7 @@ import { HttpUtils } from 'wdNetwork/Index'; @@ -11,6 +11,7 @@ import { HttpUtils } from 'wdNetwork/Index';
11 import { DateTimeUtils } from 'wdKit/Index'; 11 import { DateTimeUtils } from 'wdKit/Index';
12 import { PlayerBottomView } from '../view/PlayerBottomView'; 12 import { PlayerBottomView } from '../view/PlayerBottomView';
13 import { PlayerRightView } from '../view/PlayerRightView'; 13 import { PlayerRightView } from '../view/PlayerRightView';
  14 +import { CommentComponentPage } from './CommentComponentPage';
14 15
15 const TAG = 'DetailPlayShortVideoPage'; 16 const TAG = 'DetailPlayShortVideoPage';
16 17
@@ -32,6 +33,7 @@ export struct DetailPlayShortVideoPage { @@ -32,6 +33,7 @@ export struct DetailPlayShortVideoPage {
32 @Provide followStatus: string = '0' // 关注状态 33 @Provide followStatus: string = '0' // 关注状态
33 @Provide isOpenDetail: boolean = false // 查看详情按钮点击 34 @Provide isOpenDetail: boolean = false // 查看详情按钮点击
34 @Provide isDragging: boolean = false // 拖动时间进度条 35 @Provide isDragging: boolean = false // 拖动时间进度条
  36 + @Provide showCommentList: boolean = false
35 @Consume @Watch('videoStatusChange') switchVideoStatus: boolean 37 @Consume @Watch('videoStatusChange') switchVideoStatus: boolean
36 @Consume @Watch('pageShowChange') pageShow: number 38 @Consume @Watch('pageShowChange') pageShow: number
37 @Consume topSafeHeight: number 39 @Consume topSafeHeight: number
@@ -148,6 +150,7 @@ export struct DetailPlayShortVideoPage { @@ -148,6 +150,7 @@ export struct DetailPlayShortVideoPage {
148 this.progressVal = Math.floor(position * 100 / duration); 150 this.progressVal = Math.floor(position * 100 / duration);
149 } 151 }
150 this.queryNewsInfoOfUser() 152 this.queryNewsInfoOfUser()
  153 +
151 } 154 }
152 155
153 async aboutToDisappear(): Promise<void> { 156 async aboutToDisappear(): Promise<void> {
@@ -163,10 +166,14 @@ export struct DetailPlayShortVideoPage { @@ -163,10 +166,14 @@ export struct DetailPlayShortVideoPage {
163 PlayerBottomView({ 166 PlayerBottomView({
164 playerController: this.playerController 167 playerController: this.playerController
165 }) 168 })
  169 +
166 PlayerRightView({ 170 PlayerRightView({
167 playerController: this.playerController 171 playerController: this.playerController
168 }) 172 })
169 173
  174 + CommentComponentPage({}).visibility(this.showCommentList ? Visibility.Visible : Visibility.None)
  175 + .position({ y: '100%' })
  176 + .markAnchor({ y: '100%' })
170 } 177 }
171 .height('100%') 178 .height('100%')
172 .width('100%') 179 .width('100%')
@@ -192,6 +199,7 @@ export struct DetailPlayShortVideoPage { @@ -192,6 +199,7 @@ export struct DetailPlayShortVideoPage {
192 199
193 @Builder 200 @Builder
194 playerViewBuilder() { 201 playerViewBuilder() {
  202 +
195 WDPlayerRenderView({ 203 WDPlayerRenderView({
196 playerController: this.playerController, 204 playerController: this.playerController,
197 onLoad: async () => { 205 onLoad: async () => {
@@ -205,10 +213,13 @@ export struct DetailPlayShortVideoPage { @@ -205,10 +213,13 @@ export struct DetailPlayShortVideoPage {
205 .padding({ 213 .padding({
206 bottom: this.videoLandScape === 1 ? 115 : 0, 214 bottom: this.videoLandScape === 1 ? 115 : 0,
207 }) 215 })
  216 + .layoutWeight(1)
208 .align(this.videoLandScape === 0 ? Alignment.Top : Alignment.Center) 217 .align(this.videoLandScape === 0 ? Alignment.Top : Alignment.Center)
209 .onClick(() => { 218 .onClick(() => {
210 console.error('WDPlayerRenderView=== onClick') 219 console.error('WDPlayerRenderView=== onClick')
211 this.playerController?.switchPlayOrPause(); 220 this.playerController?.switchPlayOrPause();
212 }) 221 })
  222 +
  223 +
213 } 224 }
214 } 225 }
@@ -39,6 +39,7 @@ export struct VideoChannelDetail { @@ -39,6 +39,7 @@ export struct VideoChannelDetail {
39 // private recommend?: string = '' // 0.非推荐,1.推荐; 39 // private recommend?: string = '' // 0.非推荐,1.推荐;
40 @Link @Watch('navIndexChange') bottomNavIndex: number 40 @Link @Watch('navIndexChange') bottomNavIndex: number
41 @Link @Watch('navIndexChange') topNavIndex: number 41 @Link @Watch('navIndexChange') topNavIndex: number
  42 + @Prop @Watch('autoRefreshChange') autoRefresh: number = 0
42 @Consume barBackgroundColor: Color 43 @Consume barBackgroundColor: Color
43 private swiperController: SwiperController = new SwiperController() 44 private swiperController: SwiperController = new SwiperController()
44 @Provide showComment: boolean = false 45 @Provide showComment: boolean = false
@@ -54,6 +55,18 @@ export struct VideoChannelDetail { @@ -54,6 +55,18 @@ export struct VideoChannelDetail {
54 @State isMouted: boolean = false 55 @State isMouted: boolean = false
55 @State isRequestError: boolean = false 56 @State isRequestError: boolean = false
56 57
  58 + autoRefreshChange() {
  59 + if (this.topNavIndex === 0) {
  60 + this.data = []
  61 + this.interactDataList = []
  62 + this.totalCount = 0
  63 + this.isMouted = false
  64 + this.getRecCompInfo()
  65 + this.getRecCompInfo()
  66 + }
  67 +
  68 + }
  69 +
57 pageShowChange() { 70 pageShowChange() {
58 if (this.bottomNavIndex === 2 && this.topNavIndex === 0) { 71 if (this.bottomNavIndex === 2 && this.topNavIndex === 0) {
59 this.barBackgroundColor = Color.Black 72 this.barBackgroundColor = Color.Black
@@ -43,7 +43,7 @@ export struct DetailDialog { @@ -43,7 +43,7 @@ export struct DetailDialog {
43 .height(200) 43 .height(200)
44 44
45 Row() { 45 Row() {
46 - Image($r('app.media.ic_close')) 46 + Image($r("app.media.ic_close_white"))
47 .height(24).margin({ top: 20 }).onClick(() => { 47 .height(24).margin({ top: 20 }).onClick(() => {
48 this.controller.close() 48 this.controller.close()
49 if (this.isOpenDetail) { 49 if (this.isOpenDetail) {
@@ -3,20 +3,56 @@ import { PlayerTitleView } from './PlayerTitleView' @@ -3,20 +3,56 @@ import { PlayerTitleView } from './PlayerTitleView'
3 import { PlayerProgressView } from './PlayerProgressView' 3 import { PlayerProgressView } from './PlayerProgressView'
4 import { PlayerCommentView } from './PlayerCommentView' 4 import { PlayerCommentView } from './PlayerCommentView'
5 import { PlayerTimeSeekView } from './PlayerTimeSeekView' 5 import { PlayerTimeSeekView } from './PlayerTimeSeekView'
  6 +import { OperRowListView } from '../../../../../wdComponent/src/main/ets/components/view/OperRowListView'
  7 +import {
  8 + publishCommentModel
  9 +} from '../../../../../wdComponent/src/main/ets/components/comment/model/PublishCommentModel'
  10 +import { ContentDetailDTO } from 'wdBean/Index';
  11 +import { WindowModel } from 'wdKit/Index';
6 12
7 @Component 13 @Component
8 export struct PlayerBottomView { 14 export struct PlayerBottomView {
9 private playerController?: WDPlayerController; 15 private playerController?: WDPlayerController;
  16 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
10 @Consume showComment?: boolean 17 @Consume showComment?: boolean
11 @Consume isOpenDetail?: boolean 18 @Consume isOpenDetail?: boolean
12 @Consume isDragging?: boolean 19 @Consume isDragging?: boolean
  20 + @Consume contentDetailData: ContentDetailDTO
  21 + @State publishCommentModel: publishCommentModel = new publishCommentModel()
  22 +
  23 + aboutToAppear(): void {
  24 + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
  25 + this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
  26 + this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
  27 + this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType)
  28 + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId)
  29 + this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle)
  30 + this.publishCommentModel.targetType = String(this.contentDetailData?.newsType)
  31 + this.publishCommentModel.commentContent = ''
  32 + }
13 33
14 build() { 34 build() {
15 Column() { 35 Column() {
16 PlayerTitleView() 36 PlayerTitleView()
17 PlayerProgressView({ playerController: this.playerController }) 37 PlayerProgressView({ playerController: this.playerController })
18 if (this.showComment) { 38 if (this.showComment) {
19 - PlayerCommentView() 39 + // PlayerCommentView()
  40 + OperRowListView({
  41 + pageComponentType: 1,
  42 + styleType: 3,
  43 + componentType: 4,
  44 + operationButtonList: ['comment',],
  45 + contentDetailData: this.contentDetailData,
  46 + publishCommentModel: this.publishCommentModel,
  47 + showCommentIcon: false,
  48 + onBack: () => {
  49 + WindowModel.shared.setWindowLayoutFullScreen(false)
  50 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
  51 + }
  52 + })
  53 + .padding({
  54 + bottom: -this.bottomSafeHeight + 'px'
  55 + })
20 } 56 }
21 } 57 }
22 .alignItems(HorizontalAlign.Start) 58 .alignItems(HorizontalAlign.Start)
@@ -32,6 +32,7 @@ export struct PlayerRightView { @@ -32,6 +32,7 @@ export struct PlayerRightView {
32 @Consume isOpenDetail: boolean 32 @Consume isOpenDetail: boolean
33 @Consume isDragging: boolean 33 @Consume isDragging: boolean
34 @Consume showComment?: boolean 34 @Consume showComment?: boolean
  35 + @Consume showCommentList: boolean
35 @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 36 @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
36 37
37 aboutToAppear() { 38 aboutToAppear() {
@@ -343,7 +344,8 @@ export struct PlayerRightView { @@ -343,7 +344,8 @@ export struct PlayerRightView {
343 } 344 }
344 .margin({ bottom: 20 }) 345 .margin({ bottom: 20 })
345 .onClick((event: ClickEvent) => { 346 .onClick((event: ClickEvent) => {
346 - ToastUtils.showToast('评论为公共方法,待开发', 1000); 347 + // ToastUtils.showToast('评论为公共方法,待开发', 1000);
  348 + this.showCommentList = true
347 }) 349 })
348 } 350 }
349 351
@@ -5,6 +5,14 @@ @@ -5,6 +5,14 @@
5 "value": "#FFFFFF" 5 "value": "#FFFFFF"
6 }, 6 },
7 { 7 {
  8 + "name": "color_transparent",
  9 + "value": "#00000000"
  10 + },
  11 + {
  12 + "name": "color_222222",
  13 + "value": "#222222"
  14 + },
  15 + {
8 "name": "play_track_color", 16 "name": "play_track_color",
9 "value": "#1AFFFFFF" 17 "value": "#1AFFFFFF"
10 }, 18 },
@@ -29,6 +37,18 @@ @@ -29,6 +37,18 @@
29 "value": "#4DFFFFFF" 37 "value": "#4DFFFFFF"
30 }, 38 },
31 { 39 {
  40 + "name": "color_666666",
  41 + "value": "#666666"
  42 + },
  43 + {
  44 + "name": "color_B0B0B0",
  45 + "value": "#B0B0B0"
  46 + },
  47 + {
  48 + "name": "color_EDEDED",
  49 + "value": "#EDEDED"
  50 + },
  51 + {
32 "name": "divider_color", 52 "name": "divider_color",
33 "value": "#D3D3D3" 53 "value": "#D3D3D3"
34 }, 54 },
@@ -3,6 +3,22 @@ @@ -3,6 +3,22 @@
3 { 3 {
4 "name": "shared_desc", 4 "name": "shared_desc",
5 "value": "description" 5 "value": "description"
  6 + },
  7 + {
  8 + "name": "footer_text",
  9 + "value": "已显示全部内容"
  10 + },
  11 + {
  12 + "name": "pull_up_load_text",
  13 + "value": "加载中..."
  14 + },
  15 + {
  16 + "name": "pull_down_refresh_text",
  17 + "value": "下拉刷新"
  18 + },
  19 + {
  20 + "name": "release_refresh_text",
  21 + "value": "松开刷新"
6 } 22 }
7 ] 23 ]
8 } 24 }
@@ -2,7 +2,10 @@ import HuaweiAuth from './utils/HuaweiAuth' @@ -2,7 +2,10 @@ import HuaweiAuth from './utils/HuaweiAuth'
2 import { JumpInterceptorAction, RouterJumpInterceptor, WDRouterPage } from 'wdRouter' 2 import { JumpInterceptorAction, RouterJumpInterceptor, WDRouterPage } from 'wdRouter'
3 import { BusinessError } from '@kit.BasicServicesKit' 3 import { BusinessError } from '@kit.BasicServicesKit'
4 import { router } from '@kit.ArkUI' 4 import { router } from '@kit.ArkUI'
5 -import { AccountManagerUtils } from 'wdKit/Index' 5 +import { AccountManagerUtils, SPHelper } from 'wdKit/Index'
  6 +import { LoginViewModel } from './pages/login/LoginViewModel'
  7 +import { SpConstants } from 'wdConstant/Index'
  8 +import { ReportDeviceInfo } from './reportDeviceInfo/ReportDeviceInfo'
6 9
7 class LoginJumpHandler implements JumpInterceptorAction { 10 class LoginJumpHandler implements JumpInterceptorAction {
8 11
@@ -37,4 +40,14 @@ export class LoginModule { @@ -37,4 +40,14 @@ export class LoginModule {
37 } 40 }
38 41
39 } 42 }
  43 +
  44 + // 启动进入主页 和 每次登录成功调用
  45 + static reportDeviceInfo() {
  46 + ReportDeviceInfo.reportDeviceInfo().then((res) => {
  47 + let nickName = res.touristNickName
  48 + if (res.touristNickName) {
  49 + SPHelper.default.save(SpConstants.TOURIST_NICK_NAME, res.touristNickName)
  50 + }
  51 + })
  52 + }
40 } 53 }
@@ -82,6 +82,30 @@ export class LoginModel { @@ -82,6 +82,30 @@ export class LoginModel {
82 }) 82 })
83 } 83 }
84 84
  85 + // loginType 0:手机号密码 2:手机号登录 3:QQ 4:微信 5:微博 6:APPLEID 7:手机号一键登录8:账号+密码 9:华为一键登录
  86 + thirdPartLogin(loginType: number, otherParams: Record<string, string|number>) {
  87 + otherParams['loginType'] = loginType
  88 + otherParams['deviceId'] = HttpUtils.getDeviceId()
  89 +
  90 + return new Promise<LoginBean>((success, fail) => {
  91 + HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), otherParams).then((data: ResponseDTO<LoginBean>) => {
  92 + Logger.debug("LoginViewModel:success2 ", data.message)
  93 + if (!data) {
  94 + fail("数据为空")
  95 + return
  96 + }
  97 + if (!data.data||data.code != 0) {
  98 + fail(data.message)
  99 + return
  100 + }
  101 + success(data.data)
  102 + }, (error: Error) => {
  103 + fail(error.message)
  104 + Logger.debug("LoginViewModel:error2 ", error.toString())
  105 + })
  106 + })
  107 + }
  108 +
85 // {"password":"523acd319228efde34e8a30268ee8ca5e4fc421d72affa531676e1765940d22c","phone":"13625644528","loginType":0,"oldPassword":"BA5FD74F827AF9B271FE17CADC489C36","deviceId":"60da5af6-9c59-3566-8622-8c6c00710994"} 109 // {"password":"523acd319228efde34e8a30268ee8ca5e4fc421d72affa531676e1765940d22c","phone":"13625644528","loginType":0,"oldPassword":"BA5FD74F827AF9B271FE17CADC489C36","deviceId":"60da5af6-9c59-3566-8622-8c6c00710994"}
86 appLoginByPassword(phone: string, loginType: number, password: string, oldPassword: string) { 110 appLoginByPassword(phone: string, loginType: number, password: string, oldPassword: string) {
87 let bean: Record<string, string | number> = {}; 111 let bean: Record<string, string | number> = {};
@@ -407,14 +407,9 @@ struct LoginPage { @@ -407,14 +407,9 @@ struct LoginPage {
407 407
408 queryUserDetail(){ 408 queryUserDetail(){
409 this.loginViewModel.queryUserDetail().then(()=>{ 409 this.loginViewModel.queryUserDetail().then(()=>{
410 - router.back({  
411 - url: `${WDRouterPage.getBundleInfo()}`  
412 - }  
413 - ) 410 + router.back()
414 }).catch(()=>{ 411 }).catch(()=>{
415 - router.back({  
416 - url: `${WDRouterPage.getBundleInfo()}`  
417 - }) 412 + router.back()
418 }) 413 })
419 } 414 }
420 415
@@ -10,6 +10,7 @@ import { encryptMessage } from '../../utils/cryptoUtil' @@ -10,6 +10,7 @@ import { encryptMessage } from '../../utils/cryptoUtil'
10 import { SpConstants } from 'wdConstant/Index' 10 import { SpConstants } from 'wdConstant/Index'
11 import { UserDetail } from 'wdBean/Index'; 11 import { UserDetail } from 'wdBean/Index';
12 import { HttpUtils } from 'wdNetwork/Index' 12 import { HttpUtils } from 'wdNetwork/Index'
  13 +import { LoginModule } from '../../LoginModule'
13 14
14 const TAG = "LoginViewModel" 15 const TAG = "LoginViewModel"
15 16
@@ -47,6 +48,27 @@ export class LoginViewModel { @@ -47,6 +48,27 @@ export class LoginViewModel {
47 48
48 return new Promise<LoginBean>((success, fail) => { 49 return new Promise<LoginBean>((success, fail) => {
49 this.loginModel.appLogin(phone, loginType, verificationCode).then((data: LoginBean) => { 50 this.loginModel.appLogin(phone, loginType, verificationCode).then((data: LoginBean) => {
  51 + this.dealWithLoginSuccess(data)
  52 + success(data)
  53 + }).catch((error:string) => {
  54 + fail(error)
  55 + })
  56 + })
  57 + }
  58 +
  59 + huaweiOneKeyLogin(authCode: string) {
  60 + return new Promise<LoginBean>((success, fail) => {
  61 + this.loginModel.thirdPartLogin(9, {"idToken": authCode}).then((data: LoginBean) => {
  62 + this.dealWithLoginSuccess(data)
  63 + success(data)
  64 + }).catch((error:string) => {
  65 + fail(error)
  66 + })
  67 + })
  68 + }
  69 +
  70 + //TODO: 这里要整体改掉
  71 + dealWithLoginSuccess(data: LoginBean) {
50 SPHelper.default.saveSync(SpConstants.USER_FIRST_MARK, data.firstMark) 72 SPHelper.default.saveSync(SpConstants.USER_FIRST_MARK, data.firstMark)
51 SPHelper.default.saveSync(SpConstants.USER_ID, data.id) 73 SPHelper.default.saveSync(SpConstants.USER_ID, data.id)
52 SPHelper.default.saveSync(SpConstants.USER_JWT_TOKEN, data.jwtToken) 74 SPHelper.default.saveSync(SpConstants.USER_JWT_TOKEN, data.jwtToken)
@@ -56,11 +78,8 @@ export class LoginViewModel { @@ -56,11 +78,8 @@ export class LoginViewModel {
56 SPHelper.default.saveSync(SpConstants.USER_Type, data.userType) 78 SPHelper.default.saveSync(SpConstants.USER_Type, data.userType)
57 SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName) 79 SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)
58 EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS) 80 EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS)
59 - success(data)  
60 - }).catch((error:string) => {  
61 - fail(error)  
62 - })  
63 - }) 81 +
  82 + LoginModule.reportDeviceInfo()
64 } 83 }
65 84
66 async appLoginByPassword(phone: string, loginType: number, password: string, oldPassword: string) { 85 async appLoginByPassword(phone: string, loginType: number, password: string, oldPassword: string) {
@@ -75,15 +94,7 @@ export class LoginViewModel { @@ -75,15 +94,7 @@ export class LoginViewModel {
75 let passwordNew = await this.doMd(password) 94 let passwordNew = await this.doMd(password)
76 Logger.debug(TAG, "PASSWORD:" + passwordNew) 95 Logger.debug(TAG, "PASSWORD:" + passwordNew)
77 this.loginModel.appLoginByPassword(phone, newLoginType, passwordNew, oldPassword).then((data: LoginBean) => { 96 this.loginModel.appLoginByPassword(phone, newLoginType, passwordNew, oldPassword).then((data: LoginBean) => {
78 - SPHelper.default.saveSync(SpConstants.USER_FIRST_MARK, data.firstMark)  
79 - SPHelper.default.saveSync(SpConstants.USER_ID, data.id)  
80 - SPHelper.default.saveSync(SpConstants.USER_JWT_TOKEN, data.jwtToken)  
81 - SPHelper.default.saveSync(SpConstants.USER_LONG_TIME_NO_LOGIN_MARK, data.longTimeNoLoginMark)  
82 - SPHelper.default.saveSync(SpConstants.USER_REFRESH_TOKEN, data.refreshToken)  
83 - SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status)  
84 - SPHelper.default.saveSync(SpConstants.USER_Type, data.userType)  
85 - SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)  
86 - EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS) 97 + this.dealWithLoginSuccess(data)
87 success(data) 98 success(data)
88 }).catch((value: string) => { 99 }).catch((value: string) => {
89 fail(value) 100 fail(value)
@@ -219,18 +230,29 @@ export class LoginViewModel { @@ -219,18 +230,29 @@ export class LoginViewModel {
219 this.loginModel.queryUserDetail().then((data: UserDetail) => { 230 this.loginModel.queryUserDetail().then((data: UserDetail) => {
220 //保存sp 231 //保存sp
221 if(data){ 232 if(data){
  233 + if(data.userName!=undefined){
222 SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName) 234 SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)
  235 + }
  236 + if(data.phone!=undefined){
223 SPHelper.default.saveSync(SpConstants.USER_PHONE, data.phone) 237 SPHelper.default.saveSync(SpConstants.USER_PHONE, data.phone)
224 } 238 }
  239 + }
225 if(data.userExtend){ 240 if(data.userExtend){
  241 + if(data.userExtend.sex!=undefined){
226 SPHelper.default.saveSync(SpConstants.USER_SEX, data.userExtend.sex) 242 SPHelper.default.saveSync(SpConstants.USER_SEX, data.userExtend.sex)
  243 + }
  244 + if(data.userExtend.creatorId!=undefined){
227 SPHelper.default.saveSync(SpConstants.USER_CREATOR_ID, data.userExtend.creatorId+"") 245 SPHelper.default.saveSync(SpConstants.USER_CREATOR_ID, data.userExtend.creatorId+"")
  246 + }
  247 + if(data.userExtend.headPhotoUrl!=undefined){
228 SPHelper.default.saveSync(SpConstants.USER_HEAD_PHOTO_URL, data.userExtend.headPhotoUrl) 248 SPHelper.default.saveSync(SpConstants.USER_HEAD_PHOTO_URL, data.userExtend.headPhotoUrl)
  249 + }
  250 + if(data.userExtend.birthday!=undefined){
229 SPHelper.default.saveSync(SpConstants.USER_BIRTHDAY, data.userExtend.birthday) 251 SPHelper.default.saveSync(SpConstants.USER_BIRTHDAY, data.userExtend.birthday)
230 } 252 }
231 - 253 + }
232 success(data) 254 success(data)
233 - }).catch(() => { 255 + }).catch((error:Error) => {
234 fail() 256 fail()
235 }) 257 })
236 }) 258 })
@@ -3,13 +3,30 @@ import { Params } from 'wdBean/Index' @@ -3,13 +3,30 @@ import { Params } from 'wdBean/Index'
3 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' 3 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
4 import HuaweiAuth from '../../utils/HuaweiAuth' 4 import HuaweiAuth from '../../utils/HuaweiAuth'
5 import { BusinessError } from '@kit.BasicServicesKit' 5 import { BusinessError } from '@kit.BasicServicesKit'
6 -import { ToastUtils } from 'wdKit/Index' 6 +import { Logger, ToastUtils, CustomToast, EmitterUtils, EmitterEventId } from 'wdKit/Index'
  7 +import { LoginViewModel } from './LoginViewModel'
  8 +import {InterestsHobbiesModel} from '../../../../../../../products/phone/src/main/ets/pages/viewModel/InterestsHobbiesModel'
  9 +
  10 +const TAG = "OneKeyLoginPage"
7 11
8 @Entry 12 @Entry
9 @Component 13 @Component
10 struct OneKeyLoginPage { 14 struct OneKeyLoginPage {
11 anonymousPhone: string = '' 15 anonymousPhone: string = ''
12 @State agreeProtocol: boolean = false 16 @State agreeProtocol: boolean = false
  17 + viewModel: LoginViewModel = new LoginViewModel()
  18 + @State toastText:string = ""
  19 + dialogToast: CustomDialogController = new CustomDialogController({
  20 + builder: CustomToast({
  21 + msg: this.toastText,
  22 + }),
  23 + autoCancel: false,
  24 + alignment: DialogAlignment.Center,
  25 + offset: { dx: 0, dy: -20 },
  26 + gridCount: 1,
  27 + customStyle: true,
  28 + maskColor:"#00000000"
  29 + })
13 30
14 aboutToAppear(): void { 31 aboutToAppear(): void {
15 this.anonymousPhone = HuaweiAuth.sharedInstance().anonymousPhone||"" 32 this.anonymousPhone = HuaweiAuth.sharedInstance().anonymousPhone||""
@@ -44,17 +61,7 @@ struct OneKeyLoginPage { @@ -44,17 +61,7 @@ struct OneKeyLoginPage {
44 if (!this.agreeProtocol) { 61 if (!this.agreeProtocol) {
45 return 62 return
46 } 63 }
47 - HuaweiAuth.sharedInstance().oneKeyLogin().then((authorizeCode) => {  
48 - //TODO: 调用服务端接口登录  
49 -  
50 - ToastUtils.shortToast("获取到授权code: " + authorizeCode + ",由于需要后台接口支持,暂时先跳转其他登录方式")  
51 - setTimeout(() => {  
52 - router.replaceUrl({url: WDRouterPage.loginPage.url()})  
53 - }, 3000)  
54 -  
55 - }).catch((error: BusinessError) => {  
56 -  
57 - }) 64 + this.requestLogin()
58 }) 65 })
59 } 66 }
60 .padding({ left: 25, right: 25 }) 67 .padding({ left: 25, right: 25 })
@@ -113,4 +120,47 @@ struct OneKeyLoginPage { @@ -113,4 +120,47 @@ struct OneKeyLoginPage {
113 }.margin({ top: 15, right: 15 }) 120 }.margin({ top: 15, right: 15 })
114 .width("100%") 121 .width("100%")
115 } 122 }
  123 +
  124 + async requestLogin() {
  125 + try {
  126 + let authorizeCode = await HuaweiAuth.sharedInstance().oneKeyLogin()
  127 +
  128 + let data = await this.viewModel.huaweiOneKeyLogin(authorizeCode)
  129 +
  130 + Logger.debug(TAG, "requestLogin: " + data.jwtToken)
  131 + this.showToastTip('登录成功')
  132 +
  133 + ///同步兴趣tag
  134 + let interestsModel = new InterestsHobbiesModel()
  135 + interestsModel.updateInterests()
  136 + this.queryUserDetail()
  137 + EmitterUtils.sendEvent(EmitterEventId.PEOPLE_SHIP_ATTENTION)
  138 +
  139 + } catch (error) {
  140 + if (typeof error == "string") {
  141 + this.showToastTip(error)
  142 + } else {
  143 + (error as BusinessError)
  144 + this.showToastTip("登录失败")
  145 + }
  146 + }
  147 + }
  148 +
  149 + showToastTip(msg:string){
  150 + this.toastText = msg
  151 + this.dialogToast.open()
  152 + }
  153 +
  154 + queryUserDetail(){
  155 + this.viewModel.queryUserDetail().then(()=>{
  156 + router.back({
  157 + url: `${WDRouterPage.getBundleInfo()}`
  158 + }
  159 + )
  160 + }).catch(()=>{
  161 + router.back({
  162 + url: `${WDRouterPage.getBundleInfo()}`
  163 + })
  164 + })
  165 + }
116 } 166 }
  1 +import { AppUtils, DeviceUtil, Logger, UserDataLocal } from 'wdKit/Index';
  2 +import { HttpBizUtil, HttpUrlUtils, ResponseDTO } from 'wdNetwork/Index';
  3 +
  4 +export class ReportDeviceInfo {
  5 + static reportDeviceInfo() {
  6 + const userId = UserDataLocal.getUserId() || ""
  7 + const url = HttpUrlUtils.reportDeviceInfo()
  8 +
  9 + let bean: Record<string, string | number> = {};
  10 + bean['deviceId'] = DeviceUtil.clientId()
  11 + bean['appVersion'] = AppUtils.getAppVersionCode()
  12 + bean['platform'] = 3 /// 1Android 2iOS
  13 + bean['userId'] = userId
  14 + bean['brand'] = DeviceUtil.getMarketName()
  15 + bean['modelSystemVersion'] = DeviceUtil.getDisplayVersion()
  16 + bean['tenancy'] = 3 ///1-视界 2-英文版 3-中文版
  17 +
  18 + return new Promise<ReportDeviceInfoRes>((success, fail) => {
  19 + HttpBizUtil.post<ResponseDTO<ReportDeviceInfoRes>>(url,bean).then((data: ResponseDTO<ReportDeviceInfoRes>) => {
  20 + if (!data) {
  21 + fail("数据为空")
  22 + return
  23 + }
  24 + if (data.code != 0) {
  25 + fail(data.message)
  26 + return
  27 + }
  28 + success(data.data!)
  29 + }, (error: Error) => {
  30 + fail(error.message)
  31 + Logger.debug("ReportDeviceInfo", error.toString())
  32 + })
  33 + })
  34 +
  35 + }
  36 +}
  37 +
  38 +export class ReportDeviceInfoRes {
  39 + clean : number = 0
  40 + touristNickName : string = ""
  41 +}
@@ -94,10 +94,9 @@ export struct WDPlayerRenderView { @@ -94,10 +94,9 @@ export struct WDPlayerRenderView {
94 .renderFit(RenderFit.RESIZE_COVER) 94 .renderFit(RenderFit.RESIZE_COVER)
95 } 95 }
96 96
97 - // .onAreaChange(() => {  
98 - // this.updateLayout()  
99 - // })  
100 - 97 + .onAreaChange(() => {
  98 + this.updateLayout()
  99 + })
101 .backgroundColor("#000000") 100 .backgroundColor("#000000")
102 101
103 // .height('100%') 102 // .height('100%')
@@ -4,3 +4,4 @@ @@ -4,3 +4,4 @@
4 /build 4 /build
5 /.cxx 5 /.cxx
6 /.test 6 /.test
  7 +/oh-package-lock.json5
@@ -4,21 +4,7 @@ import UIAbility from '@ohos.app.ability.UIAbility'; @@ -4,21 +4,7 @@ import UIAbility from '@ohos.app.ability.UIAbility';
4 import Want from '@ohos.app.ability.Want'; 4 import Want from '@ohos.app.ability.Want';
5 import window from '@ohos.window'; 5 import window from '@ohos.window';
6 import { BusinessError } from '@ohos.base'; 6 import { BusinessError } from '@ohos.base';
7 -import { registerRouter } from 'wdRouter';  
8 -import {  
9 - EmitterEventId,  
10 - EmitterUtils,  
11 - Logger,  
12 - MpaasUtils,  
13 - NetworkManager,  
14 - NetworkType,  
15 - SPHelper,  
16 - StringUtils,  
17 - UmengStats,  
18 - WindowModel  
19 -} from 'wdKit';  
20 -import { HostEnum, HostManager, WDHttp } from 'wdNetwork';  
21 -import { LoginModule } from 'wdLogin/src/main/ets/LoginModule'; 7 +import { EmitterEventId, EmitterUtils, WindowModel } from 'wdKit';
22 import { ConfigurationConstant } from '@kit.AbilityKit'; 8 import { ConfigurationConstant } from '@kit.AbilityKit';
23 import { WDPushNotificationManager } from 'wdHwAbility/Index'; 9 import { WDPushNotificationManager } from 'wdHwAbility/Index';
24 import { StartupManager } from '../startupmanager/StartupManager'; 10 import { StartupManager } from '../startupmanager/StartupManager';
@@ -60,7 +46,7 @@ export default class EntryAbility extends UIAbility { @@ -60,7 +46,7 @@ export default class EntryAbility extends UIAbility {
60 AppStorage.setOrCreate('topSafeHeight', topSafeHeight); 46 AppStorage.setOrCreate('topSafeHeight', topSafeHeight);
61 AppStorage.setOrCreate('windowWidth', width); 47 AppStorage.setOrCreate('windowWidth', width);
62 AppStorage.setOrCreate('windowHeight', height); 48 AppStorage.setOrCreate('windowHeight', height);
63 - let audioWidth = px2vp(width)*0.65 49 + let audioWidth = px2vp(width) * 0.65
64 console.info('floatWindowClass audioWidth' + audioWidth); 50 console.info('floatWindowClass audioWidth' + audioWidth);
65 51
66 52
@@ -71,7 +57,8 @@ export default class EntryAbility extends UIAbility { @@ -71,7 +57,8 @@ export default class EntryAbility extends UIAbility {
71 hilog.info(0x0000, 'testTag', 'setPreferredOrientation Succeeded'); 57 hilog.info(0x0000, 'testTag', 'setPreferredOrientation Succeeded');
72 }) 58 })
73 .catch((err: Error) => { 59 .catch((err: Error) => {
74 - hilog.error(0x0000, 'testTag', `setPreferredOrientation catch, error error.name : ${err.name}, error.message:${err.message}`); 60 + hilog.error(0x0000, 'testTag',
  61 + `setPreferredOrientation catch, error error.name : ${err.name}, error.message:${err.message}`);
75 }) 62 })
76 //../../../../../../features/wdLogin/src/main/ets/pages/launchPage/LaunchPage 63 //../../../../../../features/wdLogin/src/main/ets/pages/launchPage/LaunchPage
77 windowStage.loadContent('pages/launchPage/LaunchPage', (err, data) => { 64 windowStage.loadContent('pages/launchPage/LaunchPage', (err, data) => {
  1 +{"v":"5.6.10","fr":60,"ip":0,"op":80,"w":30,"h":30,"nm":"直播页面-动效","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"空 13","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[7.5,7.375,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[50,50,100],"ix":6}},"ao":0,"ip":0,"op":80,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"形状图层 3","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[34,20.073,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15],[-2.25,-16.5],[2.25,-16.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-27.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-27.5],[-2.25,-29],[2.25,-29]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15.5],[-2.25,-17],[2.25,-17]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":30,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-3.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-3.5],[-2.25,-5],[2.25,-5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":40,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15.5],[-2.25,-17],[2.25,-17]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-27.5],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-27.5],[-2.25,-29],[2.25,-29]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":60,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15.625],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15.625],[-2.25,-17.125],[2.25,-17.125]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":70,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-3.375],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-3.375],[-2.25,-4.875],[2.25,-4.875]],"c":true}]},{"t":80,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-15.375],[3.75,15],[2.25,16.5],[-2.25,16.5],[-3.75,15],[-3.75,-15.375],[-2.25,-16.875],[2.25,-16.875]],"c":true}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":80,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"形状图层 2","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-4,24.573,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-7.875],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-7.875],[-2.25,-9.375],[2.25,-9.375]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-20],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-20],[-2.25,-21.5],[2.25,-21.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-32],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-32],[-2.25,-33.5],[2.25,-33.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":30,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-20],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-20],[-2.25,-21.5],[2.25,-21.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":40,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-7.875],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-7.875],[-2.25,-9.375],[2.25,-9.375]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-20],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-20],[-2.25,-21.5],[2.25,-21.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":60,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-31.75],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-31.75],[-2.25,-33.25],[2.25,-33.25]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":70,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-19.875],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-19.875],[-2.25,-21.375],[2.25,-21.375]],"c":true}]},{"t":80,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-8],[3.75,10.5],[2.25,12],[-2.25,12],[-3.75,10.5],[-3.75,-8],[-2.25,-9.5],[2.25,-9.5]],"c":true}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":80,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"形状图层 1","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[15,14.272,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-21],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-21],[-2.25,-22.5],[2.25,-22.5]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-9.375],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-9.375],[-2.25,-10.875],[2.25,-10.875]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,2.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,2.5],[-2.25,1],[2.25,1]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":30,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-9.375],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-9.375],[-2.25,-10.875],[2.25,-10.875]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":40,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-21.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-21.5],[-2.25,-23],[2.25,-23]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-9.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-9.5],[-2.25,-11],[2.25,-11]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":60,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,2.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,2.5],[-2.25,1],[2.25,1]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":70,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-9.5],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-9.5],[-2.25,-11],[2.25,-11]],"c":true}]},{"t":80,"s":[{"i":[[0,-0.828],[0,0],[0.828,0],[0,0],[0,0.828],[0,0],[-0.828,0],[0,0]],"o":[[0,0],[0,0.828],[0,0],[-0.828,0],[0,0],[0,-0.828],[0,0],[0.828,0]],"v":[[3.75,-21.375],[3.75,21],[2.25,22.5],[-2.25,22.5],[-3.75,21],[-3.75,-21.375],[-2.25,-22.875],[2.25,-22.875]],"c":true}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":80,"st":0,"bm":0}],"markers":[]}
  1 +{"v":"5.6.10","fr":30,"ip":0,"op":51,"w":500,"h":500,"nm":"预合成 1","ddd":0,"assets":[{"id":"image_0","w":90,"h":240,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAADwCAYAAACAL3OKAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAADW0lEQVR4nO3cv2lcQRRG8Tuzs0iBFRhcgcEVGFSBwRUYXIHBFRicqTOVJJACSfvnc+BNXvbgMUeBzi8ZJhPnDuLpYtySnEvTjarKW/8Q74GhIYaGGBpiaIihIYaGGBpiaIihIYaGjKpy1wHwRUMMDTE0xNAQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0MMDTE0xH00xBcNMTTE0BBDQwwNMTTE0BBDQwwNMTTE0BBDQwwNMTTE0BD30RBfNMTQEENDDA0xNMTQEENDDA0xNMTQEENDDA0xNMTQEEND3EdDfNEQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0MMDXEfDfFFQwwNMTTE0BBDQwwNMTTE0BBDQwwNMTTE0BBDQwwNMTTEfTTEFw0xNMTQEENDDA0xNMTQEENDDA0xNMTQEENDDA0xNMTQEPfREF80xNAQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0MMDTE0xNAQQ0P6+XxO/Y+dqor3OfeW5O/GYWmFcSmuyXpVpfcez7lnO51Of6aMUAt+dUAMDTE0ZPTe/XcdAF80xNAQQ0MMDTE0xNAQQ0PcR4P76N8bh6UV3EdD3EeD++hfU0aohZHEXx0AP+8ghoaM3W7nPhrgi4YYGmJoiKEhhoYYGmJoSD+dTov9qfc595bk58ZhaYVxKa7JelVlt9vFc+7Zjsfjjykj1IJfHRBDQwwNcR8N8UVDDA0xNMTQEENDDA0xNKQfj8fF/tT7nHtL8n3jsLTCuBTXZL2qMsaI59yzHQ6Hb1NGqAW/OiCGhhgaMsYY7qMBvmiIoSGGhhgaYmiIoSGGhvTD4bDYn3qfc29JbjcOSyuMS3FN1qsq+/0+nnPP9vr6+nXKCLXgVwfE0BBDQ8Z+v3cfDfBFQwwNMTTE0BBDQwwNMTSkv7y8LPan3ufcW5IvG4elFcaluCbrVZWrq6t4zj3b8/Pz5ykj1IL/fzTEzzuIoSHj+vrafTTAFw0xNMTQEENDDA0xNMTQkP709LTYn3qfc29JPm0cllYYj4+P/uoA9CS5ubmJ59yzPTw8fHzrab8H7qMhhoYYGtKSfHjrH+I98C9DiKEhhoYYGmJoiKEhhob0+/v7xf7U+5x7S7LbOCytMO7u7vzVAWlJmufc8x+/85zyNf84xgAAAABJRU5ErkJggg==","e":1}],"fonts":{"list":[{"fName":"SourceHanSansSC-Normal","fFamily":"Source Han Sans SC","fStyle":"Normal","ascent":79.608999023214}]},"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"“图层 1”轮廓 2","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[160.08,177.473,0],"ix":2},"a":{"a":0,"k":[8.095,35.425,0],"ix":1},"s":{"a":0,"k":[300,300,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[1.244,-10.704],[-4.109,-12.458],[-0.711,-0.358],[-0.35,-0.041],[-0.041,-0.003],[-0.374,0.124],[-0.135,1.161],[0,0],[0.134,0.407],[-1.276,10.984],[-5.322,9.464],[0,0]],"o":[[-5.704,10.153],[-1.377,11.862],[0.249,0.755],[0.314,0.159],[0.041,0.005],[0.393,0.029],[1.109,-0.366],[0,0],[0.046,-0.426],[-3.832,-11.619],[1.152,-9.916],[0,0],[0,0]],"v":[[2.846,-34.399],[-7.576,-3.114],[-3.479,33.365],[-1.98,35.104],[-0.976,35.405],[-0.852,35.417],[0.31,35.274],[2.35,32.771],[2.353,32.749],[2.219,31.485],[-1.616,-2.421],[8.095,-31.491],[7.16,-35.425]],"c":true},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[8.094,35.425],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":51,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"矩形 1624.png","cl":"png","tt":1,"refId":"image_0","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":4,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":6,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":29,"s":[100]},{"t":34,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[170.767,290.291,0],"ix":2},"a":{"a":0,"k":[45.395,241.486,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":1,"s":[100,10,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":7,"s":[100,56,100]},{"t":12,"s":[100,100,100]}],"ix":6}},"ao":0,"ip":1,"op":52,"st":1,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"形状图层 3","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":1,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":7,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":29,"s":[100]},{"t":34,"s":[0]}],"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":1,"s":[-51]},{"t":12,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":1,"s":[157.75,279.75,0],"to":[-6.112,-21.415,0],"ti":[-5.612,39.702,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":7,"s":[145.538,168,0],"to":[5.612,-39.702,0],"ti":[-10.945,22.085,0]},{"t":12,"s":[174.75,77.75,0]}],"ix":2},"a":{"a":0,"k":[-75.25,-172.25,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-96.5,-181.5],[-62.25,-189],[-54,-155.5]],"c":false},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":18,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"形状 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":1,"op":52,"st":1,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"形状图层 1","parent":5,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":20,"ix":10},"p":{"a":0,"k":[34.937,47.412,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[33.333,33.333,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,0],[28.935,-6.447],[9,-5.25],[-17.25,4],[-21.26,3.424],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-24.106,5.371],[-16.232,9.469],[9.485,-2.2],[33.448,-5.387],[9.5,4.25],[-2.25,2.5]],"v":[[52.75,-14.25],[-9.435,-6.803],[-56.25,10.25],[-46.25,39],[7.26,24.826],[88,19],[89,36.25]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[{"i":[[0,0],[26.479,-4.851],[8.679,-2.444],[-17.998,2.691],[-23.469,3.069],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-12.46,2.283],[-15.41,4.339],[4.383,-0.655],[33.593,-4.393],[9.5,4.25],[-2.25,2.5]],"v":[[58,-15],[-7.178,-6.584],[-53.707,4.823],[-47,29.75],[0.76,22.576],[88,19],[89,36.25]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":15,"s":[{"i":[[0,0],[26.919,0.031],[6.044,-0.659],[-15.132,-2.622],[-23.644,1.071],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-13.471,-0.016],[-14.086,1.535],[4.404,0.763],[32.111,-1.455],[9.5,4.25],[-2.25,2.5]],"v":[[54.157,-14.073],[-2.442,-8.813],[-49.103,-6.764],[-50.1,19.6],[-0.512,21.013],[88,19],[89,36.25]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":24,"s":[{"i":[[0,0],[26.479,-4.851],[8.679,-2.444],[-17.998,2.691],[-23.469,3.069],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-12.46,2.283],[-15.41,4.339],[4.383,-0.655],[33.593,-4.393],[9.5,4.25],[-2.25,2.5]],"v":[[58,-15],[-7.178,-6.584],[-53.707,4.823],[-47,29.75],[0.76,22.576],[88,19],[89,36.25]],"c":false}]},{"t":40,"s":[{"i":[[0,0],[28.935,-6.447],[9,-5.25],[-17.25,4],[-21.26,3.424],[-12.805,-4.71],[2.25,-2.5]],"o":[[0,0],[-24.106,5.371],[-16.232,9.469],[9.485,-2.2],[33.448,-5.387],[9.5,4.25],[-2.25,2.5]],"v":[[58,-15],[-9.435,-6.803],[-56.25,10.25],[-46.25,39],[7.26,24.826],[88,19],[89,36.25]],"c":false}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":12,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"形状 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":50,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"“img_hand”轮廓","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.775],"y":[0.621]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[-20]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":10,"s":[12]},{"t":40.0234375,"s":[-19.954]}],"ix":10},"p":{"a":0,"k":[447.982,216,0],"ix":2},"a":{"a":0,"k":[100.827,59.333,0],"ix":1},"s":{"a":0,"k":[300,300,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"形状 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.033,0.015],[0,0],[0.783,-0.214],[0.314,-0.792],[-0.133,-0.656],[-0.603,-0.563],[-0.587,-0.233],[0,0],[-0.073,-0.04],[-0.516,-0.842],[0.479,-1.208],[0.953,-0.502],[0,0],[0,0],[0,0],[-1.392,-0.86],[0.091,-1.641],[2.925,-1.592],[2.563,-0.334],[1.888,-0.636],[1.036,-1.094],[0.103,-0.722],[-0.26,-0.631],[-1.483,0.566],[-3.818,0.653],[-5.209,0.17],[-9.286,3.911],[0,0],[0,0],[-0.469,-0.165],[-0.024,-0.01],[0,0],[-0.206,-0.489],[0.163,-0.467],[0.01,-0.026],[0.495,-0.209],[0,0],[6.587,-0.214],[2.994,-0.511],[4.409,-1.635],[1.511,0.673],[0.629,1.524],[-0.21,1.467],[-0.98,1.035],[-2.962,0.997],[-2.561,0.334],[-1.666,0.907],[-0.117,0.852],[0.021,0.025],[0.515,0.318],[-2.348,-0.527],[0,0],[0,0],[-2.029,-0.079],[-0.168,0.089],[-0.048,0.103],[0.49,0.277],[0,0],[0.631,0.589],[0.298,1.464],[-0.637,1.605],[-1.864,0.508],[-0.535,0.015],[-0.648,1.306],[-1.813,0.428],[-1.806,-0.438],[-0.392,1.028],[-0.023,0.048],[-2.123,0.451],[-2.602,-1.082],[-0.033,-0.016],[0,0],[-0.034,-0.019],[-1.699,-3.421],[0,0],[0,0],[0.169,-0.503],[0.013,-0.032],[0.443,-0.22],[0.502,0.17],[0.033,0.013],[0.219,0.442],[0,0],[6.83,3.793],[0,0],[1.064,-0.227],[0.455,-0.915],[-0.154,-0.539],[-0.497,-0.308],[0,0],[0.408,-1.027],[1.026,0.405],[0,0],[0,0],[0.068,0.036],[0,0],[0.842,-0.198],[0.277,-0.557],[-0.093,-0.504],[-0.425,-0.402],[0,0],[0.237,-0.935],[0.032,-0.08],[0.015,-0.033],[0.934,0.237],[0.08,0.031]],"o":[[0,0],[-1.444,-0.567],[-0.577,0.157],[-0.344,0.868],[0.128,0.627],[0.263,0.245],[0,0],[0.077,0.03],[1.204,0.661],[0.679,1.108],[-0.415,1.046],[-0.842,0.444],[0,0],[0,0],[0,0],[2.121,1.31],[-0.133,2.377],[-2.104,1.145],[-2.301,0.3],[-2.333,0.785],[-0.397,0.419],[-0.107,0.745],[0.49,1.186],[4.665,-1.731],[3.174,-0.542],[6.094,-0.198],[0,0],[0,0],[0.458,-0.193],[0.024,0.009],[0,0],[0.491,0.2],[0.192,0.456],[-0.009,0.027],[-0.198,0.499],[0,0],[-9.741,4.104],[-5.028,0.164],[-3.573,0.611],[-1.873,0.715],[-1.375,-0.612],[-0.539,-1.304],[0.223,-1.562],[1.492,-1.576],[2.135,-0.719],[2.069,-0.269],[1.546,-0.841],[-0.014,-0.019],[-0.21,-0.254],[-1.135,-0.701],[1.606,0.361],[0,0],[0,0],[0.359,0.014],[0.069,-0.036],[-0.151,-0.213],[0,0],[-1.055,-0.418],[-1.228,-1.144],[-0.291,-1.433],[0.805,-2.031],[0.48,-0.13],[-0.099,-1.203],[0.833,-1.68],[1.331,-0.314],[0.031,-0.905],[0.019,-0.05],[1.024,-2.145],[1.886,-0.401],[0.034,0.014],[0,0],[0.034,0.016],[7.589,4.209],[0,0],[0,0],[0.236,0.476],[-0.012,0.033],[-0.182,0.46],[-0.475,0.236],[-0.033,-0.011],[-0.459,-0.182],[0,0],[-1.329,-2.67],[0,0],[-1.813,-0.748],[-0.816,0.173],[-0.338,0.913],[0.115,0.405],[0,0],[1.026,0.408],[-0.406,1.025],[0,0],[0,0],[-0.071,-0.028],[0,0],[-1.472,-0.43],[-0.593,0.14],[-0.357,0.721],[0.077,0.416],[0,0],[0.876,0.403],[-0.021,0.083],[-0.013,0.033],[-0.403,0.876],[-0.084,-0.021],[-0.033,-0.014]],"v":[[1.962,-13.096],[-8.76,-18.034],[-12.1,-18.564],[-13.438,-17.141],[-13.753,-14.855],[-12.658,-13.071],[-11.383,-12.354],[0.275,-7.73],[0.501,-7.625],[3.081,-5.371],[3.381,-1.898],[1.329,0.424],[-1.686,0.991],[-2.437,0.965],[-1.432,7.985],[4.895,10.726],[7.939,15.152],[3.353,21.106],[-3.648,23.325],[-9.932,24.728],[-14.984,27.546],[-15.734,29.258],[-15.503,31.322],[-12.544,32.252],[0.181,28.677],[12.755,27.609],[35.825,21.445],[35.827,21.444],[35.831,21.442],[37.273,21.398],[37.346,21.426],[37.363,21.432],[38.452,22.508],[38.497,23.942],[38.468,24.022],[37.385,25.128],[37.379,25.13],[12.887,31.607],[0.855,32.62],[-11.118,35.989],[-16.195,36.052],[-19.201,32.848],[-19.693,28.692],[-17.889,24.796],[-11.208,20.937],[-4.163,19.358],[1.439,17.593],[3.934,15.053],[3.882,14.987],[2.794,14.129],[-2.327,11.916],[-1.459,8.034],[-2.393,1.013],[-1.324,-2.997],[-0.535,-3.116],[-0.359,-3.325],[-1.32,-4.06],[-12.856,-8.636],[-15.385,-10.146],[-17.674,-14.058],[-17.156,-18.616],[-13.152,-22.424],[-11.63,-22.643],[-10.805,-26.407],[-6.835,-29.569],[-2.13,-29.383],[-1.495,-32.282],[-1.432,-32.43],[3.288,-36.324],[10.021,-35.302],[10.12,-35.257],[31.193,-25.105],[31.295,-25.052],[45.227,-13.607],[45.228,-13.604],[45.229,-13.603],[45.333,-12.075],[45.296,-11.977],[44.326,-10.922],[42.799,-10.819],[42.7,-10.855],[41.646,-11.825],[41.642,-11.833],[29.404,-21.527],[8.436,-31.629],[4.12,-32.411],[2.213,-30.778],[1.936,-28.6],[2.854,-27.53],[8.822,-25.163],[9.944,-22.566],[7.352,-21.443],[7.348,-21.444],[1.316,-23.823],[1.107,-23.919],[-2.447,-25.328],[-5.917,-25.676],[-7.222,-24.63],[-7.62,-22.792],[-6.867,-21.566],[3.635,-16.729],[4.737,-14.42],[4.658,-14.175],[4.615,-14.076],[2.307,-12.974],[2.061,-13.053]],"c":true},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[55.39,50.134],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":50,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":5,"nm":"上滑查看更多视频","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[249.5,409.099,0],"ix":2},"a":{"a":0,"k":[4.786,-22.901,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"t":{"d":{"k":[{"s":{"s":60,"f":"SourceHanSansSC-Normal","t":"上滑查看更多视频","j":2,"tr":0,"lh":72,"ls":0,"fc":[1,1,1],"sc":[0,0,0],"sw":0.00999999977648,"of":true},"t":0}]},"p":{},"m":{"g":1,"a":{"a":0,"k":[0,0],"ix":2}},"a":[]},"ip":0,"op":50,"st":0,"bm":0}],"markers":[{"tm":1,"cm":"{\n\t\"exportFlag\":\t1,\n\t\"storePath\":\t\"/Users/changkang/Downloads/中文版动效/动效导出最终版本的/动效\"\n}","dr":0}],"chars":[{"ch":"上","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[43.405,-82.883],[43.405,-3.625],[5.338,-3.625],[5.338,3.122],[95.471,3.122],[95.471,-3.625],[50.455,-3.625],[50.455,-44.614],[88.623,-44.614],[88.623,-51.361],[50.455,-51.361],[50.455,-82.883]],"c":true},"ix":2},"nm":"上","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"上","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"滑","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-3.928,-3.726],[0,0],[6.143,3.625]],"o":[[6.244,3.827],[0,0],[-3.928,-3.525],[0,0]],"v":[[9.467,-78.653],[27.594,-65.359],[31.924,-70.496],[13.696,-82.983]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-3.827,-3.122],[0,0],[5.74,2.921]],"o":[[5.841,3.122],[0,0],[-3.928,-3.122],[0,0]],"v":[[4.33,-50.656],[21.552,-39.679],[25.58,-44.916],[8.258,-55.389]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[4.633,-7.553],[0,0],[-4.431,10.272],[0,0]],"o":[[0,0],[5.035,-9.164],[0,0],[-4.935,11.078]],"v":[[7.755,1.913],[13.596,6.244],[29.105,-25.681],[23.868,-29.81]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[45.923,-22.055],[79.156,-22.055],[79.156,-14.2],[45.923,-14.2]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[45.923,-27.191],[45.923,-34.845],[79.156,-34.845],[79.156,-27.191]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":5,"ty":"sh","ix":6,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[1.41,0],[5.237,0.201],[-0.302,-1.511],[-2.618,1.007],[0,3.525],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,1.309],[-1.41,0.101],[0.806,1.611],[7.251,0],[2.618,-0.906],[0,0],[0,0]],"v":[[39.679,-40.384],[39.679,7.855],[45.923,7.855],[45.923,-9.164],[79.156,-9.164],[79.156,0.806],[77.344,2.518],[65.863,2.417],[67.776,7.956],[82.178,6.949],[85.602,0.806],[85.602,-40.384]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":6,"ty":"sh","ix":7,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[40.384,-80.667],[40.384,-53.476],[29.709,-53.476],[29.709,-36.658],[35.953,-36.658],[35.953,-47.836],[89.227,-47.836],[89.227,-36.658],[95.773,-36.658],[95.773,-53.476],[84.998,-53.476],[84.998,-80.667]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":7,"ty":"sh","ix":8,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[46.628,-53.476],[46.628,-63.144],[61.029,-63.144],[61.029,-53.476]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false},{"ind":8,"ty":"sh","ix":9,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[78.653,-53.476],[66.769,-53.476],[66.769,-67.978],[46.628,-67.978],[46.628,-75.229],[78.653,-75.229]],"c":true},"ix":2},"nm":"滑","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"滑","np":12,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"查","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[29.205,-21.854],[71.201,-21.854],[71.201,-12.891],[29.205,-12.891]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[29.205,-35.55],[71.201,-35.55],[71.201,-26.688],[29.205,-26.688]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[22.559,-40.585],[22.559,-7.855],[78.149,-7.855],[78.149,-40.585]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[7.654,-1.511],[7.654,4.532],[93.457,4.532],[93.457,-1.511]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[12.589,-4.33],[-1.007,-1.611],[-9.265,12.085],[0,0],[0,0],[0,0],[-14.099,-5.237],[-1.611,1.208],[8.862,9.467],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[-8.862,9.769],[1.41,1.309],[13.797,-5.539],[0,0],[0,0],[0,0],[9.366,11.884],[0.906,-1.712],[-12.991,-4.129],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[46.729,-84.494],[46.729,-71.301],[5.841,-71.301],[5.841,-65.359],[39.175,-65.359],[3.827,-42.197],[8.258,-36.758],[46.729,-65.259],[46.729,-43.707],[53.476,-43.707],[53.476,-65.359],[92.45,-37.564],[96.982,-43.103],[60.928,-65.359],[95.068,-65.359],[95.068,-71.301],[53.476,-71.301],[53.476,-84.494]],"c":true},"ix":2},"nm":"查","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"查","np":8,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"看","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[32.73,-21.854],[78.049,-21.854],[78.049,-14.301],[32.73,-14.301]],"c":true},"ix":2},"nm":"看","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[32.73,-26.788],[32.73,-34.14],[78.049,-34.14],[78.049,-26.788]],"c":true},"ix":2},"nm":"看","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[32.73,-9.467],[78.049,-9.467],[78.049,-1.511],[32.73,-1.511]],"c":true},"ix":2},"nm":"看","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[24.573,-0.201],[-0.201,-1.611],[-9.567,0.403],[0.906,-2.518],[0,0],[0,0],[0,0],[1.41,-2.618],[0,0],[0,0],[0,0],[11.581,-6.647],[-0.906,-1.41],[-5.237,5.942],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.41,2.618],[0,0],[0,0],[0,0],[-1.108,2.719],[0,0],[0,0],[0,0],[-0.806,2.618],[-10.071,2.115]],"o":[[-15.912,3.424],[0.705,1.511],[8.862,0],[-0.705,2.518],[0,0],[0,0],[0,0],[-1.108,2.719],[0,0],[0,0],[0,0],[-6.445,10.876],[1.41,1.309],[7.15,-4.23],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[1.611,-2.417],[0,0],[0,0],[0,0],[1.208,-2.618],[0,0],[0,0],[0,0],[0.906,-2.618],[14.603,-0.906],[0,0]],"v":[[83.286,-83.588],[11.884,-78.452],[13.394,-73.114],[41.492,-73.819],[39.175,-66.367],[13.394,-66.367],[13.394,-60.928],[37.161,-60.928],[33.435,-52.771],[5.942,-52.771],[5.942,-47.131],[30.313,-47.131],[3.525,-20.142],[7.855,-14.905],[26.285,-30.313],[26.285,8.057],[32.73,8.057],[32.73,4.028],[78.049,4.028],[78.049,8.057],[84.695,8.057],[84.695,-39.578],[33.435,-39.578],[38.068,-47.131],[94.766,-47.131],[94.766,-52.771],[40.988,-52.771],[44.513,-60.928],[88.824,-60.928],[88.824,-66.367],[46.527,-66.367],[49.045,-74.222],[87.717,-78.653]],"c":true},"ix":2},"nm":"看","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"看","np":7,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"更","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.424,5.539],[0,0],[-5.136,-3.827],[12.387,-2.417],[-0.806,-1.511],[-6.747,4.532],[-23.666,-1.007],[-1.309,1.611],[12.991,6.143],[-1.309,6.345],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[4.935,-4.23]],"o":[[0,0],[3.525,6.042],[-6.244,3.625],[1.511,1.611],[13.394,-2.921],[13.797,7.452],[0.302,-2.216],[-22.961,-0.705],[5.539,-5.237],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.208,5.136],[-5.035,-3.424]],"v":[[25.177,-24.17],[19.437,-21.854],[32.327,-7.15],[4.834,2.014],[8.862,7.956],[38.47,-3.223],[94.464,7.654],[97.385,1.007],[43.909,-7.553],[53.375,-25.177],[87.817,-25.177],[87.817,-63.849],[54.382,-63.849],[54.382,-72.711],[94.061,-72.711],[94.061,-78.854],[6.546,-78.854],[6.546,-72.711],[47.433,-72.711],[47.433,-63.849],[15.912,-63.849],[15.912,-25.177],[46.326,-25.177],[37.766,-10.977]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0.101,-2.216],[0,0]],"o":[[0,0],[0,0],[0,2.216],[0,0],[0,0]],"v":[[22.357,-41.794],[47.433,-41.794],[47.433,-37.564],[47.232,-30.917],[22.357,-30.917]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,2.216],[0,0],[0,0],[0,0]],"o":[[0.101,-2.216],[0,0],[0,0],[0,0],[0,0]],"v":[[54.181,-30.917],[54.382,-37.564],[54.382,-41.794],[81.07,-41.794],[81.07,-30.917]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[22.357,-58.109],[47.433,-58.109],[47.433,-47.333],[22.357,-47.333]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[54.382,-58.109],[81.07,-58.109],[81.07,-47.333],[54.382,-47.333]],"c":true},"ix":2},"nm":"更","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"更","np":8,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"多","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[16.214,-6.848],[-1.007,-1.611],[-6.647,5.438],[0,0],[8.157,-4.834],[4.532,2.518],[0,0],[-3.424,-3.021],[11.38,-2.014],[-0.705,-1.813],[-12.891,22.357],[0,0],[0,0],[0,0],[-2.014,2.518]],"o":[[-6.345,8.459],[1.511,1.108],[9.265,-4.431],[0,0],[-5.136,6.546],[-3.625,-3.122],[0,0],[4.129,2.417],[-10.977,5.539],[1.208,1.41],[25.681,-5.438],[0,0],[0,0],[0,0],[2.518,-2.417],[0,0]],"v":[[46.326,-84.595],[11.581,-59.216],[16.214,-54.382],[40.082,-69.388],[69.287,-69.388],[48.743,-52.267],[35.248,-61.533],[30.414,-58.008],[42.801,-49.146],[8.157,-37.665],[11.481,-31.622],[79.66,-73.114],[75.33,-75.833],[73.92,-75.531],[46.93,-75.531],[53.778,-82.983]],"c":true},"ix":2},"nm":"多","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[20.444,-7.452],[-0.906,-1.611],[-8.359,6.949],[0,0],[9.064,-5.136],[4.23,2.921],[0,0],[-3.323,-3.424],[17.322,-1.712],[-0.403,-1.913],[-14.099,29.709],[0,0],[0,0],[0,0],[-2.014,2.618]],"o":[[-7.352,10.071],[1.511,1.309],[12.79,-5.136],[0,0],[-5.136,8.258],[-3.525,-3.424],[0,0],[4.028,3.021],[-14.301,6.747],[1.108,1.611],[35.248,-4.23],[0,0],[0,0],[0,0],[2.518,-2.518],[0,0]],"v":[[62.741,-49.649],[20.444,-20.746],[24.774,-15.61],[56.598,-34.14],[84.796,-34.14],[63.144,-14.099],[50.253,-24.573],[44.714,-21.35],[56.9,-10.776],[7.956,1.511],[10.776,8.057],[94.867,-37.866],[90.436,-40.686],[89.127,-40.283],[63.345,-40.283],[70.193,-48.038]],"c":true},"ix":2},"nm":"多","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"多","np":5,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"视","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[45.721,-79.459],[45.721,-25.882],[52.167,-25.882],[52.167,-73.416],[84.192,-73.416],[84.192,-25.882],[90.939,-25.882],[90.939,-79.459]],"c":true},"ix":2},"nm":"视","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-1.813,-3.726],[0,0],[3.928,3.726]],"o":[[3.726,3.928],[0,0],[-1.813,-3.625],[0,0]],"v":[[15.912,-81.171],[25.378,-67.978],[30.817,-71.603],[21.048,-84.192]],"c":true},"ix":2},"nm":"视","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[25.378,-13.193],[-0.705,-1.41],[-3.827,11.38],[0,0],[-6.647,0],[0,0],[-0.906,15.811],[1.712,1.41],[3.726,0],[0,0],[0,2.921],[0,0],[0,0],[0,5.438],[0,0]],"o":[[0,0],[0,15.811],[1.41,1.108],[15.811,-8.258],[0,0],[0,6.445],[0,0],[8.459,0],[-1.813,-0.403],[-0.504,14.603],[0,0],[-3.021,0],[0,0],[0,0],[1.41,-5.942],[0,0],[0,0]],"v":[[64.453,-65.561],[64.453,-45.218],[35.953,2.921],[40.182,7.956],[67.676,-22.861],[67.676,-1.813],[76.941,6.345],[86.508,6.345],[96.982,-13.495],[91.241,-16.214],[86.609,1.108],[77.847,1.108],[74.02,-2.518],[74.02,-27.795],[69.086,-27.795],[70.898,-45.016],[70.898,-65.561]],"c":true},"ix":2},"nm":"视","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[10.474,-7.251],[-0.604,-1.913],[-4.028,4.431],[0,0],[0,0],[0,0],[-2.115,-3.122],[0,0],[3.827,4.028],[-2.82,7.855],[0,0],[0,0]],"o":[[0,0],[0,0],[-6.042,13.092],[1.108,1.208],[4.028,-3.021],[0,0],[0,0],[0,0],[3.726,4.633],[0,0],[-1.913,-2.216],[4.935,-6.949],[0,0],[0,0],[0,0]],"v":[[6.546,-67.072],[6.546,-60.828],[31.622,-60.828],[4.129,-27.594],[7.452,-21.149],[19.638,-32.428],[19.638,7.855],[25.983,7.855],[25.983,-36.356],[36.456,-22.458],[40.787,-27.896],[27.795,-42.499],[39.78,-64.856],[36.154,-67.273],[34.946,-67.072]],"c":true},"ix":2},"nm":"视","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"视","np":7,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"},{"ch":"频","size":60,"style":"Normal","w":100,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[24.573,-6.647],[-0.504,-1.41],[-0.302,37.766]],"o":[[-0.302,35.751],[1.208,1.208],[26.184,-7.452],[0,0]],"v":[[70.898,-50.958],[44.916,3.323],[48.239,8.157],[76.639,-50.958]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-4.23,-4.532],[0,0],[6.848,4.834]],"o":[[6.848,5.035],[0,0],[-4.33,-4.431],[0,0]],"v":[[73.416,-8.661],[93.155,8.157],[97.284,3.726],[77.243,-12.488]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[21.249,-6.949],[-0.806,-1.712],[-5.539,22.458]],"o":[[-5.237,20.847],[1.309,1.41],[22.458,-8.157],[0,0]],"v":[[43.506,-38.873],[5.338,3.021],[8.963,8.258],[49.347,-37.463]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[4.33,-5.237],[-1.108,-0.906],[-2.316,8.258]],"o":[[-2.115,7.452],[1.511,0.806],[4.33,-5.539],[0,0]],"v":[[13.898,-39.88],[4.028,-19.638],[9.064,-16.415],[19.638,-38.672]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.41,3.726],[0,0],[0,0],[0,0],[0,0],[0,0],[1.41,-3.223]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[1.309,-3.323],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.007,3.525],[0,0]],"v":[[54.886,-61.432],[54.886,-13.898],[60.727,-13.898],[60.727,-55.994],[86.407,-55.994],[86.407,-13.998],[92.551,-13.998],[92.551,-61.432],[74.222,-61.432],[78.351,-72.409],[95.572,-72.409],[95.572,-78.452],[52.267,-78.452],[52.267,-72.409],[71.805,-72.409],[67.978,-61.432]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false},{"ind":5,"ty":"sh","ix":6,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[11.884,-75.632],[11.884,-52.872],[4.129,-52.872],[4.129,-46.729],[25.378,-46.729],[25.378,-16.113],[31.522,-16.113],[31.522,-46.729],[50.555,-46.729],[50.555,-52.872],[33.234,-52.872],[33.234,-65.863],[48.138,-65.863],[48.138,-71.603],[33.234,-71.603],[33.234,-84.494],[27.09,-84.494],[27.09,-52.872],[17.624,-52.872],[17.624,-75.632]],"c":true},"ix":2},"nm":"频","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"频","np":9,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Source Han Sans SC"}]}
@@ -16,12 +16,15 @@ struct ImageAndTextDetailPage { @@ -16,12 +16,15 @@ struct ImageAndTextDetailPage {
16 } 16 }
17 } 17 }
18 18
19 - pageTransition(){  
20 - // 定义页面进入时的效果,从右边侧滑入  
21 - PageTransitionEnter({ type: RouteType.None, duration: 300 }) 19 + pageTransition() {
  20 + // 为目标页面时,进入:从右边侧滑入,退出:是右侧划出;跳转别的页面:左侧划出,返回:左侧划入。
  21 + PageTransitionEnter({ type: RouteType.Push, duration: 300 })
22 .slide(SlideEffect.Right) 22 .slide(SlideEffect.Right)
23 - // 定义页面退出时的效果,向右边侧滑出  
24 - PageTransitionExit({ type: RouteType.None, duration: 300 }) 23 + PageTransitionEnter({ type: RouteType.Pop, duration: 300 })
  24 + .slide(SlideEffect.Left)
  25 + PageTransitionExit({ type: RouteType.Push, duration: 300 })
  26 + .slide(SlideEffect.Left)
  27 + PageTransitionExit({ type: RouteType.Pop, duration: 300 })
25 .slide(SlideEffect.Right) 28 .slide(SlideEffect.Right)
26 } 29 }
27 30
@@ -3,11 +3,12 @@ import { BreakpointConstants } from 'wdConstant'; @@ -3,11 +3,12 @@ import { BreakpointConstants } from 'wdConstant';
3 3
4 import { HWLocationUtils, WDPushNotificationManager } from 'wdHwAbility/Index'; 4 import { HWLocationUtils, WDPushNotificationManager } from 'wdHwAbility/Index';
5 import { common } from '@kit.AbilityKit'; 5 import { common } from '@kit.AbilityKit';
6 -import { BreakpointSystem, EmitterEventId, EmitterUtils, Logger, MpaasUpgradeCheck } from 'wdKit';  
7 -import router from '@ohos.router';  
8 -import { promptAction } from '@kit.ArkUI'; 6 +import { BreakpointSystem, EmitterEventId, EmitterUtils, Logger, MpaasUpgradeCheck, WindowModel } from 'wdKit';
  7 +import { promptAction, window } from '@kit.ArkUI';
9 import { UpgradeTipDialog } from "./upgradePage/UpgradeTipDialog" 8 import { UpgradeTipDialog } from "./upgradePage/UpgradeTipDialog"
10 import { ProcessUtils } from 'wdRouter/Index'; 9 import { ProcessUtils } from 'wdRouter/Index';
  10 +import { StartupManager } from '../startupmanager/StartupManager';
  11 +import { BusinessError } from '@kit.BasicServicesKit';
11 12
12 const TAG = 'MainPage'; 13 const TAG = 'MainPage';
13 14
@@ -17,7 +18,8 @@ struct MainPage { @@ -17,7 +18,8 @@ struct MainPage {
17 @Provide pageShow: number = -1 18 @Provide pageShow: number = -1
18 @Provide pageHide: number = -1 19 @Provide pageHide: number = -1
19 private breakpointSystem: BreakpointSystem = new BreakpointSystem() 20 private breakpointSystem: BreakpointSystem = new BreakpointSystem()
20 - @StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string = BreakpointConstants.BREAKPOINT_XS; 21 + @StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string =
  22 + BreakpointConstants.BREAKPOINT_XS;
21 @State isPermission: boolean = false 23 @State isPermission: boolean = false
22 upgradeDialogController?: CustomDialogController 24 upgradeDialogController?: CustomDialogController
23 25
@@ -27,6 +29,8 @@ struct MainPage { @@ -27,6 +29,8 @@ struct MainPage {
27 29
28 aboutToAppear() { 30 aboutToAppear() {
29 31
  32 + StartupManager.sharedInstance().appReachMainPage()
  33 +
30 this.breakpointSystem.register() 34 this.breakpointSystem.register()
31 35
32 let context = getContext(this) as common.UIAbilityContext 36 let context = getContext(this) as common.UIAbilityContext
@@ -44,7 +48,7 @@ struct MainPage { @@ -44,7 +48,7 @@ struct MainPage {
44 LogoutViewModel.clearLoginInfo() 48 LogoutViewModel.clearLoginInfo()
45 }) 49 })
46 EmitterUtils.receiveEvent(EmitterEventId.LOCATION, () => { 50 EmitterUtils.receiveEvent(EmitterEventId.LOCATION, () => {
47 - this.isPermission=true 51 + this.isPermission = true
48 }) 52 })
49 } 53 }
50 54
@@ -78,7 +82,7 @@ struct MainPage { @@ -78,7 +82,7 @@ struct MainPage {
78 82
79 this.upgradeDialogController = new CustomDialogController({ 83 this.upgradeDialogController = new CustomDialogController({
80 builder: UpgradeTipDialog({ 84 builder: UpgradeTipDialog({
81 - tipContent:data, 85 + tipContent: data,
82 confirm: () => { 86 confirm: () => {
83 ProcessUtils.jumpExternalWebPage(data.downloadUrl); 87 ProcessUtils.jumpExternalWebPage(data.downloadUrl);
84 } 88 }
@@ -101,12 +105,26 @@ struct MainPage { @@ -101,12 +105,26 @@ struct MainPage {
101 105
102 onBackPress() { 106 onBackPress() {
103 Logger.info(TAG, 'onBackPress'); 107 Logger.info(TAG, 'onBackPress');
  108 + try {
  109 + // 拦截返回键,切到后台
  110 + const windowClass = WindowModel.shared.getWindowClass() as window.Window
  111 + windowClass.minimize().then(() => {
  112 + Logger.debug(TAG, 'Succeeded in minimizing the window.');
  113 + }).catch((err: BusinessError) => {
  114 + Logger.error(TAG, 'Failed to minimize the window. Cause: ' + JSON.stringify(err));
  115 + return false
  116 + });
  117 + } catch (err) {
  118 + Logger.error(TAG, 'Failed to minimize: ' + JSON.stringify(err));
  119 + return false
  120 + }
  121 + return true
104 } 122 }
105 123
106 build() { 124 build() {
107 - Stack({alignContent:Alignment.Top}) { 125 + Stack({ alignContent: Alignment.Top }) {
108 BottomNavigationComponent() 126 BottomNavigationComponent()
109 - if(this.isPermission){ 127 + if (this.isPermission) {
110 PermissionDesComponent() 128 PermissionDesComponent()
111 } 129 }
112 } 130 }
@@ -18,11 +18,14 @@ struct SpacialTopicPage { @@ -18,11 +18,14 @@ struct SpacialTopicPage {
18 } 18 }
19 19
20 pageTransition() { 20 pageTransition() {
21 - // 定义页面进入时的效果,从右边侧滑入  
22 - PageTransitionEnter({ type: RouteType.None, duration: 300 }) 21 + // 为目标页面时,进入:从右边侧滑入,退出:是右侧划出;跳转别的页面:左侧划出,返回:左侧划入。
  22 + PageTransitionEnter({ type: RouteType.Push, duration: 300 })
23 .slide(SlideEffect.Right) 23 .slide(SlideEffect.Right)
24 - // 定义页面退出时的效果,向右边侧滑出  
25 - PageTransitionExit({ type: RouteType.None, duration: 300 }) 24 + PageTransitionEnter({ type: RouteType.Pop, duration: 300 })
  25 + .slide(SlideEffect.Left)
  26 + PageTransitionExit({ type: RouteType.Push, duration: 300 })
  27 + .slide(SlideEffect.Left)
  28 + PageTransitionExit({ type: RouteType.Pop, duration: 300 })
26 .slide(SlideEffect.Right) 29 .slide(SlideEffect.Right)
27 } 30 }
28 31
@@ -70,7 +70,7 @@ struct LaunchInterestsHobbiesPage { @@ -70,7 +70,7 @@ struct LaunchInterestsHobbiesPage {
70 .width('100%') 70 .width('100%')
71 .height('100%') 71 .height('100%')
72 .backgroundColor(Color.Gray) 72 .backgroundColor(Color.Gray)
73 - .opacity(item.choose?0.7:0) 73 + .opacity(item.choose?0.85:0)
74 .borderRadius(5) 74 .borderRadius(5)
75 } 75 }
76 76
@@ -134,7 +134,7 @@ struct LaunchInterestsHobbiesPage { @@ -134,7 +134,7 @@ struct LaunchInterestsHobbiesPage {
134 .width('662lpx') 134 .width('662lpx')
135 .height('84lpx') 135 .height('84lpx')
136 .backgroundColor(Color.White) 136 .backgroundColor(Color.White)
137 - .opacity(this.selectCount == 0 ? 0.6 : 0) 137 + .opacity(this.selectCount == 0 ? 0.3 : 0)
138 .borderRadius('10lpx') 138 .borderRadius('10lpx')
139 .onClick(()=>{ 139 .onClick(()=>{
140 if (this.selectCount == 0) { 140 if (this.selectCount == 0) {
@@ -90,6 +90,9 @@ export class StartupManager { @@ -90,6 +90,9 @@ export class StartupManager {
90 appReachMainPage() : Promise<void> { 90 appReachMainPage() : Promise<void> {
91 return new Promise((resolve) => { 91 return new Promise((resolve) => {
92 Logger.debug(TAG, "App 进入首页,开始其他任务初始化") 92 Logger.debug(TAG, "App 进入首页,开始其他任务初始化")
  93 +
  94 + LoginModule.reportDeviceInfo()
  95 +
93 //TODO: 96 //TODO:
94 97
95 resolve() 98 resolve()
@@ -132,18 +135,18 @@ export class StartupManager { @@ -132,18 +135,18 @@ export class StartupManager {
132 private initNetwork() { 135 private initNetwork() {
133 Logger.debug(TAG, "App 网络 初始化") 136 Logger.debug(TAG, "App 网络 初始化")
134 WDHttp.initHttpHeader() 137 WDHttp.initHttpHeader()
135 - // 注册监听网络连接  
136 - EmitterUtils.receiveEvent(EmitterEventId.NETWORK_CONNECTED, ((str?: string) => {  
137 - let type: NetworkType | null = null  
138 - if (str) {  
139 - type = JSON.parse(str) as NetworkType  
140 - }  
141 - Logger.info('network connected: ' + type?.toString())  
142 - }))  
143 - // 注册监听网络断开  
144 - EmitterUtils.receiveEvent(EmitterEventId.NETWORK_DISCONNECTED, (() => {  
145 - Logger.info('network disconnected')  
146 - })) 138 + // 注册监听网络连接,没有实质业务意义,可删除
  139 + // EmitterUtils.receiveEvent(EmitterEventId.NETWORK_CONNECTED, ((str?: string) => {
  140 + // let type: NetworkType | null = null
  141 + // if (str) {
  142 + // type = JSON.parse(str) as NetworkType
  143 + // }
  144 + // Logger.info('network connected: ' + type?.toString())
  145 + // }))
  146 + // // 注册监听网络断开
  147 + // EmitterUtils.receiveEvent(EmitterEventId.NETWORK_DISCONNECTED, (() => {
  148 + // Logger.info('network disconnected')
  149 + // }))
147 } 150 }
148 151
149 private initCheckDeviceId() { 152 private initCheckDeviceId() {
  1 +import { insightIntent, InsightIntentExecutor } from '@kit.AbilityKit';
  2 +import { window } from '@kit.ArkUI';
  3 +import { BusinessError } from '@kit.BasicServicesKit';
  4 +
  5 +/**
  6 + * 意图调用
  7 + */
  8 +export default class InsightIntentExecutorImpl extends InsightIntentExecutor {
  9 + private static readonly ViewColumn = 'ViewColumn';
  10 + /**
  11 + * override 执行前台UIAbility意图
  12 + *
  13 + * @param name 意图名称
  14 + * @param param 意图参数
  15 + * @param pageLoader 窗口
  16 + * @returns 意图调用结果
  17 + */
  18 + onExecuteInUIAbilityForegroundMode(name: string, param: Record<string, Object>, pageLoader: window.WindowStage):
  19 + Promise<insightIntent.ExecuteResult> {
  20 + // 根据意图名称分发处理逻辑
  21 + switch (name) {
  22 + case InsightIntentExecutorImpl.ViewColumn:
  23 + return this.jumpToView(param, pageLoader);
  24 + default:
  25 + break;
  26 + }
  27 + return Promise.resolve({
  28 + code: -1,
  29 + result: {
  30 + message: 'unknown intent'
  31 + }
  32 + } as insightIntent.ExecuteResult)
  33 + }
  34 + /**
  35 + * 实现跳转新闻页面功能
  36 + *
  37 + * @param param 意图参数
  38 + * @param pageLoader 窗口
  39 + */
  40 + private jumpToView(param: Record<string, Object>, pageLoader: window.WindowStage): Promise<insightIntent.ExecuteResult> {
  41 + return new Promise((resolve, reject) => {
  42 + // TODO 实现意图调用,loadContent的入参为歌曲落地页路径,例如:pages/SongPage
  43 + pageLoader.loadContent('pages/MainPage')
  44 + .then(() => {
  45 + let entityId: string = (param.items as Array<object>)?.[0]?.['entityId'];
  46 + // TODO 调用成功的情况,此处可以打印日志
  47 + resolve({
  48 + code: 0,
  49 + result: {
  50 + message: 'Intent execute success'
  51 + }
  52 + });
  53 + })
  54 + .catch((err: BusinessError) => {
  55 + // TODO 调用失败的情况
  56 + resolve({
  57 + code: -1,
  58 + result: {
  59 + message: 'Intent execute failed'
  60 + }
  61 + })
  62 + });
  63 + })
  64 + }
  65 +}
  1 +{
  2 + "insightIntents": [
  3 + {
  4 + "intentName": "ViewColumn",
  5 + "domain": "",
  6 + "intentVersion": "1.0.1",
  7 + "srcEntry": "./ets/utils/InsightIntentExecutorImpl.ets",
  8 + "uiAbility": {
  9 + "ability": "EntryAbility",
  10 + "executeMode": [
  11 + "background",
  12 + "foreground"
  13 + ]
  14 + }
  15 + }
  16 + ]
  17 +}