Merge remote-tracking branch 'origin/main'
# Conflicts: # sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
Showing
232 changed files
with
3834 additions
and
949 deletions
| @@ -244,6 +244,30 @@ | @@ -244,6 +244,30 @@ | ||
| 244 | ] | 244 | ] |
| 245 | } | 245 | } |
| 246 | ] | 246 | ] |
| 247 | + }, | ||
| 248 | + { | ||
| 249 | + "name": "wdShareBase", | ||
| 250 | + "srcPath": "./commons/wdShareBase", | ||
| 251 | + "targets": [ | ||
| 252 | + { | ||
| 253 | + "name": "default", | ||
| 254 | + "applyToProducts": [ | ||
| 255 | + "default" | ||
| 256 | + ] | ||
| 257 | + } | ||
| 258 | + ] | ||
| 259 | + }, | ||
| 260 | + { | ||
| 261 | + "name": "wdShare", | ||
| 262 | + "srcPath": "./features/wdShare", | ||
| 263 | + "targets": [ | ||
| 264 | + { | ||
| 265 | + "name": "default", | ||
| 266 | + "applyToProducts": [ | ||
| 267 | + "default" | ||
| 268 | + ] | ||
| 269 | + } | ||
| 270 | + ] | ||
| 247 | } | 271 | } |
| 248 | ] | 272 | ] |
| 249 | } | 273 | } |
| @@ -12,6 +12,8 @@ export class ContentConstants { | @@ -12,6 +12,8 @@ export class ContentConstants { | ||
| 12 | * 2:直播 | 12 | * 2:直播 |
| 13 | */ | 13 | */ |
| 14 | static readonly TYPE_LIVE: string = "2"; | 14 | static readonly TYPE_LIVE: string = "2"; |
| 15 | + | ||
| 16 | + static readonly TYPE_FOUR: string = "4"; | ||
| 15 | /** | 17 | /** |
| 16 | * 5:专题详情 | 18 | * 5:专题详情 |
| 17 | */ | 19 | */ |
| @@ -44,4 +44,7 @@ export class SpConstants{ | @@ -44,4 +44,7 @@ export class SpConstants{ | ||
| 44 | //频道信息流页面左右挂角 | 44 | //频道信息流页面左右挂角 |
| 45 | static APP_PAGE_CORNER_ADV = 'app_page_corner_adv_' | 45 | static APP_PAGE_CORNER_ADV = 'app_page_corner_adv_' |
| 46 | 46 | ||
| 47 | + | ||
| 48 | + //游客状态下首次评论时间 | ||
| 49 | + static FIRSTCOMMENTTIME = 'firstCommentTime' | ||
| 47 | } | 50 | } |
| @@ -53,5 +53,15 @@ export class AppUtils { | @@ -53,5 +53,15 @@ export class AppUtils { | ||
| 53 | } | 53 | } |
| 54 | return ''; | 54 | return ''; |
| 55 | } | 55 | } |
| 56 | + | ||
| 57 | + static getAppChannel() { | ||
| 58 | + // TODO: 待确认,暂时写死一个 | ||
| 59 | + return "rmrb_china_0000" | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + static getOSName() { | ||
| 63 | + // TODO: 待确认,暂时写死Android | ||
| 64 | + return "Harmony" | ||
| 65 | + } | ||
| 56 | } | 66 | } |
| 57 | 67 |
| @@ -70,10 +70,16 @@ export class DeviceUtil { | @@ -70,10 +70,16 @@ export class DeviceUtil { | ||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | /** | 72 | /** |
| 73 | + * 获取设备型号: HUAWEI Mate 60 Pro | ||
| 74 | + */ | ||
| 75 | + static getMarketName() { | ||
| 76 | + return deviceInfo.marketName | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + /** | ||
| 73 | * 客户端日志链路追踪traceid生成:在每个请求头加上参数Key:EagleEye-TraceID ,value为32位生成随机值 | 80 | * 客户端日志链路追踪traceid生成:在每个请求头加上参数Key:EagleEye-TraceID ,value为32位生成随机值 |
| 74 | */ | 81 | */ |
| 75 | static getRandomUUIDForTraceID(): string { | 82 | static getRandomUUIDForTraceID(): string { |
| 76 | - deviceInfo.productModel | ||
| 77 | - return util.generateRandomUUID().toUpperCase().replace('-', '') | 83 | + return util.generateRandomUUID().toUpperCase().replace(/-/g, '') |
| 78 | } | 84 | } |
| 79 | } | 85 | } |
| @@ -17,6 +17,14 @@ export enum EmitterEventId { | @@ -17,6 +17,14 @@ export enum EmitterEventId { | ||
| 17 | 17 | ||
| 18 | // 关注,取消关注 | 18 | // 关注,取消关注 |
| 19 | PEOPLE_SHIP_ATTENTION = 7, | 19 | PEOPLE_SHIP_ATTENTION = 7, |
| 20 | + // 我的关注 为null | ||
| 21 | + MY_FOLLOW_EMPTY = 8, | ||
| 22 | + | ||
| 23 | + // 登录成功 | ||
| 24 | + LOGIN_SUCCESS = 8, | ||
| 25 | + | ||
| 26 | + // 换绑成功 | ||
| 27 | + PHONE_CHANGE_SUCCESS = 9, | ||
| 20 | 28 | ||
| 21 | // App回到前台 | 29 | // App回到前台 |
| 22 | APP_ENTER_FOREGROUD = 100, | 30 | APP_ENTER_FOREGROUD = 100, |
| @@ -72,6 +72,10 @@ export class UserDataLocal { | @@ -72,6 +72,10 @@ export class UserDataLocal { | ||
| 72 | SPHelper.default.save(UserDataLocal.USER_HEADER_URL, url) | 72 | SPHelper.default.save(UserDataLocal.USER_HEADER_URL, url) |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | + public static setUserType(type:string) { | ||
| 76 | + SPHelper.default.save(UserDataLocal.USER_Type, type) | ||
| 77 | + } | ||
| 78 | + | ||
| 75 | public static setUserFollowOperation(timestamp:string) { | 79 | public static setUserFollowOperation(timestamp:string) { |
| 76 | SPHelper.default.saveSync(UserDataLocal.USER_FOLLOW_OPERATION, timestamp) | 80 | SPHelper.default.saveSync(UserDataLocal.USER_FOLLOW_OPERATION, timestamp) |
| 77 | } | 81 | } |
| @@ -6,6 +6,9 @@ | @@ -6,6 +6,9 @@ | ||
| 6 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | 6 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", |
| 7 | "specifiers": { | 7 | "specifiers": { |
| 8 | "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | 8 | "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", |
| 9 | + "@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19", | ||
| 10 | + "@umeng/common@^1.0.21": "@umeng/common@1.0.21", | ||
| 11 | + "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 9 | "wdConstant@../wdConstant": "wdConstant@../wdConstant", | 12 | "wdConstant@../wdConstant": "wdConstant@../wdConstant", |
| 10 | "wdKit@../wdKit": "wdKit@../wdKit" | 13 | "wdKit@../wdKit": "wdKit@../wdKit" |
| 11 | }, | 14 | }, |
| @@ -16,6 +19,26 @@ | @@ -16,6 +19,26 @@ | ||
| 16 | "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | 19 | "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", |
| 17 | "registryType": "ohpm" | 20 | "registryType": "ohpm" |
| 18 | }, | 21 | }, |
| 22 | + "@umeng/analytics@1.0.19": { | ||
| 23 | + "name": "@umeng/analytics", | ||
| 24 | + "integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==", | ||
| 25 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har", | ||
| 26 | + "registryType": "ohpm" | ||
| 27 | + }, | ||
| 28 | + "@umeng/common@1.0.21": { | ||
| 29 | + "name": "@umeng/common", | ||
| 30 | + "integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==", | ||
| 31 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har", | ||
| 32 | + "registryType": "ohpm", | ||
| 33 | + "dependencies": { | ||
| 34 | + "libcommon.so": "./src/main/cpp/types/libcommon" | ||
| 35 | + } | ||
| 36 | + }, | ||
| 37 | + "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": { | ||
| 38 | + "name": "libcommon.so", | ||
| 39 | + "resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 40 | + "registryType": "local" | ||
| 41 | + }, | ||
| 19 | "wdConstant@../wdConstant": { | 42 | "wdConstant@../wdConstant": { |
| 20 | "name": "wdconstant", | 43 | "name": "wdconstant", |
| 21 | "resolved": "../wdConstant", | 44 | "resolved": "../wdConstant", |
| @@ -24,7 +47,11 @@ | @@ -24,7 +47,11 @@ | ||
| 24 | "wdKit@../wdKit": { | 47 | "wdKit@../wdKit": { |
| 25 | "name": "wdkit", | 48 | "name": "wdkit", |
| 26 | "resolved": "../wdKit", | 49 | "resolved": "../wdKit", |
| 27 | - "registryType": "local" | 50 | + "registryType": "local", |
| 51 | + "dependencies": { | ||
| 52 | + "@umeng/common": "^1.0.21", | ||
| 53 | + "@umeng/analytics": "^1.0.19" | ||
| 54 | + } | ||
| 28 | } | 55 | } |
| 29 | } | 56 | } |
| 30 | } | 57 | } |
| 1 | import { SpConstants } from 'wdConstant'; | 1 | import { SpConstants } from 'wdConstant'; |
| 2 | -import { DateTimeUtils, DeviceUtil, SPHelper, StringUtils } from 'wdKit'; | 2 | +import { AppUtils, DateTimeUtils, DeviceUtil, SPHelper, StringUtils } from 'wdKit'; |
| 3 | import { HttpUtils } from '../utils/HttpUtils'; | 3 | import { HttpUtils } from '../utils/HttpUtils'; |
| 4 | import { HostEnum, HostManager } from './HttpHostManager'; | 4 | import { HostEnum, HostManager } from './HttpHostManager'; |
| 5 | 5 | ||
| @@ -11,16 +11,16 @@ export class HttpParams { | @@ -11,16 +11,16 @@ export class HttpParams { | ||
| 11 | let headers: Record<string, string> = {}; | 11 | let headers: Record<string, string> = {}; |
| 12 | // 通用请求头 | 12 | // 通用请求头 |
| 13 | headers['User-Agent'] = 'Dalvik/2.1.0 (Linux; U; Android 13; 22101317C Build/TKQ1.221013.002)' // TODO | 13 | headers['User-Agent'] = 'Dalvik/2.1.0 (Linux; U; Android 13; 22101317C Build/TKQ1.221013.002)' // TODO |
| 14 | - headers['channel'] = 'rmrb_china_0000' // 自有渠道 | 14 | + headers['channel'] = AppUtils.getAppChannel() |
| 15 | headers['plat'] = DeviceUtil.getPlat() | 15 | headers['plat'] = DeviceUtil.getPlat() |
| 16 | headers['Content-Type'] = 'application/json; charset=utf-8' | 16 | headers['Content-Type'] = 'application/json; charset=utf-8' |
| 17 | headers['device_id'] = DeviceUtil.clientId() | 17 | headers['device_id'] = DeviceUtil.clientId() |
| 18 | headers['build_version'] = HttpParams.getVersion() | 18 | headers['build_version'] = HttpParams.getVersion() |
| 19 | headers['adcode'] = HttpUtils.getProvinceCode() | 19 | headers['adcode'] = HttpUtils.getProvinceCode() |
| 20 | headers['os_version'] = DeviceUtil.getOsVersion() | 20 | headers['os_version'] = DeviceUtil.getOsVersion() |
| 21 | - headers['system'] = 'Android' // TODO 后续是否新增鸿蒙标识 | ||
| 22 | - headers['versionCode'] = HttpParams.getVersionCode() | ||
| 23 | - headers['version_name'] = HttpParams.getVersionName() | 21 | + headers['system'] = AppUtils.getOSName() |
| 22 | + headers['versionCode'] = AppUtils.getAppVersionCode() | ||
| 23 | + headers['version_name'] = AppUtils.getAppVersionName() | ||
| 24 | headers['EagleEye-TraceID'] = DeviceUtil.getRandomUUIDForTraceID() | 24 | headers['EagleEye-TraceID'] = DeviceUtil.getRandomUUIDForTraceID() |
| 25 | headers['imei'] = DeviceUtil.clientId() | 25 | headers['imei'] = DeviceUtil.clientId() |
| 26 | headers['Accept-Language'] = 'zh' | 26 | headers['Accept-Language'] = 'zh' |
| @@ -441,6 +441,12 @@ export class HttpUrlUtils { | @@ -441,6 +441,12 @@ export class HttpUrlUtils { | ||
| 441 | return url; | 441 | return url; |
| 442 | } | 442 | } |
| 443 | 443 | ||
| 444 | + //游客评论合并 | ||
| 445 | + static visitorMergeComment() { | ||
| 446 | + let url = HttpUrlUtils.getHost() + "/api/rmrb-comment/comment/zh/c/visitorMerge"; | ||
| 447 | + return url; | ||
| 448 | + } | ||
| 449 | + | ||
| 444 | static getAppointmentListDataUrl() { | 450 | static getAppointmentListDataUrl() { |
| 445 | let url = HttpUrlUtils.getHost() + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH | 451 | let url = HttpUrlUtils.getHost() + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH |
| 446 | return url | 452 | return url |
| @@ -67,7 +67,7 @@ export class ProcessUtils { | @@ -67,7 +67,7 @@ export class ProcessUtils { | ||
| 67 | linkUrl: advert.linkUrl, | 67 | linkUrl: advert.linkUrl, |
| 68 | pageId: advert.pageId, | 68 | pageId: advert.pageId, |
| 69 | objectId: advert.objectId, | 69 | objectId: advert.objectId, |
| 70 | - objectType: advert.objectType, | 70 | + objectType: advert.objectType.toString(), |
| 71 | relId: advert.relId, | 71 | relId: advert.relId, |
| 72 | bottomNavId: advert.bottomNavId | 72 | bottomNavId: advert.bottomNavId |
| 73 | } as ContentDTO; | 73 | } as ContentDTO; |
| @@ -100,6 +100,9 @@ export class ProcessUtils { | @@ -100,6 +100,9 @@ export class ProcessUtils { | ||
| 100 | case ContentConstants.TYPE_LIVE: | 100 | case ContentConstants.TYPE_LIVE: |
| 101 | ProcessUtils.gotoLive(content) | 101 | ProcessUtils.gotoLive(content) |
| 102 | break | 102 | break |
| 103 | + case ContentConstants.TYPE_FOUR: | ||
| 104 | + ProcessUtils.gotoDefaultWeb(content); | ||
| 105 | + break | ||
| 103 | case ContentConstants.TYPE_AUDIO: | 106 | case ContentConstants.TYPE_AUDIO: |
| 104 | ProcessUtils.gotoAudio(content) | 107 | ProcessUtils.gotoAudio(content) |
| 105 | break; | 108 | break; |
| @@ -121,6 +124,7 @@ export class ProcessUtils { | @@ -121,6 +124,7 @@ export class ProcessUtils { | ||
| 121 | //动态详情页(动态图文) | 124 | //动态详情页(动态图文) |
| 122 | case ContentConstants.TYPE_FOURTEEN: | 125 | case ContentConstants.TYPE_FOURTEEN: |
| 123 | ProcessUtils.gotoDynamicDetailPage(content); | 126 | ProcessUtils.gotoDynamicDetailPage(content); |
| 127 | + break; | ||
| 124 | //动态详情页(动态视频) | 128 | //动态详情页(动态视频) |
| 125 | case ContentConstants.TYPE_FIFTEEN: | 129 | case ContentConstants.TYPE_FIFTEEN: |
| 126 | ProcessUtils.gotoDynamicDetailPage(content); | 130 | ProcessUtils.gotoDynamicDetailPage(content); |
| @@ -319,6 +323,8 @@ export class ProcessUtils { | @@ -319,6 +323,8 @@ export class ProcessUtils { | ||
| 319 | extra: { | 323 | extra: { |
| 320 | relType: content?.relType, | 324 | relType: content?.relType, |
| 321 | relId: content?.relId, | 325 | relId: content?.relId, |
| 326 | + extra: content?.extra, | ||
| 327 | + title: content?.newsTitle | ||
| 322 | } as ExtraDTO | 328 | } as ExtraDTO |
| 323 | } as Params, | 329 | } as Params, |
| 324 | }; | 330 | }; |
sight_harmony/commons/wdShareBase/.gitignore
0 → 100644
sight_harmony/commons/wdShareBase/Index.ets
0 → 100644
| 1 | +{ | ||
| 2 | + "apiType": "stageMode", | ||
| 3 | + "buildOption": { | ||
| 4 | + }, | ||
| 5 | + "buildOptionSet": [ | ||
| 6 | + { | ||
| 7 | + "name": "release", | ||
| 8 | + "arkOptions": { | ||
| 9 | + "obfuscation": { | ||
| 10 | + "ruleOptions": { | ||
| 11 | + "enable": true, | ||
| 12 | + "files": [ | ||
| 13 | + "./obfuscation-rules.txt" | ||
| 14 | + ] | ||
| 15 | + } | ||
| 16 | + } | ||
| 17 | + }, | ||
| 18 | + }, | ||
| 19 | + ], | ||
| 20 | + "targets": [ | ||
| 21 | + { | ||
| 22 | + "name": "default" | ||
| 23 | + } | ||
| 24 | + ] | ||
| 25 | +} |
| 1 | +# Define project specific obfuscation rules here. | ||
| 2 | +# You can include the obfuscation configuration files in the current module's build-profile.json5. | ||
| 3 | +# | ||
| 4 | +# For more details, see | ||
| 5 | +# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md | ||
| 6 | + | ||
| 7 | +# Obfuscation options: | ||
| 8 | +# -disable-obfuscation: disable all obfuscations | ||
| 9 | +# -enable-property-obfuscation: obfuscate the property names | ||
| 10 | +# -enable-toplevel-obfuscation: obfuscate the names in the global scope | ||
| 11 | +# -compact: remove unnecessary blank spaces and all line feeds | ||
| 12 | +# -remove-log: remove all console.* statements | ||
| 13 | +# -print-namecache: print the name cache that contains the mapping from the old names to new names | ||
| 14 | +# -apply-namecache: reuse the given cache file | ||
| 15 | + | ||
| 16 | +# Keep options: | ||
| 17 | +# -keep-property-name: specifies property names that you want to keep | ||
| 18 | +# -keep-global-name: specifies names that you want to keep in the global scope |
| 1 | + | ||
| 2 | +export const enum ShareType { | ||
| 3 | + System = 0, | ||
| 4 | + WeChat, | ||
| 5 | + QQ, | ||
| 6 | + Weibo, | ||
| 7 | + | ||
| 8 | +} | ||
| 9 | + | ||
| 10 | +export const enum ShareScene { | ||
| 11 | + System = 0, | ||
| 12 | + | ||
| 13 | + WeChatSession, | ||
| 14 | + WeChatTimeline, | ||
| 15 | + | ||
| 16 | + QQFriend, | ||
| 17 | + QQZone, | ||
| 18 | + | ||
| 19 | + Weibo, | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +export const enum ShareContentType { | ||
| 23 | + PrueText = 1, | ||
| 24 | + ImageAndText, | ||
| 25 | + Link, | ||
| 26 | +} | ||
| 27 | + | ||
| 28 | +export interface ShareContentText { | ||
| 29 | + text: string | ||
| 30 | +} | ||
| 31 | +export interface ShareContentImageAndText { | ||
| 32 | + title: string | ||
| 33 | + desc?: string | ||
| 34 | + imgURI: string | ||
| 35 | + | ||
| 36 | +} | ||
| 37 | +export interface ShareContentLink { | ||
| 38 | + title: string | ||
| 39 | + desc?: string | ||
| 40 | + link: string | ||
| 41 | + icon?: string | ||
| 42 | +} | ||
| 43 | + | ||
| 44 | +export type ShareContent = ShareContentText | ShareContentImageAndText | ShareContentLink |
| 1 | +import { ShareContent, ShareContentImageAndText, ShareContentLink, ShareContentText, | ||
| 2 | + ShareContentType, | ||
| 3 | + ShareScene } from '../Constant'; | ||
| 4 | +import { WDShareInterface } from '../WDShareInterface'; | ||
| 5 | +import { AsyncCallback } from '@kit.BasicServicesKit'; | ||
| 6 | +import { common } from '@kit.AbilityKit'; | ||
| 7 | +import { systemShare } from '@kit.ShareKit'; | ||
| 8 | +import { uniformTypeDescriptor as utd } from '@kit.ArkData'; | ||
| 9 | + | ||
| 10 | +export class WDSystemShare implements WDShareInterface { | ||
| 11 | + | ||
| 12 | + shareContent(scene: ShareScene, content: ShareContent, contentType: ShareContentType): Promise<string> { | ||
| 13 | + | ||
| 14 | + return new Promise((resolve, fail) => { | ||
| 15 | + try { | ||
| 16 | + | ||
| 17 | + let controller: systemShare.ShareController = new systemShare.ShareController(this.getShareData(content, contentType)); | ||
| 18 | + let context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext | ||
| 19 | + | ||
| 20 | + controller.on('dismiss', () => { | ||
| 21 | + | ||
| 22 | + resolve("dismiss") | ||
| 23 | + }); | ||
| 24 | + | ||
| 25 | + controller.show(context, { | ||
| 26 | + previewMode: systemShare.SharePreviewMode.DEFAULT, | ||
| 27 | + selectionMode: systemShare.SelectionMode.SINGLE | ||
| 28 | + }); | ||
| 29 | + | ||
| 30 | + console.log("分享控制器调用完成") | ||
| 31 | + } catch (e) { | ||
| 32 | + fail(e) | ||
| 33 | + } | ||
| 34 | + }) | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + getShareData(content: ShareContent, contentType: ShareContentType) : systemShare.SharedData { | ||
| 38 | + if (contentType === ShareContentType.PrueText) { | ||
| 39 | + let prueText = content as ShareContentText | ||
| 40 | + console.log("分享纯文本") | ||
| 41 | + return new systemShare.SharedData({ | ||
| 42 | + utd: utd.UniformDataType.PLAIN_TEXT, | ||
| 43 | + content: prueText.text | ||
| 44 | + }); | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + if (contentType === ShareContentType.ImageAndText) { | ||
| 48 | + let imageAndText = content as ShareContentImageAndText | ||
| 49 | + console.log("分享图片和文本") | ||
| 50 | + let data: systemShare.SharedData = new systemShare.SharedData({ | ||
| 51 | + utd: utd.UniformDataType.PLAIN_TEXT, | ||
| 52 | + content: imageAndText.title | ||
| 53 | + }); | ||
| 54 | + data.addRecord({ | ||
| 55 | + utd: utd.UniformDataType.PNG, | ||
| 56 | + uri: imageAndText.imgURI | ||
| 57 | + }); | ||
| 58 | + return data | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + console.log("分享链接和文本") | ||
| 62 | + let link = content as ShareContentLink | ||
| 63 | + let data: systemShare.SharedData = new systemShare.SharedData({ | ||
| 64 | + utd: utd.UniformDataType.PLAIN_TEXT, | ||
| 65 | + content: link.title | ||
| 66 | + }); | ||
| 67 | + data.addRecord({ | ||
| 68 | + utd: utd.UniformDataType.HYPERLINK, | ||
| 69 | + uri: link.link | ||
| 70 | + }); | ||
| 71 | + return data | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + | ||
| 75 | +} |
| 1 | +import { ShareContent, ShareContentType, ShareScene, ShareType } from './Constant' | ||
| 2 | +import { HashMap } from '@kit.ArkTS' | ||
| 3 | +import { WDShareInterface } from './WDShareInterface' | ||
| 4 | +import { WDSystemShare } from './System/WDSystemShare' | ||
| 5 | + | ||
| 6 | +export interface WDShareObject { | ||
| 7 | + to: ShareType, | ||
| 8 | + scene: ShareScene, | ||
| 9 | + type: ShareContentType, | ||
| 10 | + obj: ShareContent | ||
| 11 | +} | ||
| 12 | + | ||
| 13 | +export class WDShareBase { | ||
| 14 | + | ||
| 15 | + private static instance?: WDShareBase | ||
| 16 | + static getInstance() : WDShareBase { | ||
| 17 | + if (!WDShareBase.instance) { | ||
| 18 | + WDShareBase.instance = new WDShareBase() | ||
| 19 | + WDShareBase.instance.register() | ||
| 20 | + } | ||
| 21 | + return WDShareBase.instance | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + private handles: HashMap<ShareType, WDShareInterface> = new HashMap() | ||
| 25 | + | ||
| 26 | + register() { | ||
| 27 | + this.handles.set(ShareType.System, new WDSystemShare()) | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + share(obj: WDShareObject) : null | Promise<string> { | ||
| 31 | + let shareHandler: WDShareInterface = this.handles.get(obj.to) | ||
| 32 | + if (shareHandler) { | ||
| 33 | + return shareHandler.shareContent(obj.scene, obj.obj, obj.type) | ||
| 34 | + } | ||
| 35 | + return null | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + | ||
| 39 | + | ||
| 40 | + | ||
| 41 | +} |
| 1 | +import { ShareContent, ShareContentType, ShareScene } from './Constant' | ||
| 2 | +import { AsyncCallback } from '@kit.BasicServicesKit' | ||
| 3 | + | ||
| 4 | +export interface WDShareInterface { | ||
| 5 | + // shareContent(scene:ShareScene, content: ShareContent, callback: AsyncCallback<void>): void | ||
| 6 | + shareContent(scene:ShareScene, content: ShareContent, contentType: ShareContentType): Promise<string> | ||
| 7 | + | ||
| 8 | + | ||
| 9 | + | ||
| 10 | +} |
| 1 | +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; | ||
| 2 | + | ||
| 3 | +export default function localUnitTest() { | ||
| 4 | + describe('localUnitTest',() => { | ||
| 5 | + // Defines a test suite. Two parameters are supported: test suite name and test suite function. | ||
| 6 | + beforeAll(() => { | ||
| 7 | + // Presets an action, which is performed only once before all test cases of the test suite start. | ||
| 8 | + // This API supports only one parameter: preset action function. | ||
| 9 | + }); | ||
| 10 | + beforeEach(() => { | ||
| 11 | + // Presets an action, which is performed before each unit test case starts. | ||
| 12 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 13 | + // This API supports only one parameter: preset action function. | ||
| 14 | + }); | ||
| 15 | + afterEach(() => { | ||
| 16 | + // Presets a clear action, which is performed after each unit test case ends. | ||
| 17 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 18 | + // This API supports only one parameter: clear action function. | ||
| 19 | + }); | ||
| 20 | + afterAll(() => { | ||
| 21 | + // Presets a clear action, which is performed after all test cases of the test suite end. | ||
| 22 | + // This API supports only one parameter: clear action function. | ||
| 23 | + }); | ||
| 24 | + it('assertContain', 0, () => { | ||
| 25 | + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. | ||
| 26 | + let a = 'abc'; | ||
| 27 | + let b = 'b'; | ||
| 28 | + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. | ||
| 29 | + expect(a).assertContain(b); | ||
| 30 | + expect(a).assertEqual(a); | ||
| 31 | + }); | ||
| 32 | + }); | ||
| 33 | +} |
| @@ -9,13 +9,17 @@ import router from '@ohos.router'; | @@ -9,13 +9,17 @@ import router from '@ohos.router'; | ||
| 9 | import Url from '@ohos.url' | 9 | import Url from '@ohos.url' |
| 10 | import { ContentDTO, PhotoListBean } from 'wdBean'; | 10 | import { ContentDTO, PhotoListBean } from 'wdBean'; |
| 11 | import { handleJsCallAppService } from './JsCallAppService' | 11 | import { handleJsCallAppService } from './JsCallAppService' |
| 12 | - | 12 | +import { HttpUtils } from 'wdNetwork/Index'; |
| 13 | const TAG = 'JsBridgeBiz' | 13 | const TAG = 'JsBridgeBiz' |
| 14 | 14 | ||
| 15 | class AppInfo { | 15 | class AppInfo { |
| 16 | plat: string = '' | 16 | plat: string = '' |
| 17 | system: string = '' | 17 | system: string = '' |
| 18 | networkStatus: number = 1 | 18 | networkStatus: number = 1 |
| 19 | + screenStatusBarHeight: number = 40 // TODO 这里需要动态获取 | ||
| 20 | + screenTabbarSafeHeight: number = 42 // TODO 这里需要动态获取 | ||
| 21 | + imei: string = HttpUtils.getImei() | ||
| 22 | + device_id: string = HttpUtils.getDeviceId() | ||
| 19 | // TODO 完善 | 23 | // TODO 完善 |
| 20 | } | 24 | } |
| 21 | 25 |
| @@ -4,6 +4,7 @@ import { Logger } from 'wdKit/Index'; | @@ -4,6 +4,7 @@ import { Logger } from 'wdKit/Index'; | ||
| 4 | import { performJSCallNative } from './JsBridgeBiz'; | 4 | import { performJSCallNative } from './JsBridgeBiz'; |
| 5 | import { H5CallNativeType } from './H5CallNativeType'; | 5 | import { H5CallNativeType } from './H5CallNativeType'; |
| 6 | import { Message } from 'wdJsBridge/src/main/ets/bean/Message'; | 6 | import { Message } from 'wdJsBridge/src/main/ets/bean/Message'; |
| 7 | +import { DateTimeUtils } from 'wdKit' | ||
| 7 | 8 | ||
| 8 | const TAG = 'WdWebLocalComponent'; | 9 | const TAG = 'WdWebLocalComponent'; |
| 9 | 10 | ||
| @@ -22,6 +23,13 @@ export struct WdWebLocalComponent { | @@ -22,6 +23,13 @@ export struct WdWebLocalComponent { | ||
| 22 | @State positionLeft: number = 0 | 23 | @State positionLeft: number = 0 |
| 23 | @State positionTop: number = 0 | 24 | @State positionTop: number = 0 |
| 24 | @State videoLandscape: string = '1' | 25 | @State videoLandscape: string = '1' |
| 26 | + @State curRate: PlaybackSpeed = PlaybackSpeed.Speed_Forward_1_00_X | ||
| 27 | + @State sliderStartTime: string = ''; | ||
| 28 | + @State currentTime: number = 0; | ||
| 29 | + @State durationTime: number = 0; | ||
| 30 | + @State durationStringTime: string = ''; | ||
| 31 | + @State isPause: boolean = true; | ||
| 32 | + controller: VideoController = new VideoController() | ||
| 25 | 33 | ||
| 26 | build() { | 34 | build() { |
| 27 | Column() { | 35 | Column() { |
| @@ -77,22 +85,87 @@ export struct WdWebLocalComponent { | @@ -77,22 +85,87 @@ export struct WdWebLocalComponent { | ||
| 77 | }) | 85 | }) |
| 78 | 86 | ||
| 79 | if (this.videoUrl) { | 87 | if (this.videoUrl) { |
| 80 | - Video({ src: this.videoUrl }) | ||
| 81 | - .autoPlay(true) | ||
| 82 | - .objectFit(ImageFit.Contain) | ||
| 83 | - .width(this.positionWidth) | ||
| 84 | - .height(this.positionHeight) | ||
| 85 | - .borderRadius(5) | ||
| 86 | - .alignRules({ | ||
| 87 | - top: { anchor: "__container__", align: VerticalAlign.Top }, | 88 | + Stack({ alignContent: Alignment.Bottom }) { |
| 89 | + Video({ | ||
| 90 | + src: this.videoUrl, | ||
| 91 | + currentProgressRate: this.curRate, | ||
| 92 | + controller: this.controller | ||
| 88 | }) | 93 | }) |
| 89 | - .offset({ | ||
| 90 | - x: this.positionLeft, | ||
| 91 | - y: this.positionTop | ||
| 92 | - }) | ||
| 93 | - .id("video") | ||
| 94 | - } | 94 | + .borderRadius(5) |
| 95 | + .controls(false) | ||
| 96 | + .autoPlay(true) | ||
| 97 | + .objectFit(ImageFit.Contain) | ||
| 98 | + .onStart(() => { | ||
| 99 | + this.isPause = false | ||
| 100 | + }) | ||
| 101 | + .onPause(() => { | ||
| 102 | + this.isPause = true | ||
| 103 | + }) | ||
| 104 | + .onPrepared((event) => { | ||
| 105 | + if (event) { | ||
| 106 | + this.durationTime = event.duration | ||
| 107 | + } | ||
| 108 | + }) | ||
| 109 | + .onUpdate((event) => { | ||
| 110 | + if (event) { | ||
| 111 | + this.currentTime = event.time | ||
| 112 | + } | ||
| 113 | + }) | ||
| 114 | + Row() { | ||
| 115 | + Image($r(this.isPause ? 'app.media.icon_play' : 'app.media.icon_pause')) | ||
| 116 | + .width(24) | ||
| 117 | + .height(24) | ||
| 118 | + .onClick(()=>{ | ||
| 119 | + if(this.isPause){ | ||
| 120 | + this.controller.start() | ||
| 121 | + }else{ | ||
| 122 | + this.controller.pause() | ||
| 123 | + } | ||
| 124 | + }) | ||
| 125 | + Row() { | ||
| 126 | + Text(DateTimeUtils.getFormattedDuration(this.currentTime * 1000)).fontSize(12).fontColor(Color.White).fontWeight(600) | ||
| 127 | + Slider({ | ||
| 128 | + value: this.currentTime, | ||
| 129 | + min: 0, | ||
| 130 | + max: this.durationTime | ||
| 131 | + }) | ||
| 132 | + .width("50%") | ||
| 133 | + .selectedColor('#ED2800') | ||
| 134 | + .margin({ left: 4, right: 4 }) | ||
| 135 | + // .blockStyle({ | ||
| 136 | + // type: SliderBlockType.IMAGE, | ||
| 137 | + // image: $r('app.media.slider_block') | ||
| 138 | + // }) | ||
| 139 | + // .blockSize({ width: 18, height: 12 }) | ||
| 140 | + .onChange((value: number, mode: SliderChangeMode) => { | ||
| 141 | + this.controller.setCurrentTime(value); | ||
| 142 | + }) | ||
| 143 | + Text(DateTimeUtils.getFormattedDuration(this.durationTime * 1000)).fontSize(12).fontColor(Color.White).fontWeight(600) | ||
| 144 | + } | ||
| 145 | + .justifyContent(FlexAlign.Center) | ||
| 95 | 146 | ||
| 147 | + Image($r('app.media.icon_full_screen')) | ||
| 148 | + .width(24) | ||
| 149 | + .height(24) | ||
| 150 | + .onClick(()=>{ | ||
| 151 | + this.controller.requestFullscreen(true) | ||
| 152 | + }) | ||
| 153 | + } | ||
| 154 | + .opacity(0.8) | ||
| 155 | + .width("100%") | ||
| 156 | + .justifyContent(FlexAlign.SpaceAround) | ||
| 157 | + } | ||
| 158 | + .width(this.positionWidth) | ||
| 159 | + .height(this.positionHeight) | ||
| 160 | + .alignRules({ | ||
| 161 | + top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 162 | + }) | ||
| 163 | + .offset({ | ||
| 164 | + x: this.positionLeft, | ||
| 165 | + y: this.positionTop | ||
| 166 | + }) | ||
| 167 | + .id("video") | ||
| 168 | + } | ||
| 96 | } | 169 | } |
| 97 | }.width('100%') | 170 | }.width('100%') |
| 98 | .height(this.webHeight) | 171 | .height(this.webHeight) |
289 Bytes
339 Bytes
293 Bytes
1.79 KB
497 Bytes
| @@ -130,8 +130,6 @@ export { LiveInfoDTO } from './src/main/ets/bean/detail/LiveInfoDTO'; | @@ -130,8 +130,6 @@ export { LiveInfoDTO } from './src/main/ets/bean/detail/LiveInfoDTO'; | ||
| 130 | 130 | ||
| 131 | export { postRecommendListParams } from './src/main/ets/bean/detail/postRecommendListParams'; | 131 | export { postRecommendListParams } from './src/main/ets/bean/detail/postRecommendListParams'; |
| 132 | 132 | ||
| 133 | -export { postThemeListParams } from './src/main/ets/bean/detail/postThemeListParams'; | ||
| 134 | - | ||
| 135 | export { LiveDTO } from './src/main/ets/bean/peoples/LiveDTO'; | 133 | export { LiveDTO } from './src/main/ets/bean/peoples/LiveDTO'; |
| 136 | 134 | ||
| 137 | export { contentVideosDTO } from './src/main/ets/bean/content/contentVideosDTO'; | 135 | export { contentVideosDTO } from './src/main/ets/bean/content/contentVideosDTO'; |
| @@ -165,3 +163,7 @@ export { | @@ -165,3 +163,7 @@ export { | ||
| 165 | AttentionBatchDTO, | 163 | AttentionBatchDTO, |
| 166 | CreatorDTO | 164 | CreatorDTO |
| 167 | } from './src/main/ets/bean/peoples/AttentionBatchDTO'; | 165 | } from './src/main/ets/bean/peoples/AttentionBatchDTO'; |
| 166 | + | ||
| 167 | +export { GoldenPositionExtraBean } from './src/main/ets/bean/content/GoldenPositionExtraBean'; | ||
| 168 | +export { ClassBean } from './src/main/ets/bean/content/ClassBean'; | ||
| 169 | +export { CreatorsBean } from './src/main/ets/bean/content/CreatorsBean'; |
| 1 | +/** | ||
| 2 | + * @Description: 广告扩展信息的解析模型 | ||
| 3 | + * @Author: | ||
| 4 | + * @Email: liyubing@wondertek.com.cn | ||
| 5 | + * @CreateDate: | ||
| 6 | + * @UpdateRemark: 更新说明 | ||
| 7 | + * @Version: 1.0 | ||
| 8 | + */ | ||
| 9 | +export interface AdvExtraData { | ||
| 10 | + | ||
| 11 | + | ||
| 12 | + itemTopImage: string; | ||
| 13 | + itemMore: AdvExtraItemData; | ||
| 14 | + item: AdvExtraItemData[] | ||
| 15 | + | ||
| 16 | +} | ||
| 17 | + | ||
| 18 | +export interface AdvExtraItemData { | ||
| 19 | +/** | ||
| 20 | + * 图片地址 | ||
| 21 | + */ | ||
| 22 | + image: string; | ||
| 23 | + /** | ||
| 24 | + * 标题 | ||
| 25 | + */ | ||
| 26 | + title: string ; | ||
| 27 | + /** | ||
| 28 | + * 跳转地址 | ||
| 29 | + */ | ||
| 30 | + linkUrl: string; | ||
| 31 | + /** | ||
| 32 | + * 跳转类型 | ||
| 33 | + */ | ||
| 34 | + linkType: string; | ||
| 35 | + | ||
| 36 | +} |
| @@ -17,4 +17,6 @@ export interface ExtraDTO extends ItemDTO { | @@ -17,4 +17,6 @@ export interface ExtraDTO extends ItemDTO { | ||
| 17 | photoList: PhotoListBean[]; | 17 | photoList: PhotoListBean[]; |
| 18 | swiperIndex?: number | 18 | swiperIndex?: number |
| 19 | commentId?: string; | 19 | commentId?: string; |
| 20 | + extra?:string | ||
| 21 | + title: string | ||
| 20 | } | 22 | } |
| 1 | +import { FullColumnImgUrlDTO } from '../detail/FullColumnImgUrlDTO'; | ||
| 2 | +import { LiveInfoDTO } from '../detail/LiveInfoDTO'; | ||
| 3 | +import { VideoInfoDTO } from '../detail/VideoInfoDTO'; | ||
| 4 | +import { InteractDataDTO } from './InteractDataDTO'; | ||
| 5 | +import { slideShows } from '../morningevening/slideShows'; | ||
| 6 | +import { VoiceInfoDTO } from '../detail/VoiceInfoDTO'; | ||
| 7 | +import { RmhInfoDTO } from '../detail/RmhInfoDTO'; | ||
| 8 | +import { commentInfo } from './commentInfo'; | ||
| 9 | +import { ArrayList } from '@kit.ArkTS'; | ||
| 10 | + | ||
| 11 | +export interface ClassBean { | ||
| 12 | + secondClassifyName:string | ||
| 13 | + classifyName:string | ||
| 14 | +} |
| @@ -77,7 +77,11 @@ export interface ContentDTO { | @@ -77,7 +77,11 @@ export interface ContentDTO { | ||
| 77 | newTags: string; | 77 | newTags: string; |
| 78 | titleShow?: number; | 78 | titleShow?: number; |
| 79 | isSearch?: boolean; // 是否是搜索的结果,区分搜索和主页的数据 | 79 | isSearch?: boolean; // 是否是搜索的结果,区分搜索和主页的数据 |
| 80 | + isCollection?: boolean; // 是否是收藏的结果,区分搜索和主页的数据 | ||
| 80 | commentInfo?: commentInfo | 81 | commentInfo?: commentInfo |
| 81 | //底部导航栏 id(用于频道跳转) | 82 | //底部导航栏 id(用于频道跳转) |
| 82 | bottomNavId:string; | 83 | bottomNavId:string; |
| 84 | + // 链接类型: 0:无链接;1:内链(文章);2:外链 | ||
| 85 | + openType:string | ||
| 86 | + extra:string | ||
| 83 | } | 87 | } |
| 1 | +import { ArrayList } from '@kit.ArkTS'; | ||
| 2 | +import { ClassBean } from './ClassBean'; | ||
| 3 | +import { CreatorsBean } from './CreatorsBean'; | ||
| 4 | + | ||
| 5 | +export interface GoldenPositionExtraBean { | ||
| 6 | + sort:number | ||
| 7 | + pageNum:number | ||
| 8 | + pageSize:number | ||
| 9 | + channelId:string | ||
| 10 | + topicId:string | ||
| 11 | + keyWord:string | ||
| 12 | + aggregateType:string | ||
| 13 | + poolCode:string | ||
| 14 | + showPublishStartTime:string | ||
| 15 | + showPublishEndTime:string | ||
| 16 | + keywordsType:string | ||
| 17 | + keywords:ArrayList<string> | ||
| 18 | + classifys: ArrayList<ClassBean> | ||
| 19 | + creatorTags: ArrayList<CreatorsBean> | ||
| 20 | +} |
| @@ -159,7 +159,7 @@ export interface LiveDetailsBean { | @@ -159,7 +159,7 @@ export interface LiveDetailsBean { | ||
| 159 | } | 159 | } |
| 160 | */ | 160 | */ |
| 161 | liveInfo: LiveInfo | 161 | liveInfo: LiveInfo |
| 162 | - fullColumnImgUrls: Array<FullColumnImgUrls> | 162 | + fullColumnImgUrls: Array<FullColumnImgUrlBean> |
| 163 | newsTitle: string | 163 | newsTitle: string |
| 164 | newsId: string | 164 | newsId: string |
| 165 | newIntroduction: string | 165 | newIntroduction: string |
| @@ -186,8 +186,12 @@ export interface MLive { | @@ -186,8 +186,12 @@ export interface MLive { | ||
| 186 | mliveId: string | 186 | mliveId: string |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | -export interface FullColumnImgUrls { | 189 | +export interface FullColumnImgUrlBean { |
| 190 | url: string | 190 | url: string |
| 191 | + height: string | ||
| 192 | + landscape: number | ||
| 193 | + size: string | ||
| 194 | + weight: string | ||
| 191 | } | 195 | } |
| 192 | 196 | ||
| 193 | export interface Vlive { | 197 | export interface Vlive { |
| 1 | +import { FullColumnImgUrlBean } from './LiveDetailsBean' | ||
| 2 | + | ||
| 1 | export interface LiveRoomBean { | 3 | export interface LiveRoomBean { |
| 2 | pageNum: number | 4 | pageNum: number |
| 3 | pageSize: number | 5 | pageSize: number |
| @@ -15,6 +17,7 @@ export interface LiveRoomItemBean { | @@ -15,6 +17,7 @@ export interface LiveRoomItemBean { | ||
| 15 | isWall: number | 17 | isWall: number |
| 16 | //是否置顶 1置顶0不置顶 | 18 | //是否置顶 1置顶0不置顶 |
| 17 | isTop: number | 19 | isTop: number |
| 20 | + //guest :嘉宾,host:主持人 | ||
| 18 | role: string | 21 | role: string |
| 19 | //ZH_TEXT_AND_IMAGE_MSG :图文,ZH_TEXT_MSG:文本,ZH_VIDEO_MSG:视频,ZH_AUDIO_MSG:音频 | 22 | //ZH_TEXT_AND_IMAGE_MSG :图文,ZH_TEXT_MSG:文本,ZH_VIDEO_MSG:视频,ZH_AUDIO_MSG:音频 |
| 20 | dataType: string | 23 | dataType: string |
| @@ -28,5 +31,7 @@ export interface LiveRoomItemBean { | @@ -28,5 +31,7 @@ export interface LiveRoomItemBean { | ||
| 28 | duration: number | 31 | duration: number |
| 29 | //音频地址 | 32 | //音频地址 |
| 30 | audioUrl: string | 33 | audioUrl: string |
| 34 | + //详情页面插入数据bean | ||
| 35 | + fullColumnImgUrlDto: FullColumnImgUrlBean | ||
| 31 | 36 | ||
| 32 | } | 37 | } |
| @@ -25,6 +25,7 @@ import { Card2Component } from './cardview/Card2Component'; | @@ -25,6 +25,7 @@ import { Card2Component } from './cardview/Card2Component'; | ||
| 25 | import { Card5Component } from './cardview/Card5Component'; | 25 | import { Card5Component } from './cardview/Card5Component'; |
| 26 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 26 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| 27 | import { AdvCardParser } from './cardViewAdv/AdvCardParser'; | 27 | import { AdvCardParser } from './cardViewAdv/AdvCardParser'; |
| 28 | +import PageModel from '../viewmodel/PageModel'; | ||
| 28 | 29 | ||
| 29 | /** | 30 | /** |
| 30 | * comp适配器. | 31 | * comp适配器. |
| @@ -34,7 +35,9 @@ import { AdvCardParser } from './cardViewAdv/AdvCardParser'; | @@ -34,7 +35,9 @@ import { AdvCardParser } from './cardViewAdv/AdvCardParser'; | ||
| 34 | @Component | 35 | @Component |
| 35 | export struct CompParser { | 36 | export struct CompParser { |
| 36 | @State compDTO: CompDTO = {} as CompDTO | 37 | @State compDTO: CompDTO = {} as CompDTO |
| 37 | - compIndex: number = 0; | 38 | + |
| 39 | + @State private pageModel: PageModel = new PageModel(); | ||
| 40 | + @State compIndex: number = 0; | ||
| 38 | 41 | ||
| 39 | build() { | 42 | build() { |
| 40 | Column() { | 43 | Column() { |
| @@ -44,7 +47,7 @@ export struct CompParser { | @@ -44,7 +47,7 @@ export struct CompParser { | ||
| 44 | 47 | ||
| 45 | @Builder | 48 | @Builder |
| 46 | componentBuilder(compDTO: CompDTO, compIndex: number) { | 49 | componentBuilder(compDTO: CompDTO, compIndex: number) { |
| 47 | - // if (compDTO.operDataList[0]?.objectType !== '3' && compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口 | 50 | + //if (compDTO.operDataList[0]?.objectType !== '3' && compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口 |
| 48 | if (compDTO.compStyle === CompStyle.Label_03) { | 51 | if (compDTO.compStyle === CompStyle.Label_03) { |
| 49 | LabelComponent({ compDTO: compDTO }) | 52 | LabelComponent({ compDTO: compDTO }) |
| 50 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 53 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| @@ -77,8 +80,8 @@ export struct CompParser { | @@ -77,8 +80,8 @@ export struct CompParser { | ||
| 77 | ZhSingleRow04({ compDTO: compDTO }) | 80 | ZhSingleRow04({ compDTO: compDTO }) |
| 78 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 81 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 79 | } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_05) { | 82 | } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_05) { |
| 80 | - ZhSingleRow05({ compDTO }) | ||
| 81 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 83 | + // ZhSingleRow05({ compDTO }) |
| 84 | + // Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 82 | } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_06) { | 85 | } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_06) { |
| 83 | ZhSingleRow06({ compDTO }) | 86 | ZhSingleRow06({ compDTO }) |
| 84 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 87 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| @@ -100,7 +103,8 @@ export struct CompParser { | @@ -100,7 +103,8 @@ export struct CompParser { | ||
| 100 | ZhSingleColumn09({ compDTO }) | 103 | ZhSingleColumn09({ compDTO }) |
| 101 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 104 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 102 | } else if (compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 | 105 | } else if (compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 |
| 103 | - AdvCardParser({compDTO}) | 106 | + AdvCardParser({pageModel:this.pageModel,compDTO}) |
| 107 | + //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 16, right: 16 }) | ||
| 104 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 108 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 105 | } else if (!Number.isNaN(Number(compDTO.compStyle))) { | 109 | } else if (!Number.isNaN(Number(compDTO.compStyle))) { |
| 106 | CardParser({ contentDTO: compDTO.operDataList[0] }); | 110 | CardParser({ contentDTO: compDTO.operDataList[0] }); |
| @@ -119,6 +123,6 @@ export struct CompParser { | @@ -119,6 +123,6 @@ export struct CompParser { | ||
| 119 | } | 123 | } |
| 120 | } | 124 | } |
| 121 | 125 | ||
| 122 | - // } | 126 | + // } |
| 123 | } | 127 | } |
| 124 | 128 |
| 1 | -import { AccountManagerUtils, Logger, DateTimeUtils, SPHelper, NumberFormatterUtils } from 'wdKit'; | 1 | +import { AccountManagerUtils, Logger, DateTimeUtils, SPHelper, NumberFormatterUtils, DisplayUtils } from 'wdKit'; |
| 2 | import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; | 2 | import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; |
| 3 | import { ContentDetailDTO,postBatchAttentionStatusParams, | 3 | import { ContentDetailDTO,postBatchAttentionStatusParams, |
| 4 | PhotoListBean, | 4 | PhotoListBean, |
| @@ -53,7 +53,7 @@ export struct DynamicDetailComponent { | @@ -53,7 +53,7 @@ export struct DynamicDetailComponent { | ||
| 53 | //跳转 | 53 | //跳转 |
| 54 | private mJumpInfo: ContentDTO = {} as ContentDTO; | 54 | private mJumpInfo: ContentDTO = {} as ContentDTO; |
| 55 | 55 | ||
| 56 | - @State publishCommentModel: publishCommentModel = new publishCommentModel() | 56 | + |
| 57 | 57 | ||
| 58 | async aboutToAppear() { | 58 | async aboutToAppear() { |
| 59 | await this.getContentDetailData() | 59 | await this.getContentDetailData() |
| @@ -83,7 +83,7 @@ export struct DynamicDetailComponent { | @@ -83,7 +83,7 @@ export struct DynamicDetailComponent { | ||
| 83 | Image($r('app.media.ic_news_detail_division')) | 83 | Image($r('app.media.ic_news_detail_division')) |
| 84 | .width('100%') | 84 | .width('100%') |
| 85 | .height($r('app.float.margin_7')) | 85 | .height($r('app.float.margin_7')) |
| 86 | - .margin({left: $r('app.float.margin_16'), right: $r('app.float.margin_16')} ) | 86 | + .padding({left: $r('app.float.margin_16'), right: $r('app.float.margin_16')} ) |
| 87 | Stack({ alignContent: Alignment.Bottom }) { | 87 | Stack({ alignContent: Alignment.Bottom }) { |
| 88 | Scroll(this.scroller) { | 88 | Scroll(this.scroller) { |
| 89 | Column() { | 89 | Column() { |
| @@ -97,15 +97,29 @@ export struct DynamicDetailComponent { | @@ -97,15 +97,29 @@ export struct DynamicDetailComponent { | ||
| 97 | .height($r('app.float.margin_32')) | 97 | .height($r('app.float.margin_32')) |
| 98 | .objectFit(ImageFit.Cover) | 98 | .objectFit(ImageFit.Cover) |
| 99 | .borderRadius($r('app.float.margin_16')) | 99 | .borderRadius($r('app.float.margin_16')) |
| 100 | - Image($r('app.media.icon_border_test')) | 100 | + Image(this.contentDetailData.rmhInfo?.honoraryIcon) |
| 101 | .width($r('app.float.margin_48')) | 101 | .width($r('app.float.margin_48')) |
| 102 | .height($r('app.float.margin_48')) | 102 | .height($r('app.float.margin_48')) |
| 103 | .objectFit(ImageFit.Cover) | 103 | .objectFit(ImageFit.Cover) |
| 104 | .borderRadius($r('app.float.margin_24')) | 104 | .borderRadius($r('app.float.margin_24')) |
| 105 | + if(!StringUtils.isEmpty(this.contentDetailData.rmhInfo?.authIcon)){ | ||
| 106 | + Stack() { | ||
| 107 | + Image(this.contentDetailData.rmhInfo?.authIcon) | ||
| 108 | + .width($r('app.float.vp_12')) | ||
| 109 | + .height($r('app.float.vp_12')) | ||
| 110 | + .objectFit(ImageFit.Cover) | ||
| 111 | + } | ||
| 112 | + .width($r('app.float.margin_48')) | ||
| 113 | + .height($r('app.float.margin_48')) | ||
| 114 | + .alignContent(Alignment.BottomEnd) | ||
| 115 | + } | ||
| 105 | } | 116 | } |
| 106 | .width($r('app.float.margin_48')) | 117 | .width($r('app.float.margin_48')) |
| 107 | .height($r('app.float.margin_48')) | 118 | .height($r('app.float.margin_48')) |
| 108 | .alignContent(Alignment.Center) | 119 | .alignContent(Alignment.Center) |
| 120 | + .onClick(() => { | ||
| 121 | + ProcessUtils.gotoPeopleShipHomePage(this.contentDetailData.rmhInfo == null ?"":this.contentDetailData.rmhInfo.rmhId) | ||
| 122 | + }) | ||
| 109 | Column(){ | 123 | Column(){ |
| 110 | //昵称 | 124 | //昵称 |
| 111 | Text(this.contentDetailData.rmhInfo?.rmhName) | 125 | Text(this.contentDetailData.rmhInfo?.rmhName) |
| @@ -128,7 +142,7 @@ export struct DynamicDetailComponent { | @@ -128,7 +142,7 @@ export struct DynamicDetailComponent { | ||
| 128 | .margin({right: $r('app.float.margin_6')}) | 142 | .margin({right: $r('app.float.margin_6')}) |
| 129 | if(!StringUtils.isEmpty(this.followStatus)){ | 143 | if(!StringUtils.isEmpty(this.followStatus)){ |
| 130 | if (this.followStatus == '0') { | 144 | if (this.followStatus == '0') { |
| 131 | - Text('关注') | 145 | + Text('+关注') |
| 132 | .width($r('app.float.margin_54')) | 146 | .width($r('app.float.margin_54')) |
| 133 | .height($r('app.float.margin_24')) | 147 | .height($r('app.float.margin_24')) |
| 134 | .textAlign(TextAlign.Center) | 148 | .textAlign(TextAlign.Center) |
| @@ -147,7 +161,8 @@ export struct DynamicDetailComponent { | @@ -147,7 +161,8 @@ export struct DynamicDetailComponent { | ||
| 147 | .textAlign(TextAlign.Center) | 161 | .textAlign(TextAlign.Center) |
| 148 | .fontSize($r('app.float.font_size_12')) | 162 | .fontSize($r('app.float.font_size_12')) |
| 149 | .borderRadius($r('app.float.vp_3')) | 163 | .borderRadius($r('app.float.vp_3')) |
| 150 | - .borderColor($r('app.color.color_CCCCCC')) | 164 | + .borderColor($r('app.color.color_CCCCCC_1A')) |
| 165 | + .backgroundColor($r('app.color.color_CCCCCC_1A')) | ||
| 151 | .fontColor($r('app.color.color_CCCCCC')) | 166 | .fontColor($r('app.color.color_CCCCCC')) |
| 152 | .onClick(() => { | 167 | .onClick(() => { |
| 153 | this.handleAccention() | 168 | this.handleAccention() |
| @@ -275,8 +290,8 @@ export struct DynamicDetailComponent { | @@ -275,8 +290,8 @@ export struct DynamicDetailComponent { | ||
| 275 | Image(this.contentDetailData.fullColumnImgUrls!= null && this.contentDetailData.fullColumnImgUrls.length>0&&!StringUtils.isEmpty(this.contentDetailData.fullColumnImgUrls[0].url)? | 290 | Image(this.contentDetailData.fullColumnImgUrls!= null && this.contentDetailData.fullColumnImgUrls.length>0&&!StringUtils.isEmpty(this.contentDetailData.fullColumnImgUrls[0].url)? |
| 276 | this.contentDetailData.fullColumnImgUrls[0].url: | 291 | this.contentDetailData.fullColumnImgUrls[0].url: |
| 277 | this.contentDetailData.videoInfo[0].firstFrameImageUri) | 292 | this.contentDetailData.videoInfo[0].firstFrameImageUri) |
| 278 | - .width(CommonConstants.FULL_WIDTH) | ||
| 279 | - .aspectRatio(16 / 9) | 293 | + .width(DisplayUtils.getDeviceWidth()- 32) |
| 294 | + .height((DisplayUtils.getDeviceWidth()-32)* 9 / 16) | ||
| 280 | .borderRadius($r('app.float.image_border_radius')) | 295 | .borderRadius($r('app.float.image_border_radius')) |
| 281 | CardMediaInfo({ contentDTO: this.mJumpInfo }) | 296 | CardMediaInfo({ contentDTO: this.mJumpInfo }) |
| 282 | } | 297 | } |
| @@ -291,7 +306,8 @@ export struct DynamicDetailComponent { | @@ -291,7 +306,8 @@ export struct DynamicDetailComponent { | ||
| 291 | Image(this.contentDetailData.fullColumnImgUrls!= null && this.contentDetailData.fullColumnImgUrls.length>0&&!StringUtils.isEmpty(this.contentDetailData.fullColumnImgUrls[0].url)? | 306 | Image(this.contentDetailData.fullColumnImgUrls!= null && this.contentDetailData.fullColumnImgUrls.length>0&&!StringUtils.isEmpty(this.contentDetailData.fullColumnImgUrls[0].url)? |
| 292 | this.contentDetailData.fullColumnImgUrls[0].url: | 307 | this.contentDetailData.fullColumnImgUrls[0].url: |
| 293 | this.contentDetailData.videoInfo[0].firstFrameImageUri) | 308 | this.contentDetailData.videoInfo[0].firstFrameImageUri) |
| 294 | - .width(CommonConstants.FULL_WIDTH) | 309 | + .width(DisplayUtils.getDeviceWidth()/2) |
| 310 | + .height(DisplayUtils.getDeviceWidth()/2* 4 / 3) | ||
| 295 | .borderRadius($r('app.float.image_border_radius')) | 311 | .borderRadius($r('app.float.image_border_radius')) |
| 296 | CardMediaInfo({ contentDTO: this.mJumpInfo }) | 312 | CardMediaInfo({ contentDTO: this.mJumpInfo }) |
| 297 | } | 313 | } |
| @@ -299,7 +315,7 @@ export struct DynamicDetailComponent { | @@ -299,7 +315,7 @@ export struct DynamicDetailComponent { | ||
| 299 | } | 315 | } |
| 300 | } | 316 | } |
| 301 | } | 317 | } |
| 302 | - .margin({ left: $r('app.float.margin_16'),right: $r('app.float.margin_16'),top: $r('app.float.margin_8')}) | 318 | + .padding({ left: this.contentDetailData.videoInfo[0].videoLandScape === 1?0: 25,top: $r('app.float.margin_8')}) |
| 303 | .onClick((event: ClickEvent) => { | 319 | .onClick((event: ClickEvent) => { |
| 304 | ProcessUtils.processPage(this.mJumpInfo) | 320 | ProcessUtils.processPage(this.mJumpInfo) |
| 305 | }) | 321 | }) |
| @@ -311,8 +327,8 @@ export struct DynamicDetailComponent { | @@ -311,8 +327,8 @@ export struct DynamicDetailComponent { | ||
| 311 | .fontSize($r('app.float.font_size_12')) | 327 | .fontSize($r('app.float.font_size_12')) |
| 312 | .lineHeight($r('app.float.margin_16')) | 328 | .lineHeight($r('app.float.margin_16')) |
| 313 | .margin({ top: $r('app.float.margin_16') | 329 | .margin({ top: $r('app.float.margin_16') |
| 314 | - ,left: $r('app.float.margin_16') | ||
| 315 | - ,right: $r('app.float.margin_16') }) | 330 | + ,left: $r('app.float.vp_12') |
| 331 | + ,right: $r('app.float.vp_12') }) | ||
| 316 | //微信/朋友圈/微博 | 332 | //微信/朋友圈/微博 |
| 317 | Row(){ | 333 | Row(){ |
| 318 | Image($r('app.media.xxhdpi_pic_wechat')) | 334 | Image($r('app.media.xxhdpi_pic_wechat')) |
| @@ -362,9 +378,17 @@ export struct DynamicDetailComponent { | @@ -362,9 +378,17 @@ export struct DynamicDetailComponent { | ||
| 362 | }) | 378 | }) |
| 363 | // 评论 | 379 | // 评论 |
| 364 | if (this.contentDetailData?.openComment) { | 380 | if (this.contentDetailData?.openComment) { |
| 365 | - Divider().strokeWidth(6).color('#f5f5f5') | 381 | + Divider().strokeWidth(6).color('#f5f5f5').margin({top:$r('app.float.margin_24')}) |
| 366 | CommentComponent({ | 382 | CommentComponent({ |
| 367 | - publishCommentModel: this.publishCommentModel | 383 | + publishCommentModel: { |
| 384 | + targetId: String(this.contentDetailData?.newsId || ''), | ||
| 385 | + targetRelId: this.contentDetailData?.reLInfo?.relId, | ||
| 386 | + targetTitle: this.contentDetailData?.newsTitle, | ||
| 387 | + targetRelType: this.contentDetailData?.reLInfo?.relType, | ||
| 388 | + targetRelObjectId: String(this.contentDetailData?.reLInfo?.relObjectId), | ||
| 389 | + keyArticle: String(this.contentDetailData?.keyArticle), | ||
| 390 | + targetType: String(this.contentDetailData?.newsType), | ||
| 391 | + } as publishCommentModel | ||
| 368 | }) | 392 | }) |
| 369 | } | 393 | } |
| 370 | Blank().layoutWeight(1) | 394 | Blank().layoutWeight(1) |
| @@ -379,7 +403,15 @@ export struct DynamicDetailComponent { | @@ -379,7 +403,15 @@ export struct DynamicDetailComponent { | ||
| 379 | OperRowListView({ contentDetailData: this.contentDetailData | 403 | OperRowListView({ contentDetailData: this.contentDetailData |
| 380 | ,interactData:this.interactDataDTO | 404 | ,interactData:this.interactDataDTO |
| 381 | ,newsStatusOfUser:this.newsStatusOfUser | 405 | ,newsStatusOfUser:this.newsStatusOfUser |
| 382 | - ,publishCommentModel: this.publishCommentModel | 406 | + ,publishCommentModel: { |
| 407 | + targetId: String(this.contentDetailData?.newsId || ''), | ||
| 408 | + targetRelId: this.contentDetailData?.reLInfo?.relId, | ||
| 409 | + targetTitle: this.contentDetailData?.newsTitle, | ||
| 410 | + targetRelType: this.contentDetailData?.reLInfo?.relType, | ||
| 411 | + targetRelObjectId: String(this.contentDetailData?.reLInfo?.relObjectId), | ||
| 412 | + keyArticle: String(this.contentDetailData?.keyArticle), | ||
| 413 | + targetType: String(this.contentDetailData?.newsType), | ||
| 414 | + } as publishCommentModel | ||
| 383 | ,needLike:false}) | 415 | ,needLike:false}) |
| 384 | } | 416 | } |
| 385 | } | 417 | } |
| @@ -399,17 +431,6 @@ export struct DynamicDetailComponent { | @@ -399,17 +431,6 @@ export struct DynamicDetailComponent { | ||
| 399 | } catch (exception) { | 431 | } catch (exception) { |
| 400 | console.log('请求失败',JSON.stringify(exception)) | 432 | console.log('请求失败',JSON.stringify(exception)) |
| 401 | } | 433 | } |
| 402 | - if (this.contentDetailData.openComment) { | ||
| 403 | - this.publishCommentModel = { | ||
| 404 | - targetId: String(this.contentDetailData?.newsId || ''), | ||
| 405 | - targetRelId: this.contentDetailData?.reLInfo?.relId, | ||
| 406 | - targetTitle: this.contentDetailData?.newsTitle, | ||
| 407 | - targetRelType: this.contentDetailData?.reLInfo?.relType, | ||
| 408 | - targetRelObjectId: String(this.contentDetailData?.reLInfo?.relObjectId), | ||
| 409 | - keyArticle: String(this.contentDetailData?.keyArticle), | ||
| 410 | - targetType: String(this.contentDetailData?.newsType), | ||
| 411 | - } as publishCommentModel | ||
| 412 | - } | ||
| 413 | this.getBatchAttentionStatus() | 434 | this.getBatchAttentionStatus() |
| 414 | this.getInteractDataStatus() | 435 | this.getInteractDataStatus() |
| 415 | this.makeJumpInfo() | 436 | this.makeJumpInfo() |
| @@ -42,10 +42,12 @@ export struct ENewspaperPageComponent { | @@ -42,10 +42,12 @@ export struct ENewspaperPageComponent { | ||
| 42 | console.log("onDateChange-日历选择弹框", "date:", JSON.stringify(date)) | 42 | console.log("onDateChange-日历选择弹框", "date:", JSON.stringify(date)) |
| 43 | if (date.fullYear && date.month && date.date) { | 43 | if (date.fullYear && date.month && date.date) { |
| 44 | let month: number = date.month + 1 | 44 | let month: number = date.month + 1 |
| 45 | - this.calendarDate = `${date.fullYear}-${month > 9 ? month : '0' + month}-${date.date > 9 ? date.date : '0' + date.date}` | 45 | + this.calendarDate = |
| 46 | + `${date.fullYear}-${month > 9 ? month : '0' + month}-${date.date > 9 ? date.date : '0' + date.date}` | ||
| 46 | this.getNewspaperTime() | 47 | this.getNewspaperTime() |
| 47 | this.getNewspaperList() | 48 | this.getNewspaperList() |
| 48 | - this.selectDate = new Date(date.fullYear ? date.fullYear : 0, date.month ? date.month : 0, date.date ? date.date : 0) | 49 | + this.selectDate = |
| 50 | + new Date(date.fullYear ? date.fullYear : 0, date.month ? date.month : 0, date.date ? date.date : 0) | ||
| 49 | } | 51 | } |
| 50 | } | 52 | } |
| 51 | }), | 53 | }), |
| @@ -81,8 +83,8 @@ export struct ENewspaperPageComponent { | @@ -81,8 +83,8 @@ export struct ENewspaperPageComponent { | ||
| 81 | this.picHeight = this.picWidth * 566 / 378 | 83 | this.picHeight = this.picWidth * 566 / 378 |
| 82 | //注册字体 | 84 | //注册字体 |
| 83 | font.registerFont({ | 85 | font.registerFont({ |
| 84 | - familyName: 'BebasNeue_Regular', | ||
| 85 | - familySrc: $rawfile('font/BebasNeue_Regular.otf') | 86 | + familyName: 'BebasNeueBold', |
| 87 | + familySrc: $rawfile('font/BebasNeueBold.otf') | ||
| 86 | }) | 88 | }) |
| 87 | this.getNewspaperTime() | 89 | this.getNewspaperTime() |
| 88 | this.getNewspaperList() | 90 | this.getNewspaperList() |
| @@ -117,7 +119,7 @@ export struct ENewspaperPageComponent { | @@ -117,7 +119,7 @@ export struct ENewspaperPageComponent { | ||
| 117 | Text(this.calendarDate?.replace('-', '.')?.replace('-', '.')) | 119 | Text(this.calendarDate?.replace('-', '.')?.replace('-', '.')) |
| 118 | .fontSize($r('app.float.font_size_20')) | 120 | .fontSize($r('app.float.font_size_20')) |
| 119 | .fontColor($r('app.color.white')) | 121 | .fontColor($r('app.color.white')) |
| 120 | - .fontFamily('BebasNeue_Regular') | 122 | + .fontFamily('BebasNeueBold') |
| 121 | .fontWeight(FontWeight.Regular) | 123 | .fontWeight(FontWeight.Regular) |
| 122 | 124 | ||
| 123 | Image($r('app.media.icon_triangle')) | 125 | Image($r('app.media.icon_triangle')) |
| @@ -148,6 +150,7 @@ export struct ENewspaperPageComponent { | @@ -148,6 +150,7 @@ export struct ENewspaperPageComponent { | ||
| 148 | center: { anchor: "__container__", align: VerticalAlign.Center } | 150 | center: { anchor: "__container__", align: VerticalAlign.Center } |
| 149 | }) | 151 | }) |
| 150 | .id('e_newspaper_share') | 152 | .id('e_newspaper_share') |
| 153 | + .visibility(Visibility.Hidden) | ||
| 151 | } | 154 | } |
| 152 | .margin({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') }) | 155 | .margin({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') }) |
| 153 | .height($r('app.float.top_bar_height')) | 156 | .height($r('app.float.top_bar_height')) |
| @@ -208,13 +211,15 @@ export struct ENewspaperPageComponent { | @@ -208,13 +211,15 @@ export struct ENewspaperPageComponent { | ||
| 208 | .id('e_newspaper_shadow') | 211 | .id('e_newspaper_shadow') |
| 209 | 212 | ||
| 210 | Row() { | 213 | Row() { |
| 211 | - Text(this.swiperIndex + 1 == this.newspaperListBean?.list?.length ? '已到底部,可以选择其他日期' : '滑动查看下一版') | 214 | + Text(this.swiperIndex + 1 == this.newspaperListBean?.list?.length ? '已到底部,可以选择其他日期' : |
| 215 | + '滑动查看下一版') | ||
| 212 | .fontColor(Color.White) | 216 | .fontColor(Color.White) |
| 213 | .fontSize($r('app.float.font_size_14')) | 217 | .fontSize($r('app.float.font_size_14')) |
| 214 | Image($r('app.media.icon_next_page')) | 218 | Image($r('app.media.icon_next_page')) |
| 215 | .width($r('app.float.vp_16')) | 219 | .width($r('app.float.vp_16')) |
| 216 | .height($r('app.float.vp_16')) | 220 | .height($r('app.float.vp_16')) |
| 217 | - .visibility(this.swiperIndex + 1 == this.newspaperListBean?.list?.length ? Visibility.None : Visibility.Visible) | 221 | + .visibility(this.swiperIndex + 1 == this.newspaperListBean?.list?.length ? Visibility.None : |
| 222 | + Visibility.Visible) | ||
| 218 | } | 223 | } |
| 219 | .justifyContent(FlexAlign.Center) | 224 | .justifyContent(FlexAlign.Center) |
| 220 | .margin({ top: $r('app.float.margin_16') }) | 225 | .margin({ top: $r('app.float.margin_16') }) |
| @@ -232,7 +237,7 @@ export struct ENewspaperPageComponent { | @@ -232,7 +237,7 @@ export struct ENewspaperPageComponent { | ||
| 232 | Text(this.currentPageNum) | 237 | Text(this.currentPageNum) |
| 233 | .fontSize($r('app.float.font_size_36')) | 238 | .fontSize($r('app.float.font_size_36')) |
| 234 | .fontColor($r('app.color.white')) | 239 | .fontColor($r('app.color.white')) |
| 235 | - .fontFamily('BebasNeue_Regular') | 240 | + .fontFamily('BebasNeueBold') |
| 236 | Text('版') | 241 | Text('版') |
| 237 | .fontSize($r('app.float.font_size_16')) | 242 | .fontSize($r('app.float.font_size_16')) |
| 238 | .fontColor($r('app.color.white')) | 243 | .fontColor($r('app.color.white')) |
| 1 | -import { Logger, NumberFormatterUtils, DateTimeUtils } from 'wdKit'; | 1 | +import { |
| 2 | + Logger, | ||
| 3 | + NumberFormatterUtils, | ||
| 4 | + DateTimeUtils, | ||
| 5 | + EmitterUtils, | ||
| 6 | + EmitterEventId, | ||
| 7 | + NetworkUtil, | ||
| 8 | + DisplayUtils | ||
| 9 | +} from 'wdKit'; | ||
| 2 | import { | 10 | import { |
| 3 | Action, | 11 | Action, |
| 4 | ContentDetailDTO, | 12 | ContentDetailDTO, |
| @@ -20,7 +28,7 @@ import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailView | @@ -20,7 +28,7 @@ import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailView | ||
| 20 | import { PageRepository } from '../repository/PageRepository'; | 28 | import { PageRepository } from '../repository/PageRepository'; |
| 21 | import { detailedSkeleton } from './skeleton/detailSkeleton'; | 29 | import { detailedSkeleton } from './skeleton/detailSkeleton'; |
| 22 | import { publishCommentModel } from '../components/comment/model/PublishCommentModel'; | 30 | import { publishCommentModel } from '../components/comment/model/PublishCommentModel'; |
| 23 | - | 31 | +import { EmptyComponent } from '../components/view/EmptyComponent'; |
| 24 | import { CommentComponent } from '../components/comment/view/CommentComponent' | 32 | import { CommentComponent } from '../components/comment/view/CommentComponent' |
| 25 | import { HttpUtils } from 'wdNetwork/Index'; | 33 | import { HttpUtils } from 'wdNetwork/Index'; |
| 26 | 34 | ||
| @@ -39,6 +47,9 @@ export struct ImageAndTextPageComponent { | @@ -39,6 +47,9 @@ export struct ImageAndTextPageComponent { | ||
| 39 | @State isPageEnd: boolean = false | 47 | @State isPageEnd: boolean = false |
| 40 | @State publishTime: string = '' | 48 | @State publishTime: string = '' |
| 41 | @State publishCommentModel: publishCommentModel = new publishCommentModel() | 49 | @State publishCommentModel: publishCommentModel = new publishCommentModel() |
| 50 | + @State operationButtonList: string[] = ['comment', 'collect', 'share'] | ||
| 51 | + @State isNetConnected: boolean = true | ||
| 52 | + @State info: Area | null = null | ||
| 42 | 53 | ||
| 43 | build() { | 54 | build() { |
| 44 | Column() { | 55 | Column() { |
| @@ -83,17 +94,21 @@ export struct ImageAndTextPageComponent { | @@ -83,17 +94,21 @@ export struct ImageAndTextPageComponent { | ||
| 83 | Row() { | 94 | Row() { |
| 84 | Row() { | 95 | Row() { |
| 85 | if (this.newsStatusOfUser?.likeStatus === '1') { | 96 | if (this.newsStatusOfUser?.likeStatus === '1') { |
| 86 | - Image(this.contentDetailData[0]?.likesStyle === 1 ? $r('app.media.ic_like_check') : (this.contentDetailData[0]?.likesStyle === 2 ? $r('app.media.icon_prayer_active') : $r('app.media.icon_candle_active'))) | 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') : | ||
| 99 | + $r('app.media.icon_candle_active'))) | ||
| 87 | .width(24) | 100 | .width(24) |
| 88 | .height(24) | 101 | .height(24) |
| 89 | .margin({ right: 5 }) | 102 | .margin({ right: 5 }) |
| 90 | } else { | 103 | } else { |
| 91 | - Image(this.contentDetailData[0]?.likesStyle === 1 ? $r('app.media.icon_like') : (this.contentDetailData[0]?.likesStyle === 2 ? $r('app.media.icon_prayer') : $r('app.media.icon_candle'))) | 104 | + Image(this.contentDetailData[0]?.likesStyle === 1 ? $r('app.media.icon_like') : |
| 105 | + (this.contentDetailData[0]?.likesStyle === 2 ? $r('app.media.icon_prayer') : | ||
| 106 | + $r('app.media.icon_candle'))) | ||
| 92 | .width(24) | 107 | .width(24) |
| 93 | .height(24) | 108 | .height(24) |
| 94 | .margin({ right: 5 }) | 109 | .margin({ right: 5 }) |
| 95 | } | 110 | } |
| 96 | - if (this.interactData?.likeNum !== '0') { | 111 | + if (this.interactData?.likeNum != '0') { |
| 97 | Text(`${this.interactData?.likeNum}`) | 112 | Text(`${this.interactData?.likeNum}`) |
| 98 | .fontSize(16) | 113 | .fontSize(16) |
| 99 | .fontColor(this.newsStatusOfUser?.likeStatus === '1' ? '#ED2800' : '#999999') | 114 | .fontColor(this.newsStatusOfUser?.likeStatus === '1' ? '#ED2800' : '#999999') |
| @@ -125,7 +140,11 @@ export struct ImageAndTextPageComponent { | @@ -125,7 +140,11 @@ export struct ImageAndTextPageComponent { | ||
| 125 | Divider().strokeWidth(6).color('#f5f5f5') | 140 | Divider().strokeWidth(6).color('#f5f5f5') |
| 126 | CommentComponent({ | 141 | CommentComponent({ |
| 127 | publishCommentModel: this.publishCommentModel | 142 | publishCommentModel: this.publishCommentModel |
| 143 | + }).onAreaChange((oldValue: Area, newValue: Area) => { | ||
| 144 | + this.info = newValue | ||
| 128 | }) | 145 | }) |
| 146 | + // .onMeasureSize() | ||
| 147 | + | ||
| 129 | } | 148 | } |
| 130 | } | 149 | } |
| 131 | } | 150 | } |
| @@ -135,18 +154,27 @@ export struct ImageAndTextPageComponent { | @@ -135,18 +154,27 @@ export struct ImageAndTextPageComponent { | ||
| 135 | .height(CommonConstants.FULL_HEIGHT) | 154 | .height(CommonConstants.FULL_HEIGHT) |
| 136 | .padding({ bottom: 76 }) | 155 | .padding({ bottom: 76 }) |
| 137 | .scrollBar(BarState.Off) | 156 | .scrollBar(BarState.Off) |
| 157 | + .align(Alignment.Top) | ||
| 138 | 158 | ||
| 139 | - if (!this.isPageEnd) { | ||
| 140 | - detailedSkeleton() | 159 | + if (!this.isNetConnected) { |
| 160 | + EmptyComponent({ | ||
| 161 | + emptyType: 1, | ||
| 162 | + emptyButton: true, | ||
| 163 | + retry: () => { | ||
| 164 | + this.getDetail() | ||
| 165 | + } | ||
| 166 | + }).padding({ bottom: 200 }) | ||
| 167 | + } else { | ||
| 168 | + if (!this.isPageEnd) { | ||
| 169 | + detailedSkeleton() | ||
| 170 | + } | ||
| 141 | } | 171 | } |
| 142 | - | ||
| 143 | //底部交互区 | 172 | //底部交互区 |
| 144 | - if (this.contentDetailData?.length) { | ||
| 145 | - OperRowListView({ | ||
| 146 | - contentDetailData: this.contentDetailData[0], | ||
| 147 | - publishCommentModel: this.publishCommentModel | ||
| 148 | - }) | ||
| 149 | - } | 173 | + OperRowListView({ |
| 174 | + contentDetailData: this.contentDetailData[0], | ||
| 175 | + publishCommentModel: this.publishCommentModel, | ||
| 176 | + operationButtonList: this.operationButtonList, | ||
| 177 | + }) | ||
| 150 | } | 178 | } |
| 151 | 179 | ||
| 152 | } | 180 | } |
| @@ -155,6 +183,7 @@ export struct ImageAndTextPageComponent { | @@ -155,6 +183,7 @@ export struct ImageAndTextPageComponent { | ||
| 155 | } | 183 | } |
| 156 | 184 | ||
| 157 | private async getDetail() { | 185 | private async getDetail() { |
| 186 | + this.isNetConnected = NetworkUtil.isNetConnected() | ||
| 158 | let contentId: string = '' | 187 | let contentId: string = '' |
| 159 | let relId: string = '' | 188 | let relId: string = '' |
| 160 | let relType: string = '' | 189 | let relType: string = '' |
| @@ -174,7 +203,8 @@ export struct ImageAndTextPageComponent { | @@ -174,7 +203,8 @@ export struct ImageAndTextPageComponent { | ||
| 174 | let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) | 203 | let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) |
| 175 | if (detailBeans && detailBeans.length > 0) { | 204 | if (detailBeans && detailBeans.length > 0) { |
| 176 | this.contentDetailData = detailBeans; | 205 | this.contentDetailData = detailBeans; |
| 177 | - let dateTime = DateTimeUtils.parseDate(this.contentDetailData[0]?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN); | 206 | + let dateTime = |
| 207 | + DateTimeUtils.parseDate(this.contentDetailData[0]?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN); | ||
| 178 | this.publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN) | 208 | this.publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN) |
| 179 | if (this.contentDetailData[0]?.recommendShow === 1) { | 209 | if (this.contentDetailData[0]?.recommendShow === 1) { |
| 180 | this.getRecommend() | 210 | this.getRecommend() |
| @@ -184,13 +214,16 @@ export struct ImageAndTextPageComponent { | @@ -184,13 +214,16 @@ export struct ImageAndTextPageComponent { | ||
| 184 | this.queryContentInteractCount() | 214 | this.queryContentInteractCount() |
| 185 | } | 215 | } |
| 186 | if (this.contentDetailData[0]?.openComment) { | 216 | if (this.contentDetailData[0]?.openComment) { |
| 187 | - this.publishCommentModel.targetId = String(this.contentDetailData[0]?.newsId || '') | ||
| 188 | - this.publishCommentModel.targetRelId = String(this.contentDetailData[0]?.reLInfo?.relId) | ||
| 189 | - this.publishCommentModel.targetTitle = this.contentDetailData[0]?.newsTitle | ||
| 190 | - this.publishCommentModel.targetRelType = String(this.contentDetailData[0]?.reLInfo?.relType) | ||
| 191 | - this.publishCommentModel.targetRelObjectId = String(this.contentDetailData[0]?.reLInfo?.relObjectId) | ||
| 192 | - this.publishCommentModel.keyArticle = String(this.contentDetailData[0]?.keyArticle) | ||
| 193 | - this.publishCommentModel.targetType = String(this.contentDetailData[0]?.newsType) | 217 | + this.publishCommentModel.targetId = String(this.contentDetailData[0]?.newsId || '') |
| 218 | + this.publishCommentModel.targetRelId = String(this.contentDetailData[0]?.reLInfo?.relId) | ||
| 219 | + this.publishCommentModel.targetTitle = this.contentDetailData[0]?.newsTitle | ||
| 220 | + this.publishCommentModel.targetRelType = String(this.contentDetailData[0]?.reLInfo?.relType) | ||
| 221 | + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData[0]?.reLInfo?.relObjectId) | ||
| 222 | + this.publishCommentModel.keyArticle = String(this.contentDetailData[0]?.keyArticle) | ||
| 223 | + this.publishCommentModel.targetType = String(this.contentDetailData[0]?.newsType) | ||
| 224 | + } | ||
| 225 | + if (this.contentDetailData[0]?.audioList?.length && this.contentDetailData[0]?.audioList[0].audioUrl) { | ||
| 226 | + this.operationButtonList = ['comment', 'collect', 'listen', 'share'] | ||
| 194 | } | 227 | } |
| 195 | } | 228 | } |
| 196 | } | 229 | } |
| @@ -198,11 +231,10 @@ export struct ImageAndTextPageComponent { | @@ -198,11 +231,10 @@ export struct ImageAndTextPageComponent { | ||
| 198 | 231 | ||
| 199 | private async getRecommend() { | 232 | private async getRecommend() { |
| 200 | let params: postRecommendListParams = { | 233 | let params: postRecommendListParams = { |
| 201 | - // TODO ? imei: HttpUtils.getImei() | ||
| 202 | - imei: "8272c108-4fa2-34ce-80b9-bc425a7c2a7e", | 234 | + imei: HttpUtils.getImei(), |
| 203 | userId: HttpUtils.getUserId(), | 235 | userId: HttpUtils.getUserId(), |
| 204 | contentId: String(this.contentDetailData[0]?.newsId), | 236 | contentId: String(this.contentDetailData[0]?.newsId), |
| 205 | - recType: 1, | 237 | + recType: Number(this.contentDetailData[0]?.reLInfo?.relType), |
| 206 | contentType: this.contentDetailData[0]?.newsType, | 238 | contentType: this.contentDetailData[0]?.newsType, |
| 207 | relId: this.contentDetailData[0]?.reLInfo?.relId, | 239 | relId: this.contentDetailData[0]?.reLInfo?.relId, |
| 208 | channelId: String(this.contentDetailData[0]?.reLInfo?.channelId) | 240 | channelId: String(this.contentDetailData[0]?.reLInfo?.channelId) |
| @@ -280,6 +312,24 @@ export struct ImageAndTextPageComponent { | @@ -280,6 +312,24 @@ export struct ImageAndTextPageComponent { | ||
| 280 | 312 | ||
| 281 | aboutToAppear() { | 313 | aboutToAppear() { |
| 282 | this.getDetail() | 314 | this.getDetail() |
| 315 | + //注册通知,来自别的组件的评论成功通知 | ||
| 316 | + EmitterUtils.receiveEvent(EmitterEventId.COMMENT_PUBLISH, (targetId?: string) => { | ||
| 317 | + if (targetId) { | ||
| 318 | + if (targetId == this.publishCommentModel.targetId) { | ||
| 319 | + // 滚动到评论列表 | ||
| 320 | + if (this.info) { | ||
| 321 | + // let height = DisplayUtils.getDeviceHeight() / 2 | ||
| 322 | + let offSetY = this.info?.globalPosition.y as number | ||
| 323 | + //头部距离48 | ||
| 324 | + this.scroller.scrollTo({ | ||
| 325 | + yOffset: offSetY - 100, | ||
| 326 | + xOffset: 0, | ||
| 327 | + animation: { duration: 1000, curve: Curve.Ease } | ||
| 328 | + }) | ||
| 329 | + } | ||
| 330 | + } | ||
| 331 | + } | ||
| 332 | + }) | ||
| 283 | } | 333 | } |
| 284 | 334 | ||
| 285 | aboutToDisappear() { | 335 | aboutToDisappear() { |
| @@ -117,7 +117,7 @@ export struct ImageAndTextWebComponent { | @@ -117,7 +117,7 @@ export struct ImageAndTextWebComponent { | ||
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | private sendContentData2H5(h5ReceiveAppData: H5ReceiveDetailBean) { | 119 | private sendContentData2H5(h5ReceiveAppData: H5ReceiveDetailBean) { |
| 120 | - Logger.debug('ImageAndTextWebComponent', 'jsCall_receiveAppData'); | 120 | + Logger.debug('ImageAndTextWebComponent', 'jsCall_receiveAppData',JSON.stringify(h5ReceiveAppData)); |
| 121 | this.webviewControl.callHandle(NativeCallH5Type.jsCall_receiveAppData, | 121 | this.webviewControl.callHandle(NativeCallH5Type.jsCall_receiveAppData, |
| 122 | JSON.stringify(h5ReceiveAppData), (data: string) => { | 122 | JSON.stringify(h5ReceiveAppData), (data: string) => { |
| 123 | Logger.debug('ImageAndTextWebComponent', "from js data = " + data); | 123 | Logger.debug('ImageAndTextWebComponent', "from js data = " + data); |
| 1 | // import { FrontLinkObject, MorningEveningPaperDTO, PageInfoBean } from 'wdBean'; | 1 | // import { FrontLinkObject, MorningEveningPaperDTO, PageInfoBean } from 'wdBean'; |
| 2 | import { CompList, PageInfoBean } from 'wdBean'; | 2 | import { CompList, PageInfoBean } from 'wdBean'; |
| 3 | -import { DateTimeUtils, Logger, SPHelper } from 'wdKit/Index'; | 3 | +import { DateTimeUtils, Logger, SPHelper, WindowModel } from 'wdKit/Index'; |
| 4 | import { PaperReaderSimpleDialog } from '../../dialog/PaperReaderDialog'; | 4 | import { PaperReaderSimpleDialog } from '../../dialog/PaperReaderDialog'; |
| 5 | import { MorningEveningViewModel } from '../../viewmodel/MorningEveningViewModel'; | 5 | import { MorningEveningViewModel } from '../../viewmodel/MorningEveningViewModel'; |
| 6 | // import { AudioBarView } from './AudioBarView'; | 6 | // import { AudioBarView } from './AudioBarView'; |
| @@ -102,6 +102,7 @@ export struct MorningEveningPaperComponent { | @@ -102,6 +102,7 @@ export struct MorningEveningPaperComponent { | ||
| 102 | async aboutToAppear() { | 102 | async aboutToAppear() { |
| 103 | let windowHight: window.Window = await window.getLastWindow(getContext(this)); | 103 | let windowHight: window.Window = await window.getLastWindow(getContext(this)); |
| 104 | await windowHight.setWindowLayoutFullScreen(true); | 104 | await windowHight.setWindowLayoutFullScreen(true); |
| 105 | + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) | ||
| 105 | this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height) | 106 | this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height) |
| 106 | 107 | ||
| 107 | let dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String | 108 | let dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String |
| @@ -173,6 +174,7 @@ export struct MorningEveningPaperComponent { | @@ -173,6 +174,7 @@ export struct MorningEveningPaperComponent { | ||
| 173 | async aboutToDisappear() { | 174 | async aboutToDisappear() { |
| 174 | let windowHight: window.Window = await window.getLastWindow(getContext(this)); | 175 | let windowHight: window.Window = await window.getLastWindow(getContext(this)); |
| 175 | await windowHight.setWindowLayoutFullScreen(false); | 176 | await windowHight.setWindowLayoutFullScreen(false); |
| 177 | + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) | ||
| 176 | } | 178 | } |
| 177 | 179 | ||
| 178 | onPageHide() { | 180 | onPageHide() { |
| @@ -34,7 +34,7 @@ export struct PaperTitleComponent { | @@ -34,7 +34,7 @@ export struct PaperTitleComponent { | ||
| 34 | Text(this.subTitle ?? '')// Text('2024年\n1月16日') | 34 | Text(this.subTitle ?? '')// Text('2024年\n1月16日') |
| 35 | // .width(50) | 35 | // .width(50) |
| 36 | .margin({ left: 5 }) | 36 | .margin({ left: 5 }) |
| 37 | - .fontSize(12) | 37 | + .fontSize(8) |
| 38 | .fontColor($r('app.color.white')) | 38 | .fontColor($r('app.color.white')) |
| 39 | .maxLines(2) | 39 | .maxLines(2) |
| 40 | 40 | ||
| @@ -47,7 +47,8 @@ export struct PaperTitleComponent { | @@ -47,7 +47,8 @@ export struct PaperTitleComponent { | ||
| 47 | .alignItems(VerticalAlign.Center) | 47 | .alignItems(VerticalAlign.Center) |
| 48 | .alignRules({ | 48 | .alignRules({ |
| 49 | left: { anchor: "img_logo1", align: HorizontalAlign.End }, | 49 | left: { anchor: "img_logo1", align: HorizontalAlign.End }, |
| 50 | - center: { anchor: "__container__", align: VerticalAlign.Center } }) | 50 | + center: { anchor: "__container__", align: VerticalAlign.Center } |
| 51 | + }) | ||
| 51 | .id('row_paper_date') | 52 | .id('row_paper_date') |
| 52 | 53 | ||
| 53 | Image($r('app.media.icon_close')) | 54 | Image($r('app.media.icon_close')) |
| @@ -55,7 +56,8 @@ export struct PaperTitleComponent { | @@ -55,7 +56,8 @@ export struct PaperTitleComponent { | ||
| 55 | .width($r('app.float.top_arrow_size')) | 56 | .width($r('app.float.top_arrow_size')) |
| 56 | .alignRules({ | 57 | .alignRules({ |
| 57 | right: { anchor: "__container__", align: HorizontalAlign.End }, | 58 | right: { anchor: "__container__", align: HorizontalAlign.End }, |
| 58 | - center: { anchor: "__container__", align: VerticalAlign.Center } }) | 59 | + center: { anchor: "__container__", align: VerticalAlign.Center } |
| 60 | + }) | ||
| 59 | .id('img_close') | 61 | .id('img_close') |
| 60 | .onClick((event: ClickEvent) => { | 62 | .onClick((event: ClickEvent) => { |
| 61 | // console.info(TAG, "img_close") | 63 | // console.info(TAG, "img_close") |
| @@ -68,11 +70,12 @@ export struct PaperTitleComponent { | @@ -68,11 +70,12 @@ export struct PaperTitleComponent { | ||
| 68 | .width($r('app.float.top_arrow_size')) | 70 | .width($r('app.float.top_arrow_size')) |
| 69 | .alignRules({ | 71 | .alignRules({ |
| 70 | right: { anchor: "img_close", align: HorizontalAlign.Start }, | 72 | right: { anchor: "img_close", align: HorizontalAlign.Start }, |
| 71 | - center: { anchor: "__container__", align: VerticalAlign.Center } }) | 73 | + center: { anchor: "__container__", align: VerticalAlign.Center } |
| 74 | + }) | ||
| 72 | .id('img_share') | 75 | .id('img_share') |
| 73 | .margin({ right: 13 }) | 76 | .margin({ right: 13 }) |
| 74 | } | 77 | } |
| 75 | - // .margin({ left: 14, right: 14 }) | 78 | + .margin({ left: 14, right: 14 }) |
| 76 | .height($r('app.float.top_bar_height')) | 79 | .height($r('app.float.top_bar_height')) |
| 77 | 80 | ||
| 78 | // .backgroundColor(Color.Black) | 81 | // .backgroundColor(Color.Black) |
| @@ -150,7 +150,10 @@ export struct SingleColumn999Component { | @@ -150,7 +150,10 @@ export struct SingleColumn999Component { | ||
| 150 | scrollBackward: NestedScrollMode.SELF_FIRST | 150 | scrollBackward: NestedScrollMode.SELF_FIRST |
| 151 | }) | 151 | }) |
| 152 | } else { | 152 | } else { |
| 153 | - EmptyComponent({ emptyHeight: 200 }) | 153 | + if (this.compListItem && this.compListItem?.operDataList) { |
| 154 | + EmptyComponent({ emptyHeight: 200 }) | ||
| 155 | + } | ||
| 156 | + | ||
| 154 | } | 157 | } |
| 155 | } | 158 | } |
| 156 | 159 |
| @@ -5,7 +5,8 @@ import { | @@ -5,7 +5,8 @@ import { | ||
| 5 | PhotoListBean, | 5 | PhotoListBean, |
| 6 | postInteractBrowsOperateParams, | 6 | postInteractBrowsOperateParams, |
| 7 | postBatchAttentionStatusParams, | 7 | postBatchAttentionStatusParams, |
| 8 | - postInteractAccentionOperateParams | 8 | + postInteractAccentionOperateParams, |
| 9 | + Params | ||
| 9 | } from 'wdBean'; | 10 | } from 'wdBean'; |
| 10 | import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; | 11 | import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; |
| 11 | import display from '@ohos.display'; | 12 | import display from '@ohos.display'; |
| @@ -13,6 +14,7 @@ import font from '@ohos.font'; | @@ -13,6 +14,7 @@ import font from '@ohos.font'; | ||
| 13 | import { OperRowListView } from './view/OperRowListView'; | 14 | import { OperRowListView } from './view/OperRowListView'; |
| 14 | import { MultiPictureDetailItemComponent } from './MultiPictureDetailItemComponent'; | 15 | import { MultiPictureDetailItemComponent } from './MultiPictureDetailItemComponent'; |
| 15 | import { ImageDownloadComponent } from '../components/ImageDownloadComponent'; | 16 | import { ImageDownloadComponent } from '../components/ImageDownloadComponent'; |
| 17 | +import { publishCommentModel } from '../components/comment/model/PublishCommentModel'; | ||
| 16 | import { EmptyComponent } from './view/EmptyComponent'; | 18 | import { EmptyComponent } from './view/EmptyComponent'; |
| 17 | import { DateTimeUtils } from 'wdKit/Index'; | 19 | import { DateTimeUtils } from 'wdKit/Index'; |
| 18 | import { HttpUrlUtils } from 'wdNetwork/Index'; | 20 | import { HttpUrlUtils } from 'wdNetwork/Index'; |
| @@ -42,6 +44,8 @@ export struct MultiPictureDetailPageComponent { | @@ -42,6 +44,8 @@ export struct MultiPictureDetailPageComponent { | ||
| 42 | private scroller: Scroller = new Scroller() | 44 | private scroller: Scroller = new Scroller() |
| 43 | @State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图 | 45 | @State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图 |
| 44 | @State showDownload: Boolean = false // 控制是否显示下载默认隐藏 | 46 | @State showDownload: Boolean = false // 控制是否显示下载默认隐藏 |
| 47 | + @State publishCommentModel: publishCommentModel = new publishCommentModel() | ||
| 48 | + @State operationButtonList: string[] = ['comment', 'like', 'collect', 'share'] | ||
| 45 | 49 | ||
| 46 | //watch监听页码回调 | 50 | //watch监听页码回调 |
| 47 | onCurrentPageNumUpdated(): void { | 51 | onCurrentPageNumUpdated(): void { |
| @@ -59,10 +63,10 @@ export struct MultiPictureDetailPageComponent { | @@ -59,10 +63,10 @@ export struct MultiPictureDetailPageComponent { | ||
| 59 | this.picHeight = this.picWidth * 578 / 375 | 63 | this.picHeight = this.picWidth * 578 / 375 |
| 60 | this.titleHeight = this.screenWidth * 178 / 375 | 64 | this.titleHeight = this.screenWidth * 178 / 375 |
| 61 | //注册字体 | 65 | //注册字体 |
| 62 | - font.registerFont({ | ||
| 63 | - familyName: 'BebasNeue_Regular', | ||
| 64 | - familySrc: $rawfile('font/BebasNeue_Regular.otf') | ||
| 65 | - }) | 66 | + // font.registerFont({ |
| 67 | + // familyName: 'BebasNeueBold', | ||
| 68 | + // familySrc: $rawfile('font/BebasNeueBold.otf') | ||
| 69 | + // }) | ||
| 66 | // 注册监听网络连接 | 70 | // 注册监听网络连接 |
| 67 | let netStatus = NetworkUtil.isNetConnected() | 71 | let netStatus = NetworkUtil.isNetConnected() |
| 68 | if (netStatus) { | 72 | if (netStatus) { |
| @@ -96,19 +100,31 @@ export struct MultiPictureDetailPageComponent { | @@ -96,19 +100,31 @@ export struct MultiPictureDetailPageComponent { | ||
| 96 | if (this.contentDetailData.rmhPlatform == 1) { | 100 | if (this.contentDetailData.rmhPlatform == 1) { |
| 97 | Row() { | 101 | Row() { |
| 98 | Row({ space: 8 }) { | 102 | Row({ space: 8 }) { |
| 99 | - Row() { | ||
| 100 | - Image(this.contentDetailData?.rmhInfo?.rmhHeadUrl) | ||
| 101 | - .borderRadius(24) | ||
| 102 | - .aspectRatio(1) | ||
| 103 | - .border({ width: 1, color: Color.White, style: BorderStyle.Solid }) | ||
| 104 | - .alt($r('app.media.picture_loading')) | ||
| 105 | - .width(36) | ||
| 106 | - .height(36) | ||
| 107 | - .objectFit(ImageFit.Fill) | ||
| 108 | - .interpolation(ImageInterpolation.High) | 103 | + if (this.getImgUrl()){ |
| 104 | + Row() { | ||
| 105 | + Image(this.getImgUrl()) | ||
| 106 | + .borderRadius(24) | ||
| 107 | + .aspectRatio(1) | ||
| 108 | + .border({ width: 1, color: Color.White, style: BorderStyle.Solid }) | ||
| 109 | + .width(36) | ||
| 110 | + .height(36) | ||
| 111 | + .objectFit(ImageFit.Fill) | ||
| 112 | + .interpolation(ImageInterpolation.High) | ||
| 113 | + .onClick(() => { | ||
| 114 | + if (this.contentDetailData.rmhInfo?.cnMainControl === 1) { | ||
| 115 | + // 号主页 | ||
| 116 | + const params: Params = { | ||
| 117 | + creatorId: this.contentDetailData.rmhInfo.rmhId, | ||
| 118 | + pageID: '' | ||
| 119 | + } | ||
| 120 | + WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | + }) | ||
| 124 | + } | ||
| 125 | + .width('13%') | ||
| 126 | + .height('100%') | ||
| 109 | } | 127 | } |
| 110 | - .width('13%') | ||
| 111 | - .height('100%') | ||
| 112 | 128 | ||
| 113 | Row() { | 129 | Row() { |
| 114 | Flex({ | 130 | Flex({ |
| @@ -188,6 +204,7 @@ export struct MultiPictureDetailPageComponent { | @@ -188,6 +204,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 188 | middle: { anchor: "__container__", align: HorizontalAlign.Center } | 204 | middle: { anchor: "__container__", align: HorizontalAlign.Center } |
| 189 | }) | 205 | }) |
| 190 | .id('e_attention') | 206 | .id('e_attention') |
| 207 | + .visibility(!this.showDownload ? Visibility.Visible : Visibility.None) | ||
| 191 | } | 208 | } |
| 192 | if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length > 0) { | 209 | if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length > 0) { |
| 193 | Swiper(this.swiperController) { | 210 | Swiper(this.swiperController) { |
| @@ -302,10 +319,9 @@ export struct MultiPictureDetailPageComponent { | @@ -302,10 +319,9 @@ export struct MultiPictureDetailPageComponent { | ||
| 302 | } | 319 | } |
| 303 | OperRowListView({ | 320 | OperRowListView({ |
| 304 | contentDetailData: this.contentDetailData, | 321 | contentDetailData: this.contentDetailData, |
| 322 | + publishCommentModel: this.publishCommentModel, | ||
| 323 | + operationButtonList: this.operationButtonList, | ||
| 305 | }) | 324 | }) |
| 306 | - .width('100%') | ||
| 307 | - .height(56) | ||
| 308 | - .border({ width: { top: 0.5 }, color: '#FFFFFF' }) | ||
| 309 | } | 325 | } |
| 310 | .visibility(!this.showDownload ? Visibility.Visible : Visibility.None) | 326 | .visibility(!this.showDownload ? Visibility.Visible : Visibility.None) |
| 311 | Column(){ | 327 | Column(){ |
| @@ -369,10 +385,20 @@ export struct MultiPictureDetailPageComponent { | @@ -369,10 +385,20 @@ export struct MultiPictureDetailPageComponent { | ||
| 369 | statusBarContentColor: '#ffffff', | 385 | statusBarContentColor: '#ffffff', |
| 370 | }) | 386 | }) |
| 371 | } | 387 | } |
| 388 | + if (this.contentDetailData?.openComment) { | ||
| 389 | + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '') | ||
| 390 | + this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId) | ||
| 391 | + this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle | ||
| 392 | + this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType) | ||
| 393 | + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId) | ||
| 394 | + this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle) | ||
| 395 | + this.publishCommentModel.targetType = String(this.contentDetailData?.newsType) | ||
| 396 | + } | ||
| 372 | // this.contentDetailData.photoList = [] | 397 | // this.contentDetailData.photoList = [] |
| 373 | if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length === 0) { | 398 | if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length === 0) { |
| 374 | // 暂无内容 | 399 | // 暂无内容 |
| 375 | this.netStatus = 0 | 400 | this.netStatus = 0 |
| 401 | + this.operationButtonList = [] | ||
| 376 | Logger.info(TAG, `this.netStatus:${JSON.stringify(this.netStatus)}`) | 402 | Logger.info(TAG, `this.netStatus:${JSON.stringify(this.netStatus)}`) |
| 377 | } | 403 | } |
| 378 | Logger.info(TAG, `contentDetailData:${JSON.stringify(this.contentDetailData)}`) | 404 | Logger.info(TAG, `contentDetailData:${JSON.stringify(this.contentDetailData)}`) |
| @@ -387,12 +413,17 @@ export struct MultiPictureDetailPageComponent { | @@ -387,12 +413,17 @@ export struct MultiPictureDetailPageComponent { | ||
| 387 | Logger.info(TAG, `fetchDetailData then,err: ${JSON.stringify(err)}`); | 413 | Logger.info(TAG, `fetchDetailData then,err: ${JSON.stringify(err)}`); |
| 388 | // 内容获取失败 | 414 | // 内容获取失败 |
| 389 | this.netStatus = 9 | 415 | this.netStatus = 9 |
| 416 | + this.operationButtonList = [] | ||
| 390 | }) | 417 | }) |
| 391 | } catch (exception) { | 418 | } catch (exception) { |
| 392 | 419 | ||
| 393 | } | 420 | } |
| 394 | } | 421 | } |
| 395 | 422 | ||
| 423 | + getImgUrl() { | ||
| 424 | + return this.contentDetailData?.rmhInfo?.rmhHeadUrl || this.contentDetailData?.userInfo?.userHeadUrl | ||
| 425 | + } | ||
| 426 | + | ||
| 396 | // 记录浏览历史 | 427 | // 记录浏览历史 |
| 397 | private getInteractBrowsOperate() { | 428 | private getInteractBrowsOperate() { |
| 398 | try { | 429 | try { |
| @@ -7,6 +7,7 @@ import { detailedSkeleton } from './skeleton/detailSkeleton' | @@ -7,6 +7,7 @@ import { detailedSkeleton } from './skeleton/detailSkeleton' | ||
| 7 | import { NativeCallH5Type } from 'wdWebComponent/src/main/ets/pages/NativeCallH5Type'; | 7 | import { NativeCallH5Type } from 'wdWebComponent/src/main/ets/pages/NativeCallH5Type'; |
| 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 | 11 | ||
| 11 | const TAG: string = 'SpacialTopicPageComponent' | 12 | const TAG: string = 'SpacialTopicPageComponent' |
| 12 | 13 | ||
| @@ -21,6 +22,7 @@ export struct SpacialTopicPageComponent { | @@ -21,6 +22,7 @@ export struct SpacialTopicPageComponent { | ||
| 21 | private h5ReceiveAppData: H5ReceiveDetailBean = { dataSource: '2' } as H5ReceiveDetailBean | 22 | private h5ReceiveAppData: H5ReceiveDetailBean = { dataSource: '2' } as H5ReceiveDetailBean |
| 22 | private webPrepared = false; | 23 | private webPrepared = false; |
| 23 | private dataPrepared = false; | 24 | private dataPrepared = false; |
| 25 | + @State publishCommentModel: publishCommentModel = new publishCommentModel() | ||
| 24 | 26 | ||
| 25 | private trySendData2H5() { | 27 | private trySendData2H5() { |
| 26 | if (!this.webPrepared || !this.dataPrepared) { | 28 | if (!this.webPrepared || !this.dataPrepared) { |
| @@ -61,6 +63,15 @@ export struct SpacialTopicPageComponent { | @@ -61,6 +63,15 @@ export struct SpacialTopicPageComponent { | ||
| 61 | let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) | 63 | let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) |
| 62 | if (detailBeans && detailBeans.length > 0) { | 64 | if (detailBeans && detailBeans.length > 0) { |
| 63 | this.contentDetailData = detailBeans; | 65 | this.contentDetailData = detailBeans; |
| 66 | + if (this.contentDetailData[0]?.openComment) { | ||
| 67 | + this.publishCommentModel.targetId = String(this.contentDetailData[0]?.newsId || '') | ||
| 68 | + this.publishCommentModel.targetRelId = String(this.contentDetailData[0]?.reLInfo?.relId) | ||
| 69 | + this.publishCommentModel.targetTitle = this.contentDetailData[0]?.newsTitle | ||
| 70 | + this.publishCommentModel.targetRelType = String(this.contentDetailData[0]?.reLInfo?.relType) | ||
| 71 | + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData[0]?.reLInfo?.relObjectId) | ||
| 72 | + this.publishCommentModel.keyArticle = String(this.contentDetailData[0]?.keyArticle) | ||
| 73 | + this.publishCommentModel.targetType = String(this.contentDetailData[0]?.newsType) | ||
| 74 | + } | ||
| 64 | this.trySendData2H5() | 75 | this.trySendData2H5() |
| 65 | } | 76 | } |
| 66 | } | 77 | } |
| @@ -80,13 +91,15 @@ export struct SpacialTopicPageComponent { | @@ -80,13 +91,15 @@ export struct SpacialTopicPageComponent { | ||
| 80 | } | 91 | } |
| 81 | .width(CommonConstants.FULL_WIDTH) | 92 | .width(CommonConstants.FULL_WIDTH) |
| 82 | .height(CommonConstants.FULL_HEIGHT) | 93 | .height(CommonConstants.FULL_HEIGHT) |
| 83 | - .padding({ bottom: 126 }) | ||
| 84 | 94 | ||
| 85 | if (!this.isPageEnd) { | 95 | if (!this.isPageEnd) { |
| 86 | detailedSkeleton() | 96 | detailedSkeleton() |
| 87 | } | 97 | } |
| 88 | //底部交互区 | 98 | //底部交互区 |
| 89 | - OperRowListView({ contentDetailData: this.contentDetailData[0] }) | 99 | + OperRowListView({ |
| 100 | + contentDetailData: this.contentDetailData[0], | ||
| 101 | + publishCommentModel: this.publishCommentModel | ||
| 102 | + }) | ||
| 90 | } | 103 | } |
| 91 | }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT) | 104 | }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT) |
| 92 | } | 105 | } |
| @@ -110,7 +110,7 @@ export struct RMCalendar { | @@ -110,7 +110,7 @@ export struct RMCalendar { | ||
| 110 | if (this.onDateChange) { | 110 | if (this.onDateChange) { |
| 111 | this.onDateChange(item) | 111 | this.onDateChange(item) |
| 112 | if (item.fullYear && item.month) { | 112 | if (item.fullYear && item.month) { |
| 113 | - this.title = `${item.fullYear}年${item.month + 1}月` | 113 | + this.title = `${item.fullYear}年${this.getMonthStr(item.month + 1)}月` |
| 114 | } | 114 | } |
| 115 | } | 115 | } |
| 116 | } | 116 | } |
| @@ -191,18 +191,20 @@ export struct RMCalendar { | @@ -191,18 +191,20 @@ export struct RMCalendar { | ||
| 191 | */ | 191 | */ |
| 192 | private calcData() { | 192 | private calcData() { |
| 193 | 193 | ||
| 194 | - this.title = `${this.selectDay.getFullYear()}年${this.selectDay.getMonth() + 1}月` | 194 | + this.title = `${this.selectDay.getFullYear()}年${this.getMonthStr(this.selectDay.getMonth() + 1)}月` |
| 195 | this.selectDay.setDate(1) | 195 | this.selectDay.setDate(1) |
| 196 | 196 | ||
| 197 | if (this.selectDay.getFullYear() < this.startDate.getFullYear() | 197 | if (this.selectDay.getFullYear() < this.startDate.getFullYear() |
| 198 | - || (this.selectDay.getFullYear() == this.startDate.getFullYear() && this.selectDay.getMonth() <= this.startDate.getMonth())) { | 198 | + || (this.selectDay.getFullYear() == this.startDate.getFullYear() && |
| 199 | + this.selectDay.getMonth() <= this.startDate.getMonth())) { | ||
| 199 | this.hasPre = false | 200 | this.hasPre = false |
| 200 | } else { | 201 | } else { |
| 201 | this.hasPre = true | 202 | this.hasPre = true |
| 202 | } | 203 | } |
| 203 | 204 | ||
| 204 | if (this.selectDay.getFullYear() > this.endDate.getFullYear() | 205 | if (this.selectDay.getFullYear() > this.endDate.getFullYear() |
| 205 | - || (this.selectDay.getFullYear() == this.endDate.getFullYear() && this.selectDay.getMonth() >= this.endDate.getMonth())) { | 206 | + || (this.selectDay.getFullYear() == this.endDate.getFullYear() && |
| 207 | + this.selectDay.getMonth() >= this.endDate.getMonth())) { | ||
| 206 | this.hasNext = false | 208 | this.hasNext = false |
| 207 | } else { | 209 | } else { |
| 208 | this.hasNext = true | 210 | this.hasNext = true |
| @@ -274,7 +276,8 @@ export struct RMCalendar { | @@ -274,7 +276,8 @@ export struct RMCalendar { | ||
| 274 | Text(this.title) | 276 | Text(this.title) |
| 275 | .fontSize(this.titleFontSize) | 277 | .fontSize(this.titleFontSize) |
| 276 | .fontColor(this.titleFontColor) | 278 | .fontColor(this.titleFontColor) |
| 277 | - .fontWeight(this.titleFontWeight) | 279 | + .fontWeight(600) |
| 280 | + .fontFamily('PingFang SC-Semibold') | ||
| 278 | } | 281 | } |
| 279 | 282 | ||
| 280 | Blank() | 283 | Blank() |
| @@ -318,7 +321,22 @@ export struct RMCalendar { | @@ -318,7 +321,22 @@ export struct RMCalendar { | ||
| 318 | left: 35, | 321 | left: 35, |
| 319 | right: 35 | 322 | right: 35 |
| 320 | }) | 323 | }) |
| 324 | + .padding( | ||
| 325 | + { bottom: 20 }) | ||
| 321 | .border({ radius: 4 }) | 326 | .border({ radius: 4 }) |
| 322 | } | 327 | } |
| 323 | } | 328 | } |
| 329 | + | ||
| 330 | + getMonthStr(month?: number): string { | ||
| 331 | + if (!month) { | ||
| 332 | + return '' | ||
| 333 | + } | ||
| 334 | + if (month <= 0) { | ||
| 335 | + return '' | ||
| 336 | + } | ||
| 337 | + if (month <= 9) { | ||
| 338 | + return '0' + month | ||
| 339 | + } | ||
| 340 | + return month + '' | ||
| 341 | + } | ||
| 324 | } | 342 | } |
| @@ -100,7 +100,7 @@ export struct RMCalenderCell { | @@ -100,7 +100,7 @@ export struct RMCalenderCell { | ||
| 100 | .fontSize(this.itemFontSize) | 100 | .fontSize(this.itemFontSize) |
| 101 | .fontColor(this.getItemColor()) | 101 | .fontColor(this.getItemColor()) |
| 102 | .fontWeight(this.itemFontWeight) | 102 | .fontWeight(this.itemFontWeight) |
| 103 | - .fontFamily('BebasNeue_Regular') | 103 | + .fontFamily('BebasNeueBold') |
| 104 | } | 104 | } |
| 105 | } | 105 | } |
| 106 | // .justifyContent(FlexAlign.Center) | 106 | // .justifyContent(FlexAlign.Center) |
| @@ -16,12 +16,12 @@ export struct CardMediaInfo { | @@ -16,12 +16,12 @@ export struct CardMediaInfo { | ||
| 16 | 16 | ||
| 17 | build() { | 17 | build() { |
| 18 | Row() { | 18 | Row() { |
| 19 | - if (this.contentDTO.objectType === '1' || this.contentDTO.objectType === '15') { | 19 | + if (this.contentDTO?.objectType === '1' || this.contentDTO?.objectType === '15') { |
| 20 | // 点播、动态视频 | 20 | // 点播、动态视频 |
| 21 | Row() { | 21 | Row() { |
| 22 | Image($r('app.media.card_play')) | 22 | Image($r('app.media.card_play')) |
| 23 | .mediaLogo() | 23 | .mediaLogo() |
| 24 | - if(this.contentDTO.videoInfo!=null){ | 24 | + if (this.contentDTO.videoInfo != null) { |
| 25 | Text(DateTimeUtils.getFormattedDuration(this.contentDTO.videoInfo.videoDuration * 1000)) | 25 | Text(DateTimeUtils.getFormattedDuration(this.contentDTO.videoInfo.videoDuration * 1000)) |
| 26 | .mediaText() | 26 | .mediaText() |
| 27 | } | 27 | } |
| @@ -30,23 +30,23 @@ export struct CardMediaInfo { | @@ -30,23 +30,23 @@ export struct CardMediaInfo { | ||
| 30 | // liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 | 30 | // liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 |
| 31 | // 显示直播信息 | 31 | // 显示直播信息 |
| 32 | Row() { | 32 | Row() { |
| 33 | - if(this.contentDTO.liveInfo.liveState === 'wait') { | 33 | + if (this.contentDTO?.liveInfo?.liveState === 'wait') { |
| 34 | Image($r('app.media.card_wait')) | 34 | Image($r('app.media.card_wait')) |
| 35 | .mediaLogo() | 35 | .mediaLogo() |
| 36 | Text('预约') | 36 | Text('预约') |
| 37 | .mediaText() | 37 | .mediaText() |
| 38 | - } else if (this.contentDTO.liveInfo.liveState === 'running') { | 38 | + } else if (this.contentDTO?.liveInfo?.liveState === 'running') { |
| 39 | Image($r('app.media.card_live')) | 39 | Image($r('app.media.card_live')) |
| 40 | .mediaLogo() | 40 | .mediaLogo() |
| 41 | Text('直播中') | 41 | Text('直播中') |
| 42 | .mediaText() | 42 | .mediaText() |
| 43 | - } else if (this.contentDTO.liveInfo.liveState === 'end' && this.contentDTO.liveInfo.replayUri) { | 43 | + } else if (this.contentDTO?.liveInfo?.liveState === 'end' && this.contentDTO?.liveInfo?.replayUri) { |
| 44 | Image($r('app.media.card_play')) | 44 | Image($r('app.media.card_play')) |
| 45 | .mediaLogo() | 45 | .mediaLogo() |
| 46 | Text('回看') | 46 | Text('回看') |
| 47 | .mediaText() | 47 | .mediaText() |
| 48 | - } else if(this.contentDTO.liveInfo.liveState === 'end' && this.contentDTO.liveInfo | ||
| 49 | - .replayUri) { | 48 | + } else if (this.contentDTO?.liveInfo?.liveState === 'end' && this.contentDTO?.liveInfo |
| 49 | + ?.replayUri) { | ||
| 50 | // Image($r('app.media.card_live')) | 50 | // Image($r('app.media.card_live')) |
| 51 | // .mediaLogo() | 51 | // .mediaLogo() |
| 52 | Text('直播结束') | 52 | Text('直播结束') |
| @@ -69,6 +69,15 @@ export struct CardMediaInfo { | @@ -69,6 +69,15 @@ export struct CardMediaInfo { | ||
| 69 | Text(DateTimeUtils.getFormattedDuration(this.contentDTO.voiceInfo.voiceDuration * 1000)) | 69 | Text(DateTimeUtils.getFormattedDuration(this.contentDTO.voiceInfo.voiceDuration * 1000)) |
| 70 | .mediaText() | 70 | .mediaText() |
| 71 | } | 71 | } |
| 72 | + } else if (this.contentDTO.objectType === '4') {//广告标签 | ||
| 73 | + Text($r('app.string.comp_advertisement')) | ||
| 74 | + .fontSize('10fp') | ||
| 75 | + .fontColor($r('app.color.white')) | ||
| 76 | + .width(28) | ||
| 77 | + .height(16) | ||
| 78 | + .backgroundColor('#4D000000') | ||
| 79 | + .borderRadius(3) | ||
| 80 | + .textAlign(TextAlign.Center) | ||
| 72 | } | 81 | } |
| 73 | } | 82 | } |
| 74 | .margin(6) | 83 | .margin(6) |
| @@ -28,7 +28,7 @@ export struct CardSourceInfo { | @@ -28,7 +28,7 @@ export struct CardSourceInfo { | ||
| 28 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 28 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 29 | } | 29 | } |
| 30 | // 新闻tab下的卡片,2天之前的不显示时间。但是如果是搜索情况下展示的卡片,显示时间 | 30 | // 新闻tab下的卡片,2天之前的不显示时间。但是如果是搜索情况下展示的卡片,显示时间 |
| 31 | - if (this.contentDTO.isSearch || !this.contentDTO.isSearch && DateTimeUtils.getCommentTime | 31 | + if (this.contentDTO.isSearch || this.contentDTO.isCollection || !this.contentDTO.isSearch && DateTimeUtils.getCommentTime |
| 32 | (Number | 32 | (Number |
| 33 | .parseFloat(this | 33 | .parseFloat(this |
| 34 | .contentDTO.publishTime)) | 34 | .contentDTO.publishTime)) |
| @@ -30,7 +30,7 @@ export struct LiveFollowComponent { | @@ -30,7 +30,7 @@ export struct LiveFollowComponent { | ||
| 30 | Stack() { | 30 | Stack() { |
| 31 | Stack() | 31 | Stack() |
| 32 | .height(22) | 32 | .height(22) |
| 33 | - .width(130) | 33 | + .width(150) |
| 34 | .backgroundColor('#000000') | 34 | .backgroundColor('#000000') |
| 35 | .opacity(0.3) | 35 | .opacity(0.3) |
| 36 | .borderRadius({ | 36 | .borderRadius({ |
| @@ -71,7 +71,7 @@ export struct LiveFollowComponent { | @@ -71,7 +71,7 @@ export struct LiveFollowComponent { | ||
| 71 | }) | 71 | }) |
| 72 | } | 72 | } |
| 73 | .height(22) | 73 | .height(22) |
| 74 | - .width(130) | 74 | + .width(150) |
| 75 | } | 75 | } |
| 76 | } | 76 | } |
| 77 | 77 |
| @@ -31,21 +31,25 @@ export struct RmhTitle { | @@ -31,21 +31,25 @@ export struct RmhTitle { | ||
| 31 | .fontColor($r('app.color.color_222222')) | 31 | .fontColor($r('app.color.color_222222')) |
| 32 | .fontWeight(600) | 32 | .fontWeight(600) |
| 33 | .alignSelf(ItemAlign.Start) | 33 | .alignSelf(ItemAlign.Start) |
| 34 | - Row() { | ||
| 35 | - if (this.publishTime) { | ||
| 36 | - Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime))) | 34 | + Flex({alignContent: FlexAlign.Start, wrap: FlexWrap.NoWrap}) { |
| 35 | + Row() { | ||
| 36 | + if (this.publishTime) { | ||
| 37 | + Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime))) | ||
| 38 | + .fontSize($r("app.float.font_size_12")) | ||
| 39 | + .fontColor($r("app.color.color_B0B0B0")) | ||
| 40 | + Image($r('app.media.point')) | ||
| 41 | + .width(16) | ||
| 42 | + .height(16) | ||
| 43 | + } | ||
| 44 | + Text(this.rmhInfo.rmhDesc) | ||
| 37 | .fontSize($r("app.float.font_size_12")) | 45 | .fontSize($r("app.float.font_size_12")) |
| 38 | .fontColor($r("app.color.color_B0B0B0")) | 46 | .fontColor($r("app.color.color_B0B0B0")) |
| 39 | - Image($r('app.media.point')) | ||
| 40 | - .width(16) | ||
| 41 | - .height(16) | 47 | + .maxLines(1) |
| 48 | + .alignSelf(ItemAlign.Start) | ||
| 49 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 50 | + .textAlign(TextAlign.Start) | ||
| 42 | } | 51 | } |
| 43 | - Text(this.rmhInfo.rmhDesc) | ||
| 44 | - .fontSize($r("app.float.font_size_12")) | ||
| 45 | - .fontColor($r("app.color.color_B0B0B0")) | ||
| 46 | - .maxLines(1) | ||
| 47 | - .alignSelf(ItemAlign.Start) | ||
| 48 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | 52 | + .width('75%') |
| 49 | } | 53 | } |
| 50 | } | 54 | } |
| 51 | 55 |
| @@ -7,6 +7,7 @@ import { CardAdvBigImageComponent } from './CardAdvBigImageComponent'; | @@ -7,6 +7,7 @@ import { CardAdvBigImageComponent } from './CardAdvBigImageComponent'; | ||
| 7 | import { CardAdvVideoComponent } from './CardAdvVideoComponent'; | 7 | import { CardAdvVideoComponent } from './CardAdvVideoComponent'; |
| 8 | import { CardAdvGanMiComponent } from './CardAdvGanMiComponent'; | 8 | import { CardAdvGanMiComponent } from './CardAdvGanMiComponent'; |
| 9 | import { CardAdvVideoExComponent } from './CardAdvVideoExComponent'; | 9 | import { CardAdvVideoExComponent } from './CardAdvVideoExComponent'; |
| 10 | +import PageModel from '../../viewmodel/PageModel'; | ||
| 10 | 11 | ||
| 11 | /** | 12 | /** |
| 12 | * @Description: 广告稿件解析类 | 13 | * @Description: 广告稿件解析类 |
| @@ -19,28 +20,29 @@ import { CardAdvVideoExComponent } from './CardAdvVideoExComponent'; | @@ -19,28 +20,29 @@ import { CardAdvVideoExComponent } from './CardAdvVideoExComponent'; | ||
| 19 | @Component | 20 | @Component |
| 20 | export struct AdvCardParser { | 21 | export struct AdvCardParser { |
| 21 | @State compDTO: CompDTO = {} as CompDTO; | 22 | @State compDTO: CompDTO = {} as CompDTO; |
| 23 | + pageModel: PageModel = new PageModel(); | ||
| 22 | 24 | ||
| 23 | build() { | 25 | build() { |
| 24 | - this.contentBuilder(this.compDTO); | 26 | + this.contentBuilder(this.pageModel, this.compDTO); |
| 25 | } | 27 | } |
| 26 | 28 | ||
| 27 | @Builder | 29 | @Builder |
| 28 | - contentBuilder(compDTO: CompDTO) { | 30 | + contentBuilder(pageModel: PageModel, compDTO: CompDTO) { |
| 29 | if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_5) { //三图广告 | 31 | if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_5) { //三图广告 |
| 30 | - CardAdvThreeImageComponent({ compDTO }) | 32 | + CardAdvThreeImageComponent({ pageModel, compDTO }) |
| 31 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_6) { //小图广告 | 33 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_6) { //小图广告 |
| 32 | - CardAdvSmallImageComponent({ compDTO }) | 34 | + CardAdvSmallImageComponent({ pageModel, compDTO }) |
| 33 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_7 || | 35 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_7 || |
| 34 | compDTO.matInfo.advSubType === CompStyle.Card_Adv_12) { // 长通栏广告 和 顶部长通栏广告 | 36 | compDTO.matInfo.advSubType === CompStyle.Card_Adv_12) { // 长通栏广告 和 顶部长通栏广告 |
| 35 | - CardAdvLongImageComponent({ compDTO }) | 37 | + CardAdvLongImageComponent({ pageModel, compDTO }) |
| 36 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_8) { //大图广告 | 38 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_8) { //大图广告 |
| 37 | - CardAdvBigImageComponent({ compDTO }) | 39 | + CardAdvBigImageComponent({ pageModel, compDTO }) |
| 38 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_9) { //视频广告 | 40 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_9) { //视频广告 |
| 39 | - CardAdvVideoComponent({ compDTO }) | 41 | + CardAdvVideoComponent({ pageModel, compDTO }) |
| 40 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_10) { //展会广告 | 42 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_10) { //展会广告 |
| 41 | - CardAdvVideoExComponent({ compDTO }) | 43 | + CardAdvVideoExComponent({ pageModel, compDTO}) |
| 42 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_11) { //冠名广告 | 44 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_11) { //冠名广告 |
| 43 | - CardAdvGanMiComponent({ compDTO }) | 45 | + CardAdvGanMiComponent({ pageModel, compDTO }) |
| 44 | } | 46 | } |
| 45 | } | 47 | } |
| 46 | } | 48 | } |
| 1 | -//全标题 "appStyle":"2", | ||
| 2 | -import { CompDTO, ContentDTO } from 'wdBean'; | 1 | +import { CompDTO } from 'wdBean'; |
| 3 | import { CommonConstants } from 'wdConstant/Index'; | 2 | import { CommonConstants } from 'wdConstant/Index'; |
| 4 | import { ProcessUtils } from 'wdRouter'; | 3 | import { ProcessUtils } from 'wdRouter'; |
| 5 | -import { CardMediaInfo } from '../cardCommon/CardMediaInfo' | ||
| 6 | -import { CardSourceInfo } from '../cardCommon/CardSourceInfo' | 4 | +import PageModel from '../../viewmodel/PageModel'; |
| 5 | +import { CardAdvBottom } from './CardAdvBottom'; | ||
| 7 | 6 | ||
| 8 | const TAG: string = 'Card2Component'; | 7 | const TAG: string = 'Card2Component'; |
| 9 | 8 | ||
| 10 | -/** | ||
| 11 | - * @Description: 广告---大图卡 | ||
| 12 | - * @Author: | ||
| 13 | - * @Email: liyubing@wondertek.com.cn | ||
| 14 | - * @CreateDate: | ||
| 15 | - * @UpdateRemark: 更新说明 | ||
| 16 | - * @Version: 1.0 | 9 | +/** |
| 10 | + * @Description: 广告---大图卡 | ||
| 11 | + * @Author: | ||
| 12 | + * @Email: liyubing@wondertek.com.cn | ||
| 13 | + * @CreateDate: | ||
| 14 | + * @UpdateRemark: 更新说明 | ||
| 15 | + * @Version: 1.0 | ||
| 17 | */ | 16 | */ |
| 18 | @Component | 17 | @Component |
| 19 | export struct CardAdvBigImageComponent { | 18 | export struct CardAdvBigImageComponent { |
| 20 | - | ||
| 21 | @State compDTO: CompDTO = {} as CompDTO | 19 | @State compDTO: CompDTO = {} as CompDTO |
| 22 | - | 20 | + pageModel: PageModel = new PageModel(); |
| 23 | aboutToAppear(): void { | 21 | aboutToAppear(): void { |
| 24 | 22 | ||
| 25 | - console.error('ZZZXXXXX', '----大图卡----aboutToAppear-----') | ||
| 26 | } | 23 | } |
| 27 | 24 | ||
| 28 | aboutToDisappear(): void { | 25 | aboutToDisappear(): void { |
| 29 | 26 | ||
| 30 | - console.error('ZZZXXXXX', '---大图卡-----aboutToDisappear-----') | ||
| 31 | } | 27 | } |
| 32 | 28 | ||
| 33 | build() { | 29 | build() { |
| 34 | 30 | ||
| 35 | Column() { | 31 | Column() { |
| 36 | - Text(this.compDTO.matInfo.advTitle) | ||
| 37 | - .fontSize($r('app.float.font_size_17')) | ||
| 38 | - .fontColor($r('app.color.color_222222')) | ||
| 39 | - .maxLines(3) | ||
| 40 | - .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 | ||
| 41 | - .align(Alignment.Start) | 32 | + |
| 33 | + //新闻标题 | ||
| 34 | + Text(this.compDTO.matInfo.advTitle).bottomTextStyle().margin({ bottom: 8, }) | ||
| 35 | + //大图 | ||
| 36 | + Image(this.compDTO.matInfo.matImageUrl[0]) | ||
| 37 | + .width(CommonConstants.FULL_WIDTH) | ||
| 38 | + .aspectRatio(16 / 9) | ||
| 39 | + .borderRadius(4) | ||
| 40 | + .borderWidth(0.5) | ||
| 41 | + .borderColor($r('app.color.color_0D000000')) | ||
| 42 | + .width(CommonConstants.FULL_WIDTH) | ||
| 43 | + | ||
| 44 | + CardAdvBottom({pageModel:this.pageModel,compDTO:this.compDTO}).margin({ | ||
| 45 | + top: 8, | ||
| 46 | + }) | ||
| 42 | } | 47 | } |
| 43 | .width(CommonConstants.FULL_WIDTH) | 48 | .width(CommonConstants.FULL_WIDTH) |
| 44 | .padding({ | 49 | .padding({ |
| @@ -48,13 +53,21 @@ export struct CardAdvBigImageComponent { | @@ -48,13 +53,21 @@ export struct CardAdvBigImageComponent { | ||
| 48 | bottom: $r('app.float.card_comp_pagePadding_tb') | 53 | bottom: $r('app.float.card_comp_pagePadding_tb') |
| 49 | }) | 54 | }) |
| 50 | .onClick((event: ClickEvent) => { | 55 | .onClick((event: ClickEvent) => { |
| 51 | - //ProcessUtils.processPage(this.contentDTO) | 56 | + ProcessUtils.openAdvDetail(this.compDTO.matInfo) |
| 52 | }) | 57 | }) |
| 53 | } | 58 | } |
| 54 | } | 59 | } |
| 55 | 60 | ||
| 61 | +/* | ||
| 62 | + 标题样式 | ||
| 63 | + */ | ||
| 56 | @Extend(Text) | 64 | @Extend(Text) |
| 57 | function bottomTextStyle() { | 65 | function bottomTextStyle() { |
| 58 | - .fontSize(12) | ||
| 59 | - .fontColor('#B0B0B0') | 66 | + .fontSize('18fp') |
| 67 | + .fontColor($r('app.color.color_222222')) | ||
| 68 | + .maxLines(3) | ||
| 69 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 | ||
| 70 | + .align(Alignment.Start) | ||
| 71 | + .width('100%') | ||
| 72 | + .lineHeight(25) | ||
| 60 | } | 73 | } |
| 1 | import { CompDTO } from 'wdBean/Index'; | 1 | import { CompDTO } from 'wdBean/Index'; |
| 2 | +import { Logger } from 'wdKit/Index'; | ||
| 3 | +import PageModel from '../../viewmodel/PageModel'; | ||
| 2 | 4 | ||
| 3 | /** | 5 | /** |
| 4 | - * @Description: 广告稿件 底部标签+删除按钮 | 6 | + * @Description: 广告稿件 底部标签+删除按钮 |
| 5 | * @Author: | 7 | * @Author: |
| 6 | - * @Email: liyubing@wondertek.com.cn | 8 | + * @Email: liyubing@wondertek.com.cn |
| 7 | * @CreateDate: | 9 | * @CreateDate: |
| 8 | - * @UpdateRemark: 更新说明 | ||
| 9 | - * @Version: 1.0 | 10 | + * @UpdateRemark: 更新说明 |
| 11 | + * @Version: 1.0 | ||
| 10 | */ | 12 | */ |
| 11 | @Component | 13 | @Component |
| 12 | export struct CardAdvBottom { | 14 | export struct CardAdvBottom { |
| 13 | - @State compDTO: CompDTO = {} as CompDTO; | 15 | + pageModel: PageModel = new PageModel(); |
| 16 | + @State compDTO: CompDTO = {} as CompDTO | ||
| 14 | 17 | ||
| 15 | build() { | 18 | build() { |
| 16 | 19 | ||
| @@ -36,6 +39,30 @@ export struct CardAdvBottom { | @@ -36,6 +39,30 @@ export struct CardAdvBottom { | ||
| 36 | .borderColor($r('app.color.color_EDEDED')) | 39 | .borderColor($r('app.color.color_EDEDED')) |
| 37 | .borderRadius(4) | 40 | .borderRadius(4) |
| 38 | 41 | ||
| 39 | - }.width('100%') | 42 | + }.width('100%').onClick(() => { |
| 43 | + | ||
| 44 | + this.delComp() | ||
| 45 | + }) | ||
| 46 | + } | ||
| 47 | + /** | ||
| 48 | + * 删除稿件 | ||
| 49 | + */ | ||
| 50 | + private delComp() { | ||
| 51 | + if (this.pageModel) { | ||
| 52 | + | ||
| 53 | + let a = this.compDTO; | ||
| 54 | + let currentIndex = -1 | ||
| 55 | + for (let i = 0; i < this.pageModel.compList.size(); i++) { | ||
| 56 | + let b = this.pageModel.compList.getData(i) | ||
| 57 | + if (a.compStyle === b.compStyle && a.matInfo === b.matInfo) { | ||
| 58 | + currentIndex = i | ||
| 59 | + break; | ||
| 60 | + } | ||
| 61 | + } | ||
| 62 | + Logger.error("ZZZXXXXX","currentIndex====>"+currentIndex); | ||
| 63 | + if (currentIndex >= 0) { | ||
| 64 | + this.pageModel.compList.deleteItem(currentIndex) | ||
| 65 | + } | ||
| 66 | + } | ||
| 40 | } | 67 | } |
| 41 | } | 68 | } |
| 1 | //全标题 "appStyle":"2", | 1 | //全标题 "appStyle":"2", |
| 2 | import { CompDTO, ContentDTO } from 'wdBean'; | 2 | import { CompDTO, ContentDTO } from 'wdBean'; |
| 3 | +import { AdvExtraData, AdvExtraItemData } from 'wdBean/src/main/ets/bean/adv/AdvExtraData'; | ||
| 4 | +import { CompAdvMatInfoBean } from 'wdBean/src/main/ets/bean/adv/CompAdvInfoBean'; | ||
| 3 | import { CommonConstants } from 'wdConstant/Index'; | 5 | import { CommonConstants } from 'wdConstant/Index'; |
| 4 | import { ProcessUtils } from 'wdRouter'; | 6 | import { ProcessUtils } from 'wdRouter'; |
| 7 | +import PageModel from '../../viewmodel/PageModel'; | ||
| 5 | import { CardMediaInfo } from '../cardCommon/CardMediaInfo' | 8 | import { CardMediaInfo } from '../cardCommon/CardMediaInfo' |
| 6 | import { CardSourceInfo } from '../cardCommon/CardSourceInfo' | 9 | import { CardSourceInfo } from '../cardCommon/CardSourceInfo' |
| 10 | +import { CardAdvTop } from './CardAdvTop'; | ||
| 7 | 11 | ||
| 8 | const TAG: string = 'Card2Component'; | 12 | const TAG: string = 'Card2Component'; |
| 9 | 13 | ||
| 10 | -/** | ||
| 11 | - * @Description: 广告---冠名广告 | ||
| 12 | - * @Author: | ||
| 13 | - * @Email: liyubing@wondertek.com.cn | ||
| 14 | - * @CreateDate: | ||
| 15 | - * @UpdateRemark: 更新说明 | ||
| 16 | - * @Version: 1.0 | 14 | +/** |
| 15 | + * @Description: 广告---冠名广告 | ||
| 16 | + * @Author: | ||
| 17 | + * @Email: liyubing@wondertek.com.cn | ||
| 18 | + * @CreateDate: | ||
| 19 | + * @UpdateRemark: 更新说明 | ||
| 20 | + * @Version: 1.0 | ||
| 17 | */ | 21 | */ |
| 18 | @Component | 22 | @Component |
| 19 | export struct CardAdvGanMiComponent { | 23 | export struct CardAdvGanMiComponent { |
| 20 | - | ||
| 21 | @State compDTO: CompDTO = {} as CompDTO | 24 | @State compDTO: CompDTO = {} as CompDTO |
| 25 | + @State advExtraData: AdvExtraData = {} as AdvExtraData | ||
| 26 | + @State advLength: number = 0; | ||
| 27 | + pageModel: PageModel = new PageModel(); | ||
| 22 | 28 | ||
| 23 | aboutToAppear(): void { | 29 | aboutToAppear(): void { |
| 24 | 30 | ||
| 25 | - console.error('ZZZXXXXX', '--冠名广告------aboutToAppear-----') | 31 | + let extraData = this.compDTO.matInfo.extraData |
| 32 | + let labelDTO = JSON.parse(extraData) as AdvExtraData | ||
| 33 | + this.advExtraData = labelDTO | ||
| 34 | + //this.advExtraData.item = [this.advExtraData.item[0]] | ||
| 35 | + // this.advExtraData.item[2].title ="我爱你中国我爱你中国我爱你中国我爱你中国我爱你中国我爱你中国我爱你中国我爱你中国我爱你中国我爱你中国我爱你中国我爱你中国我爱你中国我爱你中国我爱你中国" | ||
| 36 | + this.advLength = this.advExtraData.item.length | ||
| 26 | } | 37 | } |
| 27 | 38 | ||
| 28 | aboutToDisappear(): void { | 39 | aboutToDisappear(): void { |
| 29 | 40 | ||
| 30 | - console.error('ZZZXXXXX', '--冠名广告------aboutToDisappear-----') | ||
| 31 | } | 41 | } |
| 32 | 42 | ||
| 33 | build() { | 43 | build() { |
| 34 | 44 | ||
| 35 | Column() { | 45 | Column() { |
| 36 | - Text(this.compDTO.matInfo.advTitle) | ||
| 37 | - .fontSize($r('app.float.font_size_17')) | ||
| 38 | - .fontColor($r('app.color.color_222222')) | ||
| 39 | - .maxLines(3) | ||
| 40 | - .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 | ||
| 41 | - .align(Alignment.Start) | 46 | + |
| 47 | + | ||
| 48 | + Row() { | ||
| 49 | + Stack() { | ||
| 50 | + //长图 | ||
| 51 | + Image(this.advExtraData.itemTopImage) | ||
| 52 | + .width(CommonConstants.FULL_WIDTH) | ||
| 53 | + .aspectRatio(343 / 40) | ||
| 54 | + .borderRadius(4) | ||
| 55 | + .borderWidth(0.5) | ||
| 56 | + .borderColor($r('app.color.color_0D000000')) | ||
| 57 | + | ||
| 58 | + // 广告标签和删除功能 | ||
| 59 | + CardAdvTop({ pageModel: this.pageModel, compDTO: this.compDTO }) | ||
| 60 | + } | ||
| 61 | + .alignContent(Alignment.Top) | ||
| 62 | + .width(CommonConstants.FULL_WIDTH) | ||
| 63 | + }.width('100%').padding({ | ||
| 64 | + left: $r('app.float.card_comp_pagePadding_lf'), | ||
| 65 | + right: $r('app.float.card_comp_pagePadding_lf'), | ||
| 66 | + }) | ||
| 67 | + | ||
| 68 | + | ||
| 69 | + // | ||
| 70 | + List({ space: 8 }) { | ||
| 71 | + | ||
| 72 | + ForEach(this.advExtraData.item, (content: AdvExtraItemData, index: number) => { | ||
| 73 | + | ||
| 74 | + ListItem() { | ||
| 75 | + // 广告列表信息 | ||
| 76 | + Column() { | ||
| 77 | + | ||
| 78 | + Image(content.image) | ||
| 79 | + .width('100%') | ||
| 80 | + .aspectRatio(150 / 84) | ||
| 81 | + .borderWidth(0.5) | ||
| 82 | + .borderColor($r('app.color.color_0D000000')) | ||
| 83 | + .borderRadius(4) | ||
| 84 | + | ||
| 85 | + Text(content.title) | ||
| 86 | + .fontSize('16fp') | ||
| 87 | + .fontColor($r('app.color.color_222222')) | ||
| 88 | + .fontSize('15fp') | ||
| 89 | + .maxLines(3) | ||
| 90 | + .lineHeight(20) | ||
| 91 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 92 | + .width('100%') | ||
| 93 | + .margin({ top: 8 }) | ||
| 94 | + | ||
| 95 | + } | ||
| 96 | + .width(this.advLength >= 3 ? 150 : this.advLength == 2 ? 210 : '100%') | ||
| 97 | + .margin({ left: index === 0 ? this.advLength == 1 ? 0 : 16 : 0 }) | ||
| 98 | + .onClick(() => { | ||
| 99 | + | ||
| 100 | + let matInfo: CompAdvMatInfoBean = { | ||
| 101 | + linkUrl: content.linkUrl, | ||
| 102 | + linkType: content.linkType | ||
| 103 | + } as CompAdvMatInfoBean; | ||
| 104 | + ProcessUtils.openAdvDetail(matInfo) | ||
| 105 | + | ||
| 106 | + }) | ||
| 107 | + | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + }) | ||
| 111 | + | ||
| 112 | + } | ||
| 113 | + .width('100%') | ||
| 114 | + .listDirection(Axis.Horizontal) | ||
| 115 | + .edgeEffect(EdgeEffect.None) | ||
| 116 | + .scrollBar(BarState.Off) | ||
| 117 | + // .contentStartOffset(this.advLength == 1 ? 0 : 16) | ||
| 118 | + .contentEndOffset(this.advLength == 1 ? 0 : 16) | ||
| 119 | + .margin({ top: 10, bottom: 10 }) | ||
| 120 | + .padding({ | ||
| 121 | + left: this.advLength == 1 ? 16 : 0, | ||
| 122 | + right: this.advLength == 1 ? 16 : 0, | ||
| 123 | + }) | ||
| 124 | + | ||
| 125 | + // 更多按钮 | ||
| 126 | + commonButton(this.advExtraData) | ||
| 127 | + | ||
| 42 | } | 128 | } |
| 43 | .width(CommonConstants.FULL_WIDTH) | 129 | .width(CommonConstants.FULL_WIDTH) |
| 44 | .padding({ | 130 | .padding({ |
| 45 | - left: $r('app.float.card_comp_pagePadding_lf'), | ||
| 46 | - right: $r('app.float.card_comp_pagePadding_lf'), | ||
| 47 | top: $r('app.float.card_comp_pagePadding_tb'), | 131 | top: $r('app.float.card_comp_pagePadding_tb'), |
| 48 | bottom: $r('app.float.card_comp_pagePadding_tb') | 132 | bottom: $r('app.float.card_comp_pagePadding_tb') |
| 49 | }) | 133 | }) |
| 50 | - .onClick((event: ClickEvent) => { | ||
| 51 | - //ProcessUtils.processPage(this.contentDTO) | ||
| 52 | - }) | 134 | + |
| 53 | } | 135 | } |
| 54 | } | 136 | } |
| 55 | 137 | ||
| 56 | -@Extend(Text) | ||
| 57 | -function bottomTextStyle() { | ||
| 58 | - .fontSize(12) | ||
| 59 | - .fontColor('#B0B0B0') | 138 | +/* |
| 139 | + 标题样式 | ||
| 140 | + */ | ||
| 141 | +@Builder | ||
| 142 | +function commonButton(advExtraData: AdvExtraData) { | ||
| 143 | + | ||
| 144 | + | ||
| 145 | + Row() { | ||
| 146 | + Row() { | ||
| 147 | + Blank() | ||
| 148 | + Text('查看更多').fontColor('#222222').fontSize('14fp') | ||
| 149 | + Image($r('app.media.icon_comp_more_right_red')).width(16).height(16) | ||
| 150 | + Blank() | ||
| 151 | + | ||
| 152 | + } | ||
| 153 | + .width('100%') | ||
| 154 | + .backgroundColor('#F5F5F5') | ||
| 155 | + .borderRadius(3) | ||
| 156 | + .padding({ top: 10, bottom: 10, }) | ||
| 157 | + .onClick(() => { | ||
| 158 | + let matInfo: CompAdvMatInfoBean = { | ||
| 159 | + linkUrl: advExtraData.itemMore.linkUrl, | ||
| 160 | + linkType: advExtraData.itemMore.linkType | ||
| 161 | + } as CompAdvMatInfoBean; | ||
| 162 | + ProcessUtils.openAdvDetail(matInfo) | ||
| 163 | + }) | ||
| 164 | + }.width('100%').padding({ | ||
| 165 | + left: $r('app.float.card_comp_pagePadding_lf'), | ||
| 166 | + right: $r('app.float.card_comp_pagePadding_lf'), | ||
| 167 | + | ||
| 168 | + }) | ||
| 169 | + | ||
| 60 | } | 170 | } |
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvLongImageComponent.ets
| 1 | //全标题 "appStyle":"2", | 1 | //全标题 "appStyle":"2", |
| 2 | -import { CompDTO, ContentDTO } from 'wdBean'; | ||
| 3 | -import { CommonConstants } from 'wdConstant/Index'; | 2 | +import { CompDTO } from 'wdBean'; |
| 3 | +import { CommonConstants, CompStyle } from 'wdConstant/Index'; | ||
| 4 | import { ProcessUtils } from 'wdRouter'; | 4 | import { ProcessUtils } from 'wdRouter'; |
| 5 | -import { CardMediaInfo } from '../cardCommon/CardMediaInfo' | ||
| 6 | -import { CardSourceInfo } from '../cardCommon/CardSourceInfo' | 5 | +import PageModel from '../../viewmodel/PageModel'; |
| 6 | +import { CardAdvBottom } from './CardAdvBottom'; | ||
| 7 | 7 | ||
| 8 | const TAG: string = 'Card2Component'; | 8 | const TAG: string = 'Card2Component'; |
| 9 | 9 | ||
| 10 | -/** | ||
| 11 | - * @Description: 广告---长通栏广告 和 顶部长通栏广告 | ||
| 12 | - * @Author: | ||
| 13 | - * @Email: liyubing@wondertek.com.cn | ||
| 14 | - * @CreateDate: | ||
| 15 | - * @UpdateRemark: 更新说明 | ||
| 16 | - * @Version: 1.0 | 10 | +/** |
| 11 | + * @Description: 广告---长通栏广告 和 顶部长通栏广告 | ||
| 12 | + * @Author: | ||
| 13 | + * @Email: liyubing@wondertek.com.cn | ||
| 14 | + * @CreateDate: | ||
| 15 | + * @UpdateRemark: 更新说明 | ||
| 16 | + * @Version: 1.0 | ||
| 17 | */ | 17 | */ |
| 18 | @Component | 18 | @Component |
| 19 | export struct CardAdvLongImageComponent { | 19 | export struct CardAdvLongImageComponent { |
| 20 | - | ||
| 21 | @State compDTO: CompDTO = {} as CompDTO | 20 | @State compDTO: CompDTO = {} as CompDTO |
| 21 | + @State haveTitle: boolean = true | ||
| 22 | + pageModel: PageModel = new PageModel(); | ||
| 22 | 23 | ||
| 23 | aboutToAppear(): void { | 24 | aboutToAppear(): void { |
| 24 | - | ||
| 25 | - console.error('ZZZXXXXX', '--长通栏广告 和 顶部长通栏广告------aboutToAppear-----') | 25 | + this.haveTitle = this.compDTO.matInfo.advSubType === CompStyle.Card_Adv_7; |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | aboutToDisappear(): void { | 28 | aboutToDisappear(): void { |
| 29 | 29 | ||
| 30 | - console.error('ZZZXXXXX', '--长通栏广告 和 顶部长通栏广告------aboutToDisappear-----') | ||
| 31 | } | 30 | } |
| 32 | 31 | ||
| 33 | build() { | 32 | build() { |
| 34 | 33 | ||
| 35 | Column() { | 34 | Column() { |
| 36 | - Text(this.compDTO.matInfo.advTitle) | ||
| 37 | - .fontSize($r('app.float.font_size_17')) | ||
| 38 | - .fontColor($r('app.color.color_222222')) | ||
| 39 | - .maxLines(3) | ||
| 40 | - .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 | ||
| 41 | - .align(Alignment.Start) | 35 | + //新闻标题 |
| 36 | + if (this.haveTitle) { | ||
| 37 | + Text(this.compDTO.matInfo.advTitle).width('100%').bottomTextStyle().margin({ bottom: 8, }) | ||
| 38 | + } | ||
| 39 | + //长图 | ||
| 40 | + Image(this.compDTO.matInfo.matImageUrl[0]) | ||
| 41 | + .width(CommonConstants.FULL_WIDTH) | ||
| 42 | + .aspectRatio(343 / 96) | ||
| 43 | + .borderRadius(4) | ||
| 44 | + .borderWidth(0.5) | ||
| 45 | + .borderColor($r('app.color.color_0D000000')) | ||
| 46 | + | ||
| 47 | + CardAdvBottom({ pageModel: this.pageModel, compDTO:this.compDTO }).margin({ | ||
| 48 | + top: 8, | ||
| 49 | + }) | ||
| 42 | } | 50 | } |
| 43 | .width(CommonConstants.FULL_WIDTH) | 51 | .width(CommonConstants.FULL_WIDTH) |
| 44 | .padding({ | 52 | .padding({ |
| @@ -48,13 +56,20 @@ export struct CardAdvLongImageComponent { | @@ -48,13 +56,20 @@ export struct CardAdvLongImageComponent { | ||
| 48 | bottom: $r('app.float.card_comp_pagePadding_tb') | 56 | bottom: $r('app.float.card_comp_pagePadding_tb') |
| 49 | }) | 57 | }) |
| 50 | .onClick((event: ClickEvent) => { | 58 | .onClick((event: ClickEvent) => { |
| 51 | - //ProcessUtils.processPage(this.contentDTO) | 59 | + ProcessUtils.openAdvDetail(this.compDTO.matInfo) |
| 52 | }) | 60 | }) |
| 53 | } | 61 | } |
| 54 | } | 62 | } |
| 55 | 63 | ||
| 64 | +/* | ||
| 65 | + 标题样式 | ||
| 66 | + */ | ||
| 56 | @Extend(Text) | 67 | @Extend(Text) |
| 57 | function bottomTextStyle() { | 68 | function bottomTextStyle() { |
| 58 | - .fontSize(12) | ||
| 59 | - .fontColor('#B0B0B0') | 69 | + .fontSize('18fp') |
| 70 | + .fontColor($r('app.color.color_222222')) | ||
| 71 | + .maxLines(3) | ||
| 72 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 | ||
| 73 | + .align(Alignment.Start) | ||
| 74 | + .lineHeight(25) | ||
| 60 | } | 75 | } |
| @@ -5,6 +5,7 @@ import { ProcessUtils } from 'wdRouter'; | @@ -5,6 +5,7 @@ import { ProcessUtils } from 'wdRouter'; | ||
| 5 | import measure from '@ohos.measure'; | 5 | import measure from '@ohos.measure'; |
| 6 | import { DisplayUtils } from 'wdKit/Index'; | 6 | import { DisplayUtils } from 'wdKit/Index'; |
| 7 | import { CardAdvBottom } from './CardAdvBottom'; | 7 | import { CardAdvBottom } from './CardAdvBottom'; |
| 8 | +import PageModel from '../../viewmodel/PageModel'; | ||
| 8 | 9 | ||
| 9 | const TAG: string = 'CardAdvSmallImageComponent'; | 10 | const TAG: string = 'CardAdvSmallImageComponent'; |
| 10 | 11 | ||
| @@ -20,10 +21,9 @@ const TAG: string = 'CardAdvSmallImageComponent'; | @@ -20,10 +21,9 @@ const TAG: string = 'CardAdvSmallImageComponent'; | ||
| 20 | export struct CardAdvSmallImageComponent { | 21 | export struct CardAdvSmallImageComponent { |
| 21 | @State compDTO: CompDTO = {} as CompDTO | 22 | @State compDTO: CompDTO = {} as CompDTO |
| 22 | @State isBigThreeLine: boolean = false // 标题的行数大于等于3行 是true | 23 | @State isBigThreeLine: boolean = false // 标题的行数大于等于3行 是true |
| 23 | - | 24 | + pageModel: PageModel = new PageModel(); |
| 24 | aboutToAppear(): void { | 25 | aboutToAppear(): void { |
| 25 | 26 | ||
| 26 | - console.error('ZZZXXXXX', '----小图卡----aboutToAppear-----') | ||
| 27 | // 计算标题文本行数 | 27 | // 计算标题文本行数 |
| 28 | let screenWith = DisplayUtils.getDeviceWidth(); | 28 | let screenWith = DisplayUtils.getDeviceWidth(); |
| 29 | screenWith = screenWith * 0.62 | 29 | screenWith = screenWith * 0.62 |
| @@ -33,7 +33,6 @@ export struct CardAdvSmallImageComponent { | @@ -33,7 +33,6 @@ export struct CardAdvSmallImageComponent { | ||
| 33 | 33 | ||
| 34 | aboutToDisappear(): void { | 34 | aboutToDisappear(): void { |
| 35 | 35 | ||
| 36 | - console.error('ZZZXXXXX', '---小图卡-----aboutToDisappear-----') | ||
| 37 | } | 36 | } |
| 38 | 37 | ||
| 39 | build() { | 38 | build() { |
| @@ -62,6 +61,7 @@ export struct CardAdvSmallImageComponent { | @@ -62,6 +61,7 @@ export struct CardAdvSmallImageComponent { | ||
| 62 | .borderWidth(0.5) | 61 | .borderWidth(0.5) |
| 63 | .borderColor($r('app.color.color_0D000000')) | 62 | .borderColor($r('app.color.color_0D000000')) |
| 64 | .borderRadius(4) | 63 | .borderRadius(4) |
| 64 | + //.alt('wwww.baidu.com') | ||
| 65 | .alignRules({ | 65 | .alignRules({ |
| 66 | top: { anchor: 'title_name', align: VerticalAlign.Top }, | 66 | top: { anchor: 'title_name', align: VerticalAlign.Top }, |
| 67 | left: { anchor: 'title_name', align: HorizontalAlign.End }, | 67 | left: { anchor: 'title_name', align: HorizontalAlign.End }, |
| @@ -69,7 +69,7 @@ export struct CardAdvSmallImageComponent { | @@ -69,7 +69,7 @@ export struct CardAdvSmallImageComponent { | ||
| 69 | .margin({ left: 12 }) | 69 | .margin({ left: 12 }) |
| 70 | 70 | ||
| 71 | 71 | ||
| 72 | - CardAdvBottom().width('62%').id('bottom_adv').alignRules({ | 72 | + CardAdvBottom({pageModel:this.pageModel,compDTO:this.compDTO}).width('62%').id('bottom_adv').alignRules({ |
| 73 | bottom: { anchor: this.isBigThreeLine ? '' : 'adv_imag', align: VerticalAlign.Bottom }, | 73 | bottom: { anchor: this.isBigThreeLine ? '' : 'adv_imag', align: VerticalAlign.Bottom }, |
| 74 | right: { anchor: this.isBigThreeLine ? '' : 'adv_imag', align: HorizontalAlign.Start }, | 74 | right: { anchor: this.isBigThreeLine ? '' : 'adv_imag', align: HorizontalAlign.Start }, |
| 75 | top: { anchor: this.isBigThreeLine ? 'title_name' : '', align: VerticalAlign.Bottom }, | 75 | top: { anchor: this.isBigThreeLine ? 'title_name' : '', align: VerticalAlign.Bottom }, |
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | import { CompDTO, ContentDTO } from 'wdBean'; | 2 | import { CompDTO, ContentDTO } from 'wdBean'; |
| 3 | import { CommonConstants } from 'wdConstant/Index'; | 3 | import { CommonConstants } from 'wdConstant/Index'; |
| 4 | import { ProcessUtils } from 'wdRouter'; | 4 | import { ProcessUtils } from 'wdRouter'; |
| 5 | +import PageModel from '../../viewmodel/PageModel'; | ||
| 5 | import { CardMediaInfo } from '../cardCommon/CardMediaInfo' | 6 | import { CardMediaInfo } from '../cardCommon/CardMediaInfo' |
| 6 | import { CardSourceInfo } from '../cardCommon/CardSourceInfo' | 7 | import { CardSourceInfo } from '../cardCommon/CardSourceInfo' |
| 7 | import { CardAdvBottom } from './CardAdvBottom'; | 8 | import { CardAdvBottom } from './CardAdvBottom'; |
| @@ -19,15 +20,13 @@ const TAG: string = 'Card2Component'; | @@ -19,15 +20,13 @@ const TAG: string = 'Card2Component'; | ||
| 19 | @Component | 20 | @Component |
| 20 | export struct CardAdvThreeImageComponent { | 21 | export struct CardAdvThreeImageComponent { |
| 21 | @State compDTO: CompDTO = {} as CompDTO | 22 | @State compDTO: CompDTO = {} as CompDTO |
| 22 | - | 23 | + pageModel: PageModel = new PageModel(); |
| 23 | aboutToAppear(): void { | 24 | aboutToAppear(): void { |
| 24 | 25 | ||
| 25 | - console.error('ZZZXXXXX', '---三图卡-----aboutToAppear-----') | ||
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | aboutToDisappear(): void { | 28 | aboutToDisappear(): void { |
| 29 | 29 | ||
| 30 | - console.error('ZZZXXXXX', '----三图卡----aboutToDisappear-----') | ||
| 31 | } | 30 | } |
| 32 | 31 | ||
| 33 | build() { | 32 | build() { |
| @@ -65,7 +64,7 @@ export struct CardAdvThreeImageComponent { | @@ -65,7 +64,7 @@ export struct CardAdvThreeImageComponent { | ||
| 65 | .margin({ top: 8 }) | 64 | .margin({ top: 8 }) |
| 66 | 65 | ||
| 67 | // 广告工具组件 | 66 | // 广告工具组件 |
| 68 | - CardAdvBottom().width('100%').margin({ top: 8 }) | 67 | + CardAdvBottom({pageModel:this.pageModel,compDTO:this.compDTO}).width('100%').margin({ top: 8 }) |
| 69 | } | 68 | } |
| 70 | .width('100%') | 69 | .width('100%') |
| 71 | .justifyContent(FlexAlign.Start) | 70 | .justifyContent(FlexAlign.Start) |
| 1 | +import { CompDTO } from 'wdBean/Index'; | ||
| 2 | +import { Logger } from 'wdKit/Index'; | ||
| 3 | +import PageModel from '../../viewmodel/PageModel'; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Description: 广告稿件 顶部标签+删除按钮 | ||
| 7 | + * @Author: | ||
| 8 | + * @Email: liyubing@wondertek.com.cn | ||
| 9 | + * @CreateDate: | ||
| 10 | + * @UpdateRemark: 更新说明 | ||
| 11 | + * @Version: 1.0 | ||
| 12 | + */ | ||
| 13 | +@Component | ||
| 14 | +export struct CardAdvTop { | ||
| 15 | + pageModel: PageModel = new PageModel(); | ||
| 16 | + compDTO: CompDTO = {} as CompDTO | ||
| 17 | + | ||
| 18 | + build() { | ||
| 19 | + | ||
| 20 | + Row() { | ||
| 21 | + Text($r('app.string.comp_advertisement')) | ||
| 22 | + .fontSize('10fp') | ||
| 23 | + .fontColor($r('app.color.white')) | ||
| 24 | + .width(28) | ||
| 25 | + .height(16) | ||
| 26 | + .backgroundColor('#4D000000') | ||
| 27 | + .borderRadius(4) | ||
| 28 | + .textAlign(TextAlign.Center) | ||
| 29 | + | ||
| 30 | + Blank() | ||
| 31 | + | ||
| 32 | + Stack() { | ||
| 33 | + Image($r('app.media.comp_adv_close_white')) | ||
| 34 | + .width(9) | ||
| 35 | + .height(9) | ||
| 36 | + .borderRadius({ | ||
| 37 | + topLeft: '4vp', | ||
| 38 | + topRight: '4vp', | ||
| 39 | + bottomLeft: '4vp', | ||
| 40 | + bottomRight: '4vp' | ||
| 41 | + }) | ||
| 42 | + } | ||
| 43 | + .width(18) | ||
| 44 | + .height(14) | ||
| 45 | + .backgroundColor('#4D000000') | ||
| 46 | + .borderWidth(0.5) | ||
| 47 | + .borderColor($r('app.color.white')) | ||
| 48 | + .borderRadius(4) | ||
| 49 | + | ||
| 50 | + }.width('100%').padding({ | ||
| 51 | + top: 8, | ||
| 52 | + left: 8, | ||
| 53 | + right: 8 | ||
| 54 | + }).onClick(() => { | ||
| 55 | + this.delComp() | ||
| 56 | + }) | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + /** | ||
| 60 | + * 删除稿件 | ||
| 61 | + */ | ||
| 62 | + private delComp() { | ||
| 63 | + if (this.pageModel) { | ||
| 64 | + | ||
| 65 | + let a = this.compDTO; | ||
| 66 | + let currentIndex = -1 | ||
| 67 | + for (let i = 0; i < this.pageModel.compList.size(); i++) { | ||
| 68 | + let b = this.pageModel.compList.getData(i) | ||
| 69 | + if (a.compStyle === b.compStyle && a.matInfo === b.matInfo) { | ||
| 70 | + currentIndex = i | ||
| 71 | + break; | ||
| 72 | + } | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + Logger.error("ZZZXXXXX","currentIndex====>"+currentIndex); | ||
| 76 | + if (currentIndex >= 0) { | ||
| 77 | + this.pageModel.compList.deleteItem(currentIndex) | ||
| 78 | + } | ||
| 79 | + } | ||
| 80 | + } | ||
| 81 | +} |
| 1 | //全标题 "appStyle":"2", | 1 | //全标题 "appStyle":"2", |
| 2 | -import { CompDTO, ContentDTO } from 'wdBean'; | 2 | +import { CompDTO, ContentDTO, VideoInfoDTO } from 'wdBean'; |
| 3 | import { CommonConstants } from 'wdConstant/Index'; | 3 | import { CommonConstants } from 'wdConstant/Index'; |
| 4 | import { ProcessUtils } from 'wdRouter'; | 4 | import { ProcessUtils } from 'wdRouter'; |
| 5 | +import PageModel from '../../viewmodel/PageModel'; | ||
| 5 | import { CardMediaInfo } from '../cardCommon/CardMediaInfo' | 6 | import { CardMediaInfo } from '../cardCommon/CardMediaInfo' |
| 6 | import { CardSourceInfo } from '../cardCommon/CardSourceInfo' | 7 | import { CardSourceInfo } from '../cardCommon/CardSourceInfo' |
| 8 | +import { CardAdvBottom } from './CardAdvBottom'; | ||
| 7 | 9 | ||
| 8 | const TAG: string = 'Card2Component'; | 10 | const TAG: string = 'Card2Component'; |
| 9 | 11 | ||
| 10 | -/** | ||
| 11 | - * @Description: 广告---视频广告 | ||
| 12 | - * @Author: | ||
| 13 | - * @Email: liyubing@wondertek.com.cn | ||
| 14 | - * @CreateDate: | ||
| 15 | - * @UpdateRemark: 更新说明 | ||
| 16 | - * @Version: 1.0 | 12 | +/** |
| 13 | + * @Description: 广告---视频广告 | ||
| 14 | + * @Author: | ||
| 15 | + * @Email: liyubing@wondertek.com.cn | ||
| 16 | + * @CreateDate: | ||
| 17 | + * @UpdateRemark: 更新说明 | ||
| 18 | + * @Version: 1.0 | ||
| 17 | */ | 19 | */ |
| 18 | @Component | 20 | @Component |
| 19 | export struct CardAdvVideoComponent { | 21 | export struct CardAdvVideoComponent { |
| 20 | - | ||
| 21 | @State compDTO: CompDTO = {} as CompDTO | 22 | @State compDTO: CompDTO = {} as CompDTO |
| 22 | - | 23 | + @State contentDTO: ContentDTO = {} as ContentDTO |
| 24 | + pageModel: PageModel = new PageModel(); | ||
| 23 | aboutToAppear(): void { | 25 | aboutToAppear(): void { |
| 24 | 26 | ||
| 25 | - console.error('ZZZXXXXX', '--视频广告------aboutToAppear-----') | 27 | + // this.contentDTO.objectType = '1' |
| 28 | + // this.contentDTO.videoInfo = { videoDuration: 1000 } as VideoInfoDTO | ||
| 26 | } | 29 | } |
| 27 | 30 | ||
| 28 | aboutToDisappear(): void { | 31 | aboutToDisappear(): void { |
| 29 | 32 | ||
| 30 | - console.error('ZZZXXXXX', '---视频广告-----aboutToDisappear-----') | ||
| 31 | } | 33 | } |
| 32 | 34 | ||
| 33 | build() { | 35 | build() { |
| 34 | 36 | ||
| 35 | Column() { | 37 | Column() { |
| 36 | - Text(this.compDTO.matInfo.advTitle) | ||
| 37 | - .fontSize($r('app.float.font_size_17')) | ||
| 38 | - .fontColor($r('app.color.color_222222')) | ||
| 39 | - .maxLines(3) | ||
| 40 | - .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 | ||
| 41 | - .align(Alignment.Start) | 38 | + |
| 39 | + //新闻标题 | ||
| 40 | + Text(this.compDTO.matInfo.advTitle).bottomTextStyle() | ||
| 41 | + //大图 | ||
| 42 | + Stack() { | ||
| 43 | + Image(this.compDTO.matInfo.matImageUrl[0]) | ||
| 44 | + .width(CommonConstants.FULL_WIDTH) | ||
| 45 | + .aspectRatio(16 / 9) | ||
| 46 | + .borderRadius(4) | ||
| 47 | + .borderWidth(0.5) | ||
| 48 | + .borderColor($r('app.color.color_0D000000')) | ||
| 49 | + //播放状态+时长 | ||
| 50 | + CardMediaInfo({ | ||
| 51 | + contentDTO: this.contentDTO | ||
| 52 | + }) | ||
| 53 | + } | ||
| 54 | + .alignContent(Alignment.BottomEnd) | ||
| 55 | + .width(CommonConstants.FULL_WIDTH) | ||
| 56 | + .margin({ top: 8 }) | ||
| 57 | + | ||
| 58 | + CardAdvBottom({pageModel:this.pageModel,compDTO:this.compDTO}).margin({ | ||
| 59 | + top: 8, | ||
| 60 | + }) | ||
| 42 | } | 61 | } |
| 43 | .width(CommonConstants.FULL_WIDTH) | 62 | .width(CommonConstants.FULL_WIDTH) |
| 44 | .padding({ | 63 | .padding({ |
| @@ -48,13 +67,21 @@ export struct CardAdvVideoComponent { | @@ -48,13 +67,21 @@ export struct CardAdvVideoComponent { | ||
| 48 | bottom: $r('app.float.card_comp_pagePadding_tb') | 67 | bottom: $r('app.float.card_comp_pagePadding_tb') |
| 49 | }) | 68 | }) |
| 50 | .onClick((event: ClickEvent) => { | 69 | .onClick((event: ClickEvent) => { |
| 51 | - //ProcessUtils.processPage(this.contentDTO) | 70 | + ProcessUtils.openAdvDetail(this.compDTO.matInfo) |
| 52 | }) | 71 | }) |
| 53 | } | 72 | } |
| 54 | } | 73 | } |
| 55 | 74 | ||
| 75 | +/* | ||
| 76 | + 标题样式 | ||
| 77 | + */ | ||
| 56 | @Extend(Text) | 78 | @Extend(Text) |
| 57 | function bottomTextStyle() { | 79 | function bottomTextStyle() { |
| 58 | - .fontSize(12) | ||
| 59 | - .fontColor('#B0B0B0') | 80 | + .fontSize('18fp') |
| 81 | + .fontColor($r('app.color.color_222222')) | ||
| 82 | + .maxLines(3) | ||
| 83 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 | ||
| 84 | + .align(Alignment.Start) | ||
| 85 | + .width('100%') | ||
| 86 | + .lineHeight(25) | ||
| 60 | } | 87 | } |
| 1 | -//全标题 "appStyle":"2", | ||
| 2 | -import { CompDTO, ContentDTO } from 'wdBean'; | 1 | +import { CompDTO } from 'wdBean'; |
| 2 | +import { AdvExtraData, AdvExtraItemData } from 'wdBean/src/main/ets/bean/adv/AdvExtraData'; | ||
| 3 | +import { CompAdvMatInfoBean } from 'wdBean/src/main/ets/bean/adv/CompAdvInfoBean'; | ||
| 3 | import { CommonConstants } from 'wdConstant/Index'; | 4 | import { CommonConstants } from 'wdConstant/Index'; |
| 4 | import { ProcessUtils } from 'wdRouter'; | 5 | import { ProcessUtils } from 'wdRouter'; |
| 5 | -import { CardMediaInfo } from '../cardCommon/CardMediaInfo' | ||
| 6 | -import { CardSourceInfo } from '../cardCommon/CardSourceInfo' | 6 | +import PageModel from '../../viewmodel/PageModel'; |
| 7 | +import { CardAdvTop } from './CardAdvTop'; | ||
| 7 | 8 | ||
| 8 | const TAG: string = 'Card2Component'; | 9 | const TAG: string = 'Card2Component'; |
| 9 | 10 | ||
| 10 | -/** | ||
| 11 | - * @Description: 广告---冠名广告 | ||
| 12 | - * @Author: | ||
| 13 | - * @Email: liyubing@wondertek.com.cn | ||
| 14 | - * @CreateDate: | ||
| 15 | - * @UpdateRemark: 更新说明 | ||
| 16 | - * @Version: 1.0 | 11 | +/** |
| 12 | + * @Description: 广告---展会广告 | ||
| 13 | + * @Author: | ||
| 14 | + * @Email: liyubing@wondertek.com.cn | ||
| 15 | + * @CreateDate: | ||
| 16 | + * @UpdateRemark: 更新说明 | ||
| 17 | + * @Version: 1.0 | ||
| 17 | */ | 18 | */ |
| 18 | @Component | 19 | @Component |
| 19 | export struct CardAdvVideoExComponent { | 20 | export struct CardAdvVideoExComponent { |
| 20 | - | ||
| 21 | @State compDTO: CompDTO = {} as CompDTO | 21 | @State compDTO: CompDTO = {} as CompDTO |
| 22 | + @State advExtraData: AdvExtraData = {} as AdvExtraData | ||
| 23 | + pageModel: PageModel = new PageModel(); | ||
| 22 | 24 | ||
| 23 | aboutToAppear(): void { | 25 | aboutToAppear(): void { |
| 24 | 26 | ||
| 25 | - console.error('ZZZXXXXX', '--冠名广告------aboutToAppear-----') | 27 | + |
| 28 | + let extraData = this.compDTO.matInfo.extraData | ||
| 29 | + let labelDTO = JSON.parse(extraData) as AdvExtraData | ||
| 30 | + this.advExtraData = labelDTO | ||
| 26 | } | 31 | } |
| 27 | 32 | ||
| 28 | aboutToDisappear(): void { | 33 | aboutToDisappear(): void { |
| 29 | 34 | ||
| 30 | - console.error('ZZZXXXXX', '----冠名广告----aboutToDisappear-----') | ||
| 31 | } | 35 | } |
| 32 | 36 | ||
| 33 | build() { | 37 | build() { |
| 34 | 38 | ||
| 35 | Column() { | 39 | Column() { |
| 36 | - Text(this.compDTO.matInfo.advTitle) | ||
| 37 | - .fontSize($r('app.float.font_size_17')) | ||
| 38 | - .fontColor($r('app.color.color_222222')) | ||
| 39 | - .maxLines(3) | ||
| 40 | - .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 | ||
| 41 | - .align(Alignment.Start) | 40 | + |
| 41 | + Stack() { | ||
| 42 | + //长图 | ||
| 43 | + Image(this.advExtraData.itemTopImage) | ||
| 44 | + .width(CommonConstants.FULL_WIDTH) | ||
| 45 | + .aspectRatio(343 / 80) | ||
| 46 | + .borderRadius(4) | ||
| 47 | + .borderWidth(0.5) | ||
| 48 | + .borderColor($r('app.color.color_0D000000')) | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + CardAdvTop({ pageModel: this.pageModel, compDTO: this.compDTO }) | ||
| 52 | + } | ||
| 53 | + .alignContent(Alignment.Top) | ||
| 54 | + .width(CommonConstants.FULL_WIDTH) | ||
| 55 | + | ||
| 56 | + // | ||
| 57 | + List({ space: 10 }) { | ||
| 58 | + | ||
| 59 | + ForEach(this.advExtraData.item, (content: AdvExtraItemData) => { | ||
| 60 | + | ||
| 61 | + ListItem() { | ||
| 62 | + | ||
| 63 | + Text(content.title).fontSize('16fp').fontColor($r('app.color.color_222222')).width('100%').onClick(() => { | ||
| 64 | + let matInfo: CompAdvMatInfoBean = { | ||
| 65 | + linkUrl: content.linkUrl, | ||
| 66 | + linkType: content.linkType | ||
| 67 | + } as CompAdvMatInfoBean; | ||
| 68 | + ProcessUtils.openAdvDetail(matInfo) | ||
| 69 | + }) | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + }) | ||
| 73 | + | ||
| 74 | + }.width('100%').listDirection(Axis.Vertical).margin({ top: 10, bottom: 10 }) | ||
| 75 | + | ||
| 76 | + // 更多按钮 | ||
| 77 | + commonButton(this.advExtraData) | ||
| 78 | + | ||
| 42 | } | 79 | } |
| 43 | .width(CommonConstants.FULL_WIDTH) | 80 | .width(CommonConstants.FULL_WIDTH) |
| 44 | .padding({ | 81 | .padding({ |
| @@ -47,14 +84,33 @@ export struct CardAdvVideoExComponent { | @@ -47,14 +84,33 @@ export struct CardAdvVideoExComponent { | ||
| 47 | top: $r('app.float.card_comp_pagePadding_tb'), | 84 | top: $r('app.float.card_comp_pagePadding_tb'), |
| 48 | bottom: $r('app.float.card_comp_pagePadding_tb') | 85 | bottom: $r('app.float.card_comp_pagePadding_tb') |
| 49 | }) | 86 | }) |
| 50 | - .onClick((event: ClickEvent) => { | ||
| 51 | - //ProcessUtils.processPage(this.contentDTO) | ||
| 52 | - }) | 87 | + |
| 53 | } | 88 | } |
| 54 | } | 89 | } |
| 55 | 90 | ||
| 56 | -@Extend(Text) | ||
| 57 | -function bottomTextStyle() { | ||
| 58 | - .fontSize(12) | ||
| 59 | - .fontColor('#B0B0B0') | 91 | +/* |
| 92 | + 标题样式 | ||
| 93 | + */ | ||
| 94 | +@Builder | ||
| 95 | +function commonButton(advExtraData: AdvExtraData) { | ||
| 96 | + | ||
| 97 | + | ||
| 98 | + Row() { | ||
| 99 | + Blank() | ||
| 100 | + Text('查看更多').fontColor('#222222').fontSize('14fp') | ||
| 101 | + Image($r('app.media.icon_comp_more_right_red')).width(16).height(16) | ||
| 102 | + Blank() | ||
| 103 | + | ||
| 104 | + } | ||
| 105 | + .width('100%') | ||
| 106 | + .backgroundColor('#F5F5F5') | ||
| 107 | + .borderRadius(3) | ||
| 108 | + .padding({ top: 10, bottom: 10, }) | ||
| 109 | + .onClick(() => { | ||
| 110 | + let matInfo: CompAdvMatInfoBean = { | ||
| 111 | + linkUrl: advExtraData.itemMore.linkUrl, | ||
| 112 | + linkType: advExtraData.itemMore.linkType | ||
| 113 | + } as CompAdvMatInfoBean; | ||
| 114 | + ProcessUtils.openAdvDetail(matInfo) | ||
| 115 | + }) | ||
| 60 | } | 116 | } |
| 1 | import { ContentDTO, slideShows } from 'wdBean'; | 1 | import { ContentDTO, slideShows } from 'wdBean'; |
| 2 | -import { CommonConstants } from 'wdConstant' | ||
| 3 | -import { DateTimeUtils } from 'wdKit'; | 2 | +import { CommonConstants } from 'wdConstant'; |
| 4 | import { ProcessUtils } from 'wdRouter'; | 3 | import { ProcessUtils } from 'wdRouter'; |
| 5 | -import { CardSourceInfo } from '../cardCommon/CardSourceInfo' | ||
| 6 | -import { CardMediaInfo } from '../cardCommon/CardMediaInfo' | 4 | +import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; |
| 5 | +import { CardMediaInfo } from '../cardCommon/CardMediaInfo'; | ||
| 7 | 6 | ||
| 8 | /** | 7 | /** |
| 9 | * 大专题卡--CompStyle: 10 | 8 | * 大专题卡--CompStyle: 10 |
| @@ -110,12 +109,23 @@ export struct Card10Component { | @@ -110,12 +109,23 @@ export struct Card10Component { | ||
| 110 | 109 | ||
| 111 | // 右侧图片 | 110 | // 右侧图片 |
| 112 | if (item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) { | 111 | if (item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) { |
| 113 | - Image(item.fullColumnImgUrls[0].url) | ||
| 114 | - .width(117) | ||
| 115 | - .height(78) | ||
| 116 | - .objectFit(ImageFit.Cover) | ||
| 117 | - .borderRadius($r('app.float.image_border_radius')) | ||
| 118 | - .margin({ left: 12 }) | 112 | + Stack() { |
| 113 | + Image(item.fullColumnImgUrls[0].url) | ||
| 114 | + .width(117) | ||
| 115 | + .height(78) | ||
| 116 | + .objectFit(ImageFit.Cover) | ||
| 117 | + .borderRadius($r('app.float.image_border_radius')) | ||
| 118 | + .margin({ left: 12 }) | ||
| 119 | + CardMediaInfo({ | ||
| 120 | + contentDTO: { | ||
| 121 | + objectType: String(item.objectType), | ||
| 122 | + videoInfo: { videoDuration: Number(item.videoDuration) as number }, | ||
| 123 | + photoNum: Number(item.photoNum), | ||
| 124 | + voiceInfo: { voiceDuration: Number(item.voiceDuration) as number } | ||
| 125 | + } as ContentDTO | ||
| 126 | + }) | ||
| 127 | + } | ||
| 128 | + .alignContent(Alignment.BottomEnd) | ||
| 119 | } | 129 | } |
| 120 | } | 130 | } |
| 121 | .padding({ top: 10, bottom: 10 }) | 131 | .padding({ top: 10, bottom: 10 }) |
| 1 | import { ContentDTO, slideShows } from 'wdBean'; | 1 | import { ContentDTO, slideShows } from 'wdBean'; |
| 2 | -import { CommonConstants } from 'wdConstant' | 2 | +import { CommonConstants } from 'wdConstant'; |
| 3 | import { DateTimeUtils } from 'wdKit'; | 3 | import { DateTimeUtils } from 'wdKit'; |
| 4 | import { ProcessUtils } from 'wdRouter'; | 4 | import { ProcessUtils } from 'wdRouter'; |
| 5 | 5 | ||
| @@ -104,10 +104,12 @@ export struct Card9Component { | @@ -104,10 +104,12 @@ export struct Card9Component { | ||
| 104 | Column() { | 104 | Column() { |
| 105 | Row() { | 105 | Row() { |
| 106 | // 标题 | 106 | // 标题 |
| 107 | - Image($r("app.media.timeline_rect")) | 107 | + Image($r("app.media.timeAxis")) |
| 108 | .width(9) | 108 | .width(9) |
| 109 | .height(9) | 109 | .height(9) |
| 110 | .margin({ right: 5 }) | 110 | .margin({ right: 5 }) |
| 111 | + .fillColor(item.newsTitleColor) | ||
| 112 | + | ||
| 111 | Text(DateTimeUtils.formatDate(item.publishTime, "MM月dd日 HH:mm")) | 113 | Text(DateTimeUtils.formatDate(item.publishTime, "MM月dd日 HH:mm")) |
| 112 | .fontSize($r('app.float.font_size_12')) | 114 | .fontSize($r('app.float.font_size_12')) |
| 113 | .fontColor($r('app.color.color_222222')) | 115 | .fontColor($r('app.color.color_222222')) |
| @@ -15,7 +15,7 @@ export class publishCommentModel { | @@ -15,7 +15,7 @@ export class publishCommentModel { | ||
| 15 | /*【迭代二新增】关联的频道id/专题id; 页面必传*/ | 15 | /*【迭代二新增】关联的频道id/专题id; 页面必传*/ |
| 16 | targetRelObjectId: string = "" | 16 | targetRelObjectId: string = "" |
| 17 | /*【迭代二新增】是否是重点稿件 1是 0否 页面必传*/ | 17 | /*【迭代二新增】是否是重点稿件 1是 0否 页面必传*/ |
| 18 | - keyArticle: string = '' | 18 | + keyArticle: string = '0' |
| 19 | /*内容类别, 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,14:动态(13和14为中文版新增) 页面必传*/ | 19 | /*内容类别, 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,14:动态(13和14为中文版新增) 页面必传*/ |
| 20 | targetType: string = '' | 20 | targetType: string = '' |
| 21 | /*评论总数*/ | 21 | /*评论总数*/ |
| @@ -9,8 +9,9 @@ import measure from '@ohos.measure' | @@ -9,8 +9,9 @@ import measure from '@ohos.measure' | ||
| 9 | import { CommentCustomDialog } from './CommentCustomDialog' | 9 | import { CommentCustomDialog } from './CommentCustomDialog' |
| 10 | import { publishCommentModel } from '../model/PublishCommentModel'; | 10 | import { publishCommentModel } from '../model/PublishCommentModel'; |
| 11 | import { ifaa } from '@kit.OnlineAuthenticationKit'; | 11 | import { ifaa } from '@kit.OnlineAuthenticationKit'; |
| 12 | -import { HttpUrlUtils } from 'wdNetwork/Index'; | 12 | +import { HttpUrlUtils, HttpUtils } from 'wdNetwork/Index'; |
| 13 | import NoMoreLayout from '../../page/NoMoreLayout'; | 13 | import NoMoreLayout from '../../page/NoMoreLayout'; |
| 14 | +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | ||
| 14 | 15 | ||
| 15 | const TAG = 'CommentComponent'; | 16 | const TAG = 'CommentComponent'; |
| 16 | 17 | ||
| @@ -25,6 +26,10 @@ export struct CommentComponent { | @@ -25,6 +26,10 @@ export struct CommentComponent { | ||
| 25 | // @State private browSingModel: commentListModel = new commentListModel() | 26 | // @State private browSingModel: commentListModel = new commentListModel() |
| 26 | /*必传*/ | 27 | /*必传*/ |
| 27 | @ObjectLink publishCommentModel: publishCommentModel | 28 | @ObjectLink publishCommentModel: publishCommentModel |
| 29 | + | ||
| 30 | + listScroller: ListScroller = new ListScroller(); // scroller控制器 | ||
| 31 | + historyOffset: number = 0; // 上次浏览到列表距离顶端的偏移量offset | ||
| 32 | + | ||
| 28 | isloading: boolean = false | 33 | isloading: boolean = false |
| 29 | @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource(); | 34 | @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource(); |
| 30 | @State dialogController: CustomDialogController | null = null; | 35 | @State dialogController: CustomDialogController | null = null; |
| @@ -69,11 +74,12 @@ export struct CommentComponent { | @@ -69,11 +74,12 @@ export struct CommentComponent { | ||
| 69 | 74 | ||
| 70 | // | 75 | // |
| 71 | addCommentLocal() { | 76 | addCommentLocal() { |
| 72 | - let model = commentViewModel.deepCopyCommentItemModel(this.publishCommentModel.lastCommentModel) | 77 | + // let model = commentViewModel.deepCopyCommentItemModel(this.publishCommentModel.lastCommentModel) |
| 78 | + let model = this.publishCommentModel.lastCommentModel | ||
| 73 | /*一级评论*/ | 79 | /*一级评论*/ |
| 80 | + // if (this.publishCommentModel.lastCommentModel) | ||
| 74 | if (this.publishCommentModel.lastCommentModel.parentId == '-1') { | 81 | if (this.publishCommentModel.lastCommentModel.parentId == '-1') { |
| 75 | this.allDatas.addFirstItem(model) | 82 | this.allDatas.addFirstItem(model) |
| 76 | - //TODO 跳转顶部 | ||
| 77 | } else { | 83 | } else { |
| 78 | //二级评论 | 84 | //二级评论 |
| 79 | this.allDatas.getDataArray().forEach(element => { | 85 | this.allDatas.getDataArray().forEach(element => { |
| @@ -134,7 +140,7 @@ export struct CommentComponent { | @@ -134,7 +140,7 @@ export struct CommentComponent { | ||
| 134 | 140 | ||
| 135 | build() { | 141 | build() { |
| 136 | Column() { | 142 | Column() { |
| 137 | - List() { | 143 | + List({scroller:this.listScroller}) { |
| 138 | ListItemGroup({ header: this.titleHeader() }) | 144 | ListItemGroup({ header: this.titleHeader() }) |
| 139 | 145 | ||
| 140 | LazyForEach(this.allDatas, (item: commentItemModel, index: number) => { | 146 | LazyForEach(this.allDatas, (item: commentItemModel, index: number) => { |
| @@ -176,7 +182,6 @@ export struct CommentComponent { | @@ -176,7 +182,6 @@ export struct CommentComponent { | ||
| 176 | if (this.hasMore === false) NoMoreLayout() | 182 | if (this.hasMore === false) NoMoreLayout() |
| 177 | } | 183 | } |
| 178 | } | 184 | } |
| 179 | - | ||
| 180 | .onReachEnd(()=>{ | 185 | .onReachEnd(()=>{ |
| 181 | if (this.hasMore) { | 186 | if (this.hasMore) { |
| 182 | this.getData() | 187 | this.getData() |
| @@ -552,6 +557,12 @@ struct commentFooterView { | @@ -552,6 +557,12 @@ struct commentFooterView { | ||
| 552 | 557 | ||
| 553 | } | 558 | } |
| 554 | .onClick(() => { | 559 | .onClick(() => { |
| 560 | + // 未登录,跳转登录 | ||
| 561 | + const user_id = HttpUtils.getUserId() | ||
| 562 | + if (!user_id) { | ||
| 563 | + WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | ||
| 564 | + return | ||
| 565 | + } | ||
| 555 | commentLikeChange(this.item) | 566 | commentLikeChange(this.item) |
| 556 | commentViewModel.commentLike(this.item).then(() => { | 567 | commentViewModel.commentLike(this.item).then(() => { |
| 557 | }).catch(() => { | 568 | }).catch(() => { |
| @@ -7,17 +7,17 @@ import commentViewModel from '../viewmodel/CommentViewModel' | @@ -7,17 +7,17 @@ import commentViewModel from '../viewmodel/CommentViewModel' | ||
| 7 | @Preview | 7 | @Preview |
| 8 | @CustomDialog | 8 | @CustomDialog |
| 9 | export struct CommentCustomDialog { | 9 | export struct CommentCustomDialog { |
| 10 | - | ||
| 11 | @ObjectLink publishCommentModel: publishCommentModel | 10 | @ObjectLink publishCommentModel: publishCommentModel |
| 12 | controller?: CustomDialogController | 11 | controller?: CustomDialogController |
| 13 | confirm: (value: Record<string, string>) => void = () => { | 12 | confirm: (value: Record<string, string>) => void = () => { |
| 14 | } | 13 | } |
| 15 | @State private emojiSwitch: boolean = false | 14 | @State private emojiSwitch: boolean = false |
| 16 | textInputController: TextAreaController = new TextAreaController() | 15 | textInputController: TextAreaController = new TextAreaController() |
| 16 | + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } | ||
| 17 | 17 | ||
| 18 | aboutToAppear(): void { | 18 | aboutToAppear(): void { |
| 19 | 19 | ||
| 20 | - | 20 | + // this.textInputController.caretPosition(0) |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | publishCommentRequest() { | 23 | publishCommentRequest() { |
| @@ -25,9 +25,11 @@ export struct CommentCustomDialog { | @@ -25,9 +25,11 @@ export struct CommentCustomDialog { | ||
| 25 | // this.publishCommentModel.commentContent = this.commentText | 25 | // this.publishCommentModel.commentContent = this.commentText |
| 26 | //TODO 判断类型 | 26 | //TODO 判断类型 |
| 27 | this.publishCommentModel.commentType = '2' | 27 | this.publishCommentModel.commentType = '2' |
| 28 | - commentViewModel.publishComment(this.publishCommentModel).then((model:commentItemModel) => { | 28 | + commentViewModel.publishComment(this.publishCommentModel).then((model: commentItemModel) => { |
| 29 | this.publishCommentModel.commentContent = '' | 29 | this.publishCommentModel.commentContent = '' |
| 30 | - this.publishCommentModel.lastCommentModel = model | 30 | + // |
| 31 | + | ||
| 32 | + this.publishCommentModel.lastCommentModel = commentViewModel.deepCopyCommentItemModel(model) | ||
| 31 | // this.commentText = '' | 33 | // this.commentText = '' |
| 32 | if (this.controller != null) { | 34 | if (this.controller != null) { |
| 33 | this.controller.close() | 35 | this.controller.close() |
| @@ -72,12 +74,13 @@ export struct CommentCustomDialog { | @@ -72,12 +74,13 @@ export struct CommentCustomDialog { | ||
| 72 | .height(30) | 74 | .height(30) |
| 73 | .onClick(() => { | 75 | .onClick(() => { |
| 74 | 76 | ||
| 75 | - // this.commentText = this.commentText + '神鼎' | 77 | + this.positionInfo = this.textInputController.getCaretOffset() |
| 78 | + | ||
| 76 | this.emojiSwitch = !this.emojiSwitch | 79 | this.emojiSwitch = !this.emojiSwitch |
| 77 | if (this.emojiSwitch) { | 80 | if (this.emojiSwitch) { |
| 78 | this.textInputController.stopEditing() | 81 | this.textInputController.stopEditing() |
| 79 | } else { | 82 | } else { |
| 80 | - this.textInputController.caretPosition(this.textInputController.getTextContentRect().x) | 83 | + // this.textInputController.caretPosition(this.textInputController.getTextContentRect().x) |
| 81 | } | 84 | } |
| 82 | 85 | ||
| 83 | }) | 86 | }) |
| @@ -114,7 +117,7 @@ export struct CommentCustomDialog { | @@ -114,7 +117,7 @@ export struct CommentCustomDialog { | ||
| 114 | 117 | ||
| 115 | //表情view | 118 | //表情view |
| 116 | if (this.emojiSwitch) { | 119 | if (this.emojiSwitch) { |
| 117 | - emojiView() | 120 | + emojiView({ publishCommentModel: this.publishCommentModel }).height(150) |
| 118 | } | 121 | } |
| 119 | 122 | ||
| 120 | }.backgroundColor(Color.White) | 123 | }.backgroundColor(Color.White) |
| @@ -127,10 +130,90 @@ export struct CommentCustomDialog { | @@ -127,10 +130,90 @@ export struct CommentCustomDialog { | ||
| 127 | 130 | ||
| 128 | @Component | 131 | @Component |
| 129 | struct emojiView { | 132 | struct emojiView { |
| 133 | + @ObjectLink publishCommentModel: publishCommentModel | ||
| 134 | + /*没找到获取系统emoji的方案*/ | ||
| 135 | + private emojiString = '😀,😁,😂,😃,😄,😅,😆,😇,😈,😉,😊,😋,😌,😍,😎,😏,😐,😑,😒,😓,😔,😕,😖,😗,😘,😙,😚,😛,😜,😝,😞,😟,😠,😡,😢,😣,😤,😥,😦,😧,😨,😩,😪,😫,😬,😭,😮,😯,😰,😱,😲,😳,😴,😵,😶,😷,😸,😹,😺,😻,😼,😽,😾,😿,🙀,🙅,🙆,🙇,🙈,🙉,🙊,🙋,🙌,🙍,🙎,🙏' | ||
| 136 | + private displayArray: string[][] = [] | ||
| 137 | + private swiperController: SwiperController = new SwiperController() | ||
| 138 | + | ||
| 139 | + aboutToAppear(): void { | ||
| 140 | + | ||
| 141 | + | ||
| 142 | + | ||
| 143 | + this.displayArray = chunk(this.emojiString.split(','), 20) | ||
| 144 | + | ||
| 145 | + //补上删除按钮以及空白占位 | ||
| 146 | + let lastElement = this.displayArray.slice(-1)[0]; | ||
| 147 | + if (lastElement.length < 20) { | ||
| 148 | + let needLength = (20 - lastElement.length) | ||
| 149 | + for (let index = 0; index < needLength; index++) { | ||
| 150 | + lastElement.push('') | ||
| 151 | + } | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + this.displayArray.forEach(element => { | ||
| 155 | + element.push('删除') | ||
| 156 | + }); | ||
| 157 | + | ||
| 158 | + } | ||
| 159 | + | ||
| 130 | build() { | 160 | build() { |
| 161 | + | ||
| 162 | + // String.fromCodePoint() | ||
| 163 | + Swiper(this.swiperController) { | ||
| 164 | + | ||
| 165 | + ForEach(this.displayArray, (array: [], index) => { | ||
| 166 | + Column() { | ||
| 167 | + Grid() { | ||
| 168 | + ForEach(array, (emoji: string, subIndex: number) => { | ||
| 169 | + GridItem() { | ||
| 170 | + Text() { | ||
| 171 | + if (emoji == '删除') { | ||
| 172 | + ImageSpan($r('app.media.wdInput_delete')) | ||
| 173 | + } else { | ||
| 174 | + Span(emoji) | ||
| 175 | + } | ||
| 176 | + | ||
| 177 | + }.textAlign(TextAlign.Center).width(30).height(30) | ||
| 178 | + | ||
| 179 | + // .backgroundColor(Color.Orange) | ||
| 180 | + }.onClick(() => { | ||
| 181 | + if (emoji == '删除') { | ||
| 182 | + this.publishCommentModel.commentContent = this.publishCommentModel.commentContent.substring(0, this.publishCommentModel.commentContent.length -1) | ||
| 183 | + } else if (emoji == '') { | ||
| 184 | + | ||
| 185 | + } else { | ||
| 186 | + this.publishCommentModel.commentContent = this.publishCommentModel.commentContent + emoji | ||
| 187 | + } | ||
| 188 | + | ||
| 189 | + }) | ||
| 190 | + }) | ||
| 191 | + } | ||
| 192 | + .maxCount(6) | ||
| 193 | + .columnsTemplate('1fr 1fr 1fr 1fr 1fr 1fr 1fr') | ||
| 194 | + .rowsGap(10) | ||
| 195 | + .layoutDirection(GridDirection.Row) | ||
| 196 | + | ||
| 197 | + Row().height(40) | ||
| 198 | + } | ||
| 199 | + }) | ||
| 200 | + } | ||
| 201 | + .indicator(true) | ||
| 202 | + .vertical(false) | ||
| 203 | + .height(140) | ||
| 131 | } | 204 | } |
| 132 | } | 205 | } |
| 133 | 206 | ||
| 207 | +function chunk<T>(array: T[], size: number): T[][] { | ||
| 208 | + const result: T[][] = []; | ||
| 209 | + | ||
| 210 | + for (let i = 0; i < array.length; i += size) { | ||
| 211 | + result.push(array.slice(i, i + size)); | ||
| 212 | + } | ||
| 213 | + | ||
| 214 | + return result; | ||
| 215 | +} | ||
| 216 | + | ||
| 134 | 217 | ||
| 135 | 218 | ||
| 136 | 219 |
| @@ -44,7 +44,10 @@ export struct CommentTabComponent { | @@ -44,7 +44,10 @@ export struct CommentTabComponent { | ||
| 44 | } | 44 | } |
| 45 | }.width(151).height(30) | 45 | }.width(151).height(30) |
| 46 | .onClick(() => { | 46 | .onClick(() => { |
| 47 | + | ||
| 48 | + this.publishCommentModel.rootCommentId = '-1'; | ||
| 47 | this.publishCommentModel.parentId = '-1'; | 49 | this.publishCommentModel.parentId = '-1'; |
| 50 | + this.publishCommentModel.placeHolderText = "优质评论会获得最佳评论人的称号" | ||
| 48 | this.dialogController?.open(); | 51 | this.dialogController?.open(); |
| 49 | }) | 52 | }) |
| 50 | } | 53 | } |
| @@ -71,6 +71,7 @@ export struct LiveCommentComponent { | @@ -71,6 +71,7 @@ export struct LiveCommentComponent { | ||
| 71 | left: 6, | 71 | left: 6, |
| 72 | right: 2 | 72 | right: 2 |
| 73 | }) | 73 | }) |
| 74 | + .visibility(this.heartNum > 0 ? Visibility.Visible : Visibility.Hidden) | ||
| 74 | Image(this.isLike ? $r('app.media.icon_like_selected_redheart') : $r('app.media.iv_live_heart_normal')) | 75 | Image(this.isLike ? $r('app.media.icon_like_selected_redheart') : $r('app.media.iv_live_heart_normal')) |
| 75 | .width(24) | 76 | .width(24) |
| 76 | .height(24) | 77 | .height(24) |
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
| 1 | import { ViewType } from 'wdConstant/Index' | 1 | import { ViewType } from 'wdConstant/Index' |
| 2 | import { DateTimeUtils, LazyDataSource, WindowModel } from 'wdKit/Index' | 2 | import { DateTimeUtils, LazyDataSource, WindowModel } from 'wdKit/Index' |
| 3 | -import { commentItemModel, commentListModel } from '../model/CommentModel' | 3 | +import { commentItemModel } from '../model/CommentModel' |
| 4 | import commentViewModel from '../viewmodel/CommentViewModel' | 4 | import commentViewModel from '../viewmodel/CommentViewModel' |
| 5 | import { router, window } from '@kit.ArkUI' | 5 | import { router, window } from '@kit.ArkUI' |
| 6 | -import { CustomTitleUI } from '../../reusable/CustomTitleUI' | ||
| 7 | -import { MyCommentDataSource } from '../model/MyCommentDataSource' | ||
| 8 | -import { HttpUrlUtils } from 'wdNetwork/Index' | ||
| 9 | -import PageModel from '../../../viewmodel/PageModel' | 6 | +import { HttpUtils } from 'wdNetwork/Index' |
| 10 | import { ErrorComponent } from '../../view/ErrorComponent' | 7 | import { ErrorComponent } from '../../view/ErrorComponent' |
| 11 | -import { EmptyComponent , WDViewDefaultType} from '../../view/EmptyComponent' | ||
| 12 | -import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh' | 8 | +import { EmptyComponent, WDViewDefaultType } from '../../view/EmptyComponent' |
| 13 | import NoMoreLayout from '../../page/NoMoreLayout' | 9 | import NoMoreLayout from '../../page/NoMoreLayout' |
| 10 | +import { CommentCustomDialog } from './CommentCustomDialog' | ||
| 11 | +import { publishCommentModel } from '../model/PublishCommentModel' | ||
| 12 | +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | ||
| 14 | 13 | ||
| 15 | const TAG = 'QualityCommentsComponent'; | 14 | const TAG = 'QualityCommentsComponent'; |
| 16 | 15 | ||
| @@ -24,9 +23,6 @@ export struct QualityCommentsComponent { | @@ -24,9 +23,6 @@ export struct QualityCommentsComponent { | ||
| 24 | @State hasMore: boolean = true; | 23 | @State hasMore: boolean = true; |
| 25 | @State currentPage: number = 1; | 24 | @State currentPage: number = 1; |
| 26 | private scroller: Scroller = new Scroller(); | 25 | private scroller: Scroller = new Scroller(); |
| 27 | - | ||
| 28 | - | ||
| 29 | - | ||
| 30 | @State tileOpacity: number = 0; | 26 | @State tileOpacity: number = 0; |
| 31 | firstPositionY: number = 0; | 27 | firstPositionY: number = 0; |
| 32 | bottomSafeHeight: string = AppStorage.get<number>('bottomSafeHeight') + 'px'; | 28 | bottomSafeHeight: string = AppStorage.get<number>('bottomSafeHeight') + 'px'; |
| @@ -34,6 +30,11 @@ export struct QualityCommentsComponent { | @@ -34,6 +30,11 @@ export struct QualityCommentsComponent { | ||
| 34 | lastWindowColor: string = '#ffffff' | 30 | lastWindowColor: string = '#ffffff' |
| 35 | currentWindowColor: string = '#FF4202' | 31 | currentWindowColor: string = '#FF4202' |
| 36 | @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource(); | 32 | @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource(); |
| 33 | + @State dialogController: CustomDialogController | null = null; | ||
| 34 | + | ||
| 35 | + /*必传*/ | ||
| 36 | + @State publishCommentModel: publishCommentModel = new publishCommentModel() | ||
| 37 | + | ||
| 37 | 38 | ||
| 38 | aboutToDisappear(): void { | 39 | aboutToDisappear(): void { |
| 39 | 40 | ||
| @@ -43,13 +44,33 @@ export struct QualityCommentsComponent { | @@ -43,13 +44,33 @@ export struct QualityCommentsComponent { | ||
| 43 | windowClass.setWindowLayoutFullScreen(false) | 44 | windowClass.setWindowLayoutFullScreen(false) |
| 44 | // windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' }) | 45 | // windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' }) |
| 45 | 46 | ||
| 47 | + this.dialogController = null // 将dialogController置空 | ||
| 48 | + | ||
| 46 | } | 49 | } |
| 47 | 50 | ||
| 48 | aboutToAppear(): void { | 51 | aboutToAppear(): void { |
| 49 | 52 | ||
| 50 | this.fullScreen(); | 53 | this.fullScreen(); |
| 51 | this.getData(); | 54 | this.getData(); |
| 55 | + this.showAlert() | ||
| 56 | + } | ||
| 52 | 57 | ||
| 58 | + showAlert(){ | ||
| 59 | + this.dialogController = new CustomDialogController({ | ||
| 60 | + builder: CommentCustomDialog({ | ||
| 61 | + confirm: (value: Record<string, string>) => { | ||
| 62 | + | ||
| 63 | + }, | ||
| 64 | + publishCommentModel: this.publishCommentModel | ||
| 65 | + }), | ||
| 66 | + autoCancel: true, | ||
| 67 | + alignment: DialogAlignment.Bottom, | ||
| 68 | + customStyle: true, | ||
| 69 | + offset: { | ||
| 70 | + dx: 0, | ||
| 71 | + dy: -20 | ||
| 72 | + }, | ||
| 73 | + }) | ||
| 53 | } | 74 | } |
| 54 | 75 | ||
| 55 | getData(resolve?: (value: string | PromiseLike<string>) => void){ | 76 | getData(resolve?: (value: string | PromiseLike<string>) => void){ |
| @@ -217,7 +238,7 @@ export struct QualityCommentsComponent { | @@ -217,7 +238,7 @@ export struct QualityCommentsComponent { | ||
| 217 | // ListItemGroup({ header: this.titleHeader() }) | 238 | // ListItemGroup({ header: this.titleHeader() }) |
| 218 | LazyForEach(this.allDatas, (item: commentItemModel, index: number) => { | 239 | LazyForEach(this.allDatas, (item: commentItemModel, index: number) => { |
| 219 | ListItem() { | 240 | ListItem() { |
| 220 | - QualityCommentItem({ item: item, index: index }).margin({ left: 12, right: 12 }) | 241 | + QualityCommentItem({ item: item, index: index , dialogController:this.dialogController, publishCommentModel:this.publishCommentModel}).margin({ left: 12, right: 12 }) |
| 221 | } | 242 | } |
| 222 | }) | 243 | }) |
| 223 | // 加载更多 | 244 | // 加载更多 |
| @@ -243,16 +264,6 @@ export struct QualityCommentsComponent { | @@ -243,16 +264,6 @@ export struct QualityCommentsComponent { | ||
| 243 | } | 264 | } |
| 244 | 265 | ||
| 245 | 266 | ||
| 246 | - @Builder | ||
| 247 | - testLayout(){ | ||
| 248 | - List({ space: 12, scroller:this.scroller }){ | ||
| 249 | - LazyForEach(this.allDatas, (item: commentItemModel, index: number) => { | ||
| 250 | - ListItem() { | ||
| 251 | - QualityCommentItem({ item: item, index: index }).margin({ left: 12, right: 12 }) | ||
| 252 | - } | ||
| 253 | - }) | ||
| 254 | - } | ||
| 255 | - } | ||
| 256 | 267 | ||
| 257 | } | 268 | } |
| 258 | 269 | ||
| @@ -261,6 +272,8 @@ export struct QualityCommentsComponent { | @@ -261,6 +272,8 @@ export struct QualityCommentsComponent { | ||
| 261 | 272 | ||
| 262 | @Component | 273 | @Component |
| 263 | struct QualityCommentItem { | 274 | struct QualityCommentItem { |
| 275 | + @ObjectLink publishCommentModel: publishCommentModel | ||
| 276 | + dialogController: CustomDialogController | null = null; | ||
| 264 | @ObjectLink item: commentItemModel | 277 | @ObjectLink item: commentItemModel |
| 265 | index: number = 0 | 278 | index: number = 0 |
| 266 | 279 | ||
| @@ -360,7 +373,20 @@ struct QualityCommentItem { | @@ -360,7 +373,20 @@ struct QualityCommentItem { | ||
| 360 | Row({ space: 16 }) { | 373 | Row({ space: 16 }) { |
| 361 | Row() { | 374 | Row() { |
| 362 | Image($r('app.media.comment_icon_pinglun')).width(16).height(16) | 375 | Image($r('app.media.comment_icon_pinglun')).width(16).height(16) |
| 363 | - } | 376 | + }.onClick(()=>{ |
| 377 | + this.publishCommentModel.targetId = this.item.targetId | ||
| 378 | + this.publishCommentModel.targetRelId = this.item.targetRelId | ||
| 379 | + this.publishCommentModel.targetTitle = this.item.targetTitle | ||
| 380 | + this.publishCommentModel.targetRelType = this.item.targetRelType | ||
| 381 | + this.publishCommentModel.targetRelObjectId = this.item.targetRelObjectId | ||
| 382 | + this.publishCommentModel.targetType = this.item.targetType | ||
| 383 | + // this.publishCommentModel.keyArticle = this.item.keyArticle | ||
| 384 | + | ||
| 385 | + this.publishCommentModel.rootCommentId = this.item.rootCommentId | ||
| 386 | + this.publishCommentModel.parentId = this.item.id | ||
| 387 | + | ||
| 388 | + this.dialogController?.open() | ||
| 389 | + }) | ||
| 364 | 390 | ||
| 365 | Row() { | 391 | Row() { |
| 366 | Image($r(this.item.api_status ? 'app.media.comment_like_select' : 'app.media.comment_like_normal')) | 392 | Image($r(this.item.api_status ? 'app.media.comment_like_select' : 'app.media.comment_like_normal')) |
| @@ -373,6 +399,12 @@ struct QualityCommentItem { | @@ -373,6 +399,12 @@ struct QualityCommentItem { | ||
| 373 | .margin({ left: 3 }) | 399 | .margin({ left: 3 }) |
| 374 | } | 400 | } |
| 375 | }.onClick(() => { | 401 | }.onClick(() => { |
| 402 | + // 未登录,跳转登录 | ||
| 403 | + const user_id = HttpUtils.getUserId() | ||
| 404 | + if (!user_id) { | ||
| 405 | + WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | ||
| 406 | + return | ||
| 407 | + } | ||
| 376 | commentLikeChange(this.item) | 408 | commentLikeChange(this.item) |
| 377 | commentViewModel.commentLike(this.item).then(() => { | 409 | commentViewModel.commentLike(this.item).then(() => { |
| 378 | }).catch(() => { | 410 | }).catch(() => { |
| 1 | -import { DateTimeUtils, Logger, ToastUtils, UserDataLocal } from 'wdKit/Index'; | 1 | +import { SpConstants } from 'wdConstant/Index'; |
| 2 | +import { DateTimeUtils, Logger, SPHelper, ToastUtils, UserDataLocal } from 'wdKit/Index'; | ||
| 2 | import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO } from 'wdNetwork/Index'; | 3 | import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO } from 'wdNetwork/Index'; |
| 3 | import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; | 4 | import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; |
| 4 | import { | 5 | import { |
| @@ -183,6 +184,14 @@ class CommentViewModel { | @@ -183,6 +184,14 @@ class CommentViewModel { | ||
| 183 | } | 184 | } |
| 184 | ToastUtils.showToast(data.message, 1000); | 185 | ToastUtils.showToast(data.message, 1000); |
| 185 | let model = data.data as commentItemModel | 186 | let model = data.data as commentItemModel |
| 187 | + | ||
| 188 | + let userId = HttpUtils.getUserId() | ||
| 189 | + let FIRSTCOMMENTTIME = SPHelper.default.getSync(SpConstants.FIRSTCOMMENTTIME, '') | ||
| 190 | + | ||
| 191 | + if (!userId && !FIRSTCOMMENTTIME) { | ||
| 192 | + //保存首次评论时间 | ||
| 193 | + SPHelper.default.saveSync(SpConstants.FIRSTCOMMENTTIME, DateTimeUtils.formatDate(data.timestamp, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) | ||
| 194 | + } | ||
| 186 | success(model) | 195 | success(model) |
| 187 | }, (error: Error) => { | 196 | }, (error: Error) => { |
| 188 | ToastUtils.showToast('评论失败', 1000); | 197 | ToastUtils.showToast('评论失败', 1000); |
| @@ -180,7 +180,7 @@ struct CarouselLayout01CardView { | @@ -180,7 +180,7 @@ struct CarouselLayout01CardView { | ||
| 180 | }) | 180 | }) |
| 181 | Column() { | 181 | Column() { |
| 182 | // 这里用于展示轮播图右上角信息,这里只对直播类型的展示 | 182 | // 这里用于展示轮播图右上角信息,这里只对直播类型的展示 |
| 183 | - if (this.item.objectType === '2') { | 183 | + if (this.item.objectType === '2' || this.item.objectType ==='4') { |
| 184 | CardMediaInfo({ contentDTO: this.item }) | 184 | CardMediaInfo({ contentDTO: this.item }) |
| 185 | .width(CommonConstants.FULL_PARENT) | 185 | .width(CommonConstants.FULL_PARENT) |
| 186 | } | 186 | } |
| @@ -4,6 +4,7 @@ import { postInteractAccentionOperateParams } from 'wdBean'; | @@ -4,6 +4,7 @@ import { postInteractAccentionOperateParams } from 'wdBean'; | ||
| 4 | import { PageRepository } from '../../repository/PageRepository'; | 4 | import { PageRepository } from '../../repository/PageRepository'; |
| 5 | import { ProcessUtils } from 'wdRouter'; | 5 | import { ProcessUtils } from 'wdRouter'; |
| 6 | import { HttpUtils } from 'wdNetwork/Index'; | 6 | import { HttpUtils } from 'wdNetwork/Index'; |
| 7 | +import { DateTimeUtils } from 'wdKit'; | ||
| 7 | 8 | ||
| 8 | /** | 9 | /** |
| 9 | * 直播预约卡 | 10 | * 直播预约卡 |
| @@ -17,6 +18,22 @@ export struct ZhSingleRow03 { | @@ -17,6 +18,22 @@ export struct ZhSingleRow03 { | ||
| 17 | @State compDTO: CompDTO = {} as CompDTO | 18 | @State compDTO: CompDTO = {} as CompDTO |
| 18 | scroller: Scroller = new Scroller() | 19 | scroller: Scroller = new Scroller() |
| 19 | 20 | ||
| 21 | + format(timeNum: number) { | ||
| 22 | + const todayDate = new Date().setHours(0,0,0,0) | ||
| 23 | + const parseDate = new Date(timeNum).setHours(0,0,0,0); | ||
| 24 | + if (todayDate === parseDate) { | ||
| 25 | + return '今天' | ||
| 26 | + } else { const str = DateTimeUtils.formatDate(timeNum, 'MM月dd日') | ||
| 27 | + const month: string = str.split('月')[0]; | ||
| 28 | + if (month[0] === "0") { | ||
| 29 | + return str.slice(1) | ||
| 30 | + } else { | ||
| 31 | + return str.slice(0) | ||
| 32 | + } | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + } | ||
| 36 | + | ||
| 20 | build() { | 37 | build() { |
| 21 | Column() { | 38 | Column() { |
| 22 | //顶部 | 39 | //顶部 |
| @@ -42,7 +59,8 @@ export struct ZhSingleRow03 { | @@ -42,7 +59,8 @@ export struct ZhSingleRow03 { | ||
| 42 | Row() { | 59 | Row() { |
| 43 | Flex({justifyContent: FlexAlign.SpaceBetween}){ | 60 | Flex({justifyContent: FlexAlign.SpaceBetween}){ |
| 44 | Row() { | 61 | Row() { |
| 45 | - Text(item.liveInfo.liveStartTime.split(' ')[0].slice(5).split('-').join('月')+'日') | 62 | + Text(this.format(new Date(item.liveInfo.liveStartTime).getTime())) |
| 63 | + // Text(item.liveInfo.liveStartTime.split(' ')[0].slice(5).split('-').join('月')+'日') | ||
| 46 | .margin({right: 6}) | 64 | .margin({right: 6}) |
| 47 | .fontColor(0x000000) | 65 | .fontColor(0x000000) |
| 48 | .fontSize(13) | 66 | .fontSize(13) |
| @@ -106,7 +124,7 @@ export struct ZhSingleRow03 { | @@ -106,7 +124,7 @@ export struct ZhSingleRow03 { | ||
| 106 | .width(3) | 124 | .width(3) |
| 107 | .height(16) | 125 | .height(16) |
| 108 | .margin({ right: 4 }) | 126 | .margin({ right: 4 }) |
| 109 | - Text('直播预约') | 127 | + Text('直播预告') |
| 110 | .fontSize($r("app.float.font_size_17")) | 128 | .fontSize($r("app.float.font_size_17")) |
| 111 | .fontColor($r("app.color.color_222222")) | 129 | .fontColor($r("app.color.color_222222")) |
| 112 | .fontWeight(600) | 130 | .fontWeight(600) |
| @@ -30,6 +30,7 @@ const TAG = 'Zh_Single_Row-06' | @@ -30,6 +30,7 @@ const TAG = 'Zh_Single_Row-06' | ||
| 30 | @Component | 30 | @Component |
| 31 | export struct ZhSingleRow06 { | 31 | export struct ZhSingleRow06 { |
| 32 | @State compDTO: CompDTO = {} as CompDTO | 32 | @State compDTO: CompDTO = {} as CompDTO |
| 33 | + @State likeBl: boolean = false; | ||
| 33 | 34 | ||
| 34 | build() { | 35 | build() { |
| 35 | Column() { | 36 | Column() { |
| @@ -81,7 +82,7 @@ export struct ZhSingleRow06 { | @@ -81,7 +82,7 @@ export struct ZhSingleRow06 { | ||
| 81 | .fontColor(0x999999) | 82 | .fontColor(0x999999) |
| 82 | 83 | ||
| 83 | Row(){ | 84 | Row(){ |
| 84 | - Image($r('app.media.icon_like_no')) | 85 | + Image(this.likeBl ? $r('app.media.icon_like_select') : $r('app.media.icon_like')) |
| 85 | .width(16) | 86 | .width(16) |
| 86 | .height(16) | 87 | .height(16) |
| 87 | .margin({right: 3}) | 88 | .margin({right: 3}) |
| @@ -90,6 +91,13 @@ export struct ZhSingleRow06 { | @@ -90,6 +91,13 @@ export struct ZhSingleRow06 { | ||
| 90 | .fontSize(14) | 91 | .fontSize(14) |
| 91 | .fontColor(0x999999) | 92 | .fontColor(0x999999) |
| 92 | } | 93 | } |
| 94 | + .onClick(() => { | ||
| 95 | + if (this.likeBl) { | ||
| 96 | + this.likeBl = false; | ||
| 97 | + } else { | ||
| 98 | + this.likeBl = true; | ||
| 99 | + } | ||
| 100 | + }) | ||
| 93 | } | 101 | } |
| 94 | .justifyContent(FlexAlign.SpaceBetween) | 102 | .justifyContent(FlexAlign.SpaceBetween) |
| 95 | .width('100%') | 103 | .width('100%') |
| @@ -9,13 +9,12 @@ export default struct MinePageMoreFunctionUI { | @@ -9,13 +9,12 @@ export default struct MinePageMoreFunctionUI { | ||
| 9 | build() { | 9 | build() { |
| 10 | Column() { | 10 | Column() { |
| 11 | Column() { | 11 | Column() { |
| 12 | - Text(`更多功能`) | ||
| 13 | - .width('456lpx') | ||
| 14 | - .height('38lpx') | ||
| 15 | - .fontColor($r('app.color.color_666666')) | 12 | + Text("更多功能") |
| 13 | + .fontColor($r('app.color.color_222222')) | ||
| 16 | .fontSize('29lpx') | 14 | .fontSize('29lpx') |
| 17 | .margin({ left: "31lpx" }) | 15 | .margin({ left: "31lpx" }) |
| 18 | - .fontWeight('600lpx') | 16 | + .lineHeight('46lpx') |
| 17 | + .fontWeight(FontWeight.Bold) | ||
| 19 | }.height('92lpx') | 18 | }.height('92lpx') |
| 20 | .width('100%') | 19 | .width('100%') |
| 21 | .justifyContent(FlexAlign.Center) | 20 | .justifyContent(FlexAlign.Center) |
| @@ -9,13 +9,13 @@ export default struct MinePageUserSimpleInfoUI { | @@ -9,13 +9,13 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 9 | @Watch('loginStateChange') @Prop isLogin :boolean | 9 | @Watch('loginStateChange') @Prop isLogin :boolean |
| 10 | @State userName:string = "登陆注册" | 10 | @State userName:string = "登陆注册" |
| 11 | @State headPhotoUrl:string = "" | 11 | @State headPhotoUrl:string = "" |
| 12 | + userType:string = "1" | ||
| 12 | @State levelHead:string = "" | 13 | @State levelHead:string = "" |
| 13 | @State levelId:number = 0 | 14 | @State levelId:number = 0 |
| 14 | 15 | ||
| 15 | loginStateChange(){ | 16 | loginStateChange(){ |
| 16 | if(this.isLogin){ | 17 | if(this.isLogin){ |
| 17 | this.getUserInfo() | 18 | this.getUserInfo() |
| 18 | - this.getUserLevel() | ||
| 19 | }else{ | 19 | }else{ |
| 20 | this.headPhotoUrl = "" | 20 | this.headPhotoUrl = "" |
| 21 | this.levelHead = "" | 21 | this.levelHead = "" |
| @@ -54,8 +54,10 @@ export default struct MinePageUserSimpleInfoUI { | @@ -54,8 +54,10 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 54 | Text(this.userName) | 54 | Text(this.userName) |
| 55 | .fontColor($r('app.color.color_222222')) | 55 | .fontColor($r('app.color.color_222222')) |
| 56 | .maxLines(1) | 56 | .maxLines(1) |
| 57 | + .fontWeight(FontWeight.Bold) | ||
| 57 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 58 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 58 | .fontSize('33lpx') | 59 | .fontSize('33lpx') |
| 60 | + .lineHeight("46lpx") | ||
| 59 | 61 | ||
| 60 | Image($r('app.media.mine_user_edit')) | 62 | Image($r('app.media.mine_user_edit')) |
| 61 | .width('27lpx') | 63 | .width('27lpx') |
| @@ -144,7 +146,21 @@ export default struct MinePageUserSimpleInfoUI { | @@ -144,7 +146,21 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 144 | this.userName = value.userName | 146 | this.userName = value.userName |
| 145 | this.headPhotoUrl = value.headPhotoUrl | 147 | this.headPhotoUrl = value.headPhotoUrl |
| 146 | UserDataLocal.setUserHeaderUrl(value.headPhotoUrl) | 148 | UserDataLocal.setUserHeaderUrl(value.headPhotoUrl) |
| 149 | + | ||
| 150 | + this.userType = value.userType | ||
| 151 | + UserDataLocal.setUserType(value.userType) | ||
| 152 | + | ||
| 153 | + if(this.userType === "1"){ | ||
| 154 | + if(StringUtils.isNotEmpty(value.honoraryIcon)){ | ||
| 155 | + this.levelHead = value.honoraryIcon | ||
| 156 | + return | ||
| 157 | + } | ||
| 158 | + if(StringUtils.isNotEmpty(value.avatarFrame)){ | ||
| 159 | + this.levelHead = value.avatarFrame | ||
| 160 | + } | ||
| 161 | + } | ||
| 147 | } | 162 | } |
| 163 | + this.getUserLevel() | ||
| 148 | }).catch((err:Error)=>{ | 164 | }).catch((err:Error)=>{ |
| 149 | console.log(TAG,JSON.stringify(err)) | 165 | console.log(TAG,JSON.stringify(err)) |
| 150 | }) | 166 | }) |
| @@ -152,10 +168,14 @@ export default struct MinePageUserSimpleInfoUI { | @@ -152,10 +168,14 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 152 | getUserLevel(){ | 168 | getUserLevel(){ |
| 153 | MinePageDatasModel.getUserLevelData(getContext(this)).then((value)=>{ | 169 | MinePageDatasModel.getUserLevelData(getContext(this)).then((value)=>{ |
| 154 | if(value!=null){ | 170 | if(value!=null){ |
| 155 | - this.levelHead = value.levelHead | 171 | + if(StringUtils.isEmpty(this.levelHead)){ |
| 172 | + if(this.userType === "1"){ | ||
| 173 | + this.levelHead = value.levelHead | ||
| 174 | + } | ||
| 175 | + } | ||
| 156 | this.levelId = value.levelId | 176 | this.levelId = value.levelId |
| 157 | - UserDataLocal.setUserLevel(value.levelId) | ||
| 158 | - UserDataLocal.setUserLevelHeaderUrl(value.levelHead + "") | 177 | + UserDataLocal.setUserLevel(this.levelId) |
| 178 | + UserDataLocal.setUserLevelHeaderUrl(this.levelHead + "") | ||
| 159 | } | 179 | } |
| 160 | }).catch((err:Error)=>{ | 180 | }).catch((err:Error)=>{ |
| 161 | console.log(TAG,JSON.stringify(err)) | 181 | console.log(TAG,JSON.stringify(err)) |
| @@ -19,7 +19,7 @@ export struct FollowChildComponent{ | @@ -19,7 +19,7 @@ export struct FollowChildComponent{ | ||
| 19 | Row() { | 19 | Row() { |
| 20 | Row(){ | 20 | Row(){ |
| 21 | Stack({alignContent: Alignment.Bottom}){ | 21 | Stack({alignContent: Alignment.Bottom}){ |
| 22 | - Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.default_head'):this.data.headPhotoUrl) | 22 | + Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.icon_default_head_mater'):this.data.headPhotoUrl) |
| 23 | .objectFit(ImageFit.Auto) | 23 | .objectFit(ImageFit.Auto) |
| 24 | .width('92lpx') | 24 | .width('92lpx') |
| 25 | .height('92lpx') | 25 | .height('92lpx') |
| @@ -128,7 +128,7 @@ export struct FollowChildComponent{ | @@ -128,7 +128,7 @@ export struct FollowChildComponent{ | ||
| 128 | Row() { | 128 | Row() { |
| 129 | Row(){ | 129 | Row(){ |
| 130 | Stack({alignContent: Alignment.Bottom}){ | 130 | Stack({alignContent: Alignment.Bottom}){ |
| 131 | - Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.default_head'):this.data.headPhotoUrl) | 131 | + Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.icon_default_head_mater'):this.data.headPhotoUrl) |
| 132 | .objectFit(ImageFit.Auto) | 132 | .objectFit(ImageFit.Auto) |
| 133 | .width('92lpx') | 133 | .width('92lpx') |
| 134 | .height('92lpx') | 134 | .height('92lpx') |
| 1 | +import { EmitterUtils, EmitterEventId, Logger } from 'wdKit/Index' | ||
| 1 | import MinePageDatasModel from '../../../model/MinePageDatasModel' | 2 | import MinePageDatasModel from '../../../model/MinePageDatasModel' |
| 2 | import { FollowListItem } from '../../../viewmodel/FollowListItem' | 3 | import { FollowListItem } from '../../../viewmodel/FollowListItem' |
| 3 | import { CustomTitleUI } from '../../reusable/CustomTitleUI' | 4 | import { CustomTitleUI } from '../../reusable/CustomTitleUI' |
| @@ -20,16 +21,26 @@ export struct FollowFirstTabsComponent{ | @@ -20,16 +21,26 @@ export struct FollowFirstTabsComponent{ | ||
| 20 | }) | 21 | }) |
| 21 | 22 | ||
| 22 | if(this.controller != null && this.data.length>1 && this.changeIndex === 1){ | 23 | if(this.controller != null && this.data.length>1 && this.changeIndex === 1){ |
| 23 | - //个人主页 跳转 关注页 tab 2 | ||
| 24 | - let intervalID = setInterval(() => { | ||
| 25 | - this.currentIndex = this.changeIndex | ||
| 26 | - this.controller.changeIndex(this.currentIndex) | ||
| 27 | - clearInterval(intervalID); | ||
| 28 | - }, 500); | 24 | + this.jumpFollowNextPage() |
| 29 | } | 25 | } |
| 30 | }).catch((err:Error)=>{ | 26 | }).catch((err:Error)=>{ |
| 31 | console.log(TAG,JSON.stringify(err)) | 27 | console.log(TAG,JSON.stringify(err)) |
| 32 | }) | 28 | }) |
| 29 | + | ||
| 30 | + EmitterUtils.receiveEvent(EmitterEventId.MY_FOLLOW_EMPTY, (() => { | ||
| 31 | + if(this.controller != null && this.data.length>1 ){ | ||
| 32 | + this.jumpFollowNextPage() | ||
| 33 | + } | ||
| 34 | + })) | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + jumpFollowNextPage(){ | ||
| 38 | + //个人主页 跳转 关注页 tab 2 | ||
| 39 | + let intervalID = setInterval(() => { | ||
| 40 | + this.currentIndex = 1 | ||
| 41 | + this.controller.changeIndex(this.currentIndex) | ||
| 42 | + clearInterval(intervalID); | ||
| 43 | + }, 500); | ||
| 33 | } | 44 | } |
| 34 | 45 | ||
| 35 | @Builder TabBuilder(index: number, item: FollowListItem) { | 46 | @Builder TabBuilder(index: number, item: FollowListItem) { |
| @@ -74,6 +85,7 @@ export struct FollowFirstTabsComponent{ | @@ -74,6 +85,7 @@ export struct FollowFirstTabsComponent{ | ||
| 74 | .vertical(false) | 85 | .vertical(false) |
| 75 | .barMode(BarMode.Scrollable) | 86 | .barMode(BarMode.Scrollable) |
| 76 | .barWidth('100%') | 87 | .barWidth('100%') |
| 88 | + .barBackgroundColor($r('app.color.white')) | ||
| 77 | .barHeight('84lpx') | 89 | .barHeight('84lpx') |
| 78 | .animationDuration(0) | 90 | .animationDuration(0) |
| 79 | .onChange((index: number) => { | 91 | .onChange((index: number) => { |
| 1 | -import { LazyDataSource, SPHelper, UserDataLocal } from 'wdKit'; | 1 | +import { EmitterEventId, EmitterUtils, LazyDataSource, SPHelper, UserDataLocal } from 'wdKit'; |
| 2 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; | 2 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; |
| 3 | import SearcherAboutDataModel from '../../../model/SearcherAboutDataModel'; | 3 | import SearcherAboutDataModel from '../../../model/SearcherAboutDataModel'; |
| 4 | import { CreatorDetailRequestItem } from '../../../viewmodel/CreatorDetailRequestItem'; | 4 | import { CreatorDetailRequestItem } from '../../../viewmodel/CreatorDetailRequestItem'; |
| @@ -70,9 +70,15 @@ export struct FollowListDetailUI { | @@ -70,9 +70,15 @@ export struct FollowListDetailUI { | ||
| 70 | Column() { | 70 | Column() { |
| 71 | if (this.count === 0) { | 71 | if (this.count === 0) { |
| 72 | if (this.isGetRequest == true) { | 72 | if (this.isGetRequest == true) { |
| 73 | - EmptyComponent({ emptyType: 14 }) | ||
| 74 | - .layoutWeight(1) | ||
| 75 | - .width('100%') | 73 | + if(this.creatorDirectoryId === -1){ |
| 74 | + EmptyComponent({ emptyType: 14,emptyHeight:"100%" }) | ||
| 75 | + .layoutWeight(1) | ||
| 76 | + .width('100%') | ||
| 77 | + }else{ | ||
| 78 | + EmptyComponent({ emptyType: 16,emptyHeight:"100%" }) | ||
| 79 | + .layoutWeight(1) | ||
| 80 | + .width('100%') | ||
| 81 | + } | ||
| 76 | } | 82 | } |
| 77 | 83 | ||
| 78 | } else { | 84 | } else { |
| @@ -156,10 +162,12 @@ export struct FollowListDetailUI { | @@ -156,10 +162,12 @@ export struct FollowListDetailUI { | ||
| 156 | } | 162 | } |
| 157 | this.isLoading = false | 163 | this.isLoading = false |
| 158 | this.isGetRequest = true | 164 | this.isGetRequest = true |
| 165 | + this.sendFollowMessage() | ||
| 159 | }).catch((err: Error) => { | 166 | }).catch((err: Error) => { |
| 160 | console.log(TAG, "请求失败") | 167 | console.log(TAG, "请求失败") |
| 161 | this.isGetRequest = true | 168 | this.isGetRequest = true |
| 162 | this.isLoading = false | 169 | this.isLoading = false |
| 170 | + this.sendFollowMessage() | ||
| 163 | }) | 171 | }) |
| 164 | } else { | 172 | } else { |
| 165 | this.isLoading = false | 173 | this.isLoading = false |
| @@ -167,6 +175,12 @@ export struct FollowListDetailUI { | @@ -167,6 +175,12 @@ export struct FollowListDetailUI { | ||
| 167 | } | 175 | } |
| 168 | } | 176 | } |
| 169 | 177 | ||
| 178 | + sendFollowMessage(){ | ||
| 179 | + if(this.count === 0){ | ||
| 180 | + EmitterUtils.sendEvent(EmitterEventId.MY_FOLLOW_EMPTY) | ||
| 181 | + } | ||
| 182 | + } | ||
| 183 | + | ||
| 170 | getNewPageData() { | 184 | getNewPageData() { |
| 171 | //我的关注列表 | 185 | //我的关注列表 |
| 172 | if (this.creatorDirectoryId === -1) { | 186 | if (this.creatorDirectoryId === -1) { |
| @@ -179,6 +193,7 @@ export struct FollowListDetailUI { | @@ -179,6 +193,7 @@ export struct FollowListDetailUI { | ||
| 179 | if (!this.data || value.list.length == 0) { | 193 | if (!this.data || value.list.length == 0) { |
| 180 | this.hasMore = false | 194 | this.hasMore = false |
| 181 | this.isLoading = false | 195 | this.isLoading = false |
| 196 | + this.isGetRequest = true | ||
| 182 | } else { | 197 | } else { |
| 183 | this.getFollowListStatus(value) | 198 | this.getFollowListStatus(value) |
| 184 | } | 199 | } |
| @@ -226,6 +241,8 @@ export struct FollowListDetailUI { | @@ -226,6 +241,8 @@ export struct FollowListDetailUI { | ||
| 226 | }) | 241 | }) |
| 227 | }) | 242 | }) |
| 228 | this.getFollowStatus(data_temp, result.totalCount) | 243 | this.getFollowStatus(data_temp, result.totalCount) |
| 244 | + }else{ | ||
| 245 | + this.isGetRequest = true | ||
| 229 | } | 246 | } |
| 230 | }).catch((err: Error) => { | 247 | }).catch((err: Error) => { |
| 231 | console.log(TAG, JSON.stringify(err)) | 248 | console.log(TAG, JSON.stringify(err)) |
| 1 | import { FollowListItem, FollowThirdListItem } from '../../../viewmodel/FollowListItem' | 1 | import { FollowListItem, FollowThirdListItem } from '../../../viewmodel/FollowListItem' |
| 2 | import { FollowListDetailUI } from './FollowListDetailUI' | 2 | import { FollowListDetailUI } from './FollowListDetailUI' |
| 3 | +import measure from '@ohos.measure' | ||
| 3 | 4 | ||
| 4 | @Component | 5 | @Component |
| 5 | export struct FollowThirdTabsComponent{ | 6 | export struct FollowThirdTabsComponent{ |
| @@ -11,8 +12,8 @@ export struct FollowThirdTabsComponent{ | @@ -11,8 +12,8 @@ export struct FollowThirdTabsComponent{ | ||
| 11 | 12 | ||
| 12 | 13 | ||
| 13 | private controller: TabsController = new TabsController() | 14 | private controller: TabsController = new TabsController() |
| 14 | - fontColor: string = '#999999' | ||
| 15 | - selectedFontColor: string = '#000000' | 15 | + fontColor: string = '#666666' |
| 16 | + selectedFontColor: string = '#222222' | ||
| 16 | 17 | ||
| 17 | build(){ | 18 | build(){ |
| 18 | if(this.data != null){ | 19 | if(this.data != null){ |
| @@ -26,32 +27,44 @@ export struct FollowThirdTabsComponent{ | @@ -26,32 +27,44 @@ export struct FollowThirdTabsComponent{ | ||
| 26 | 27 | ||
| 27 | @Builder TabBuilder(index: number, item: FollowThirdListItem) { | 28 | @Builder TabBuilder(index: number, item: FollowThirdListItem) { |
| 28 | Column(){ | 29 | Column(){ |
| 29 | - Text(item.directoryName) | ||
| 30 | - .fontSize('30lpx') | ||
| 31 | - .textAlign(TextAlign.Center) | ||
| 32 | - .fontWeight(this.currentIndex === index ? 600 : 400) | ||
| 33 | - .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) | ||
| 34 | - .lineHeight('38lpx') | ||
| 35 | - .backgroundColor($r('app.color.color_F9F9F9')) | ||
| 36 | - .padding('13lpx') | ||
| 37 | - .maxLines(1) | 30 | + Row(){ |
| 31 | + Image(index === 0?$r("app.media.ic_collect_left_left"):(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?$r('app.media.ic_collect_right_left'):$r('app.media.ic_collect_mid_left'))) | ||
| 32 | + .width(index === 0?"19lpx":"35lpx") | ||
| 33 | + .height('61lpx') | ||
| 34 | + .objectFit(ImageFit.Fill) | ||
| 35 | + | ||
| 36 | + Text(item.directoryName) | ||
| 37 | + .fontSize('27lpx') | ||
| 38 | + .fontWeight(this.currentIndex === index ? "600lpx" : "400lpx") | ||
| 39 | + .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) | ||
| 40 | + .lineHeight('35lpx') | ||
| 41 | + .backgroundImage($r('app.media.ic_collect_mid')) | ||
| 42 | + .backgroundImageSize(ImageSize.Cover) | ||
| 43 | + .padding({top:"13lpx",bottom:"13lpx"}) | ||
| 44 | + | ||
| 45 | + Image(index === 0?$r("app.media.ic_collect_left_right"):(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?$r('app.media.ic_collect_right_right'):$r('app.media.ic_collect_mid_right'))) | ||
| 46 | + .width(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?"19lpx":"35lpx") | ||
| 47 | + .height('61lpx') | ||
| 48 | + .objectFit(ImageFit.Fill) | ||
| 49 | + } | ||
| 38 | } | 50 | } |
| 39 | .onClick(()=>{ | 51 | .onClick(()=>{ |
| 40 | this.currentIndex = index | 52 | this.currentIndex = index |
| 41 | this.controller.changeIndex(this.currentIndex) | 53 | this.controller.changeIndex(this.currentIndex) |
| 42 | }) | 54 | }) |
| 43 | - .height('84lpx') | ||
| 44 | - .margin({right:'9lpx'}) | ||
| 45 | - .padding({left:'20lpx',right:index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?"20lpx":"0lpx"}) | ||
| 46 | - .justifyContent(FlexAlign.Center) | 55 | + .offset({x:index === 0?"0lpx":"-5lpx"}) |
| 56 | + .height('80lpx') | ||
| 57 | + .justifyContent(FlexAlign.End) | ||
| 47 | } | 58 | } |
| 48 | 59 | ||
| 60 | + | ||
| 61 | + | ||
| 49 | @Builder FollowThirdUI(){ | 62 | @Builder FollowThirdUI(){ |
| 50 | 63 | ||
| 51 | Column(){ | 64 | Column(){ |
| 52 | Column() { | 65 | Column() { |
| 53 | // 页签 | 66 | // 页签 |
| 54 | - Row({ space: 7 }) { | 67 | + Row() { |
| 55 | Scroll() { | 68 | Scroll() { |
| 56 | Row() { | 69 | Row() { |
| 57 | ForEach(this.data[this.firstIndex].children[this.secondIndex].children, (item: FollowThirdListItem, index: number ) => { | 70 | ForEach(this.data[this.firstIndex].children[this.secondIndex].children, (item: FollowThirdListItem, index: number ) => { |
| @@ -63,8 +76,8 @@ export struct FollowThirdTabsComponent{ | @@ -63,8 +76,8 @@ export struct FollowThirdTabsComponent{ | ||
| 63 | .align(Alignment.Start) | 76 | .align(Alignment.Start) |
| 64 | .scrollable(ScrollDirection.Horizontal) | 77 | .scrollable(ScrollDirection.Horizontal) |
| 65 | .scrollBar(BarState.Off) | 78 | .scrollBar(BarState.Off) |
| 66 | - .width('90%') | ||
| 67 | - .padding({left:'11lpx'}) | 79 | + .width('100%') |
| 80 | + .padding({left:'31lpx',right:'48lpx'}) | ||
| 68 | } | 81 | } |
| 69 | .alignItems(VerticalAlign.Bottom) | 82 | .alignItems(VerticalAlign.Bottom) |
| 70 | .width('100%') | 83 | .width('100%') |
| @@ -77,11 +90,6 @@ export struct FollowThirdTabsComponent{ | @@ -77,11 +90,6 @@ export struct FollowThirdTabsComponent{ | ||
| 77 | ForEach(this.data[this.firstIndex].children[this.secondIndex].children, (item: FollowThirdListItem, index: number ) => { | 90 | ForEach(this.data[this.firstIndex].children[this.secondIndex].children, (item: FollowThirdListItem, index: number ) => { |
| 78 | TabContent(){ | 91 | TabContent(){ |
| 79 | Column(){ | 92 | Column(){ |
| 80 | - Divider().width('100%') | ||
| 81 | - .height('2lpx') | ||
| 82 | - .strokeWidth('1lpx') | ||
| 83 | - .backgroundColor($r('app.color.color_EDEDED')) | ||
| 84 | - .margin({left:'20lpx'}) | ||
| 85 | FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].children[this.secondIndex].children[index].id}) | 93 | FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].children[this.secondIndex].children[index].id}) |
| 86 | } | 94 | } |
| 87 | } | 95 | } |
| @@ -99,4 +107,19 @@ export struct FollowThirdTabsComponent{ | @@ -99,4 +107,19 @@ export struct FollowThirdTabsComponent{ | ||
| 99 | } | 107 | } |
| 100 | } | 108 | } |
| 101 | 109 | ||
| 110 | + getMeasureText(text: string,index:number) { | ||
| 111 | + let width = measure.measureText({ | ||
| 112 | + textContent: text, | ||
| 113 | + fontSize: px2fp(27), | ||
| 114 | + lineHeight: px2fp(35) | ||
| 115 | + }) | ||
| 116 | + if(index === 0){ | ||
| 117 | + return width + 19+ 35 | ||
| 118 | + }else if(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1){ | ||
| 119 | + return width + 35+ 35 | ||
| 120 | + }else{ | ||
| 121 | + return width + 35+ 19 | ||
| 122 | + } | ||
| 123 | + } | ||
| 124 | + | ||
| 102 | } | 125 | } |
| 1 | -import { ContentDTO, Params } from 'wdBean'; | ||
| 2 | import { DateTimeUtils, LazyDataSource, SPHelper,UserDataLocal } from 'wdKit'; | 1 | import { DateTimeUtils, LazyDataSource, SPHelper,UserDataLocal } from 'wdKit'; |
| 3 | -import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter'; | 2 | +import { WDRouterPage, WDRouterRule } from 'wdRouter'; |
| 4 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; | 3 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; |
| 5 | import { CommentListItem } from '../../../viewmodel/CommentListItem'; | 4 | import { CommentListItem } from '../../../viewmodel/CommentListItem'; |
| 6 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; | 5 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; |
| @@ -106,6 +105,7 @@ export struct HomePageBottomComponent{ | @@ -106,6 +105,7 @@ export struct HomePageBottomComponent{ | ||
| 106 | EmptyComponent({emptyType:14}) | 105 | EmptyComponent({emptyType:14}) |
| 107 | .layoutWeight(1) | 106 | .layoutWeight(1) |
| 108 | .width('100%') | 107 | .width('100%') |
| 108 | + .offset({y:"-200lpx"}) | ||
| 109 | } | 109 | } |
| 110 | }.layoutWeight(1) | 110 | }.layoutWeight(1) |
| 111 | .justifyContent(FlexAlign.Start) | 111 | .justifyContent(FlexAlign.Start) |
| @@ -114,6 +114,7 @@ export struct HomePageBottomComponent{ | @@ -114,6 +114,7 @@ export struct HomePageBottomComponent{ | ||
| 114 | EmptyComponent({emptyType:11}) | 114 | EmptyComponent({emptyType:11}) |
| 115 | .layoutWeight(1) | 115 | .layoutWeight(1) |
| 116 | .width('100%') | 116 | .width('100%') |
| 117 | + .offset({y:"-200lpx"}) | ||
| 117 | } | 118 | } |
| 118 | } | 119 | } |
| 119 | }else{ | 120 | }else{ |
| @@ -146,7 +147,7 @@ export struct HomePageBottomComponent{ | @@ -146,7 +147,7 @@ export struct HomePageBottomComponent{ | ||
| 146 | 147 | ||
| 147 | LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => { | 148 | LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => { |
| 148 | ListItem() { | 149 | ListItem() { |
| 149 | - FollowChildComponent({data: item,type:1}) | 150 | + FollowChildComponent({data: item,type:2}) |
| 150 | } | 151 | } |
| 151 | .onClick(() => { | 152 | .onClick(() => { |
| 152 | }) | 153 | }) |
| @@ -284,6 +285,7 @@ export struct HomePageBottomComponent{ | @@ -284,6 +285,7 @@ export struct HomePageBottomComponent{ | ||
| 284 | if (!this.data_comment || value.list.length == 0){ | 285 | if (!this.data_comment || value.list.length == 0){ |
| 285 | this.hasMore = false | 286 | this.hasMore = false |
| 286 | this.isLoading = false | 287 | this.isLoading = false |
| 288 | + this.isGetRequest = true | ||
| 287 | }else{ | 289 | }else{ |
| 288 | this.getCommentListStatus(value) | 290 | this.getCommentListStatus(value) |
| 289 | } | 291 | } |
| @@ -322,6 +324,27 @@ export struct HomePageBottomComponent{ | @@ -322,6 +324,27 @@ export struct HomePageBottomComponent{ | ||
| 322 | data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,commentContent,item.likeNum,0,item.id,item.targetId,item.targetType,item.targetRelId,item.targetRelObjectId,item.targetRelType,item.targetStatus,item.checkStatus,parentCommentContent,parentCommentUserName)) | 324 | data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,commentContent,item.likeNum,0,item.id,item.targetId,item.targetType,item.targetRelId,item.targetRelObjectId,item.targetRelType,item.targetStatus,item.checkStatus,parentCommentContent,parentCommentUserName)) |
| 323 | }) | 325 | }) |
| 324 | 326 | ||
| 327 | + if(status.commentIdList.length === 0){ | ||
| 328 | + data.forEach((item)=>{ | ||
| 329 | + let publishTime = DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(item.createTime,DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) | ||
| 330 | + this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,publishTime,item.commentContent,item.likeNum,item.like_status,item.id,item.targetId,item.targetType,item.targetRelId,item.targetRelObjectId,item.targetRelType,item.targetStatus,item.checkStatus,item.parentCommentContent,item.parentCommentUserName)) | ||
| 331 | + }) | ||
| 332 | + | ||
| 333 | + this.data_comment.notifyDataReload() | ||
| 334 | + | ||
| 335 | + this.count = this.data_comment.totalCount() | ||
| 336 | + this.commentNum = value.totalCount | ||
| 337 | + if (this.data_comment.totalCount() < value.totalCount) { | ||
| 338 | + this.curPageNum++ | ||
| 339 | + }else { | ||
| 340 | + this.hasMore = false | ||
| 341 | + } | ||
| 342 | + | ||
| 343 | + this.isLoading = false | ||
| 344 | + this.isGetRequest = true | ||
| 345 | + return | ||
| 346 | + } | ||
| 347 | + | ||
| 325 | MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{ | 348 | MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{ |
| 326 | newValue.forEach((item)=>{ | 349 | newValue.forEach((item)=>{ |
| 327 | data.forEach((list)=>{ | 350 | data.forEach((list)=>{ |
| @@ -101,6 +101,7 @@ export struct OtherHomePageBottomCommentComponent { | @@ -101,6 +101,7 @@ export struct OtherHomePageBottomCommentComponent { | ||
| 101 | if (!this.data_comment || value.list.length == 0) { | 101 | if (!this.data_comment || value.list.length == 0) { |
| 102 | this.hasMore = false | 102 | this.hasMore = false |
| 103 | this.isLoading = false | 103 | this.isLoading = false |
| 104 | + this.isGetRequest = true | ||
| 104 | } else { | 105 | } else { |
| 105 | this.getCommentListStatus(value) | 106 | this.getCommentListStatus(value) |
| 106 | } | 107 | } |
| @@ -138,6 +139,27 @@ export struct OtherHomePageBottomCommentComponent { | @@ -138,6 +139,27 @@ export struct OtherHomePageBottomCommentComponent { | ||
| 138 | data.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, item.createTime, commentContent, item.likeNum, 0, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, parentCommentContent, parentCommentUserName)) | 139 | data.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, item.createTime, commentContent, item.likeNum, 0, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, parentCommentContent, parentCommentUserName)) |
| 139 | }) | 140 | }) |
| 140 | 141 | ||
| 142 | + if(status.commentIdList.length === 0){ | ||
| 143 | + data.forEach((item) => { | ||
| 144 | + this.data_comment.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, item.createTime, item.commentContent, item.likeNum, item.like_status, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, item.parentCommentContent, item.parentCommentUserName)) | ||
| 145 | + }) | ||
| 146 | + | ||
| 147 | + this.data_comment.notifyDataReload() | ||
| 148 | + | ||
| 149 | + this.count = this.data_comment.totalCount() | ||
| 150 | + this.commentNum = value.totalCount | ||
| 151 | + if (this.data_comment.totalCount() < value.totalCount) { | ||
| 152 | + this.curPageNum++ | ||
| 153 | + } else { | ||
| 154 | + this.hasMore = false | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + this.isLoading = false | ||
| 158 | + this.isGetRequest = true | ||
| 159 | + return | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + | ||
| 141 | MinePageDatasModel.getOtherUserCommentLikeStatusData(status, getContext(this)).then((newValue) => { | 163 | MinePageDatasModel.getOtherUserCommentLikeStatusData(status, getContext(this)).then((newValue) => { |
| 142 | newValue.forEach((item) => { | 164 | newValue.forEach((item) => { |
| 143 | data.forEach((list) => { | 165 | data.forEach((list) => { |
| @@ -250,10 +250,10 @@ struct ChannelDialog { | @@ -250,10 +250,10 @@ struct ChannelDialog { | ||
| 250 | .fontSize(16) | 250 | .fontSize(16) |
| 251 | .fontWeight(600) | 251 | .fontWeight(600) |
| 252 | .margin({ right: 4 }) | 252 | .margin({ right: 4 }) |
| 253 | - Text(!this.isEditIng ? MY_CHANNEL_TIP1 : MY_CHANNEL_TIP2) | ||
| 254 | - .fontSize(12) | ||
| 255 | - .fontWeight(400) | ||
| 256 | - .fontColor('#222222') | 253 | + // Text(!this.isEditIng ? MY_CHANNEL_TIP1 : MY_CHANNEL_TIP2) |
| 254 | + // .fontSize(12) | ||
| 255 | + // .fontWeight(400) | ||
| 256 | + // .fontColor('#222222') | ||
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | Text(this.isEditIng ? EDIT_DOWN : EDIT_TEXT) | 259 | Text(this.isEditIng ? EDIT_DOWN : EDIT_TEXT) |
| @@ -276,9 +276,9 @@ struct ChannelDialog { | @@ -276,9 +276,9 @@ struct ChannelDialog { | ||
| 276 | Row() { | 276 | Row() { |
| 277 | Text(item.name) | 277 | Text(item.name) |
| 278 | .fontSize(14) | 278 | .fontSize(14) |
| 279 | - .fontColor(this.currentTopNavSelectedItem.channelId === item.channelId ? '#ED2800' : (item.homeChannel === '1' || item.movePermitted === 0 ? '#999999' : '#222222')) | 279 | + .fontColor(this.currentTopNavSelectedItem.channelId === item.channelId ? '#ED2800' : (item.headlinesOn === 1 || item.movePermitted === 0 ? '#999999' : '#222222')) |
| 280 | 280 | ||
| 281 | - if (this.isEditIng && item.delPermitted === 1) { | 281 | + if (this.isEditIng && item.delPermitted === 1 && item.movePermitted === 1) { |
| 282 | Image($r('app.media.icon_audio_close')) | 282 | Image($r('app.media.icon_audio_close')) |
| 283 | .width(12) | 283 | .width(12) |
| 284 | .margin({ left: 1 }) | 284 | .margin({ left: 1 }) |
| @@ -287,12 +287,12 @@ struct ChannelDialog { | @@ -287,12 +287,12 @@ struct ChannelDialog { | ||
| 287 | .width('100%') | 287 | .width('100%') |
| 288 | .height('100%') | 288 | .height('100%') |
| 289 | .justifyContent(FlexAlign.Center) | 289 | .justifyContent(FlexAlign.Center) |
| 290 | - .backgroundColor(item.homeChannel === '1' || item.movePermitted === 0 ? '#F5F5F5' : '#ffffff') | 290 | + .backgroundColor(item.headlinesOn === 1 || item.movePermitted === 0 ? '#F5F5F5' : '#ffffff') |
| 291 | } | 291 | } |
| 292 | .width('23%') | 292 | .width('23%') |
| 293 | .height(40) | 293 | .height(40) |
| 294 | .border({ | 294 | .border({ |
| 295 | - width: item.homeChannel === '1' ? 0 : 1, | 295 | + width: item.headlinesOn === 1 || item.movePermitted === 0 ? 0 : 1, |
| 296 | color: '#EDEDED', | 296 | color: '#EDEDED', |
| 297 | radius: 3 | 297 | radius: 3 |
| 298 | }) | 298 | }) |
| @@ -303,7 +303,7 @@ struct ChannelDialog { | @@ -303,7 +303,7 @@ struct ChannelDialog { | ||
| 303 | TapGesture() | 303 | TapGesture() |
| 304 | .onAction((event?: GestureEvent) => { | 304 | .onAction((event?: GestureEvent) => { |
| 305 | if (this.isEditIng) { | 305 | if (this.isEditIng) { |
| 306 | - if (item.delPermitted === 1) { | 306 | + if (item.delPermitted === 1 && item.movePermitted === 1) { |
| 307 | this.delChannelItem(index) | 307 | this.delChannelItem(index) |
| 308 | } | 308 | } |
| 309 | } else { | 309 | } else { |
| @@ -319,7 +319,7 @@ struct ChannelDialog { | @@ -319,7 +319,7 @@ struct ChannelDialog { | ||
| 319 | } | 319 | } |
| 320 | } | 320 | } |
| 321 | }), | 321 | }), |
| 322 | - PanGesture({ fingers: 1, direction: null, distance: 0 }) | 322 | + PanGesture({ fingers: 1, direction: this.isEditIng ? PanDirection.All:PanDirection.None, distance: 0 }) |
| 323 | .onActionStart((event: GestureEvent) => { | 323 | .onActionStart((event: GestureEvent) => { |
| 324 | this.dragItem = item.num | 324 | this.dragItem = item.num |
| 325 | this.dragRefOffsetX = 0 | 325 | this.dragRefOffsetX = 0 |
| @@ -449,7 +449,7 @@ struct ChannelDialog { | @@ -449,7 +449,7 @@ struct ChannelDialog { | ||
| 449 | }.width('100%').height('100%') | 449 | }.width('100%').height('100%') |
| 450 | .scrollBar(BarState.Off) | 450 | .scrollBar(BarState.Off) |
| 451 | } | 451 | } |
| 452 | - .padding({ top: 40, right: 15, bottom: 20, left: 15 }) | 452 | + .padding({ top: 40, right: 15, bottom: 40, left: 15 }) |
| 453 | .backgroundColor('#ffffff') | 453 | .backgroundColor('#ffffff') |
| 454 | } | 454 | } |
| 455 | } | 455 | } |
| @@ -526,10 +526,9 @@ struct ChannelSubscriptionLayout { | @@ -526,10 +526,9 @@ struct ChannelSubscriptionLayout { | ||
| 526 | .width(18) | 526 | .width(18) |
| 527 | } | 527 | } |
| 528 | .width(36) | 528 | .width(36) |
| 529 | - .height(36) | 529 | + .height(40) |
| 530 | .justifyContent(FlexAlign.Center) | 530 | .justifyContent(FlexAlign.Center) |
| 531 | - .padding({ bottom: 6 }) | ||
| 532 | - .backgroundColor('#ffffff') | 531 | + .backgroundColor(Color.White) |
| 533 | .onClick(() => { | 532 | .onClick(() => { |
| 534 | if (this.dialogController != null) { | 533 | if (this.dialogController != null) { |
| 535 | this.dialogController.open() | 534 | this.dialogController.open() |
| @@ -3,6 +3,7 @@ import { RefreshLayoutBean } from './RefreshLayoutBean'; | @@ -3,6 +3,7 @@ import { RefreshLayoutBean } from './RefreshLayoutBean'; | ||
| 3 | 3 | ||
| 4 | /** | 4 | /** |
| 5 | * Custom layout to show refresh or load. | 5 | * Custom layout to show refresh or load. |
| 6 | + * @deprecated | ||
| 6 | */ | 7 | */ |
| 7 | @Component | 8 | @Component |
| 8 | export default struct CustomLayout { | 9 | export default struct CustomLayout { |
| @@ -128,7 +128,8 @@ struct EditUserInfoPage { | @@ -128,7 +128,8 @@ struct EditUserInfoPage { | ||
| 128 | onAccept:(value:DatePickerResult) => { | 128 | onAccept:(value:DatePickerResult) => { |
| 129 | let mon = value.month as number + 1 | 129 | let mon = value.month as number + 1 |
| 130 | let monStr = mon < 10? '0'+mon.toString():mon.toString(); | 130 | let monStr = mon < 10? '0'+mon.toString():mon.toString(); |
| 131 | - this.currentUserInfo.userExtend.birthday = value.year+'-'+monStr+'-'+value.day; | 131 | + let dayStr = value.day as number < 10? '0'+value.day:value.day; |
| 132 | + this.currentUserInfo.userExtend.birthday = value.year+'-'+monStr+'-'+dayStr; | ||
| 132 | this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_birthday | 133 | this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_birthday |
| 133 | this.updateEditModel() | 134 | this.updateEditModel() |
| 134 | } | 135 | } |
| @@ -8,6 +8,7 @@ import MinePageMoreFunctionUI from '../mine/MinePageMoreFunctionUI' | @@ -8,6 +8,7 @@ import MinePageMoreFunctionUI from '../mine/MinePageMoreFunctionUI' | ||
| 8 | import { SPHelper, StringUtils } from 'wdKit' | 8 | import { SPHelper, StringUtils } from 'wdKit' |
| 9 | import { SpConstants } from 'wdConstant' | 9 | import { SpConstants } from 'wdConstant' |
| 10 | import dataPreferences from '@ohos.data.preferences'; | 10 | import dataPreferences from '@ohos.data.preferences'; |
| 11 | +import { MergeRecordDialog } from '../../dialog/MergeRecordDialog' | ||
| 11 | 12 | ||
| 12 | const TAG = 'MinePageComponent'; | 13 | const TAG = 'MinePageComponent'; |
| 13 | 14 | ||
| @@ -30,9 +31,23 @@ export struct MinePageComponent { | @@ -30,9 +31,23 @@ export struct MinePageComponent { | ||
| 30 | this.isLogin = false | 31 | this.isLogin = false |
| 31 | }else { | 32 | }else { |
| 32 | this.isLogin = true | 33 | this.isLogin = true |
| 34 | + this.addRecordDialog() | ||
| 33 | } | 35 | } |
| 34 | } | 36 | } |
| 35 | } | 37 | } |
| 38 | + mergeDialogController: CustomDialogController = new CustomDialogController({ | ||
| 39 | + builder: MergeRecordDialog({ | ||
| 40 | + cancel: () => { | ||
| 41 | + this.clearMergeRecord() | ||
| 42 | + }, | ||
| 43 | + confirm: () => { | ||
| 44 | + this.dealMergeRecordData() | ||
| 45 | + } | ||
| 46 | + }), | ||
| 47 | + customStyle: true, | ||
| 48 | + alignment: DialogAlignment.Center, | ||
| 49 | + autoCancel: false | ||
| 50 | + }) | ||
| 36 | 51 | ||
| 37 | aboutToAppear(){ | 52 | aboutToAppear(){ |
| 38 | this.getUserLogin() | 53 | this.getUserLogin() |
| @@ -112,5 +127,29 @@ export struct MinePageComponent { | @@ -112,5 +127,29 @@ export struct MinePageComponent { | ||
| 112 | } | 127 | } |
| 113 | } | 128 | } |
| 114 | 129 | ||
| 130 | + addRecordDialog() { | ||
| 131 | + setTimeout(() => { | ||
| 132 | + this.dealMergeRecordDialog() | ||
| 133 | + }, 300) | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + dealMergeRecordDialog() { | ||
| 137 | + let commentTime = SPHelper.default.getSync(SpConstants.FIRSTCOMMENTTIME, "") | ||
| 138 | + if (StringUtils.isNotEmpty(commentTime)) { | ||
| 139 | + this.mergeDialogController.open() | ||
| 140 | + } | ||
| 141 | + } | ||
| 142 | + | ||
| 143 | + dealMergeRecordData() { | ||
| 144 | + MinePageDatasModel.visitorMergeComment().then(() => { | ||
| 145 | + this.mergeDialogController.close() | ||
| 146 | + }).catch(() => { | ||
| 147 | + this.mergeDialogController.close() | ||
| 148 | + }) | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + clearMergeRecord(){ | ||
| 152 | + SPHelper.default.saveSync(SpConstants.FIRSTCOMMENTTIME, "") | ||
| 153 | + } | ||
| 115 | } | 154 | } |
| 116 | 155 |
| @@ -47,6 +47,7 @@ struct MyCollectionListPage { | @@ -47,6 +47,7 @@ struct MyCollectionListPage { | ||
| 47 | CustomPullToRefresh({ | 47 | CustomPullToRefresh({ |
| 48 | alldata:this.allDatas, | 48 | alldata:this.allDatas, |
| 49 | scroller:this.scroller, | 49 | scroller:this.scroller, |
| 50 | + hasMore:this.browSingModel.hasMore, | ||
| 50 | customList:()=>{ | 51 | customList:()=>{ |
| 51 | this.ListLayout() | 52 | this.ListLayout() |
| 52 | }, | 53 | }, |
| @@ -122,10 +123,14 @@ struct MyCollectionListPage { | @@ -122,10 +123,14 @@ struct MyCollectionListPage { | ||
| 122 | if (collectionItem && collectionItem.list && collectionItem.list.length > 0) { | 123 | if (collectionItem && collectionItem.list && collectionItem.list.length > 0) { |
| 123 | if (this.currentPage === 1) { | 124 | if (this.currentPage === 1) { |
| 124 | this.allDatas = [] | 125 | this.allDatas = [] |
| 125 | - this.allDatas.push(...collectionItem.list) | ||
| 126 | - }else { | ||
| 127 | - this.allDatas = this.allDatas.concat(...collectionItem.list) | ||
| 128 | } | 126 | } |
| 127 | + | ||
| 128 | + for (let index = 0; index < collectionItem.list.length; index++) { | ||
| 129 | + const compDTO = collectionItem.list[index]; | ||
| 130 | + compDTO.isCollection = true ///用于时间展示 | ||
| 131 | + this.allDatas.push(compDTO) | ||
| 132 | + } | ||
| 133 | + | ||
| 129 | if (collectionItem.hasNext === 0) { | 134 | if (collectionItem.hasNext === 0) { |
| 130 | this.browSingModel.hasMore = false; | 135 | this.browSingModel.hasMore = false; |
| 131 | } else { | 136 | } else { |
| @@ -188,8 +193,17 @@ struct MyCollectionListPage { | @@ -188,8 +193,17 @@ struct MyCollectionListPage { | ||
| 188 | }) | 193 | }) |
| 189 | 194 | ||
| 190 | //重置删除状态 | 195 | //重置删除状态 |
| 196 | + this.updataUIState() | ||
| 197 | + } | ||
| 198 | + | ||
| 199 | + updataUIState(){ | ||
| 191 | this.isEditState = false | 200 | this.isEditState = false |
| 192 | this.isAllSelect = false | 201 | this.isAllSelect = false |
| 202 | + | ||
| 203 | + if (this.allDatas.length === 0) { | ||
| 204 | + this.browSingModel.viewType = ViewType.EMPTY; | ||
| 205 | + this.browSingModel.hasMore === true | ||
| 206 | + } | ||
| 193 | } | 207 | } |
| 194 | 208 | ||
| 195 | } | 209 | } |
| @@ -5,12 +5,15 @@ import { RefreshConstants } from '../../utils/RefreshConstants' | @@ -5,12 +5,15 @@ import { RefreshConstants } from '../../utils/RefreshConstants' | ||
| 5 | */ | 5 | */ |
| 6 | @Component | 6 | @Component |
| 7 | export default struct NoMoreLayout { | 7 | export default struct NoMoreLayout { |
| 8 | + | ||
| 9 | + | ||
| 8 | build() { | 10 | build() { |
| 9 | - Row() { | 11 | + Column() { |
| 10 | Text($r('app.string.footer_text')) | 12 | Text($r('app.string.footer_text')) |
| 11 | - .margin({ left: RefreshConstants.NoMoreLayoutConstant_NORMAL_PADDING }) | ||
| 12 | .fontSize(RefreshConstants.NoMoreLayoutConstant_TITLE_FONT) | 13 | .fontSize(RefreshConstants.NoMoreLayoutConstant_TITLE_FONT) |
| 13 | .textAlign(TextAlign.Center) | 14 | .textAlign(TextAlign.Center) |
| 15 | + .fontColor('#CCCCCC') | ||
| 16 | + .margin({bottom:40}) | ||
| 14 | } | 17 | } |
| 15 | .width(RefreshConstants.FULL_WIDTH) | 18 | .width(RefreshConstants.FULL_WIDTH) |
| 16 | .justifyContent(FlexAlign.Center) | 19 | .justifyContent(FlexAlign.Center) |
| @@ -3,8 +3,6 @@ import { Logger } from 'wdKit'; | @@ -3,8 +3,6 @@ import { Logger } from 'wdKit'; | ||
| 3 | import { EmptyComponent } from '../view/EmptyComponent'; | 3 | import { EmptyComponent } from '../view/EmptyComponent'; |
| 4 | import PageModel from '../../viewmodel/PageModel'; | 4 | import PageModel from '../../viewmodel/PageModel'; |
| 5 | import { autoRefresh, listTouchEvent } from '../../utils/PullDownRefresh'; | 5 | import { autoRefresh, listTouchEvent } from '../../utils/PullDownRefresh'; |
| 6 | -import RefreshLayout from './RefreshLayout'; | ||
| 7 | -import { RefreshLayoutBean } from './RefreshLayoutBean'; | ||
| 8 | import LoadMoreLayout from './LoadMoreLayout'; | 6 | import LoadMoreLayout from './LoadMoreLayout'; |
| 9 | import { CompParser } from '../CompParser'; | 7 | import { CompParser } from '../CompParser'; |
| 10 | import { CompDTO } from 'wdBean'; | 8 | import { CompDTO } from 'wdBean'; |
| @@ -14,6 +12,8 @@ import { ProcessUtils } from 'wdRouter/Index'; | @@ -14,6 +12,8 @@ import { ProcessUtils } from 'wdRouter/Index'; | ||
| 14 | import PageAdModel from '../../viewmodel/PageAdvModel'; | 12 | import PageAdModel from '../../viewmodel/PageAdvModel'; |
| 15 | import PageNoMoreLayout from './PageNoMoreLayout'; | 13 | import PageNoMoreLayout from './PageNoMoreLayout'; |
| 16 | import { NoMoreBean } from './NoMoreBean'; | 14 | import { NoMoreBean } from './NoMoreBean'; |
| 15 | +import { RefreshLayoutBean } from '../refresh/RefreshLayoutBean'; | ||
| 16 | +import RefreshLayout from '../refresh/RefreshLayout'; | ||
| 17 | 17 | ||
| 18 | const TAG = 'PageComponent'; | 18 | const TAG = 'PageComponent'; |
| 19 | 19 | ||
| @@ -66,15 +66,15 @@ export struct PageComponent { | @@ -66,15 +66,15 @@ export struct PageComponent { | ||
| 66 | // 下拉刷新 | 66 | // 下拉刷新 |
| 67 | ListItem() { | 67 | ListItem() { |
| 68 | RefreshLayout({ | 68 | RefreshLayout({ |
| 69 | - refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullDown, this.pageModel.pullDownRefreshImage, | ||
| 70 | - this.pageModel.pullDownRefreshText, this.pageModel.pullDownRefreshHeight) | 69 | + refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullDown, this.pageModel.load, |
| 70 | + this.pageModel.offsetY) | ||
| 71 | }) | 71 | }) |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | LazyForEach(this.pageModel.compList, (compDTO: CompDTO, compIndex: number) => { | 74 | LazyForEach(this.pageModel.compList, (compDTO: CompDTO, compIndex: number) => { |
| 75 | ListItem() { | 75 | ListItem() { |
| 76 | Column() { | 76 | Column() { |
| 77 | - CompParser({ compDTO: compDTO, compIndex: compIndex }); | 77 | + CompParser({ pageModel: this.pageModel, compDTO: compDTO, compIndex: compIndex }); |
| 78 | } | 78 | } |
| 79 | } | 79 | } |
| 80 | }, | 80 | }, |
| @@ -246,6 +246,7 @@ export struct PageComponent { | @@ -246,6 +246,7 @@ export struct PageComponent { | ||
| 246 | this.pageModel.groupId = this.pageId; | 246 | this.pageModel.groupId = this.pageId; |
| 247 | this.pageModel.channelId = this.channelId; | 247 | this.pageModel.channelId = this.channelId; |
| 248 | this.pageModel.currentPage = 1; | 248 | this.pageModel.currentPage = 1; |
| 249 | + this.pageModel.pageTotalCompSize = 0; | ||
| 249 | PageHelper.getInitData(this.pageModel, this.pageAdvModel) | 250 | PageHelper.getInitData(this.pageModel, this.pageAdvModel) |
| 250 | } | 251 | } |
| 251 | } | 252 | } |
| @@ -99,8 +99,12 @@ struct PeopleShipHomePage { | @@ -99,8 +99,12 @@ struct PeopleShipHomePage { | ||
| 99 | 99 | ||
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | - async aboutToAppear() { | 102 | + aboutToAppear() { |
| 103 | 103 | ||
| 104 | + this.getData() | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + private async getData() { | ||
| 104 | try { | 108 | try { |
| 105 | // 获取页面信息 | 109 | // 获取页面信息 |
| 106 | this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '') | 110 | this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '') |
| @@ -117,8 +121,6 @@ struct PeopleShipHomePage { | @@ -117,8 +121,6 @@ struct PeopleShipHomePage { | ||
| 117 | } catch (exception) { | 121 | } catch (exception) { |
| 118 | 122 | ||
| 119 | } | 123 | } |
| 120 | - | ||
| 121 | - | ||
| 122 | } | 124 | } |
| 123 | 125 | ||
| 124 | findFollowStata(followList: QueryListIsFollowedItem[]) { | 126 | findFollowStata(followList: QueryListIsFollowedItem[]) { |
| @@ -156,8 +158,10 @@ struct PeopleShipHomePage { | @@ -156,8 +158,10 @@ struct PeopleShipHomePage { | ||
| 156 | PageRepository.postInteractAccentionOperate(params).then(res => { | 158 | PageRepository.postInteractAccentionOperate(params).then(res => { |
| 157 | if (this.isAttention == '1') { | 159 | if (this.isAttention == '1') { |
| 158 | this.isAttention = '0' | 160 | this.isAttention = '0' |
| 161 | + this.detailModel.fansNum -= 1 | ||
| 159 | } else { | 162 | } else { |
| 160 | this.isAttention = '1' | 163 | this.isAttention = '1' |
| 164 | + this.detailModel.fansNum += 1 | ||
| 161 | } | 165 | } |
| 162 | this.isLoadingAttention = false | 166 | this.isLoadingAttention = false |
| 163 | }) | 167 | }) |
| @@ -3,6 +3,7 @@ import { RefreshLayoutBean } from './RefreshLayoutBean'; | @@ -3,6 +3,7 @@ import { RefreshLayoutBean } from './RefreshLayoutBean'; | ||
| 3 | 3 | ||
| 4 | /** | 4 | /** |
| 5 | * The refresh layout component. | 5 | * The refresh layout component. |
| 6 | + * @deprecated | ||
| 6 | */ | 7 | */ |
| 7 | @Component | 8 | @Component |
| 8 | export default struct RefreshLayout { | 9 | export default struct RefreshLayout { |
| 1 | -import { ContentDTO } from 'wdBean'; | 1 | +import { ContentDTO , Action,GoldenPositionExtraBean} from 'wdBean'; |
| 2 | import { CommonConstants ,ViewType} from 'wdConstant'; | 2 | import { CommonConstants ,ViewType} from 'wdConstant'; |
| 3 | import PageViewModel from '../../viewmodel/PageViewModel'; | 3 | import PageViewModel from '../../viewmodel/PageViewModel'; |
| 4 | import RefreshLayout from '../page/RefreshLayout'; | 4 | import RefreshLayout from '../page/RefreshLayout'; |
| @@ -22,9 +22,14 @@ struct ThemeListPage { | @@ -22,9 +22,14 @@ struct ThemeListPage { | ||
| 22 | currentPage: number = 1; | 22 | currentPage: number = 1; |
| 23 | pageSize: number = 20; | 23 | pageSize: number = 20; |
| 24 | title: string = '金刚位聚合页' | 24 | title: string = '金刚位聚合页' |
| 25 | + extra: string = '' | ||
| 25 | 26 | ||
| 26 | aboutToAppear(): void { | 27 | aboutToAppear(): void { |
| 27 | - PageViewModel.postThemeList(this.sort, this.currentPage, this.pageSize).then((liveReviewDTO) => { | 28 | + let par:Action = router.getParams() as Action; |
| 29 | + let params = par?.params; | ||
| 30 | + this.extra = params?.extra?.extra || ''; | ||
| 31 | + this.title = params?.extra?.title || ''; | ||
| 32 | + PageViewModel.postThemeList(this.sort, this.currentPage, this.pageSize,this.extra).then((liveReviewDTO) => { | ||
| 28 | console.log(`postThemeList${JSON.stringify(liveReviewDTO)}`) | 33 | console.log(`postThemeList${JSON.stringify(liveReviewDTO)}`) |
| 29 | this.data.push(...liveReviewDTO.list) | 34 | this.data.push(...liveReviewDTO.list) |
| 30 | if(this.data.getDataArray().length > 0){ | 35 | if(this.data.getDataArray().length > 0){ |
| @@ -7,6 +7,7 @@ import { FirstTabTopSearchComponent } from '../search/FirstTabTopSearchComponent | @@ -7,6 +7,7 @@ import { FirstTabTopSearchComponent } from '../search/FirstTabTopSearchComponent | ||
| 7 | import { VideoChannelDetail } from 'wdDetailPlayShortVideo/Index'; | 7 | import { VideoChannelDetail } from 'wdDetailPlayShortVideo/Index'; |
| 8 | import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils'; | 8 | import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils'; |
| 9 | import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent'; | 9 | import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent'; |
| 10 | +import { WDRouterPage, WDRouterRule } from 'wdRouter' | ||
| 10 | 11 | ||
| 11 | 12 | ||
| 12 | const TAG = 'TopNavigationComponent'; | 13 | const TAG = 'TopNavigationComponent'; |
| @@ -63,6 +64,8 @@ export struct TopNavigationComponent { | @@ -63,6 +64,8 @@ export struct TopNavigationComponent { | ||
| 63 | @State indicatorLeftMargin: number = 0 | 64 | @State indicatorLeftMargin: number = 0 |
| 64 | @State indicatorWidth: number = 0 | 65 | @State indicatorWidth: number = 0 |
| 65 | private tabsWidth: number = 0 | 66 | private tabsWidth: number = 0 |
| 67 | + //定时器延时处理切换至版面、播报tab时 返回上一个tab | ||
| 68 | + @State tabTimmer: number = 0 | ||
| 66 | 69 | ||
| 67 | topOrBottomNavChange() { | 70 | topOrBottomNavChange() { |
| 68 | if (this.currentBottomNavName === this.currentBottomNavInfo?.name) { | 71 | if (this.currentBottomNavName === this.currentBottomNavInfo?.name) { |
| @@ -136,13 +139,15 @@ export struct TopNavigationComponent { | @@ -136,13 +139,15 @@ export struct TopNavigationComponent { | ||
| 136 | } | 139 | } |
| 137 | 140 | ||
| 138 | //频道分类 | 141 | //频道分类 |
| 139 | - if (item.myChannel === '1' && item.name !== '播报') { | ||
| 140 | - _myChannelList.push(item) | ||
| 141 | - _channelIds.push(item.channelId) | ||
| 142 | - } else if (item.moreChannel === '1') { | ||
| 143 | - this.moreChannelList.push(item) | ||
| 144 | - } else if (item.localChannel === '1') { | ||
| 145 | - this.localChannelList.push(item) | 142 | + if (item.name !== '播报') { //暂时隐藏播报 |
| 143 | + if (item.myChannel === '1') { | ||
| 144 | + _myChannelList.push(item) | ||
| 145 | + _channelIds.push(item.channelId) | ||
| 146 | + } else if (item.moreChannel === '1') { | ||
| 147 | + this.moreChannelList.push(item) | ||
| 148 | + } else if (item.localChannel === '1') { | ||
| 149 | + this.localChannelList.push(item) | ||
| 150 | + } | ||
| 146 | } | 151 | } |
| 147 | 152 | ||
| 148 | }) | 153 | }) |
| @@ -252,14 +257,15 @@ export struct TopNavigationComponent { | @@ -252,14 +257,15 @@ export struct TopNavigationComponent { | ||
| 252 | .barMode(BarMode.Scrollable) | 257 | .barMode(BarMode.Scrollable) |
| 253 | .vertical(false) | 258 | .vertical(false) |
| 254 | .barBackgroundColor(this.barBackgroundColor) | 259 | .barBackgroundColor(this.barBackgroundColor) |
| 255 | - .backgroundColor(this.barBackgroundColor) | ||
| 256 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 257 | .onAreaChange((oldValue: Area, newValue: Area) => { | 260 | .onAreaChange((oldValue: Area, newValue: Area) => { |
| 258 | let width = Number.parseFloat(newValue.width.toString()) | 261 | let width = Number.parseFloat(newValue.width.toString()) |
| 259 | this.tabsWidth = Number.isNaN(width) ? 0 : width | 262 | this.tabsWidth = Number.isNaN(width) ? 0 : width |
| 260 | }) | 263 | }) |
| 261 | .animationDuration(this.animationDuration) | 264 | .animationDuration(this.animationDuration) |
| 262 | .onChange((index: number) => { | 265 | .onChange((index: number) => { |
| 266 | + if(this.tabTimmer){ | ||
| 267 | + clearTimeout(this.tabTimmer) | ||
| 268 | + } | ||
| 263 | this.currentTopNavName = | 269 | this.currentTopNavName = |
| 264 | this._currentNavIndex === 0 ? this.myChannelList[index].name : this.topNavList[index].name | 270 | this._currentNavIndex === 0 ? this.myChannelList[index].name : this.topNavList[index].name |
| 265 | Logger.info(TAG, `onChange index : ${index}`); | 271 | Logger.info(TAG, `onChange index : ${index}`); |
| @@ -271,11 +277,15 @@ export struct TopNavigationComponent { | @@ -271,11 +277,15 @@ export struct TopNavigationComponent { | ||
| 271 | if (this.isBroadcast(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index])) { | 277 | if (this.isBroadcast(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index])) { |
| 272 | // 跳转到播报页面 | 278 | // 跳转到播报页面 |
| 273 | ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId) | 279 | ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId) |
| 274 | - this.tabsController.changeIndex(this.currentTopNavSelectedIndex) | 280 | + this.tabTimmer = setTimeout(() => { |
| 281 | + this.tabsController.changeIndex(this.currentTopNavSelectedIndex) | ||
| 282 | + }, 500) | ||
| 275 | } | 283 | } |
| 276 | if (this.isLayout(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index])) { | 284 | if (this.isLayout(this._currentNavIndex === 0 ? this.myChannelList[index] : this.topNavList[index])) { |
| 277 | ProcessUtils.gotoENewsPaper() | 285 | ProcessUtils.gotoENewsPaper() |
| 278 | - this.tabsController.changeIndex(this.currentTopNavSelectedIndex) | 286 | + this.tabTimmer = setTimeout(() => { |
| 287 | + this.tabsController.changeIndex(this.currentTopNavSelectedIndex) | ||
| 288 | + }, 500) | ||
| 279 | } | 289 | } |
| 280 | }) | 290 | }) |
| 281 | .onAnimationStart((index: number, targetIndex: number, event: TabsAnimationEvent) => { | 291 | .onAnimationStart((index: number, targetIndex: number, event: TabsAnimationEvent) => { |
| @@ -326,6 +336,20 @@ export struct TopNavigationComponent { | @@ -326,6 +336,20 @@ export struct TopNavigationComponent { | ||
| 326 | this.tabsController.changeIndex(index) | 336 | this.tabsController.changeIndex(index) |
| 327 | } | 337 | } |
| 328 | }) | 338 | }) |
| 339 | + }else { | ||
| 340 | + Row() { | ||
| 341 | + Image($r('app.media.icon_search')) | ||
| 342 | + .width('24vp') | ||
| 343 | + .height('24vp') | ||
| 344 | + } | ||
| 345 | + .height('40vp') | ||
| 346 | + .width('40vp') | ||
| 347 | + .margin({ right: 10 }) | ||
| 348 | + .alignItems(VerticalAlign.Center) | ||
| 349 | + .justifyContent(FlexAlign.Center) | ||
| 350 | + .onClick(() => { | ||
| 351 | + WDRouterRule.jumpWithPage(WDRouterPage.searchPage) | ||
| 352 | + }) | ||
| 329 | } | 353 | } |
| 330 | } | 354 | } |
| 331 | } | 355 | } |
| @@ -3,31 +3,29 @@ import { FollowListDetailItem } from '../../viewmodel/FollowListDetailItem'; | @@ -3,31 +3,29 @@ import { FollowListDetailItem } from '../../viewmodel/FollowListDetailItem'; | ||
| 3 | 3 | ||
| 4 | @Component | 4 | @Component |
| 5 | export struct PeopleShipAttentionContentListHeadComponent { | 5 | export struct PeopleShipAttentionContentListHeadComponent { |
| 6 | - | ||
| 7 | - @State index: number = 0 | ||
| 8 | @ObjectLink item: FollowListDetailItem | 6 | @ObjectLink item: FollowListDetailItem |
| 7 | + | ||
| 9 | build() { | 8 | build() { |
| 10 | - Column(){ | 9 | + Column() { |
| 11 | // 头像 | 10 | // 头像 |
| 12 | PeopleShipHomePageHeadComponent({ | 11 | PeopleShipHomePageHeadComponent({ |
| 13 | diameter: 48, | 12 | diameter: 48, |
| 14 | iconDiameter: 16, | 13 | iconDiameter: 16, |
| 15 | - headPhotoUrl: this.index == 0 ? $r('app.media.attention_mine') : | ||
| 16 | - ((this.item.attentionHeadPhotoUrl && this.item.attentionHeadPhotoUrl.length > 0) ? | ||
| 17 | - this.item.attentionHeadPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon')), | ||
| 18 | - authIcon: this.index == 0 ? '' : this.item.authIcon | 14 | + headPhotoUrl: (this.item.attentionHeadPhotoUrl && this.item.attentionHeadPhotoUrl.length > 0) ? |
| 15 | + this.item.attentionHeadPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon'), | ||
| 16 | + authIcon: this.item.authIcon | ||
| 19 | }).margin({ | 17 | }).margin({ |
| 20 | bottom: '8vp' | 18 | bottom: '8vp' |
| 21 | }) | 19 | }) |
| 22 | 20 | ||
| 23 | - Text(this.index == 0 ? '我的关注' : this.item.attentionUserName) | 21 | + Text(this.item.attentionUserName) |
| 24 | .fontColor($r('app.color.color_666666')) | 22 | .fontColor($r('app.color.color_666666')) |
| 25 | .fontSize($r('app.float.vp_13')) | 23 | .fontSize($r('app.float.vp_13')) |
| 26 | .fontWeight(400) | 24 | .fontWeight(400) |
| 27 | .height('18vp') | 25 | .height('18vp') |
| 28 | .lineHeight('18vp') | 26 | .lineHeight('18vp') |
| 29 | .maxLines(1) | 27 | .maxLines(1) |
| 30 | - .textOverflow({overflow: TextOverflow.Ellipsis}) | 28 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 31 | .padding({ | 29 | .padding({ |
| 32 | left: '2vp', | 30 | left: '2vp', |
| 33 | right: '2vp' | 31 | right: '2vp' |
| @@ -36,7 +34,7 @@ export struct PeopleShipAttentionContentListHeadComponent { | @@ -36,7 +34,7 @@ export struct PeopleShipAttentionContentListHeadComponent { | ||
| 36 | .alignItems(HorizontalAlign.Center) | 34 | .alignItems(HorizontalAlign.Center) |
| 37 | .width('78vp') | 35 | .width('78vp') |
| 38 | .margin({ | 36 | .margin({ |
| 39 | - left: this.index == 0 ? '8vp' : '4vp', | 37 | + left: '4vp', |
| 40 | top: '14vp', | 38 | top: '14vp', |
| 41 | bottom: '14vp' | 39 | bottom: '14vp' |
| 42 | }) | 40 | }) |
| @@ -6,37 +6,72 @@ import { PeopleShipAttentionContentListHeadComponent } from './PeopleShipAttenti | @@ -6,37 +6,72 @@ import { PeopleShipAttentionContentListHeadComponent } from './PeopleShipAttenti | ||
| 6 | @Component | 6 | @Component |
| 7 | export struct PeopleShipAttentionContentListTopComponent { | 7 | export struct PeopleShipAttentionContentListTopComponent { |
| 8 | @Prop followList: FollowListDetailItem[] | 8 | @Prop followList: FollowListDetailItem[] |
| 9 | + | ||
| 9 | build() { | 10 | build() { |
| 10 | Column() { | 11 | Column() { |
| 11 | - List(){ | 12 | + List() { |
| 12 | ListItem() { | 13 | ListItem() { |
| 13 | - PeopleShipAttentionContentListHeadComponent({ | ||
| 14 | - index: 0, | ||
| 15 | - item: this.followList[0] | ||
| 16 | - }) | 14 | + this.PeopleShipFollowTop() |
| 17 | }.onClick(() => { | 15 | }.onClick(() => { |
| 18 | // 跳转到关注列表-我的 | 16 | // 跳转到关注列表-我的 |
| 19 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage) | 17 | WDRouterRule.jumpWithPage(WDRouterPage.followListPage) |
| 20 | }) | 18 | }) |
| 21 | 19 | ||
| 22 | 20 | ||
| 23 | - ForEach(this.followList, (item: FollowListDetailItem, index: number) => { | 21 | + ForEach(this.followList, (item: FollowListDetailItem) => { |
| 24 | ListItem() { | 22 | ListItem() { |
| 25 | PeopleShipAttentionContentListHeadComponent({ | 23 | PeopleShipAttentionContentListHeadComponent({ |
| 26 | - index: index + 1, | ||
| 27 | item: item | 24 | item: item |
| 28 | }) | 25 | }) |
| 29 | }.onClick(() => { | 26 | }.onClick(() => { |
| 30 | let creatorId = item.attentionCreatorId || '' | 27 | let creatorId = item.attentionCreatorId || '' |
| 31 | ProcessUtils.gotoPeopleShipHomePage(creatorId) | 28 | ProcessUtils.gotoPeopleShipHomePage(creatorId) |
| 32 | }) | 29 | }) |
| 33 | - }, (item: FollowListDetailItem) => item.attentionCreatorId) | 30 | + }, (item: FollowListDetailItem, index: number) => item.attentionCreatorId + index) |
| 34 | } | 31 | } |
| 35 | .listDirection(Axis.Horizontal) | 32 | .listDirection(Axis.Horizontal) |
| 36 | .scrollBar(BarState.Off) | 33 | .scrollBar(BarState.Off) |
| 37 | .width('100%') | 34 | .width('100%') |
| 38 | .height('102vp') | 35 | .height('102vp') |
| 36 | + | ||
| 39 | Divider().strokeWidth(1).color($r('app.color.color_F5F5F5')) | 37 | Divider().strokeWidth(1).color($r('app.color.color_F5F5F5')) |
| 40 | } | 38 | } |
| 41 | } | 39 | } |
| 40 | + | ||
| 41 | + @Builder | ||
| 42 | + PeopleShipFollowTop() { | ||
| 43 | + Column() { | ||
| 44 | + // 头像 | ||
| 45 | + Image($r('app.media.attention_mine')) | ||
| 46 | + .alt($r('app.media.attention_mine')) | ||
| 47 | + .width(48) | ||
| 48 | + .height(48) | ||
| 49 | + .borderRadius(24) | ||
| 50 | + .objectFit(ImageFit.ScaleDown) | ||
| 51 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 52 | + .margin({ | ||
| 53 | + bottom: '8vp' | ||
| 54 | + }) | ||
| 55 | + | ||
| 56 | + Text('我的关注') | ||
| 57 | + .fontColor($r('app.color.color_666666')) | ||
| 58 | + .fontSize($r('app.float.vp_13')) | ||
| 59 | + .fontWeight(400) | ||
| 60 | + .height('18vp') | ||
| 61 | + .lineHeight('18vp') | ||
| 62 | + .maxLines(1) | ||
| 63 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 64 | + .padding({ | ||
| 65 | + left: '2vp', | ||
| 66 | + right: '2vp' | ||
| 67 | + }) | ||
| 68 | + } | ||
| 69 | + .alignItems(HorizontalAlign.Center) | ||
| 70 | + .width('78vp') | ||
| 71 | + .margin({ | ||
| 72 | + left: '8vp', | ||
| 73 | + top: '14vp', | ||
| 74 | + bottom: '14vp' | ||
| 75 | + }) | ||
| 76 | + } | ||
| 42 | } | 77 | } |
| @@ -24,7 +24,7 @@ import PageAdModel from '../../viewmodel/PageAdvModel'; | @@ -24,7 +24,7 @@ import PageAdModel from '../../viewmodel/PageAdvModel'; | ||
| 24 | import PageHelper from '../../viewmodel/PageHelper'; | 24 | import PageHelper from '../../viewmodel/PageHelper'; |
| 25 | import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentionContentListTopComponent' | 25 | import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentionContentListTopComponent' |
| 26 | import { CardParser } from '../CardParser' | 26 | import { CardParser } from '../CardParser' |
| 27 | -import NoMoreLayout from '../page/NoMoreLayout'; | 27 | +import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'; |
| 28 | 28 | ||
| 29 | @Preview | 29 | @Preview |
| 30 | @Component | 30 | @Component |
| @@ -161,7 +161,7 @@ export struct PeopleShipMainComponent { | @@ -161,7 +161,7 @@ export struct PeopleShipMainComponent { | ||
| 161 | // 加载更多 | 161 | // 加载更多 |
| 162 | ListItem() { | 162 | ListItem() { |
| 163 | if (!this.hasMore && !this.isLoading) { | 163 | if (!this.hasMore && !this.isLoading) { |
| 164 | - NoMoreLayout() | 164 | + PeopleShipNoMoreData() |
| 165 | } | 165 | } |
| 166 | } | 166 | } |
| 167 | } | 167 | } |
| @@ -280,6 +280,7 @@ export struct PeopleShipMainComponent { | @@ -280,6 +280,7 @@ export struct PeopleShipMainComponent { | ||
| 280 | //批量查询各类型内容动态数据接口 | 280 | //批量查询各类型内容动态数据接口 |
| 281 | this.checkContentInteractData(listData.list, resolve) | 281 | this.checkContentInteractData(listData.list, resolve) |
| 282 | } else { | 282 | } else { |
| 283 | + this.hasMore = false; | ||
| 283 | this.resolveEnd(true, resolve) | 284 | this.resolveEnd(true, resolve) |
| 284 | } | 285 | } |
| 285 | 286 |
| 1 | import { PeopleShipRecommendHeadComponent } from './PeopleShipRecommendHeadComponent' | 1 | import { PeopleShipRecommendHeadComponent } from './PeopleShipRecommendHeadComponent' |
| 2 | import { RmhRecommendDTO } from 'wdBean'; | 2 | import { RmhRecommendDTO } from 'wdBean'; |
| 3 | -import { Logger } from 'wdKit/Index'; | ||
| 4 | -import NoMoreLayout from '../page/NoMoreLayout'; | 3 | +import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'; |
| 5 | 4 | ||
| 6 | @Component | 5 | @Component |
| 7 | export struct PeopleShipRecommendComponent { | 6 | export struct PeopleShipRecommendComponent { |
| @@ -87,7 +86,8 @@ export struct PeopleShipRecommendComponent { | @@ -87,7 +86,8 @@ export struct PeopleShipRecommendComponent { | ||
| 87 | // 为你推荐 | 86 | // 为你推荐 |
| 88 | Button(this.rmhSelectedList.length == 0 ? '一键关注' : `一键关注 (${this.rmhSelectedList.length})`, { type: ButtonType.Normal, stateEffect: this.rmhSelectedList.length != 0 }) | 87 | Button(this.rmhSelectedList.length == 0 ? '一键关注' : `一键关注 (${this.rmhSelectedList.length})`, { type: ButtonType.Normal, stateEffect: this.rmhSelectedList.length != 0 }) |
| 89 | .margin({ | 88 | .margin({ |
| 90 | - top: '24vp' | 89 | + top: '24vp', |
| 90 | + bottom: '10vp' | ||
| 91 | }) | 91 | }) |
| 92 | .width('120vp') | 92 | .width('120vp') |
| 93 | .height('36vp') | 93 | .height('36vp') |
| @@ -104,7 +104,7 @@ export struct PeopleShipRecommendComponent { | @@ -104,7 +104,7 @@ export struct PeopleShipRecommendComponent { | ||
| 104 | } | 104 | } |
| 105 | }) | 105 | }) |
| 106 | // 没有更多 | 106 | // 没有更多 |
| 107 | - NoMoreLayout() | 107 | + PeopleShipNoMoreData() |
| 108 | } | 108 | } |
| 109 | .width('100%') | 109 | .width('100%') |
| 110 | } | 110 | } |
| @@ -25,12 +25,27 @@ export struct PeopleShipRecommendHeadComponent { | @@ -25,12 +25,27 @@ export struct PeopleShipRecommendHeadComponent { | ||
| 25 | }) | 25 | }) |
| 26 | }.margin({ top: 12, bottom: 8 }) | 26 | }.margin({ top: 12, bottom: 8 }) |
| 27 | 27 | ||
| 28 | - Text(this.rmhInfo.userName) | ||
| 29 | - .fontColor($r('app.color.color_222222')) | ||
| 30 | - .fontSize($r('app.float.vp_14')) | ||
| 31 | - .fontWeight(600) | ||
| 32 | - .maxLines(1) | ||
| 33 | - .textOverflow({overflow: TextOverflow.Ellipsis}) | 28 | + Row() { |
| 29 | + Text(this.rmhInfo.userName) | ||
| 30 | + .fontColor($r('app.color.color_222222')) | ||
| 31 | + .fontSize($r('app.float.vp_14')) | ||
| 32 | + .fontWeight(600) | ||
| 33 | + .maxLines(1) | ||
| 34 | + .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 35 | + if (this.rmhInfo.authIcon) { | ||
| 36 | + Image(this.rmhInfo.authIcon) | ||
| 37 | + .width('12vp') | ||
| 38 | + .height('12vp') | ||
| 39 | + .borderRadius(6) | ||
| 40 | + .objectFit(ImageFit.Cover) | ||
| 41 | + .margin({ | ||
| 42 | + left: '2vp' | ||
| 43 | + }) | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | + .alignItems(VerticalAlign.Center) | ||
| 47 | + .justifyContent(FlexAlign.Center) | ||
| 48 | + | ||
| 34 | 49 | ||
| 35 | Text(this.rmhInfo.introduction) | 50 | Text(this.rmhInfo.introduction) |
| 36 | .fontColor($r('app.color.color_B0B0B0')) | 51 | .fontColor($r('app.color.color_B0B0B0')) |
| @@ -18,9 +18,9 @@ import { CardParser } from '../CardParser' | @@ -18,9 +18,9 @@ import { CardParser } from '../CardParser' | ||
| 18 | import { PageRepository } from '../../repository/PageRepository' | 18 | import { PageRepository } from '../../repository/PageRepository' |
| 19 | import { RefreshLayoutBean } from '../page/RefreshLayoutBean' | 19 | import { RefreshLayoutBean } from '../page/RefreshLayoutBean' |
| 20 | import CustomRefreshLoadLayout from '../page/CustomRefreshLoadLayout' | 20 | import CustomRefreshLoadLayout from '../page/CustomRefreshLoadLayout' |
| 21 | -import { ErrorComponent } from '../view/ErrorComponent'; | ||
| 22 | -import NoMoreLayout from '../page/NoMoreLayout'; | 21 | +import { ErrorComponent } from '../view/ErrorComponent' |
| 23 | import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh' | 22 | import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh' |
| 23 | +import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData' | ||
| 24 | 24 | ||
| 25 | const TAG = 'PeopleShipHomeArticleListComponent'; | 25 | const TAG = 'PeopleShipHomeArticleListComponent'; |
| 26 | 26 | ||
| @@ -104,7 +104,7 @@ export struct PeopleShipHomeArticleListComponent { | @@ -104,7 +104,7 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 104 | // 加载更多 | 104 | // 加载更多 |
| 105 | ListItem() { | 105 | ListItem() { |
| 106 | if (!this.hasMore && !this.isLoading) { | 106 | if (!this.hasMore && !this.isLoading) { |
| 107 | - NoMoreLayout() | 107 | + PeopleShipNoMoreData() |
| 108 | } | 108 | } |
| 109 | } | 109 | } |
| 110 | } | 110 | } |
| 1 | +import { ToastUtils } from 'wdKit'; | ||
| 2 | + | ||
| 1 | @Component | 3 | @Component |
| 2 | export struct PeopleShipHomeAttentionComponent { | 4 | export struct PeopleShipHomeAttentionComponent { |
| 3 | @Consume isAttention: string | 5 | @Consume isAttention: string |
| @@ -18,7 +20,14 @@ export struct PeopleShipHomeAttentionComponent { | @@ -18,7 +20,14 @@ export struct PeopleShipHomeAttentionComponent { | ||
| 18 | .height(20) | 20 | .height(20) |
| 19 | .color($r('app.color.color_fff')) | 21 | .color($r('app.color.color_fff')) |
| 20 | }else { | 22 | }else { |
| 21 | - Text('+ 关注') | 23 | + Image($r('app.media.people_ship_top_add')) |
| 24 | + .objectFit(ImageFit.Auto) | ||
| 25 | + .width('16vp') | ||
| 26 | + .height('16pv') | ||
| 27 | + .margin({ | ||
| 28 | + right: '4vp' | ||
| 29 | + }) | ||
| 30 | + Text('关注') | ||
| 22 | .fontColor(Color.White) | 31 | .fontColor(Color.White) |
| 23 | .fontSize($r('app.float.vp_14')) | 32 | .fontSize($r('app.float.vp_14')) |
| 24 | .fontWeight(500) | 33 | .fontWeight(500) |
| @@ -104,7 +113,7 @@ export struct PeopleShipHomeAttentionComponent { | @@ -104,7 +113,7 @@ export struct PeopleShipHomeAttentionComponent { | ||
| 104 | left: '-5vp' | 113 | left: '-5vp' |
| 105 | }) | 114 | }) |
| 106 | .onClick(() => { | 115 | .onClick(() => { |
| 107 | - | 116 | + ToastUtils.showToast('分享为公共方法,待开发', 1000); |
| 108 | }) | 117 | }) |
| 109 | 118 | ||
| 110 | } | 119 | } |
| @@ -24,7 +24,7 @@ export struct PeopleShipHomeListComponent { | @@ -24,7 +24,7 @@ export struct PeopleShipHomeListComponent { | ||
| 24 | // 列表 | 24 | // 列表 |
| 25 | else if (this.publishCount == 0) { | 25 | else if (this.publishCount == 0) { |
| 26 | // 无数据展示 | 26 | // 无数据展示 |
| 27 | - EmptyComponent({emptyType: 13}).height(DisplayUtils.getDeviceHeight() - this.topHeight) | 27 | + EmptyComponent({emptyType: 12}).height(DisplayUtils.getDeviceHeight() - this.topHeight) |
| 28 | } else { | 28 | } else { |
| 29 | Column() { | 29 | Column() { |
| 30 | Column() { | 30 | Column() { |
| @@ -38,14 +38,17 @@ export struct PeopleShipHomeListComponent { | @@ -38,14 +38,17 @@ export struct PeopleShipHomeListComponent { | ||
| 38 | } | 38 | } |
| 39 | .justifyContent(FlexAlign.Start) | 39 | .justifyContent(FlexAlign.Start) |
| 40 | } | 40 | } |
| 41 | + .backgroundColor(Color.White) | ||
| 41 | .align(Alignment.Start) | 42 | .align(Alignment.Start) |
| 42 | .scrollable(ScrollDirection.Horizontal) | 43 | .scrollable(ScrollDirection.Horizontal) |
| 43 | .scrollBar(BarState.Off) | 44 | .scrollBar(BarState.Off) |
| 44 | .width('100%') | 45 | .width('100%') |
| 45 | } | 46 | } |
| 47 | + .backgroundColor(Color.White) | ||
| 46 | .alignItems(VerticalAlign.Bottom) | 48 | .alignItems(VerticalAlign.Bottom) |
| 47 | .width('100%') | 49 | .width('100%') |
| 48 | } | 50 | } |
| 51 | + .justifyContent(FlexAlign.Start) | ||
| 49 | .height('44vp') | 52 | .height('44vp') |
| 50 | .alignItems(HorizontalAlign.Start) | 53 | .alignItems(HorizontalAlign.Start) |
| 51 | .width('100%') | 54 | .width('100%') |
| 1 | import router from '@ohos.router' | 1 | import router from '@ohos.router' |
| 2 | import { PeopleShipUserDetailData } from 'wdBean' | 2 | import { PeopleShipUserDetailData } from 'wdBean' |
| 3 | import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent' | 3 | import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent' |
| 4 | +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | ||
| 5 | +import { ToastUtils } from 'wdKit'; | ||
| 4 | 6 | ||
| 5 | @Component | 7 | @Component |
| 6 | export struct PeopleShipHomePageNavComponent { | 8 | export struct PeopleShipHomePageNavComponent { |
| @@ -38,8 +40,13 @@ export struct PeopleShipHomePageNavComponent { | @@ -38,8 +40,13 @@ export struct PeopleShipHomePageNavComponent { | ||
| 38 | iconDiameter: 10, | 40 | iconDiameter: 10, |
| 39 | headPhotoUrl: (this.detailModel.headPhotoUrl && this.detailModel.headPhotoUrl.length > 0 ) ? this.detailModel.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon'), | 41 | headPhotoUrl: (this.detailModel.headPhotoUrl && this.detailModel.headPhotoUrl.length > 0 ) ? this.detailModel.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon'), |
| 40 | authIcon: this.detailModel.authIcon | 42 | authIcon: this.detailModel.authIcon |
| 41 | - }) | ||
| 42 | - .margin({ | 43 | + }).onClick(()=>{ |
| 44 | + let params = { | ||
| 45 | + 'headPhotoUrl': this.detailModel.headPhotoUrl, | ||
| 46 | + 'headType': '1' | ||
| 47 | + } as Record<string, string>; | ||
| 48 | + WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params) | ||
| 49 | + }).margin({ | ||
| 43 | left: '10vp', | 50 | left: '10vp', |
| 44 | }) | 51 | }) |
| 45 | .visibility((this.topOpacity > 0.5 ? Visibility.Visible : Visibility.Hidden)) | 52 | .visibility((this.topOpacity > 0.5 ? Visibility.Visible : Visibility.Hidden)) |
| @@ -56,7 +63,25 @@ export struct PeopleShipHomePageNavComponent { | @@ -56,7 +63,25 @@ export struct PeopleShipHomePageNavComponent { | ||
| 56 | 63 | ||
| 57 | if (this.isAttention == '0') { | 64 | if (this.isAttention == '0') { |
| 58 | // 关注 | 65 | // 关注 |
| 59 | - Button('+关注', { type: ButtonType.Normal, stateEffect: true }) | 66 | + Button({ type: ButtonType.Normal, stateEffect: true }) { |
| 67 | + Row(){ | ||
| 68 | + Image($r('app.media.people_ship_top_add')) | ||
| 69 | + .objectFit(ImageFit.Auto) | ||
| 70 | + .width('12vp') | ||
| 71 | + .height('12pv') | ||
| 72 | + .margin({ | ||
| 73 | + right: '2vp' | ||
| 74 | + }) | ||
| 75 | + Text('关注') | ||
| 76 | + .fontSize($r('app.float.vp_12')) | ||
| 77 | + .fontColor(Color.White) | ||
| 78 | + } | ||
| 79 | + .alignSelf(ItemAlign.Center) | ||
| 80 | + .justifyContent(FlexAlign.Center) | ||
| 81 | + .width('100%') | ||
| 82 | + .height('100%') | ||
| 83 | + } | ||
| 84 | + | ||
| 60 | .borderRadius(4) | 85 | .borderRadius(4) |
| 61 | .backgroundColor($r('app.color.color_ED2800')) | 86 | .backgroundColor($r('app.color.color_ED2800')) |
| 62 | .width('54vp') | 87 | .width('54vp') |
| @@ -71,8 +96,6 @@ export struct PeopleShipHomePageNavComponent { | @@ -71,8 +96,6 @@ export struct PeopleShipHomePageNavComponent { | ||
| 71 | left: '12vp', | 96 | left: '12vp', |
| 72 | }) | 97 | }) |
| 73 | .padding(0) | 98 | .padding(0) |
| 74 | - .fontSize($r('app.float.vp_12')) | ||
| 75 | - .fontColor(Color.White) | ||
| 76 | .visibility((this.attentionOpacity ? Visibility.Visible : Visibility.Hidden)) | 99 | .visibility((this.attentionOpacity ? Visibility.Visible : Visibility.Hidden)) |
| 77 | } else { | 100 | } else { |
| 78 | Button('已关注', { type: ButtonType.Normal, stateEffect: true }) | 101 | Button('已关注', { type: ButtonType.Normal, stateEffect: true }) |
| @@ -104,7 +127,7 @@ export struct PeopleShipHomePageNavComponent { | @@ -104,7 +127,7 @@ export struct PeopleShipHomePageNavComponent { | ||
| 104 | .objectFit(ImageFit.Auto) | 127 | .objectFit(ImageFit.Auto) |
| 105 | .margin({ right: '10vp' }) | 128 | .margin({ right: '10vp' }) |
| 106 | .onClick(() => { | 129 | .onClick(() => { |
| 107 | - | 130 | + ToastUtils.showToast('分享为公共方法,待开发', 1000); |
| 108 | }) | 131 | }) |
| 109 | } | 132 | } |
| 110 | .width('100%') | 133 | .width('100%') |
| @@ -5,7 +5,7 @@ export struct PeopleShipHomePageAttestationComponent { | @@ -5,7 +5,7 @@ export struct PeopleShipHomePageAttestationComponent { | ||
| 5 | build() { | 5 | build() { |
| 6 | Row() { | 6 | Row() { |
| 7 | Text(this.name) | 7 | Text(this.name) |
| 8 | - .lineHeight('16vp') | 8 | + .lineHeight('18vp') |
| 9 | .fontColor($r('app.color.color_ED2800')) | 9 | .fontColor($r('app.color.color_ED2800')) |
| 10 | .fontSize($r('app.float.vp_11')) | 10 | .fontSize($r('app.float.vp_11')) |
| 11 | .backgroundColor($r('app.color.color_1AED2800')) | 11 | .backgroundColor($r('app.color.color_1AED2800')) |
| @@ -16,21 +16,27 @@ export struct PeopleShipHomePageAttestationComponent { | @@ -16,21 +16,27 @@ export struct PeopleShipHomePageAttestationComponent { | ||
| 16 | left: '16vp', | 16 | left: '16vp', |
| 17 | }) | 17 | }) |
| 18 | .padding({ | 18 | .padding({ |
| 19 | - top: '3vp', | ||
| 20 | - bottom: '3vp', | ||
| 21 | - right: '6vp', | ||
| 22 | - left: '6vp' | 19 | + top: '1vp', |
| 20 | + bottom: '1vp', | ||
| 21 | + right: '4vp', | ||
| 22 | + left: '4vp' | ||
| 23 | }) | 23 | }) |
| 24 | 24 | ||
| 25 | Text(this.content) | 25 | Text(this.content) |
| 26 | - .lineHeight('22vp') | 26 | + .lineHeight('18vp') |
| 27 | .fontSize($r('app.float.vp_12')) | 27 | .fontSize($r('app.float.vp_12')) |
| 28 | .layoutWeight(1) | 28 | .layoutWeight(1) |
| 29 | .fontColor($r('app.color.color_222222')) | 29 | .fontColor($r('app.color.color_222222')) |
| 30 | .textAlign(TextAlign.Start) | 30 | .textAlign(TextAlign.Start) |
| 31 | + .align(Alignment.Center) | ||
| 32 | + .padding(0) | ||
| 31 | .margin({ | 33 | .margin({ |
| 32 | right: '16vp' | 34 | right: '16vp' |
| 33 | }) | 35 | }) |
| 36 | + .padding({ | ||
| 37 | + top: '1vp', | ||
| 38 | + bottom: '1vp', | ||
| 39 | + }) | ||
| 34 | } | 40 | } |
| 35 | .width('100%') | 41 | .width('100%') |
| 36 | .alignItems(VerticalAlign.Top) | 42 | .alignItems(VerticalAlign.Top) |
| @@ -9,6 +9,7 @@ export struct PeopleShipHomePageHeadComponent { | @@ -9,6 +9,7 @@ export struct PeopleShipHomePageHeadComponent { | ||
| 9 | Stack({ alignContent: Alignment.BottomEnd }) { | 9 | Stack({ alignContent: Alignment.BottomEnd }) { |
| 10 | // 头像 | 10 | // 头像 |
| 11 | Image( this.headPhotoUrl ) | 11 | Image( this.headPhotoUrl ) |
| 12 | + .alt($r('app.media.WDAccountOwnerHedaerDefaultIcon')) | ||
| 12 | .width(this.diameter) | 13 | .width(this.diameter) |
| 13 | .height(this.diameter) | 14 | .height(this.diameter) |
| 14 | .borderRadius(this.diameter/2) | 15 | .borderRadius(this.diameter/2) |
| @@ -2,11 +2,12 @@ import measure from '@ohos.measure' | @@ -2,11 +2,12 @@ import measure from '@ohos.measure' | ||
| 2 | import { DisplayUtils } from 'wdKit' | 2 | import { DisplayUtils } from 'wdKit' |
| 3 | import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent' | 3 | import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent' |
| 4 | import { PeopleShipHomePageAttestationComponent } from './PeopleShipHomePageAttestationComponent' | 4 | import { PeopleShipHomePageAttestationComponent } from './PeopleShipHomePageAttestationComponent' |
| 5 | -import { Logger } from 'wdKit' | 5 | +import { Logger } from 'wdKit' |
| 6 | import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel' | 6 | import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel' |
| 7 | import { InfluenceData, PeopleShipUserDetailData } from 'wdBean' | 7 | import { InfluenceData, PeopleShipUserDetailData } from 'wdBean' |
| 8 | import { PeopleShipHomeAttentionComponent } from './PeopleShipHomeAttentionComponent' | 8 | import { PeopleShipHomeAttentionComponent } from './PeopleShipHomeAttentionComponent' |
| 9 | import { HWLocationUtils } from 'wdHwAbility' | 9 | import { HWLocationUtils } from 'wdHwAbility' |
| 10 | +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | ||
| 10 | 11 | ||
| 11 | 12 | ||
| 12 | @Component | 13 | @Component |
| @@ -27,30 +28,37 @@ export struct PeopleShipHomePageTopComponent { | @@ -27,30 +28,37 @@ export struct PeopleShipHomePageTopComponent { | ||
| 27 | @State collapseTxt: string = '…展开'; | 28 | @State collapseTxt: string = '…展开'; |
| 28 | private subTxt: string = ''; | 29 | private subTxt: string = ''; |
| 29 | @State content: string = '' | 30 | @State content: string = '' |
| 30 | - @State topFixedHeight: number = 320 | 31 | + @State topFixedHeight: number = 286 |
| 31 | @State lineInNum: number = 1 | 32 | @State lineInNum: number = 1 |
| 32 | @Link topHeight: number | 33 | @Link topHeight: number |
| 33 | @State provinceName: string = '' | 34 | @State provinceName: string = '' |
| 35 | + | ||
| 34 | build() { | 36 | build() { |
| 35 | Column() { | 37 | Column() { |
| 36 | - Stack({ alignContent: Alignment.TopStart}) { | 38 | + Stack({ alignContent: Alignment.TopStart }) { |
| 37 | // 顶部图片 | 39 | // 顶部图片 |
| 38 | Image($r('app.media.home_page_bg')) | 40 | Image($r('app.media.home_page_bg')) |
| 39 | .width('100%') | 41 | .width('100%') |
| 40 | .height('120vp') | 42 | .height('120vp') |
| 41 | .objectFit(ImageFit.Fill) | 43 | .objectFit(ImageFit.Fill) |
| 42 | - .backgroundColor(Color.Black) | 44 | + .backgroundColor(Color.White) |
| 43 | // 头像和名称 | 45 | // 头像和名称 |
| 44 | Row() { | 46 | Row() { |
| 45 | // 头像 | 47 | // 头像 |
| 46 | PeopleShipHomePageHeadComponent({ | 48 | PeopleShipHomePageHeadComponent({ |
| 47 | diameter: 80, | 49 | diameter: 80, |
| 48 | iconDiameter: 20, | 50 | iconDiameter: 20, |
| 49 | - headPhotoUrl:(this.detailModel.headPhotoUrl && this.detailModel.headPhotoUrl.length > 0) ? this.detailModel.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon') , | 51 | + headPhotoUrl: (this.detailModel.headPhotoUrl && this.detailModel.headPhotoUrl.length > 0) ? this.detailModel.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon'), |
| 50 | authIcon: this.detailModel.authIcon | 52 | authIcon: this.detailModel.authIcon |
| 51 | }).margin({ | 53 | }).margin({ |
| 52 | left: '10vp', | 54 | left: '10vp', |
| 53 | bottom: '20vp' | 55 | bottom: '20vp' |
| 56 | + }).onClick(() => { | ||
| 57 | + let params = { | ||
| 58 | + 'headPhotoUrl': this.detailModel.headPhotoUrl, | ||
| 59 | + 'headType': '1' | ||
| 60 | + } as Record<string, string>; | ||
| 61 | + WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage, params) | ||
| 54 | }) | 62 | }) |
| 55 | 63 | ||
| 56 | 64 | ||
| @@ -61,7 +69,7 @@ export struct PeopleShipHomePageTopComponent { | @@ -61,7 +69,7 @@ export struct PeopleShipHomePageTopComponent { | ||
| 61 | .fontColor($r('app.color.color_222222')) | 69 | .fontColor($r('app.color.color_222222')) |
| 62 | .fontWeight(500) | 70 | .fontWeight(500) |
| 63 | .textAlign(TextAlign.Start) | 71 | .textAlign(TextAlign.Start) |
| 64 | - .textOverflow({overflow: TextOverflow.Ellipsis}) | 72 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 65 | .maxLines(2) | 73 | .maxLines(2) |
| 66 | .layoutWeight(1) | 74 | .layoutWeight(1) |
| 67 | .margin({ | 75 | .margin({ |
| @@ -78,82 +86,89 @@ export struct PeopleShipHomePageTopComponent { | @@ -78,82 +86,89 @@ export struct PeopleShipHomePageTopComponent { | ||
| 78 | .width('100%') | 86 | .width('100%') |
| 79 | .height('180vp') | 87 | .height('180vp') |
| 80 | .backgroundColor(Color.Transparent) | 88 | .backgroundColor(Color.Transparent) |
| 89 | + | ||
| 81 | // 认证id:1蓝2黄,蓝v 只有官方认证,黄v有领域和身份认证 | 90 | // 认证id:1蓝2黄,蓝v 只有官方认证,黄v有领域和身份认证 |
| 82 | // 官方认证 | 91 | // 官方认证 |
| 83 | - if(this.detailModel.authId == 1 && this.detailModel.categoryAuth.length > 0) { | ||
| 84 | - PeopleShipHomePageAttestationComponent({name: '官方认证', content: this.detailModel.categoryAuth}) | 92 | + if (this.detailModel.authId == 1 && this.detailModel.categoryAuth.length > 0) { |
| 93 | + PeopleShipHomePageAttestationComponent({ name: '官方认证', content: this.detailModel.categoryAuth}) | ||
| 85 | .margin({ | 94 | .margin({ |
| 86 | - top: '10vp', | 95 | + top: '0vp', |
| 87 | bottom: '10vp' | 96 | bottom: '10vp' |
| 88 | }) | 97 | }) |
| 89 | } | 98 | } |
| 90 | - if(this.detailModel.authId == 2) { | ||
| 91 | - if (this.detailModel.authTitle && this.detailModel.authTitle.length > 0 ){ | ||
| 92 | - PeopleShipHomePageAttestationComponent({name: '领域认证', content: this.detailModel.authTitle}) | ||
| 93 | - .margin({ | ||
| 94 | - top: '10vp', | ||
| 95 | - bottom: '10vp' | ||
| 96 | - }) | ||
| 97 | - } | ||
| 98 | - if (this.detailModel.authPersonal && this.detailModel.authPersonal.length > 0 ){ | ||
| 99 | - PeopleShipHomePageAttestationComponent({name: '身份认证', content: this.detailModel.authPersonal}) | 99 | + if (this.detailModel.authId == 2) { |
| 100 | + if (this.detailModel.authTitle && this.detailModel.authTitle.length > 0) { | ||
| 101 | + PeopleShipHomePageAttestationComponent({ name: '领域认证', content: this.detailModel.authTitle }) | ||
| 100 | .margin({ | 102 | .margin({ |
| 101 | - top: '10vp', | 103 | + top: '0vp', |
| 104 | + bottom: (this.detailModel.authPersonal && this.detailModel.authPersonal.length > 0) ? '6vp' : '10vp' | ||
| 105 | + }) | ||
| 106 | + } | ||
| 107 | + if (this.detailModel.authPersonal && this.detailModel.authPersonal.length > 0) { | ||
| 108 | + PeopleShipHomePageAttestationComponent({ name: '身份认证', content: this.detailModel.authPersonal }) | ||
| 109 | + .margin({ | ||
| 110 | + top: '0vp', | ||
| 102 | bottom: '10vp' | 111 | bottom: '10vp' |
| 103 | }) | 112 | }) |
| 104 | } | 113 | } |
| 105 | } | 114 | } |
| 106 | 115 | ||
| 107 | // 简介 | 116 | // 简介 |
| 108 | - if(this.lineInNum > 3) { | 117 | + if (this.lineInNum > 3) { |
| 109 | Row() { | 118 | Row() { |
| 110 | Text() { | 119 | Text() { |
| 111 | Span(this.content) | 120 | Span(this.content) |
| 112 | .fontColor($r('app.color.color_222222')) | 121 | .fontColor($r('app.color.color_222222')) |
| 113 | 122 | ||
| 114 | Span(this.collapseTxt) | 123 | Span(this.collapseTxt) |
| 115 | - .onClick(()=>{ | ||
| 116 | - if(this.isCollapse){ | 124 | + .onClick(() => { |
| 125 | + if (this.isCollapse) { | ||
| 117 | this.maxLines = Infinity; | 126 | this.maxLines = Infinity; |
| 118 | this.content = `简介:${this.detailModel.introduction}` | 127 | this.content = `简介:${this.detailModel.introduction}` |
| 119 | this.isCollapse = false; | 128 | this.isCollapse = false; |
| 120 | this.collapseTxt = '收起'; | 129 | this.collapseTxt = '收起'; |
| 121 | this.topHeight = this.topFixedHeight + 21 * this.lineInNum | 130 | this.topHeight = this.topFixedHeight + 21 * this.lineInNum |
| 122 | 131 | ||
| 123 | - }else{ | 132 | + } else { |
| 124 | this.isCollapse = true; | 133 | this.isCollapse = true; |
| 125 | this.collapseTxt = '…展开'; | 134 | this.collapseTxt = '…展开'; |
| 126 | this.content = this.subTxt; | 135 | this.content = this.subTxt; |
| 127 | - this.topHeight = this.topFixedHeight + 21 * 3 | 136 | + this.topHeight = this.topFixedHeight + 21 * 3 |
| 128 | } | 137 | } |
| 129 | }) | 138 | }) |
| 130 | .fontColor($r('app.color.color_B0B0B0')) | 139 | .fontColor($r('app.color.color_B0B0B0')) |
| 131 | 140 | ||
| 132 | } | 141 | } |
| 142 | + .backgroundColor(Color.Transparent) | ||
| 133 | .lineHeight('21vp') | 143 | .lineHeight('21vp') |
| 144 | + .width('100%') | ||
| 134 | .maxLines(this.maxLines) | 145 | .maxLines(this.maxLines) |
| 135 | - .textOverflow({overflow: TextOverflow.Ellipsis}) | 146 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 136 | .fontSize($r('app.float.vp_14')) | 147 | .fontSize($r('app.float.vp_14')) |
| 137 | - .key('home_page_introduction') | ||
| 138 | - .margin({ | 148 | + .padding({ |
| 139 | left: '16vp', | 149 | left: '16vp', |
| 140 | right: '16vp', | 150 | right: '16vp', |
| 141 | }) | 151 | }) |
| 142 | }.width('100%') | 152 | }.width('100%') |
| 153 | + .backgroundColor(Color.Transparent) | ||
| 143 | .alignItems(VerticalAlign.Top) | 154 | .alignItems(VerticalAlign.Top) |
| 144 | - }else { | 155 | + } else { |
| 145 | Row() { | 156 | Row() { |
| 146 | Text(`简介:${this.detailModel.introduction}`) | 157 | Text(`简介:${this.detailModel.introduction}`) |
| 147 | - .fontSize($r('app.float.vp_14')) | ||
| 148 | - .fontColor($r('app.color.color_222222')) | ||
| 149 | - .lineHeight('21vp') | ||
| 150 | - .maxLines(3) | ||
| 151 | - .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 152 | - .margin({ | ||
| 153 | - left: '16vp', | ||
| 154 | - right: '16vp', | ||
| 155 | - }) | 158 | + .fontSize($r('app.float.vp_14')) |
| 159 | + .fontColor($r('app.color.color_222222')) | ||
| 160 | + .lineHeight('21vp') | ||
| 161 | + .width('100%') | ||
| 162 | + .maxLines(3) | ||
| 163 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 164 | + .padding({ | ||
| 165 | + left: '16vp', | ||
| 166 | + right: '16vp', | ||
| 167 | + }) | ||
| 168 | + .backgroundColor(Color.Transparent) | ||
| 169 | + | ||
| 156 | }.width('100%') | 170 | }.width('100%') |
| 171 | + .backgroundColor(Color.Transparent) | ||
| 157 | .alignItems(VerticalAlign.Top) | 172 | .alignItems(VerticalAlign.Top) |
| 158 | } | 173 | } |
| 159 | 174 | ||
| @@ -164,7 +179,6 @@ export struct PeopleShipHomePageTopComponent { | @@ -164,7 +179,6 @@ export struct PeopleShipHomePageTopComponent { | ||
| 164 | .fontSize($r('app.float.vp_12')) | 179 | .fontSize($r('app.float.vp_12')) |
| 165 | .fontColor($r('app.color.color_999999')) | 180 | .fontColor($r('app.color.color_999999')) |
| 166 | .textAlign(TextAlign.Start) | 181 | .textAlign(TextAlign.Start) |
| 167 | - .width('100%') | ||
| 168 | .alignSelf(ItemAlign.Start) | 182 | .alignSelf(ItemAlign.Start) |
| 169 | .margin({ | 183 | .margin({ |
| 170 | right: '16vp', | 184 | right: '16vp', |
| @@ -247,7 +261,8 @@ export struct PeopleShipHomePageTopComponent { | @@ -247,7 +261,8 @@ export struct PeopleShipHomePageTopComponent { | ||
| 247 | .height('6vp') | 261 | .height('6vp') |
| 248 | } | 262 | } |
| 249 | .width('100%') | 263 | .width('100%') |
| 250 | - .height('100%') | 264 | + |
| 265 | + // .height('100%') | ||
| 251 | } | 266 | } |
| 252 | 267 | ||
| 253 | async aboutToAppear() { | 268 | async aboutToAppear() { |
| @@ -265,17 +280,15 @@ export struct PeopleShipHomePageTopComponent { | @@ -265,17 +280,15 @@ export struct PeopleShipHomePageTopComponent { | ||
| 265 | 280 | ||
| 266 | } | 281 | } |
| 267 | 282 | ||
| 268 | - | ||
| 269 | - | ||
| 270 | // 不听减去2个字-一直到时3行 | 283 | // 不听减去2个字-一直到时3行 |
| 271 | private compIntroductionTextHeights() { | 284 | private compIntroductionTextHeights() { |
| 272 | let introduction = `简介:${this.detailModel.introduction}` | 285 | let introduction = `简介:${this.detailModel.introduction}` |
| 273 | - let lineInNum1 = this.getTextLineNum(introduction, DisplayUtils.getDeviceWidth() - 32, 21, $r('app.float.vp_14')) | ||
| 274 | - while (lineInNum1 > 3 ) { | 286 | + let lineInNum1 = this.getTextLineNum(introduction, DisplayUtils.getDeviceWidth() - 32, 21, $r('app.float.vp_14')) |
| 287 | + while (lineInNum1 > 3) { | ||
| 275 | introduction = introduction.substring(0, introduction.length - 2); | 288 | introduction = introduction.substring(0, introduction.length - 2); |
| 276 | - lineInNum1 = this.getTextLineNum(introduction, DisplayUtils.getDeviceWidth() - 32, 21, $r('app.float.vp_14')) | 289 | + lineInNum1 = this.getTextLineNum(introduction + this.collapseTxt, DisplayUtils.getDeviceWidth() - 32, 21, $r('app.float.vp_14')) |
| 277 | } | 290 | } |
| 278 | - introduction = introduction.substring(0, introduction.length - 3); | 291 | + // introduction = introduction.substring(0, introduction.length - 3); |
| 279 | Logger.debug('PeopleShipHomePageTopComponent', '3行简介:', `${introduction}`) | 292 | Logger.debug('PeopleShipHomePageTopComponent', '3行简介:', `${introduction}`) |
| 280 | 293 | ||
| 281 | this.subTxt = introduction; | 294 | this.subTxt = introduction; |
| @@ -285,7 +298,7 @@ export struct PeopleShipHomePageTopComponent { | @@ -285,7 +298,7 @@ export struct PeopleShipHomePageTopComponent { | ||
| 285 | private getTextLineNum(text: string, constraintWidth: number, lineHeight: number, fontSize: number | string | Resource) { | 298 | private getTextLineNum(text: string, constraintWidth: number, lineHeight: number, fontSize: number | string | Resource) { |
| 286 | let size = this.topMeasureText(text, constraintWidth, lineHeight, fontSize) | 299 | let size = this.topMeasureText(text, constraintWidth, lineHeight, fontSize) |
| 287 | let height: number = Number(size.height) | 300 | let height: number = Number(size.height) |
| 288 | - return Math.ceil(px2vp(height)/lineHeight) | 301 | + return Math.ceil(px2vp(height) / lineHeight) |
| 289 | } | 302 | } |
| 290 | 303 | ||
| 291 | private topMeasureText(text: string, constraintWidth: number, lineHeight: number, fontSize: number | string | Resource) { | 304 | private topMeasureText(text: string, constraintWidth: number, lineHeight: number, fontSize: number | string | Resource) { |
| @@ -299,51 +312,56 @@ export struct PeopleShipHomePageTopComponent { | @@ -299,51 +312,56 @@ export struct PeopleShipHomePageTopComponent { | ||
| 299 | 312 | ||
| 300 | async onIntroductionUpdated() { | 313 | async onIntroductionUpdated() { |
| 301 | 314 | ||
| 302 | - if (this.content.length == 0 && this.detailModel.introduction ) { | ||
| 303 | - this.lineInNum = this.getTextLineNum(`简介:${this.detailModel.introduction}`, DisplayUtils.getDeviceWidth() - 32, 21, $r('app.float.vp_14')) | 315 | + if (this.content.length == 0 && this.detailModel.introduction) { |
| 316 | + this.lineInNum = this.getTextLineNum(`简介:${this.detailModel.introduction}`, DisplayUtils.getDeviceWidth() - 32, 21, $r('app.float.vp_14')) | ||
| 304 | if (this.lineInNum > 3) { | 317 | if (this.lineInNum > 3) { |
| 305 | this.compIntroductionTextHeights() | 318 | this.compIntroductionTextHeights() |
| 306 | this.content = this.subTxt | 319 | this.content = this.subTxt |
| 307 | } | 320 | } |
| 308 | } | 321 | } |
| 309 | - if (this.detailModel) { | ||
| 310 | - this.topFixedHeight = 308 | ||
| 311 | - if (this.detailModel.region && this.detailModel.region.length > 0) { | ||
| 312 | - this.provinceName = this.detailModel.region | ||
| 313 | - }else { | ||
| 314 | - this.provinceName = await this.computeIPRegion(this.detailModel.province) | ||
| 315 | - } | ||
| 316 | - if(this.detailModel.authId == 1 && this.detailModel.categoryAuth.length > 0) { | ||
| 317 | - this.topFixedHeight += this.getTextLineNum(this.detailModel.categoryAuth, DisplayUtils.getDeviceWidth() - 90, 22, $r('app.float.vp_12'))*22 | ||
| 318 | - } | ||
| 319 | - else if(this.detailModel.authId == 2) { | ||
| 320 | - if (this.detailModel.authTitle && this.detailModel.authTitle.length > 0 ){ | ||
| 321 | - this.topFixedHeight += this.getTextLineNum(this.detailModel.authTitle, DisplayUtils.getDeviceWidth() - 90, 22, $r('app.float.vp_12'))*22 | ||
| 322 | - } | ||
| 323 | - if (this.detailModel.authPersonal && this.detailModel.authPersonal.length > 0 ){ | ||
| 324 | - if (this.detailModel.authTitle && this.detailModel.authTitle.length > 0 ){ | ||
| 325 | - this.topFixedHeight += 10 | ||
| 326 | - } | ||
| 327 | - this.topFixedHeight += this.getTextLineNum(this.detailModel.authPersonal, DisplayUtils.getDeviceWidth() - 90, 22, $r('app.float.vp_12'))*22 | ||
| 328 | - } | ||
| 329 | - } | ||
| 330 | - this.lineInNum = this.getTextLineNum(`简介:${this.detailModel.introduction}`, DisplayUtils.getDeviceWidth() - 32, 21, $r('app.float.vp_14')) | ||
| 331 | - if (this.lineInNum <= 3) { | ||
| 332 | - this.topFixedHeight += (21 * this.lineInNum) | ||
| 333 | - this.topHeight = this.topFixedHeight | ||
| 334 | - }else { | ||
| 335 | - this.topHeight = this.topFixedHeight + (this.isCollapse ? 21*3 : 21 * this.lineInNum ) | ||
| 336 | - } | ||
| 337 | - // IP归属地 | ||
| 338 | - if (this.provinceName && this.provinceName.length > 0) { | ||
| 339 | - this.topHeight += 28 | ||
| 340 | - } | ||
| 341 | - } | 322 | + if (this.detailModel) { |
| 323 | + this.topFixedHeight = 286 | ||
| 324 | + if (this.detailModel.region && this.detailModel.region.length > 0) { | ||
| 325 | + this.provinceName = this.detailModel.region | ||
| 326 | + } else { | ||
| 327 | + this.provinceName = await this.computeIPRegion(this.detailModel.province) | ||
| 328 | + } | ||
| 329 | + if (this.detailModel.authId == 1 && this.detailModel.categoryAuth.length > 0) { | ||
| 330 | + this.topFixedHeight += this.getTextLineNum(this.detailModel.categoryAuth, DisplayUtils.getDeviceWidth() - 90, 22, $r('app.float.vp_12')) * 18 | ||
| 331 | + this.topFixedHeight += 12 | ||
| 332 | + } | ||
| 333 | + else if (this.detailModel.authId == 2) { | ||
| 334 | + if (this.detailModel.authTitle && this.detailModel.authTitle.length > 0) { | ||
| 335 | + this.topFixedHeight += this.getTextLineNum(this.detailModel.authTitle, DisplayUtils.getDeviceWidth() - 90, 22, $r('app.float.vp_12')) * 18 | ||
| 336 | + if (this.detailModel.authPersonal && this.detailModel.authPersonal.length > 0){ | ||
| 337 | + this.topFixedHeight += 8 | ||
| 338 | + }else{ | ||
| 339 | + this.topFixedHeight += 12 | ||
| 340 | + } | ||
| 341 | + } | ||
| 342 | + if (this.detailModel.authPersonal && this.detailModel.authPersonal.length > 0) { | ||
| 343 | + this.topFixedHeight += this.getTextLineNum(this.detailModel.authPersonal, DisplayUtils.getDeviceWidth() - 90, 22, $r('app.float.vp_12')) * 18 | ||
| 344 | + this.topFixedHeight += 12 | ||
| 345 | + } | ||
| 346 | + } | ||
| 347 | + this.lineInNum = this.getTextLineNum(`简介:${this.detailModel.introduction}`, DisplayUtils.getDeviceWidth() - 32, 21, $r('app.float.vp_14')) | ||
| 348 | + if (this.lineInNum <= 3) { | ||
| 349 | + this.topHeight = this.topFixedHeight + (21 * this.lineInNum) | ||
| 350 | + } else { | ||
| 351 | + this.lineInNum = this.getTextLineNum(`简介:${this.detailModel.introduction}` + '收起', DisplayUtils.getDeviceWidth() - 32, 21, $r('app.float.vp_14')) | ||
| 352 | + this.topHeight = this.topFixedHeight + (this.isCollapse ? 21 * 3 : 21 * this.lineInNum) | ||
| 353 | + } | ||
| 354 | + // IP归属地 | ||
| 355 | + if (this.provinceName && this.provinceName.length > 0) { | ||
| 356 | + this.topFixedHeight += 28 | ||
| 357 | + this.topHeight += 28 | ||
| 358 | + } | ||
| 359 | + } | ||
| 342 | } | 360 | } |
| 343 | 361 | ||
| 344 | - private computeShowNum(count: number) { | ||
| 345 | - if(count >= 10000) { | ||
| 346 | - return `${(count/10000).toFixed(1)}万` | 362 | + private computeShowNum(count: number) { |
| 363 | + if (count >= 10000) { | ||
| 364 | + return `${(count / 10000).toFixed(1)}万` | ||
| 347 | } | 365 | } |
| 348 | return `${count}` | 366 | return `${count}` |
| 349 | } | 367 | } |
| @@ -352,7 +370,7 @@ export struct PeopleShipHomePageTopComponent { | @@ -352,7 +370,7 @@ export struct PeopleShipHomePageTopComponent { | ||
| 352 | private async computeIPRegion(province: string) { | 370 | private async computeIPRegion(province: string) { |
| 353 | if (province && province.length) { | 371 | if (province && province.length) { |
| 354 | try { | 372 | try { |
| 355 | - let provinceName = await HWLocationUtils.getProvinceName(province) ; | 373 | + let provinceName = await HWLocationUtils.getProvinceName(province); |
| 356 | return provinceName | 374 | return provinceName |
| 357 | } catch (e) { | 375 | } catch (e) { |
| 358 | return '' | 376 | return '' |
| @@ -360,5 +378,4 @@ export struct PeopleShipHomePageTopComponent { | @@ -360,5 +378,4 @@ export struct PeopleShipHomePageTopComponent { | ||
| 360 | } | 378 | } |
| 361 | return '' | 379 | return '' |
| 362 | } | 380 | } |
| 363 | - | ||
| 364 | } | 381 | } |
| 1 | +import { RefreshLayoutBean } from '../refresh/RefreshLayoutBean'; | ||
| 2 | +import RefreshLoadLayout from '../refresh/RefreshLoadLayout'; | ||
| 3 | + | ||
| 4 | +/** | ||
| 5 | + * The refresh layout component. | ||
| 6 | + */ | ||
| 7 | +@Component | ||
| 8 | +export default struct RefreshLayout { | ||
| 9 | + @ObjectLink refreshBean: RefreshLayoutBean; | ||
| 10 | + | ||
| 11 | + build() { | ||
| 12 | + Column() { | ||
| 13 | + if (this.refreshBean.isVisible) { | ||
| 14 | + RefreshLoadLayout({ | ||
| 15 | + refreshBean: new RefreshLayoutBean(this.refreshBean.isVisible, this.refreshBean.loadStatus, this.refreshBean.offset) | ||
| 16 | + }) | ||
| 17 | + } | ||
| 18 | + } | ||
| 19 | + } | ||
| 20 | +} |
| 1 | +/** | ||
| 2 | + * 下拉刷新数据bean. | ||
| 3 | + */ | ||
| 4 | +@Observed | ||
| 5 | +export class RefreshLayoutBean { | ||
| 6 | + /** | ||
| 7 | + * Custom refresh load layout isVisible. | ||
| 8 | + */ | ||
| 9 | + isVisible: boolean; | ||
| 10 | + loadStatus: number; // 1-下拉刷新 2-松开刷新 3-刷新完成 | ||
| 11 | + | ||
| 12 | + offset: number; | ||
| 13 | + | ||
| 14 | + constructor(isVisible: boolean, loadStatus: LoadStatus, offset: number) { | ||
| 15 | + this.isVisible = isVisible; | ||
| 16 | + this.loadStatus = loadStatus; | ||
| 17 | + this.offset = offset; | ||
| 18 | + } | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +export const enum LoadStatus { | ||
| 22 | + /** | ||
| 23 | + * 触发刷新前,有下拉动作了 | ||
| 24 | + */ | ||
| 25 | + IDLE, | ||
| 26 | + /** | ||
| 27 | + * 触发刷新前,有下拉动作了 | ||
| 28 | + */ | ||
| 29 | + PRELOAD, | ||
| 30 | + /** | ||
| 31 | + * 刷新中 | ||
| 32 | + */ | ||
| 33 | + LOADING, | ||
| 34 | + /** | ||
| 35 | + * 触发刷新结束,展示‘已更新最新’ | ||
| 36 | + */ | ||
| 37 | + LOADED, | ||
| 38 | +} |
| 1 | +import lottie, { AnimationItem } from '@ohos/lottie'; | ||
| 2 | +import { LoadStatus, RefreshLayoutBean } from './RefreshLayoutBean'; | ||
| 3 | + | ||
| 4 | +/** | ||
| 5 | + * Custom layout to show refresh or load. | ||
| 6 | + * TODO 待优化 | ||
| 7 | + */ | ||
| 8 | +@Component | ||
| 9 | +export default struct CustomLayout { | ||
| 10 | + // 设置刷新view高度 | ||
| 11 | + static readonly REFRESH_HEIGHT: number = 90; | ||
| 12 | + @ObjectLink @Watch('onOffsetChange') refreshBean: RefreshLayoutBean; | ||
| 13 | + private mainRenderingSettings: RenderingContextSettings = new RenderingContextSettings(true) | ||
| 14 | + private mainCanvasRenderingContext: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.mainRenderingSettings) | ||
| 15 | + private mainRenderingSettings2: RenderingContextSettings = new RenderingContextSettings(true) | ||
| 16 | + private mainCanvasRenderingContext2: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.mainRenderingSettings2) | ||
| 17 | + private animateItem: AnimationItem | null = null; | ||
| 18 | + private animateItem2: AnimationItem | null = null; | ||
| 19 | + private animateName: string = "refresh"; | ||
| 20 | + private animateName2: string = "refreshing"; | ||
| 21 | + @State private layoutHeight: number = 0; | ||
| 22 | + | ||
| 23 | + build() { | ||
| 24 | + Stack({ alignContent: Alignment.Center }) { | ||
| 25 | + Canvas(this.mainCanvasRenderingContext) | ||
| 26 | + .width(60) | ||
| 27 | + .height(60) | ||
| 28 | + .backgroundColor(Color.Transparent) | ||
| 29 | + .onReady(() => { | ||
| 30 | + // 可在此生命回调周期中加载动画,可以保证动画尺寸正确 | ||
| 31 | + //抗锯齿的设置 | ||
| 32 | + this.mainCanvasRenderingContext.imageSmoothingEnabled = true; | ||
| 33 | + this.mainCanvasRenderingContext.imageSmoothingQuality = 'medium' | ||
| 34 | + }) | ||
| 35 | + .onDisAppear(() => { | ||
| 36 | + lottie.destroy(this.animateName); | ||
| 37 | + }) | ||
| 38 | + .visibility(this.refreshBean.loadStatus === LoadStatus.PRELOAD ? Visibility.Visible : Visibility.Hidden) | ||
| 39 | + | ||
| 40 | + Canvas(this.mainCanvasRenderingContext2) | ||
| 41 | + .width(60) | ||
| 42 | + .height(60) | ||
| 43 | + .backgroundColor(Color.Transparent) | ||
| 44 | + .onReady(() => { | ||
| 45 | + // 可在此生命回调周期中加载动画,可以保证动画尺寸正确 | ||
| 46 | + //抗锯齿的设置 | ||
| 47 | + this.mainCanvasRenderingContext2.imageSmoothingEnabled = true; | ||
| 48 | + this.mainCanvasRenderingContext2.imageSmoothingQuality = 'medium' | ||
| 49 | + }) | ||
| 50 | + .onDisAppear(() => { | ||
| 51 | + lottie.destroy(this.animateName2); | ||
| 52 | + }) | ||
| 53 | + .visibility(this.refreshBean.loadStatus === LoadStatus.LOADING ? Visibility.Visible : Visibility.Hidden) | ||
| 54 | + | ||
| 55 | + Text('已更新至最新') | ||
| 56 | + .fontSize(14) | ||
| 57 | + .textAlign(TextAlign.Center) | ||
| 58 | + .fontColor('#676767') | ||
| 59 | + .backgroundColor('#f6f6f6') | ||
| 60 | + .borderRadius(20) | ||
| 61 | + .padding({ left: 19, right: 19, top: 10, bottom: 10 }) | ||
| 62 | + .visibility(this.refreshBean.loadStatus != LoadStatus.LOADED ? Visibility.Hidden : Visibility.Visible) | ||
| 63 | + | ||
| 64 | + } | ||
| 65 | + .clip(true) | ||
| 66 | + .width('100%') | ||
| 67 | + .height(this.layoutHeight) | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + animate1(offset: number) { | ||
| 71 | + if (this.animateItem == null) { | ||
| 72 | + this.animateItem = lottie.loadAnimation({ | ||
| 73 | + container: this.mainCanvasRenderingContext, | ||
| 74 | + renderer: 'canvas', // canvas 渲染模式 | ||
| 75 | + loop: 1, | ||
| 76 | + autoplay: true, | ||
| 77 | + name: this.animateName, | ||
| 78 | + path: "lottie/refresh_step1.json", // 路径加载动画只支持entry/src/main/ets 文件夹下的相对路径 | ||
| 79 | + }) | ||
| 80 | + } | ||
| 81 | + this.animateItem.goToAndStop(1) | ||
| 82 | + let total = CustomLayout.REFRESH_HEIGHT | ||
| 83 | + let progress = offset * 100 / total | ||
| 84 | + this.animateItem?.goToAndStop(this.getFramesByProgress(progress), true); | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + animate2() { | ||
| 88 | + if (this.animateItem2 == null) { | ||
| 89 | + this.animateItem2 = lottie.loadAnimation({ | ||
| 90 | + container: this.mainCanvasRenderingContext2, | ||
| 91 | + renderer: 'canvas', // canvas 渲染模式 | ||
| 92 | + loop: 10, | ||
| 93 | + autoplay: true, | ||
| 94 | + name: this.animateName2, | ||
| 95 | + path: "lottie/refresh_step2.json", // 路径加载动画只支持entry/src/main/ets 文件夹下的相对路径 | ||
| 96 | + }) | ||
| 97 | + } | ||
| 98 | + // this.animateItem2.isLoaded | ||
| 99 | + // TODO 是否拦截重复触发 | ||
| 100 | + this.animateItem2.goToAndPlay(1) | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + getFramesByProgress(progress: number): number { | ||
| 104 | + if (this.animateItem == null) { | ||
| 105 | + return 1; | ||
| 106 | + } | ||
| 107 | + let progressTmp = progress | ||
| 108 | + let total = this.animateItem.totalFrames; | ||
| 109 | + let frame = Math.floor(total * progressTmp / 100); | ||
| 110 | + if (frame >= total - 1) { | ||
| 111 | + frame = total - 1 | ||
| 112 | + } | ||
| 113 | + return frame; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + onOffsetChange() { | ||
| 117 | + if (!this.refreshBean.isVisible) { | ||
| 118 | + return | ||
| 119 | + } | ||
| 120 | + if (this.refreshBean.loadStatus === LoadStatus.PRELOAD) { | ||
| 121 | + // 下拉刷新 | ||
| 122 | + this.animate1(this.refreshBean.offset) | ||
| 123 | + } else if (this.refreshBean.loadStatus == LoadStatus.LOADING) { | ||
| 124 | + // 正在刷新 | ||
| 125 | + this.animate2() | ||
| 126 | + } else { | ||
| 127 | + // 刷新完成 | ||
| 128 | + lottie.destroy() | ||
| 129 | + } | ||
| 130 | + let maxH = CustomLayout.REFRESH_HEIGHT | ||
| 131 | + let tmpHeight = this.refreshBean.offset > maxH ? maxH : this.refreshBean.offset | ||
| 132 | + if (this.refreshBean.loadStatus === LoadStatus.LOADED) { | ||
| 133 | + if (tmpHeight <= 0) { | ||
| 134 | + setTimeout(() => { | ||
| 135 | + // 延时设置0,让“已更新到最新”展示 | ||
| 136 | + this.layoutHeight = 0 | ||
| 137 | + }, 1500) | ||
| 138 | + } | ||
| 139 | + } else { | ||
| 140 | + // 直接设置高度 | ||
| 141 | + this.layoutHeight = tmpHeight | ||
| 142 | + } | ||
| 143 | + } | ||
| 144 | +} |
sight_harmony/features/wdComponent/src/main/ets/components/reusable/PeopleShipNoMoreData.ets
0 → 100644
| 1 | +@Component | ||
| 2 | +export struct PeopleShipNoMoreData{ | ||
| 3 | + | ||
| 4 | + @State title: string = '已显示全部内容' | ||
| 5 | + build(){ | ||
| 6 | + Row(){ | ||
| 7 | + Text("已显示全部内容") | ||
| 8 | + .fontColor($r('app.color.color_999999')) | ||
| 9 | + .fontWeight(400) | ||
| 10 | + .fontSize('14vp') | ||
| 11 | + } | ||
| 12 | + .justifyContent(FlexAlign.Center) | ||
| 13 | + .alignItems(VerticalAlign.Center) | ||
| 14 | + .width('100%') | ||
| 15 | + .margin({top:'24vp',bottom:'24vp'}) | ||
| 16 | + } | ||
| 17 | +} |
| @@ -29,11 +29,19 @@ export struct FirstTabTopSearchComponent { | @@ -29,11 +29,19 @@ export struct FirstTabTopSearchComponent { | ||
| 29 | if (value != null) { | 29 | if (value != null) { |
| 30 | this.searchTextData = value | 30 | this.searchTextData = value |
| 31 | } | 31 | } |
| 32 | + this.setDefaultHitData() | ||
| 32 | }).catch((err: Error) => { | 33 | }).catch((err: Error) => { |
| 33 | console.log(TAG, JSON.stringify(err)) | 34 | console.log(TAG, JSON.stringify(err)) |
| 35 | + this.setDefaultHitData() | ||
| 34 | }) | 36 | }) |
| 35 | } | 37 | } |
| 36 | 38 | ||
| 39 | + setDefaultHitData(){ | ||
| 40 | + if(this.searchTextData.length === 0){ | ||
| 41 | + this.searchTextData.push("搜索") | ||
| 42 | + } | ||
| 43 | + } | ||
| 44 | + | ||
| 37 | build() { | 45 | build() { |
| 38 | Row() { | 46 | Row() { |
| 39 | Image($r('app.media.icon_search')) | 47 | Image($r('app.media.icon_search')) |
| @@ -13,14 +13,18 @@ const TAG = "SearchComponent" | @@ -13,14 +13,18 @@ const TAG = "SearchComponent" | ||
| 13 | @Component | 13 | @Component |
| 14 | export struct SearchComponent { | 14 | export struct SearchComponent { |
| 15 | @State searchTextData: string[] = [] | 15 | @State searchTextData: string[] = [] |
| 16 | + @State hasNoSearchTextData: boolean = false | ||
| 17 | + @State curHintSearchData: string = "" | ||
| 16 | @State hasInputContent: boolean = false | 18 | @State hasInputContent: boolean = false |
| 17 | @State hasChooseSearch: boolean = false | 19 | @State hasChooseSearch: boolean = false |
| 18 | - @State isClickedHistory: boolean = false | ||
| 19 | - @State isClickedHot: boolean = false | ||
| 20 | - @State isClickedRelated: boolean = false | 20 | + @State isClickedHistorySearch: boolean = false |
| 21 | + @State isClickedHotSearch: boolean = false | ||
| 22 | + @State isClickedRelatedSearch: boolean = false | ||
| 23 | + @State isClickedInputSearch: boolean = false | ||
| 24 | + @State isClickedHintSearch: boolean = false | ||
| 21 | private swiperController: SwiperController = new SwiperController() | 25 | private swiperController: SwiperController = new SwiperController() |
| 22 | @State searchText: string = '' | 26 | @State searchText: string = '' |
| 23 | - controller: TextInputController = new TextInputController() | 27 | + controller: SearchController = new SearchController() |
| 24 | @State searchHistoryData: SearchHistoryItem[] = [] | 28 | @State searchHistoryData: SearchHistoryItem[] = [] |
| 25 | @State relatedSearchContentsData: SearchRelatedItem[] = [] | 29 | @State relatedSearchContentsData: SearchRelatedItem[] = [] |
| 26 | scroller: Scroller = new Scroller() | 30 | scroller: Scroller = new Scroller() |
| @@ -30,6 +34,8 @@ export struct SearchComponent { | @@ -30,6 +34,8 @@ export struct SearchComponent { | ||
| 30 | aboutToAppear() { | 34 | aboutToAppear() { |
| 31 | //获取提示滚动 | 35 | //获取提示滚动 |
| 32 | this.getSearchHint() | 36 | this.getSearchHint() |
| 37 | + //清除缓存 | ||
| 38 | + SearcherAboutDataModel.searchHistoryData = [] | ||
| 33 | //获取搜索历史 | 39 | //获取搜索历史 |
| 34 | this.getSearchHistoryData() | 40 | this.getSearchHistoryData() |
| 35 | } | 41 | } |
| @@ -75,10 +81,18 @@ export struct SearchComponent { | @@ -75,10 +81,18 @@ export struct SearchComponent { | ||
| 75 | if (value != null) { | 81 | if (value != null) { |
| 76 | this.searchTextData = value | 82 | this.searchTextData = value |
| 77 | } | 83 | } |
| 84 | + this.setDefaultHitData() | ||
| 78 | }).catch((err: Error) => { | 85 | }).catch((err: Error) => { |
| 79 | console.log(TAG, JSON.stringify(err)) | 86 | console.log(TAG, JSON.stringify(err)) |
| 87 | + this.setDefaultHitData() | ||
| 80 | }) | 88 | }) |
| 81 | } | 89 | } |
| 90 | + setDefaultHitData(){ | ||
| 91 | + if(this.searchTextData.length === 0){ | ||
| 92 | + this.hasNoSearchTextData = true | ||
| 93 | + this.searchTextData.push("搜索感兴趣的内容") | ||
| 94 | + } | ||
| 95 | + } | ||
| 82 | 96 | ||
| 83 | getSearchHistoryData() { | 97 | getSearchHistoryData() { |
| 84 | this.searchHistoryData = SearcherAboutDataModel.getSearchHistoryData() | 98 | this.searchHistoryData = SearcherAboutDataModel.getSearchHistoryData() |
| @@ -94,12 +108,14 @@ export struct SearchComponent { | @@ -94,12 +108,14 @@ export struct SearchComponent { | ||
| 94 | SearchHistoryComponent({ searchHistoryData: $searchHistoryData, onDelHistory: (): void => this.getSearchHistoryData(),onGetSearchRes: (item,index): void => this.getSearchHistoryResData(item,index) }) | 108 | SearchHistoryComponent({ searchHistoryData: $searchHistoryData, onDelHistory: (): void => this.getSearchHistoryData(),onGetSearchRes: (item,index): void => this.getSearchHistoryResData(item,index) }) |
| 95 | } | 109 | } |
| 96 | 110 | ||
| 97 | - //分隔符 | ||
| 98 | - Divider() | ||
| 99 | - .width('100%') | ||
| 100 | - .height('1lpx') | ||
| 101 | - .color($r('app.color.color_EDEDED')) | ||
| 102 | - .strokeWidth('1lpx') | 111 | + if(this.searchHistoryData.length>0){ |
| 112 | + //分隔符 | ||
| 113 | + Divider() | ||
| 114 | + .width('100%') | ||
| 115 | + .height('1lpx') | ||
| 116 | + .color($r('app.color.color_EDEDED')) | ||
| 117 | + .strokeWidth('1lpx') | ||
| 118 | + } | ||
| 103 | 119 | ||
| 104 | SearchHotsComponent({onGetSearchRes: (item): void => this.getSearchHotResData(item)}) | 120 | SearchHotsComponent({onGetSearchRes: (item): void => this.getSearchHotResData(item)}) |
| 105 | } | 121 | } |
| @@ -109,7 +125,6 @@ export struct SearchComponent { | @@ -109,7 +125,6 @@ export struct SearchComponent { | ||
| 109 | .width('100%') | 125 | .width('100%') |
| 110 | .height('100%') | 126 | .height('100%') |
| 111 | .padding({ left: '31lpx', right: '31lpx' }) | 127 | .padding({ left: '31lpx', right: '31lpx' }) |
| 112 | - .margin({ top: '36lpx' }) | ||
| 113 | } else { | 128 | } else { |
| 114 | if (this.hasChooseSearch) { | 129 | if (this.hasChooseSearch) { |
| 115 | //搜索结果 | 130 | //搜索结果 |
| @@ -131,7 +146,7 @@ export struct SearchComponent { | @@ -131,7 +146,7 @@ export struct SearchComponent { | ||
| 131 | getSearchHistoryResData(content:string,index:number){ | 146 | getSearchHistoryResData(content:string,index:number){ |
| 132 | //删除单条记录 | 147 | //删除单条记录 |
| 133 | SearcherAboutDataModel.delSearchSingleHistoryData(index) | 148 | SearcherAboutDataModel.delSearchSingleHistoryData(index) |
| 134 | - this.isClickedHistory = true | 149 | + this.isClickedHistorySearch = true |
| 135 | this.searchResData(content) | 150 | this.searchResData(content) |
| 136 | } | 151 | } |
| 137 | 152 | ||
| @@ -148,6 +163,16 @@ export struct SearchComponent { | @@ -148,6 +163,16 @@ export struct SearchComponent { | ||
| 148 | //查询 操作 TODO | 163 | //查询 操作 TODO |
| 149 | this.hasChooseSearch = true | 164 | this.hasChooseSearch = true |
| 150 | this.getSearchResultCountData() | 165 | this.getSearchResultCountData() |
| 166 | + this.controller.stopEditing() | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + /** | ||
| 170 | + * 点击hint搜索列表回调 | ||
| 171 | + * @param content | ||
| 172 | + */ | ||
| 173 | + getSearchHintResData(content:string){ | ||
| 174 | + this.isClickedHintSearch = true | ||
| 175 | + this.searchResData(content) | ||
| 151 | } | 176 | } |
| 152 | 177 | ||
| 153 | /** | 178 | /** |
| @@ -155,7 +180,7 @@ export struct SearchComponent { | @@ -155,7 +180,7 @@ export struct SearchComponent { | ||
| 155 | * @param content | 180 | * @param content |
| 156 | */ | 181 | */ |
| 157 | getSearchRelatedResData(content:string){ | 182 | getSearchRelatedResData(content:string){ |
| 158 | - this.isClickedRelated = true | 183 | + this.isClickedRelatedSearch = true |
| 159 | this.searchResData(content) | 184 | this.searchResData(content) |
| 160 | } | 185 | } |
| 161 | 186 | ||
| @@ -164,10 +189,18 @@ export struct SearchComponent { | @@ -164,10 +189,18 @@ export struct SearchComponent { | ||
| 164 | * @param content | 189 | * @param content |
| 165 | */ | 190 | */ |
| 166 | getSearchHotResData(content:string){ | 191 | getSearchHotResData(content:string){ |
| 167 | - this.isClickedHot = true | 192 | + this.isClickedHotSearch = true |
| 168 | this.searchResData(content) | 193 | this.searchResData(content) |
| 169 | } | 194 | } |
| 170 | 195 | ||
| 196 | + /** | ||
| 197 | + * 点击输入法搜索搜索列表回调 | ||
| 198 | + * @param content | ||
| 199 | + */ | ||
| 200 | + getSearchInputResData(content:string){ | ||
| 201 | + this.isClickedInputSearch = true | ||
| 202 | + this.searchResData(content) | ||
| 203 | + } | ||
| 171 | 204 | ||
| 172 | //搜索框 | 205 | //搜索框 |
| 173 | @Builder searchInputComponent() { | 206 | @Builder searchInputComponent() { |
| @@ -185,7 +218,7 @@ export struct SearchComponent { | @@ -185,7 +218,7 @@ export struct SearchComponent { | ||
| 185 | .textAlign(TextAlign.Start) | 218 | .textAlign(TextAlign.Start) |
| 186 | .maxLines(1) | 219 | .maxLines(1) |
| 187 | .textOverflow({ overflow: TextOverflow.Clip }) | 220 | .textOverflow({ overflow: TextOverflow.Clip }) |
| 188 | - .margin({ left: '40lpx' }) | 221 | + .margin({ left: '70lpx' }) |
| 189 | }) | 222 | }) |
| 190 | } | 223 | } |
| 191 | .loop(true) | 224 | .loop(true) |
| @@ -195,42 +228,57 @@ export struct SearchComponent { | @@ -195,42 +228,57 @@ export struct SearchComponent { | ||
| 195 | .vertical(true) | 228 | .vertical(true) |
| 196 | .enabled(false) | 229 | .enabled(false) |
| 197 | .focusable(false) | 230 | .focusable(false) |
| 231 | + .onChange((index: number) => { | ||
| 232 | + this.curHintSearchData = this.searchTextData[index] | ||
| 233 | + }) | ||
| 198 | } | 234 | } |
| 199 | Row(){ | 235 | Row(){ |
| 200 | - TextInput({ text: this.searchText, placeholder: '', controller: this.controller }) | ||
| 201 | - .caretColor(Color.Pink) | ||
| 202 | - .fontSize('27lpx') | 236 | + Search({ value: this.searchText, placeholder: '', controller: this.controller}) |
| 203 | .layoutWeight(1) | 237 | .layoutWeight(1) |
| 204 | - .fontColor(Color.Black) | ||
| 205 | - .onChange((value: string) => { | ||
| 206 | - this.searchText = value | ||
| 207 | - if (this.searchText.length > 0) { | ||
| 208 | - this.hasInputContent = true | ||
| 209 | - } else { | ||
| 210 | - this.hasInputContent = false | ||
| 211 | - } | ||
| 212 | - if(this.isClickedHistory || this.isClickedHot || this.isClickedRelated){ | ||
| 213 | - this.isClickedHistory = false | ||
| 214 | - this.isClickedHot = false | ||
| 215 | - this.isClickedRelated = false | ||
| 216 | - }else{ | ||
| 217 | - this.getRelatedSearchContent() | ||
| 218 | - } | ||
| 219 | - }) | ||
| 220 | - .backgroundColor($r('app.color.color_transparent')) | ||
| 221 | - .defaultFocus(true) | ||
| 222 | - if(this.hasInputContent){ | ||
| 223 | - Image($r('app.media.search_input_del_icon')) | ||
| 224 | - .width('31lpx') | ||
| 225 | - .height('31lpx') | ||
| 226 | - .objectFit(ImageFit.Cover) | ||
| 227 | - .interpolation(ImageInterpolation.High) | ||
| 228 | - .onClick(()=>{ | ||
| 229 | - this.searchText = "" | ||
| 230 | - this.hasInputContent = false | 238 | + .height('69lpx') |
| 239 | + .backgroundColor($r('app.color.color_transparent')) | ||
| 240 | + .textFont({ size: "27lpx", weight: "400lpx" }) | ||
| 241 | + .defaultFocus(true) | ||
| 242 | + .caretStyle({color:Color.Pink}) | ||
| 243 | + .onSubmit((value: string) => { | ||
| 244 | + if(StringUtils.isNotEmpty(this.searchText)){ | ||
| 245 | + SearcherAboutDataModel.putSearchHistoryData(this.searchText) | ||
| 246 | + this.getSearchHistoryData() | ||
| 247 | + this.getSearchInputResData(this.searchText) | ||
| 248 | + }else{ | ||
| 249 | + if(!this.hasNoSearchTextData){ | ||
| 250 | + if(StringUtils.isEmpty(this.curHintSearchData)){ | ||
| 251 | + this.curHintSearchData = this.searchTextData[0] | ||
| 252 | + } | ||
| 253 | + this.getSearchHintResData(this.curHintSearchData) | ||
| 254 | + }else{ | ||
| 255 | + ToastUtils.shortToast("请输入搜索关键词") | ||
| 256 | + } | ||
| 257 | + } | ||
| 258 | + }) | ||
| 259 | + .onChange((value: string) => { | ||
| 260 | + this.searchText = value | ||
| 261 | + if(this.isClickedHistorySearch || this.isClickedHotSearch || this.isClickedRelatedSearch || this.isClickedInputSearch|| this.isClickedHintSearch){ | ||
| 262 | + this.hasChooseSearch = true | ||
| 263 | + }else{ | ||
| 231 | this.hasChooseSearch = false | 264 | this.hasChooseSearch = false |
| 232 | - }) | ||
| 233 | - } | 265 | + } |
| 266 | + | ||
| 267 | + if (this.searchText.length > 0) { | ||
| 268 | + this.hasInputContent = true | ||
| 269 | + } else { | ||
| 270 | + this.hasInputContent = false | ||
| 271 | + } | ||
| 272 | + | ||
| 273 | + if(this.isClickedHistorySearch || this.isClickedHotSearch || this.isClickedRelatedSearch || this.isClickedInputSearch|| this.isClickedHintSearch){ | ||
| 274 | + this.resetSearch() | ||
| 275 | + }else{ | ||
| 276 | + if(this.hasInputContent){ | ||
| 277 | + this.getRelatedSearchContent() | ||
| 278 | + } | ||
| 279 | + } | ||
| 280 | + }) | ||
| 281 | + | ||
| 234 | }.padding({right:'30lpx'}) | 282 | }.padding({right:'30lpx'}) |
| 235 | .layoutWeight(1) | 283 | .layoutWeight(1) |
| 236 | } | 284 | } |
| @@ -241,7 +289,7 @@ export struct SearchComponent { | @@ -241,7 +289,7 @@ export struct SearchComponent { | ||
| 241 | 289 | ||
| 242 | //TODO 需要修改输入法 换行 | 290 | //TODO 需要修改输入法 换行 |
| 243 | //右 | 291 | //右 |
| 244 | - Text(this.hasInputContent?"搜索":"取消") | 292 | + Text("取消") |
| 245 | .textAlign(TextAlign.Center) | 293 | .textAlign(TextAlign.Center) |
| 246 | .fontWeight('400lpx') | 294 | .fontWeight('400lpx') |
| 247 | .fontSize('31lpx') | 295 | .fontSize('31lpx') |
| @@ -250,16 +298,7 @@ export struct SearchComponent { | @@ -250,16 +298,7 @@ export struct SearchComponent { | ||
| 250 | .width('125lpx') | 298 | .width('125lpx') |
| 251 | .height('58lpx') | 299 | .height('58lpx') |
| 252 | .onClick(() => { | 300 | .onClick(() => { |
| 253 | - if(this.hasInputContent){ | ||
| 254 | - if(StringUtils.isNotEmpty(this.searchText)){ | ||
| 255 | - SearcherAboutDataModel.putSearchHistoryData(this.searchText) | ||
| 256 | - this.getSearchHistoryData() | ||
| 257 | - | ||
| 258 | - this.getSearchHotResData(this.searchText) | ||
| 259 | - } | ||
| 260 | - }else{ | ||
| 261 | - router.back() | ||
| 262 | - } | 301 | + router.back() |
| 263 | }) | 302 | }) |
| 264 | } | 303 | } |
| 265 | .height('85lpx') | 304 | .height('85lpx') |
| @@ -289,9 +328,19 @@ export struct SearchComponent { | @@ -289,9 +328,19 @@ export struct SearchComponent { | ||
| 289 | } | 328 | } |
| 290 | } | 329 | } |
| 291 | this.isGetRequest = true | 330 | this.isGetRequest = true |
| 331 | + this.resetSearch() | ||
| 292 | }).catch((err: Error) => { | 332 | }).catch((err: Error) => { |
| 293 | console.log(TAG, JSON.stringify(err)) | 333 | console.log(TAG, JSON.stringify(err)) |
| 294 | this.isGetRequest = true | 334 | this.isGetRequest = true |
| 335 | + this.resetSearch() | ||
| 295 | }) | 336 | }) |
| 296 | } | 337 | } |
| 338 | + | ||
| 339 | + resetSearch(){ | ||
| 340 | + this.isClickedHistorySearch = false | ||
| 341 | + this.isClickedHotSearch = false | ||
| 342 | + this.isClickedRelatedSearch = false | ||
| 343 | + this.isClickedInputSearch = false | ||
| 344 | + this.isClickedHintSearch = false | ||
| 345 | + } | ||
| 297 | } | 346 | } |
| @@ -11,7 +11,7 @@ export struct SearchCreatorComponent{ | @@ -11,7 +11,7 @@ export struct SearchCreatorComponent{ | ||
| 11 | Stack({alignContent: Alignment.Bottom}){ | 11 | Stack({alignContent: Alignment.Bottom}){ |
| 12 | Image(this.item.headerPhotoUrl) | 12 | Image(this.item.headerPhotoUrl) |
| 13 | .width('92lpx') | 13 | .width('92lpx') |
| 14 | - .alt($r('app.media.default_head')) | 14 | + .alt($r('app.media.icon_default_head_mater')) |
| 15 | .height('92lpx') | 15 | .height('92lpx') |
| 16 | .margin({bottom:'15lpx'}) | 16 | .margin({bottom:'15lpx'}) |
| 17 | .borderRadius(50) | 17 | .borderRadius(50) |
| @@ -120,7 +120,7 @@ export struct SearchHistoryComponent{ | @@ -120,7 +120,7 @@ export struct SearchHistoryComponent{ | ||
| 120 | .columnsTemplate('1fr 1fr') | 120 | .columnsTemplate('1fr 1fr') |
| 121 | .rowsGap('23lpx') | 121 | .rowsGap('23lpx') |
| 122 | } | 122 | } |
| 123 | - .margin({bottom:'46lpx'}) | 123 | + .margin({top:"36lpx",bottom:'46lpx'}) |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | getCategoryRowCount() { | 126 | getCategoryRowCount() { |
| @@ -135,6 +135,6 @@ export struct SearchHistoryComponent{ | @@ -135,6 +135,6 @@ export struct SearchHistoryComponent{ | ||
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | getCategoryViewHeight() { | 137 | getCategoryViewHeight() { |
| 138 | - return `${46 * this.getCategoryRowCount()}lpx`; | 138 | + return `${50 * this.getCategoryRowCount()}lpx`; |
| 139 | } | 139 | } |
| 140 | } | 140 | } |
| @@ -41,18 +41,18 @@ export struct SearchHotsComponent{ | @@ -41,18 +41,18 @@ export struct SearchHotsComponent{ | ||
| 41 | 41 | ||
| 42 | Text("热门搜索") | 42 | Text("热门搜索") |
| 43 | .textAlign(TextAlign.Center) | 43 | .textAlign(TextAlign.Center) |
| 44 | - .fontWeight('600lpx') | 44 | + .fontWeight(FontWeight.Bold) |
| 45 | .fontSize('33lpx') | 45 | .fontSize('33lpx') |
| 46 | .lineHeight('46lpx') | 46 | .lineHeight('46lpx') |
| 47 | .fontColor($r('app.color.color_222222')) | 47 | .fontColor($r('app.color.color_222222')) |
| 48 | - .height('38lpx') | 48 | + .height('46lpx') |
| 49 | } | 49 | } |
| 50 | .width('100%') | 50 | .width('100%') |
| 51 | + .margin({bottom:"15lpx"}) | ||
| 51 | 52 | ||
| 52 | List(){ | 53 | List(){ |
| 53 | ForEach(this.searchHotsData,(item:SearchHotContentItem,index:number)=>{ | 54 | ForEach(this.searchHotsData,(item:SearchHotContentItem,index:number)=>{ |
| 54 | ListItem(){ | 55 | ListItem(){ |
| 55 | - Column(){ | ||
| 56 | Column(){ | 56 | Column(){ |
| 57 | Row(){ | 57 | Row(){ |
| 58 | Row(){ | 58 | Row(){ |
| @@ -80,7 +80,8 @@ export struct SearchHotsComponent{ | @@ -80,7 +80,8 @@ export struct SearchHotsComponent{ | ||
| 80 | .fontWeight('400lpx') | 80 | .fontWeight('400lpx') |
| 81 | .lineHeight('42lpx') | 81 | .lineHeight('42lpx') |
| 82 | }.layoutWeight(1) | 82 | }.layoutWeight(1) |
| 83 | - if(item.mark!=0){ | 83 | + |
| 84 | + if(item.mark===1 || item.mark===2){ | ||
| 84 | Image(item.mark===1?$r('app.media.search_hots_mark1'):$r('app.media.search_hots_mark2')) | 85 | Image(item.mark===1?$r('app.media.search_hots_mark1'):$r('app.media.search_hots_mark2')) |
| 85 | .width('42lpx') | 86 | .width('42lpx') |
| 86 | .height('31lpx') | 87 | .height('31lpx') |
| @@ -89,6 +90,7 @@ export struct SearchHotsComponent{ | @@ -89,6 +90,7 @@ export struct SearchHotsComponent{ | ||
| 89 | } | 90 | } |
| 90 | }.alignItems(VerticalAlign.Center) | 91 | }.alignItems(VerticalAlign.Center) |
| 91 | .height('84lpx') | 92 | .height('84lpx') |
| 93 | + .width('100%') | ||
| 92 | .justifyContent(FlexAlign.SpaceBetween) | 94 | .justifyContent(FlexAlign.SpaceBetween) |
| 93 | 95 | ||
| 94 | if(index != this.searchHotsData.length-1 ){ | 96 | if(index != this.searchHotsData.length-1 ){ |
| @@ -98,18 +100,15 @@ export struct SearchHotsComponent{ | @@ -98,18 +100,15 @@ export struct SearchHotsComponent{ | ||
| 98 | .color($r('app.color.color_F5F5F5')) | 100 | .color($r('app.color.color_F5F5F5')) |
| 99 | .strokeWidth('1lpx') | 101 | .strokeWidth('1lpx') |
| 100 | } | 102 | } |
| 101 | - }.height('108lpx') | ||
| 102 | - .justifyContent(FlexAlign.Center) | 103 | + }.height('85lpx') |
| 104 | + .width('100%') | ||
| 103 | .alignItems(HorizontalAlign.Start) | 105 | .alignItems(HorizontalAlign.Start) |
| 104 | - .padding({left:'27lpx'}) | ||
| 105 | - } | ||
| 106 | } | 106 | } |
| 107 | .onClick(()=>{ | 107 | .onClick(()=>{ |
| 108 | if (this.onGetSearchRes !== undefined) { | 108 | if (this.onGetSearchRes !== undefined) { |
| 109 | this.onGetSearchRes(item.hotEntry) | 109 | this.onGetSearchRes(item.hotEntry) |
| 110 | } | 110 | } |
| 111 | }) | 111 | }) |
| 112 | - .height('117lpx') | ||
| 113 | }) | 112 | }) |
| 114 | }.onScrollFrameBegin((offset, state) => { | 113 | }.onScrollFrameBegin((offset, state) => { |
| 115 | return { offsetRemain: 0 } | 114 | return { offsetRemain: 0 } |
| @@ -194,6 +194,8 @@ export struct SearchResultContentComponent{ | @@ -194,6 +194,8 @@ export struct SearchResultContentComponent{ | ||
| 194 | isSearch: true, | 194 | isSearch: true, |
| 195 | publishTimestamp:"", | 195 | publishTimestamp:"", |
| 196 | bottomNavId:'', | 196 | bottomNavId:'', |
| 197 | + openType:'', | ||
| 198 | + extra:'' | ||
| 197 | } | 199 | } |
| 198 | 200 | ||
| 199 | this.data.push(contentDTO) | 201 | this.data.push(contentDTO) |
| 1 | import { Params } from 'wdBean'; | 1 | import { Params } from 'wdBean'; |
| 2 | import { AppUtils, StringUtils } from 'wdKit/Index'; | 2 | import { AppUtils, StringUtils } from 'wdKit/Index'; |
| 3 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; | 3 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; |
| 4 | +import { CustomTitleUI } from '../reusable/CustomTitleUI'; | ||
| 4 | import { EnvironmentCustomDialog } from './EnvironmentCustomDialog'; | 5 | import { EnvironmentCustomDialog } from './EnvironmentCustomDialog'; |
| 5 | 6 | ||
| 6 | const TAG = 'AboutPageUI'; | 7 | const TAG = 'AboutPageUI'; |
| @@ -23,11 +24,11 @@ export struct AboutPageUI { | @@ -23,11 +24,11 @@ export struct AboutPageUI { | ||
| 23 | }) | 24 | }) |
| 24 | 25 | ||
| 25 | build() { | 26 | build() { |
| 26 | - Navigation() { | 27 | + // Navigation() { |
| 27 | //滑动区域 | 28 | //滑动区域 |
| 28 | this.aboutUi() | 29 | this.aboutUi() |
| 29 | - }.titleMode(NavigationTitleMode.Mini) | ||
| 30 | - .title('关于') | 30 | + // }.titleMode(NavigationTitleMode.Mini) |
| 31 | + // .title('关于') | ||
| 31 | } | 32 | } |
| 32 | 33 | ||
| 33 | aboutToAppear() { | 34 | aboutToAppear() { |
| @@ -42,6 +43,8 @@ export struct AboutPageUI { | @@ -42,6 +43,8 @@ export struct AboutPageUI { | ||
| 42 | @Builder | 43 | @Builder |
| 43 | aboutUi() { | 44 | aboutUi() { |
| 44 | Column() { | 45 | Column() { |
| 46 | + CustomTitleUI({titleName:'关于'}) | ||
| 47 | + | ||
| 45 | Image($r('app.media.setting_about_logo')) | 48 | Image($r('app.media.setting_about_logo')) |
| 46 | .width('278lpx') | 49 | .width('278lpx') |
| 47 | .height('154lpx') | 50 | .height('154lpx') |
| @@ -76,14 +76,14 @@ export struct AccountAndSecurityLayout { | @@ -76,14 +76,14 @@ export struct AccountAndSecurityLayout { | ||
| 76 | addEmitEvent(){ | 76 | addEmitEvent(){ |
| 77 | // 定义一个eventId为1的事件 | 77 | // 定义一个eventId为1的事件 |
| 78 | let event: emitter.InnerEvent = { | 78 | let event: emitter.InnerEvent = { |
| 79 | - eventId: 10010 | 79 | + eventId: EmitterEventId.PHONE_CHANGE_SUCCESS |
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | // 收到eventId为1的事件后执行该回调 | 82 | // 收到eventId为1的事件后执行该回调 |
| 83 | let callback = (eventData: emitter.EventData): void => { | 83 | let callback = (eventData: emitter.EventData): void => { |
| 84 | - promptAction.showToast({ | ||
| 85 | - message: JSON.stringify(eventData) | ||
| 86 | - }); | 84 | + // promptAction.showToast({ |
| 85 | + // message: JSON.stringify(eventData) | ||
| 86 | + // }); | ||
| 87 | if(eventData&&eventData.data){ | 87 | if(eventData&&eventData.data){ |
| 88 | this.listData[0].subTitle = eventData.data['content'] | 88 | this.listData[0].subTitle = eventData.data['content'] |
| 89 | } | 89 | } |
| @@ -3,7 +3,7 @@ import { EmptyComponent } from '../view/EmptyComponent' | @@ -3,7 +3,7 @@ import { EmptyComponent } from '../view/EmptyComponent' | ||
| 3 | @Entry | 3 | @Entry |
| 4 | @Component | 4 | @Component |
| 5 | export struct DefaultPage { | 5 | export struct DefaultPage { |
| 6 | - @State type: number = 1 | 6 | + @State type: number = 15 |
| 7 | 7 | ||
| 8 | retry() { | 8 | retry() { |
| 9 | console.log('daj点击了重试') | 9 | console.log('daj点击了重试') |
| @@ -13,7 +13,6 @@ export struct DefaultPage { | @@ -13,7 +13,6 @@ export struct DefaultPage { | ||
| 13 | Row() { | 13 | Row() { |
| 14 | EmptyComponent({ | 14 | EmptyComponent({ |
| 15 | emptyType: this.type, | 15 | emptyType: this.type, |
| 16 | - emptyButton: true, | ||
| 17 | retry: () => { | 16 | retry: () => { |
| 18 | this.retry() | 17 | this.retry() |
| 19 | } | 18 | } |
| @@ -197,7 +197,7 @@ export struct EmptyComponent { | @@ -197,7 +197,7 @@ export struct EmptyComponent { | ||
| 197 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoNetwork) { | 197 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoNetwork) { |
| 198 | contentString = '网络出小差了,请检查网络后重试' | 198 | contentString = '网络出小差了,请检查网络后重试' |
| 199 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) { | 199 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) { |
| 200 | - contentString = '获取内容失败请重试' | 200 | + contentString = '获取内容失败,请重试' |
| 201 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCreation) { | 201 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCreation) { |
| 202 | contentString = '暂无作品' | 202 | contentString = '暂无作品' |
| 203 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoBooking) { | 203 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoBooking) { |
| @@ -231,11 +231,11 @@ export struct EmptyComponent { | @@ -231,11 +231,11 @@ export struct EmptyComponent { | ||
| 231 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoSearchResult) { | 231 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoSearchResult) { |
| 232 | imageString = $r('app.media.icon_no_result') | 232 | imageString = $r('app.media.icon_no_result') |
| 233 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoNetwork) { | 233 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoNetwork) { |
| 234 | - imageString = $r('app.media.icon_no_net') | 234 | + imageString = $r('app.media.icon_no_net1') |
| 235 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) { | 235 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) { |
| 236 | imageString = $r('app.media.icon_no_content') | 236 | imageString = $r('app.media.icon_no_content') |
| 237 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCreation) { | 237 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCreation) { |
| 238 | - imageString = $r('app.media.icon_no_appointmentMade') | 238 | + imageString = $r('app.media.icon_no_works1') |
| 239 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoBooking) { | 239 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoBooking) { |
| 240 | imageString = $r('app.media.icon_no_appointmentMade') | 240 | imageString = $r('app.media.icon_no_appointmentMade') |
| 241 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NetworkFailed) { | 241 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NetworkFailed) { |
| @@ -158,20 +158,38 @@ export struct ImageItemView { | @@ -158,20 +158,38 @@ export struct ImageItemView { | ||
| 158 | 158 | ||
| 159 | build() { | 159 | build() { |
| 160 | Stack() { | 160 | Stack() { |
| 161 | - Image(this.imagePixelMap)// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 | ||
| 162 | - .width(this.fitWH === "width" ? "100%" : undefined) | ||
| 163 | - .height(this.fitWH === "height" ? "100%" : undefined) | ||
| 164 | - .aspectRatio(this.imageWHRatio) | ||
| 165 | - .objectFit(ImageFit.Cover)// TODO:知识点:保持宽高比进行缩放,可以超出父组件,以便实现多图切换的增强功能 | ||
| 166 | - .autoResize(false) | ||
| 167 | - .transform(this.matrix)// TODO:知识点:通过matrix控制图片的缩放 | ||
| 168 | - .defaultFocus(true) | ||
| 169 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 170 | - .offset({ | ||
| 171 | - // TODO:知识点:通过offset控制图片的偏移 | ||
| 172 | - x: this.imageOffsetInfo.currentX, | ||
| 173 | - y: this.imageOffsetInfo.currentY | ||
| 174 | - }) | 161 | + if(this.imageUri != null && (this.imageUri.includes('.gif') || this.imageUri.includes('.GIF'))){ |
| 162 | + Image(this.imageUri)// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 | ||
| 163 | + .width(this.fitWH === "width" ? "100%" : undefined) | ||
| 164 | + .height(this.fitWH === "height" ? "100%" : undefined) | ||
| 165 | + .aspectRatio(this.imageWHRatio) | ||
| 166 | + .objectFit(ImageFit.Cover)// TODO:知识点:保持宽高比进行缩放,可以超出父组件,以便实现多图切换的增强功能 | ||
| 167 | + .autoResize(false) | ||
| 168 | + .transform(this.matrix)// TODO:知识点:通过matrix控制图片的缩放 | ||
| 169 | + .defaultFocus(true) | ||
| 170 | + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 171 | + .offset({ | ||
| 172 | + // TODO:知识点:通过offset控制图片的偏移 | ||
| 173 | + x: this.imageOffsetInfo.currentX, | ||
| 174 | + y: this.imageOffsetInfo.currentY | ||
| 175 | + }) | ||
| 176 | + }else{ | ||
| 177 | + Image(this.imagePixelMap)// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 | ||
| 178 | + .width(this.fitWH === "width" ? "100%" : undefined) | ||
| 179 | + .height(this.fitWH === "height" ? "100%" : undefined) | ||
| 180 | + .aspectRatio(this.imageWHRatio) | ||
| 181 | + .objectFit(ImageFit.Cover)// TODO:知识点:保持宽高比进行缩放,可以超出父组件,以便实现多图切换的增强功能 | ||
| 182 | + .autoResize(false) | ||
| 183 | + .transform(this.matrix)// TODO:知识点:通过matrix控制图片的缩放 | ||
| 184 | + .defaultFocus(true) | ||
| 185 | + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 186 | + .offset({ | ||
| 187 | + // TODO:知识点:通过offset控制图片的偏移 | ||
| 188 | + x: this.imageOffsetInfo.currentX, | ||
| 189 | + y: this.imageOffsetInfo.currentY | ||
| 190 | + }) | ||
| 191 | + } | ||
| 192 | + | ||
| 175 | } | 193 | } |
| 176 | .onBlur(() => { | 194 | .onBlur(() => { |
| 177 | this.resetCurrentImageInfo(); | 195 | this.resetCurrentImageInfo(); |
| @@ -15,6 +15,8 @@ import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailV | @@ -15,6 +15,8 @@ import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailV | ||
| 15 | import { LikeComponent } from './LikeComponent'; | 15 | import { LikeComponent } from './LikeComponent'; |
| 16 | import { CommentTabComponent, CommentIconComponent, } from '../comment/view/CommentTabComponent'; | 16 | import { CommentTabComponent, CommentIconComponent, } from '../comment/view/CommentTabComponent'; |
| 17 | import { publishCommentModel } from '../comment/model/PublishCommentModel' | 17 | import { publishCommentModel } from '../comment/model/PublishCommentModel' |
| 18 | +// import { AudioBarView } from '../MorningEveningPaper/AudioBarView' | ||
| 19 | +// import { AudioDialog } from '../../dialog/AudioDialog' | ||
| 18 | import { HttpUrlUtils } from 'wdNetwork/Index'; | 20 | import { HttpUrlUtils } from 'wdNetwork/Index'; |
| 19 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 21 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| 20 | import { PageRepository } from '../../repository/PageRepository'; | 22 | import { PageRepository } from '../../repository/PageRepository'; |
| @@ -26,25 +28,27 @@ const TAG = 'OperRowListView'; | @@ -26,25 +28,27 @@ const TAG = 'OperRowListView'; | ||
| 26 | * 稿件详情底部通栏组件:包含返回、评论、点赞、收藏、分享 | 28 | * 稿件详情底部通栏组件:包含返回、评论、点赞、收藏、分享 |
| 27 | * 上层传值: | 29 | * 上层传值: |
| 28 | * 1、(必传) contentDetailData---稿件详情 | 30 | * 1、(必传) contentDetailData---稿件详情 |
| 29 | - * 2、(非必传) operationButtonList---组件展示条件,['comment', 'like', 'collect', 'share'],需要展示什么传什么 | ||
| 30 | - * comment--评论;like--点赞;collect--收藏;share--分享; | 31 | + * 2、(非必传) operationButtonList---组件展示条件, |
| 32 | + * ['comment', 'like', 'collect', 'share'],需要展示什么传什么 | ||
| 33 | + * comment--评论;like--点赞;collect--收藏;listen--音频;share--分享; | ||
| 31 | * | 34 | * |
| 32 | * 传值示例: | 35 | * 传值示例: |
| 33 | OperRowListView({ | 36 | OperRowListView({ |
| 34 | contentDetailData: this.contentDetailData[0], | 37 | contentDetailData: this.contentDetailData[0], |
| 35 | - operationButtonList: ['comment', 'like', 'collect', 'share'] | 38 | + operationButtonList: ['comment', 'like', 'collect', 'listen', 'share'] |
| 36 | }) | 39 | }) |
| 37 | */ | 40 | */ |
| 38 | @Preview | 41 | @Preview |
| 39 | @Component | 42 | @Component |
| 40 | export struct OperRowListView { | 43 | export struct OperRowListView { |
| 41 | @Prop contentDetailData: ContentDetailDTO // 稿件详情 | 44 | @Prop contentDetailData: ContentDetailDTO // 稿件详情 |
| 42 | - @State operationButtonList: string[] = ['comment', 'like', 'collect', 'share'] // 组件展示条件 | 45 | + @State operationButtonList: string[] = ['comment', 'collect', 'share'] // 组件展示条件 |
| 43 | @ObjectLink publishCommentModel: publishCommentModel | 46 | @ObjectLink publishCommentModel: publishCommentModel |
| 44 | // @State contentDetailData: ContentDetailDTO = {} as ContentDetailDTO | 47 | // @State contentDetailData: ContentDetailDTO = {} as ContentDetailDTO |
| 45 | @State interactData: InteractDataDTO = {} as InteractDataDTO | 48 | @State interactData: InteractDataDTO = {} as InteractDataDTO |
| 46 | @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态 | 49 | @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态 |
| 47 | @State likeBean: Record<string, string> = {} | 50 | @State likeBean: Record<string, string> = {} |
| 51 | + @State audioUrl: string= '' | ||
| 48 | needLike: boolean = true | 52 | needLike: boolean = true |
| 49 | 53 | ||
| 50 | async aboutToAppear() { | 54 | async aboutToAppear() { |
| @@ -70,10 +74,16 @@ export struct OperRowListView { | @@ -70,10 +74,16 @@ export struct OperRowListView { | ||
| 70 | this.publishCommentModel.targetRelObjectId = this.contentDetailData.reLInfo?.relObjectId + '' | 74 | this.publishCommentModel.targetRelObjectId = this.contentDetailData.reLInfo?.relObjectId + '' |
| 71 | this.publishCommentModel.keyArticle = this.contentDetailData.keyArticle + '' | 75 | this.publishCommentModel.keyArticle = this.contentDetailData.keyArticle + '' |
| 72 | this.publishCommentModel.targetType = this.contentDetailData.newsType + ''*/ | 76 | this.publishCommentModel.targetType = this.contentDetailData.newsType + ''*/ |
| 77 | + // 音频需要数据 | ||
| 78 | + if (this.operationButtonList?.includes('listen')) { | ||
| 79 | + this.audioUrl = this.contentDetailData.audioList[0]?.audioUrl || '' | ||
| 80 | + console.log(TAG, 'this.audioUrl+++', this.audioUrl) | ||
| 81 | + } | ||
| 73 | } | 82 | } |
| 74 | 83 | ||
| 75 | build() { | 84 | build() { |
| 76 | Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { | 85 | Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { |
| 86 | + // AudioDialog() | ||
| 77 | Row() { | 87 | Row() { |
| 78 | Column() { | 88 | Column() { |
| 79 | Image($r('app.media.icon_arrow_left')) | 89 | Image($r('app.media.icon_arrow_left')) |
| @@ -95,6 +105,8 @@ export struct OperRowListView { | @@ -95,6 +105,8 @@ export struct OperRowListView { | ||
| 95 | this.builderLike() | 105 | this.builderLike() |
| 96 | } else if (item == 'collect') { | 106 | } else if (item == 'collect') { |
| 97 | this.builderCollect() | 107 | this.builderCollect() |
| 108 | + } else if (item == 'listen') { | ||
| 109 | + this.builderListen() | ||
| 98 | } else if (item == 'share') { | 110 | } else if (item == 'share') { |
| 99 | this.builderShare() | 111 | this.builderShare() |
| 100 | } else { | 112 | } else { |
| @@ -176,6 +188,25 @@ export struct OperRowListView { | @@ -176,6 +188,25 @@ export struct OperRowListView { | ||
| 176 | } | 188 | } |
| 177 | 189 | ||
| 178 | /** | 190 | /** |
| 191 | + * 音频组件 | ||
| 192 | + */ | ||
| 193 | + // this.audioUrl | ||
| 194 | + @Builder | ||
| 195 | + builderListen() { | ||
| 196 | + Column() { | ||
| 197 | + Image($r('app.media.icon_listen')) | ||
| 198 | + .width(24) | ||
| 199 | + .height(24) | ||
| 200 | + .aspectRatio(1) | ||
| 201 | + .interpolation(ImageInterpolation.High) | ||
| 202 | + .onClick((event: ClickEvent) => { | ||
| 203 | + ToastUtils.showToast('音频为公共方法,待开发', 1000); | ||
| 204 | + }) | ||
| 205 | + } | ||
| 206 | + .width(42) | ||
| 207 | + } | ||
| 208 | + | ||
| 209 | + /** | ||
| 179 | * 分享组件 | 210 | * 分享组件 |
| 180 | */ | 211 | */ |
| 181 | @Builder | 212 | @Builder |
| @@ -12,8 +12,9 @@ export struct ENewspaperListDialog { | @@ -12,8 +12,9 @@ export struct ENewspaperListDialog { | ||
| 12 | @Consume @Watch('onCurrentPageNumUpdated') currentPageNum: string | 12 | @Consume @Watch('onCurrentPageNumUpdated') currentPageNum: string |
| 13 | @State pageDialogShow: boolean = false | 13 | @State pageDialogShow: boolean = false |
| 14 | @State scrollIndex: number = 0 | 14 | @State scrollIndex: number = 0 |
| 15 | - @Prop newspaperListBean: NewspaperListBean = {} as NewspaperListBean | ||
| 16 | - private listScroller: Scroller = new Scroller(); | 15 | + @Prop @Watch('updateRecordsData') newspaperListBean: NewspaperListBean = {} as NewspaperListBean |
| 16 | + private listScroller: Scroller = new Scroller() | ||
| 17 | + @State scrollOffset: number = 0 | ||
| 17 | //文字版选择弹框 | 18 | //文字版选择弹框 |
| 18 | pageListDialogController: CustomDialogController = new CustomDialogController({ | 19 | pageListDialogController: CustomDialogController = new CustomDialogController({ |
| 19 | builder: ENewspaperPageDialog({ | 20 | builder: ENewspaperPageDialog({ |
| @@ -73,7 +74,7 @@ export struct ENewspaperListDialog { | @@ -73,7 +74,7 @@ export struct ENewspaperListDialog { | ||
| 73 | Text(this.currentPageNum) | 74 | Text(this.currentPageNum) |
| 74 | .fontSize($r('app.float.font_size_36')) | 75 | .fontSize($r('app.float.font_size_36')) |
| 75 | .fontColor($r('app.color.color_222222')) | 76 | .fontColor($r('app.color.color_222222')) |
| 76 | - .fontFamily('BebasNeue_Regular') | 77 | + .fontFamily('BebasNeueBold') |
| 77 | Text('版') | 78 | Text('版') |
| 78 | .fontSize($r('app.float.font_size_16')) | 79 | .fontSize($r('app.float.font_size_16')) |
| 79 | .fontColor($r('app.color.color_222222')) | 80 | .fontColor($r('app.color.color_222222')) |
| @@ -114,96 +115,139 @@ export struct ENewspaperListDialog { | @@ -114,96 +115,139 @@ export struct ENewspaperListDialog { | ||
| 114 | .fontSize($r('app.float.font_size_14')) | 115 | .fontSize($r('app.float.font_size_14')) |
| 115 | .fontColor($r('app.color.color_ED2800')) | 116 | .fontColor($r('app.color.color_ED2800')) |
| 116 | .fontWeight(600) | 117 | .fontWeight(600) |
| 117 | - .margin({ top: 16, bottom: 16 }) | 118 | + .width('100%') |
| 119 | + .textAlign(TextAlign.Start) | ||
| 120 | + .margin({ | ||
| 121 | + // top: 16, | ||
| 122 | + bottom: 16 | ||
| 123 | + }) | ||
| 118 | .maxLines(1) | 124 | .maxLines(1) |
| 119 | } | 125 | } |
| 126 | + Column() { | ||
| 127 | + if (positionItem.shortTitle) { | ||
| 128 | + Text(positionItem.shortTitle) | ||
| 129 | + .fontSize($r('app.float.font_size_14')) | ||
| 130 | + .fontColor($r('app.color.color_222222')) | ||
| 131 | + .fontWeight(600) | ||
| 132 | + .maxLines(2) | ||
| 133 | + .margin({ | ||
| 134 | + bottom: 8 | ||
| 135 | + }) | ||
| 136 | + } | ||
| 120 | 137 | ||
| 121 | - if (positionItem.shortTitle) { | ||
| 122 | - Text(positionItem.shortTitle) | ||
| 123 | - .fontSize($r('app.float.font_size_14')) | ||
| 124 | - .fontColor($r('app.color.color_222222')) | ||
| 125 | - .fontWeight(600) | ||
| 126 | - .maxLines(2) | ||
| 127 | - } | ||
| 128 | - | ||
| 129 | - if (positionItem.title) { | ||
| 130 | - Text(positionItem.title) | ||
| 131 | - .fontSize($r('app.float.font_size_17')) | ||
| 132 | - .fontColor($r('app.color.color_222222')) | ||
| 133 | - .fontWeight(600) | ||
| 134 | - .margin({ top: 8 }) | ||
| 135 | - .maxLines(2) | ||
| 136 | - } | 138 | + if (positionItem.title) { |
| 139 | + Text(positionItem.title) | ||
| 140 | + .fontSize($r('app.float.font_size_17')) | ||
| 141 | + .fontColor($r('app.color.color_222222')) | ||
| 142 | + .fontWeight(600) | ||
| 143 | + .margin({ | ||
| 144 | + bottom: 8 | ||
| 145 | + }) | ||
| 146 | + .maxLines(2) | ||
| 147 | + } | ||
| 137 | 148 | ||
| 138 | - if (positionItem.downTitle) { | ||
| 139 | - Text(positionItem.downTitle) | ||
| 140 | - .fontSize($r('app.float.font_size_14')) | ||
| 141 | - .fontColor($r('app.color.color_222222')) | ||
| 142 | - .fontWeight(600) | ||
| 143 | - .margin({ top: 8 }) | ||
| 144 | - .maxLines(2) | 149 | + if (positionItem.downTitle) { |
| 150 | + Text(positionItem.downTitle) | ||
| 151 | + .fontSize($r('app.float.font_size_14')) | ||
| 152 | + .fontColor($r('app.color.color_222222')) | ||
| 153 | + .fontWeight(600) | ||
| 154 | + .margin({ | ||
| 155 | + bottom: 8 | ||
| 156 | + }) | ||
| 157 | + .maxLines(2) | ||
| 158 | + } | ||
| 159 | + if (positionItem.newsTxt) { | ||
| 160 | + Text(positionItem.newsTxt) | ||
| 161 | + .fontSize($r('app.float.font_size_14')) | ||
| 162 | + .fontColor($r('app.color.color_999999')) | ||
| 163 | + .lineHeight(25) | ||
| 164 | + .margin({ | ||
| 165 | + // bottom: 15 | ||
| 166 | + }) | ||
| 167 | + .maxLines(5) | ||
| 168 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 169 | + } | ||
| 145 | } | 170 | } |
| 171 | + .width('100%') | ||
| 172 | + .alignItems(HorizontalAlign.Start) | ||
| 173 | + .onClick(() => { | ||
| 174 | + let taskAction: Action = { | ||
| 175 | + type: 'JUMP_INNER_NEW_PAGE', | ||
| 176 | + params: { | ||
| 177 | + contentID: '' + positionItem.newsId, | ||
| 178 | + pageID: 'IMAGE_TEXT_DETAIL', | ||
| 179 | + extra: { | ||
| 180 | + relType: positionItem.relType ?? '', | ||
| 181 | + relId: '' + positionItem.relId, | ||
| 182 | + sourcePage: '5' | ||
| 183 | + } as ExtraDTO | ||
| 184 | + } as Params, | ||
| 185 | + }; | ||
| 186 | + WDRouterRule.jumpWithAction(taskAction) | ||
| 187 | + // if (this.listDialogController) { | ||
| 188 | + // this.listDialogController.close() | ||
| 189 | + // } | ||
| 190 | + }) | ||
| 146 | 191 | ||
| 147 | - if (positionItem.newsTxt) { | ||
| 148 | - Text(positionItem.newsTxt) | ||
| 149 | - .fontSize($r('app.float.font_size_14')) | ||
| 150 | - .fontColor($r('app.color.color_999999')) | ||
| 151 | - .margin({ top: 15, bottom: 15 }) | ||
| 152 | - .maxLines(5) | ||
| 153 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | 192 | + if (item.items.length != itemIndex + 1) { |
| 193 | + Divider() | ||
| 194 | + .strokeWidth(0.5) | ||
| 195 | + .color('#EDEDED') | ||
| 196 | + .padding({ | ||
| 197 | + top: 15, | ||
| 198 | + bottom: 15 | ||
| 199 | + }) | ||
| 154 | } | 200 | } |
| 155 | } | 201 | } |
| 156 | - .alignItems(HorizontalAlign.Start) | ||
| 157 | - .onClick(() => { | ||
| 158 | - let taskAction: Action = { | ||
| 159 | - type: 'JUMP_INNER_NEW_PAGE', | ||
| 160 | - params: { | ||
| 161 | - contentID: '' + positionItem.newsId, | ||
| 162 | - pageID: 'IMAGE_TEXT_DETAIL', | ||
| 163 | - extra: { | ||
| 164 | - relType: positionItem.relType ?? '', | ||
| 165 | - relId: '' + positionItem.relId, | ||
| 166 | - sourcePage: '5' | ||
| 167 | - } as ExtraDTO | ||
| 168 | - } as Params, | ||
| 169 | - }; | ||
| 170 | - WDRouterRule.jumpWithAction(taskAction) | ||
| 171 | - // if (this.listDialogController) { | ||
| 172 | - // this.listDialogController.close() | ||
| 173 | - // } | ||
| 174 | - }) | ||
| 175 | } | 202 | } |
| 176 | }) | 203 | }) |
| 177 | } | 204 | } |
| 178 | - .divider({ | ||
| 179 | - strokeWidth: 0.5, | ||
| 180 | - color: '#EDEDED' | 205 | + // .divider({ |
| 206 | + // color: '#EDEDED', | ||
| 207 | + // strokeWidth: 0.5 | ||
| 208 | + // }) | ||
| 209 | + .padding({ | ||
| 210 | + top: 16, | ||
| 211 | + bottom: 16 | ||
| 181 | }) | 212 | }) |
| 182 | } | 213 | } |
| 183 | }) | 214 | }) |
| 184 | } | 215 | } |
| 216 | + .divider({ | ||
| 217 | + color: '#EDEDED', | ||
| 218 | + strokeWidth: 0.5 | ||
| 219 | + }) | ||
| 185 | .width('100%') | 220 | .width('100%') |
| 186 | - .padding({ left: 15, right: 15 }) | 221 | + .padding({ |
| 222 | + left: 15, | ||
| 223 | + right: 15, | ||
| 224 | + top: 16, | ||
| 225 | + bottom: 16 | ||
| 226 | + }) | ||
| 187 | .margin({ | 227 | .margin({ |
| 188 | bottom: 85 | 228 | bottom: 85 |
| 189 | }) | 229 | }) |
| 190 | .scrollBar(BarState.Off) | 230 | .scrollBar(BarState.Off) |
| 191 | - .divider({ | ||
| 192 | - strokeWidth: 0.5, | ||
| 193 | - color: '#EDEDED' | ||
| 194 | - }) | ||
| 195 | - .onScrollIndex((firstIndex: number) => { | ||
| 196 | - console.log('firstIndex', firstIndex) | ||
| 197 | - }) | 231 | + |
| 198 | .onScrollIndex((firstIndex: number, lastIndex: number, centerIndex: number) => { | 232 | .onScrollIndex((firstIndex: number, lastIndex: number, centerIndex: number) => { |
| 199 | - console.info('first' + firstIndex) | ||
| 200 | - console.info('last' + lastIndex) | ||
| 201 | - console.info('center' + centerIndex) | 233 | + // console.info('ENewspaperListDialog::first' + firstIndex) |
| 234 | + // console.info('ENewspaperListDialog::last' + lastIndex) | ||
| 235 | + // console.info('ENewspaperListDialog::center' + centerIndex) | ||
| 202 | // this.updateCurrentPageNum(firstIndex) | 236 | // this.updateCurrentPageNum(firstIndex) |
| 203 | - this.currentPageNum = `${centerIndex < 9 ? '0' + (centerIndex + 1) : centerIndex + 1}` | 237 | + // const tempIndex = this.findClassIndex(firstIndex) |
| 238 | + if (firstIndex !== centerIndex) { | ||
| 239 | + return | ||
| 240 | + } | ||
| 241 | + // console.info(`this.scrollOffset:` + this.scrollOffset) | ||
| 242 | + // if (this.scrollOffset == 0) { | ||
| 243 | + this.currentPageNum = `${centerIndex < 9 ? '0' + (centerIndex + 1) : centerIndex + 1}` | ||
| 244 | + // } | ||
| 204 | }) | 245 | }) |
| 205 | .onScroll((scrollOffset: number, scrollState: ScrollState) => { | 246 | .onScroll((scrollOffset: number, scrollState: ScrollState) => { |
| 206 | - console.info(`onScroll scrollState = ScrollState` + scrollState + `, scrollOffset = ` + scrollOffset) | 247 | + // console.info(`onScroll scrollState = ScrollState` + scrollState + `, scrollOffset = ` + scrollOffset) |
| 248 | + // if (this.scrollOffset == 0) { | ||
| 249 | + // this.scrollOffset = 0 | ||
| 250 | + // } | ||
| 207 | }) | 251 | }) |
| 208 | } | 252 | } |
| 209 | .margin({ top: 124 }) | 253 | .margin({ top: 124 }) |
| @@ -222,23 +266,25 @@ export struct ENewspaperListDialog { | @@ -222,23 +266,25 @@ export struct ENewspaperListDialog { | ||
| 222 | }) | 266 | }) |
| 223 | } | 267 | } |
| 224 | 268 | ||
| 225 | - updateCurrentPageNum(firstIndex: number): void { | ||
| 226 | - if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) { | ||
| 227 | - let index = 0; | ||
| 228 | - for (let itemBean of this.newspaperListBean.list) { | ||
| 229 | - if (itemBean.items && itemBean.items.length > 0) { | ||
| 230 | - for (let item of itemBean.items) { | ||
| 231 | - index++ | ||
| 232 | - if (index == firstIndex) { | ||
| 233 | - this.currentPageNum = itemBean.pageNum | ||
| 234 | - return | ||
| 235 | - } | ||
| 236 | - } | ||
| 237 | - } | ||
| 238 | - } | ||
| 239 | - } | ||
| 240 | - | 269 | + updateRecordsData() { |
| 270 | + // if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) { | ||
| 271 | + // for (let itemBean of this.newspaperListBean.list) { | ||
| 272 | + // index += itemBean.items.length | ||
| 273 | + // this.records.push(index) | ||
| 274 | + // } | ||
| 275 | + // } | ||
| 241 | } | 276 | } |
| 277 | + | ||
| 278 | + // findClassIndex(index: number): number { | ||
| 279 | + // let ans = 0; | ||
| 280 | + // for (let i = 0; i < this.records.length; i++) { | ||
| 281 | + // if (index >= this.records[i] && index < this.records[i + 1]) { | ||
| 282 | + // ans = i; | ||
| 283 | + // break; | ||
| 284 | + // } | ||
| 285 | + // } | ||
| 286 | + // return ans; | ||
| 287 | + // } | ||
| 242 | } | 288 | } |
| 243 | 289 | ||
| 244 | 290 |
| @@ -29,7 +29,7 @@ export struct ENewspaperPageDialog { | @@ -29,7 +29,7 @@ export struct ENewspaperPageDialog { | ||
| 29 | Text(item.pageNum) | 29 | Text(item.pageNum) |
| 30 | .fontSize($r('app.float.normal_text_size')) | 30 | .fontSize($r('app.float.normal_text_size')) |
| 31 | .fontColor(this.currentPageNum == item.pageNum ? Color.White : $r('app.color.color_222222')) | 31 | .fontColor(this.currentPageNum == item.pageNum ? Color.White : $r('app.color.color_222222')) |
| 32 | - .fontFamily('BebasNeue_Regular') | 32 | + .fontFamily('BebasNeueBold') |
| 33 | } | 33 | } |
| 34 | .alignItems(VerticalAlign.Center) | 34 | .alignItems(VerticalAlign.Center) |
| 35 | .justifyContent(FlexAlign.Center) | 35 | .justifyContent(FlexAlign.Center) |
| 1 | +@CustomDialog | ||
| 2 | +export struct MergeRecordDialog { | ||
| 3 | + controller: CustomDialogController | ||
| 4 | + cancel: () => void = () => { | ||
| 5 | + } | ||
| 6 | + confirm: () => void = () => { | ||
| 7 | + } | ||
| 8 | + | ||
| 9 | + build() { | ||
| 10 | + Column() { | ||
| 11 | + Text("合并游客记录到当前账号,可避免信息丢失") | ||
| 12 | + .fontColor("#333333") | ||
| 13 | + .fontSize(18) | ||
| 14 | + .width("100%") | ||
| 15 | + .fontWeight(FontWeight.Bold) | ||
| 16 | + .textAlign(TextAlign.Center) | ||
| 17 | + .margin({ top: 25 }) | ||
| 18 | + .padding({left:24,right:24}) | ||
| 19 | + | ||
| 20 | + Divider().color("#08000000").width("100%").margin({ top: 20 }).height('2vp') | ||
| 21 | + Row() { | ||
| 22 | + Text('取消') | ||
| 23 | + .fontSize(18) | ||
| 24 | + .fontColor("#648DF2") | ||
| 25 | + .layoutWeight(1) | ||
| 26 | + .fontWeight(FontWeight.Medium) | ||
| 27 | + .textAlign(TextAlign.Center) | ||
| 28 | + .onClick(() => { | ||
| 29 | + this.controller.close() | ||
| 30 | + if (this.cancel) { | ||
| 31 | + this.cancel() | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + }) | ||
| 35 | + .height(50) | ||
| 36 | + Divider().color("#eeeeee").height(44).width(1).margin({top:3}).strokeWidth(1).vertical(true) | ||
| 37 | + Text('一键合并') | ||
| 38 | + .fontSize(18) | ||
| 39 | + .fontColor("#648DF2") | ||
| 40 | + .layoutWeight(1) | ||
| 41 | + .fontWeight(FontWeight.Medium) | ||
| 42 | + .textAlign(TextAlign.Center) | ||
| 43 | + .onClick(() => { | ||
| 44 | + this.controller.close() | ||
| 45 | + if (this.confirm) { | ||
| 46 | + this.confirm() | ||
| 47 | + } | ||
| 48 | + }) | ||
| 49 | + .height(50) | ||
| 50 | + }.layoutWeight(1).justifyContent(FlexAlign.Center) | ||
| 51 | + }.height(140).backgroundColor(Color.White).borderRadius(14).width('75%') | ||
| 52 | + } | ||
| 53 | +} |
| @@ -4,7 +4,7 @@ import MinePageCreatorFunctionsItem from '../viewmodel/MinePageCreatorFunctionsI | @@ -4,7 +4,7 @@ import MinePageCreatorFunctionsItem from '../viewmodel/MinePageCreatorFunctionsI | ||
| 4 | import MinePageMoreFunctionModel from '../viewmodel/MinePageMoreFunctionModel'; | 4 | import MinePageMoreFunctionModel from '../viewmodel/MinePageMoreFunctionModel'; |
| 5 | import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork'; | 5 | import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork'; |
| 6 | import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem'; | 6 | import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem'; |
| 7 | -import { Logger, StringUtils, EmitterUtils, EmitterEventId } from 'wdKit'; | 7 | +import { Logger, StringUtils, EmitterUtils, EmitterEventId, SPHelper } from 'wdKit'; |
| 8 | import { MineFollowListDetailItem } from '../viewmodel/MineFollowListDetailItem'; | 8 | import { MineFollowListDetailItem } from '../viewmodel/MineFollowListDetailItem'; |
| 9 | import { FollowListDetailRequestItem } from '../viewmodel/FollowListDetailRequestItem'; | 9 | import { FollowListDetailRequestItem } from '../viewmodel/FollowListDetailRequestItem'; |
| 10 | import { FollowListItem } from '../viewmodel/FollowListItem'; | 10 | import { FollowListItem } from '../viewmodel/FollowListItem'; |
| @@ -22,6 +22,7 @@ import { UserFollowListRequestItem } from '../viewmodel/UserFollowListRequestIte | @@ -22,6 +22,7 @@ import { UserFollowListRequestItem } from '../viewmodel/UserFollowListRequestIte | ||
| 22 | import { AppointmentOperationRequestItem } from '../viewmodel/AppointmentOperationRequestItem'; | 22 | import { AppointmentOperationRequestItem } from '../viewmodel/AppointmentOperationRequestItem'; |
| 23 | import { CommentLikeOperationRequestItem } from '../viewmodel/CommentLikeOperationRequestItem'; | 23 | import { CommentLikeOperationRequestItem } from '../viewmodel/CommentLikeOperationRequestItem'; |
| 24 | import { FollowOperationRequestItem } from '../viewmodel/FollowOperationRequestItem'; | 24 | import { FollowOperationRequestItem } from '../viewmodel/FollowOperationRequestItem'; |
| 25 | +import { SpConstants } from 'wdConstant/Index'; | ||
| 25 | 26 | ||
| 26 | const TAG = "MinePageDatasModel" | 27 | const TAG = "MinePageDatasModel" |
| 27 | 28 | ||
| @@ -559,7 +560,26 @@ class MinePageDatasModel{ | @@ -559,7 +560,26 @@ class MinePageDatasModel{ | ||
| 559 | return WDHttp.post<ResponseDTO>(url,object) | 560 | return WDHttp.post<ResponseDTO>(url,object) |
| 560 | }; | 561 | }; |
| 561 | 562 | ||
| 562 | - | 563 | + visitorMergeComment() { |
| 564 | + let bean: Record<string, string> = {}; | ||
| 565 | + bean['time'] = SPHelper.default.getSync(SpConstants.FIRSTCOMMENTTIME, "") as string | ||
| 566 | + bean['deviceId'] = HttpUtils.getDeviceId(); | ||
| 567 | + return new Promise<object>((success, error) => { | ||
| 568 | + // Logger.info(TAG, `visitorMergeComment`); | ||
| 569 | + HttpBizUtil.post<ResponseDTO<object>>(HttpUrlUtils.visitorMergeComment(), bean).then((data: ResponseDTO<object>) => { | ||
| 570 | + if (!data) { | ||
| 571 | + error() | ||
| 572 | + } | ||
| 573 | + if (data.code != 0) { | ||
| 574 | + error() | ||
| 575 | + } | ||
| 576 | + SPHelper.default.save(SpConstants.FIRSTCOMMENTTIME, "") | ||
| 577 | + success(data) | ||
| 578 | + }).catch(() => { | ||
| 579 | + error() | ||
| 580 | + }) | ||
| 581 | + }) | ||
| 582 | + } | ||
| 563 | } | 583 | } |
| 564 | 584 | ||
| 565 | const minePageDatasModel = MinePageDatasModel.getInstance() | 585 | const minePageDatasModel = MinePageDatasModel.getInstance() |
| 1 | 1 | ||
| 2 | -import { Logger, SPHelper, UserDataLocal } from 'wdKit'; | 2 | +import { Logger, SPHelper, StringUtils, UserDataLocal } from 'wdKit'; |
| 3 | import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork'; | 3 | import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork'; |
| 4 | import { SearchHistoryItem } from '../viewmodel/SearchHistoryItem'; | 4 | import { SearchHistoryItem } from '../viewmodel/SearchHistoryItem'; |
| 5 | import { SearchHotContentItem } from '../viewmodel/SearchHotContentItem'; | 5 | import { SearchHotContentItem } from '../viewmodel/SearchHotContentItem'; |
| @@ -18,7 +18,7 @@ const TAG = "SearcherAboutDataModel" | @@ -18,7 +18,7 @@ const TAG = "SearcherAboutDataModel" | ||
| 18 | class SearcherAboutDataModel{ | 18 | class SearcherAboutDataModel{ |
| 19 | private static instance: SearcherAboutDataModel; | 19 | private static instance: SearcherAboutDataModel; |
| 20 | public searchHistoryData:SearchHistoryItem[] = [] | 20 | public searchHistoryData:SearchHistoryItem[] = [] |
| 21 | - public SEARCH_HISTORY_KEY:string = "SEARCH_HISTORY_KEY" + UserDataLocal.getUserId() | 21 | + public SEARCH_HISTORY_KEY:string = "SEARCH_HISTORY_KEY" |
| 22 | 22 | ||
| 23 | private constructor() { } | 23 | private constructor() { } |
| 24 | 24 | ||
| @@ -37,7 +37,7 @@ class SearcherAboutDataModel{ | @@ -37,7 +37,7 @@ class SearcherAboutDataModel{ | ||
| 37 | * 插入搜索记录(单个) | 37 | * 插入搜索记录(单个) |
| 38 | */ | 38 | */ |
| 39 | public async putSearchHistoryData(content:string){ | 39 | public async putSearchHistoryData(content:string){ |
| 40 | - let history = SPHelper.default.getSync(this.SEARCH_HISTORY_KEY,"[]") as string | 40 | + let history = SPHelper.default.getSync(this.generationSearchKey(),"[]") as string |
| 41 | this.searchHistoryData = JSON.parse(history) | 41 | this.searchHistoryData = JSON.parse(history) |
| 42 | this.searchHistoryData.forEach((element,index) => { | 42 | this.searchHistoryData.forEach((element,index) => { |
| 43 | if (element.searchContent == content) { | 43 | if (element.searchContent == content) { |
| @@ -45,14 +45,14 @@ class SearcherAboutDataModel{ | @@ -45,14 +45,14 @@ class SearcherAboutDataModel{ | ||
| 45 | } | 45 | } |
| 46 | }); | 46 | }); |
| 47 | this.searchHistoryData.splice(0,0,new SearchHistoryItem(content)) | 47 | this.searchHistoryData.splice(0,0,new SearchHistoryItem(content)) |
| 48 | - await SPHelper.default.saveSync(this.SEARCH_HISTORY_KEY, JSON.stringify(this.searchHistoryData)); | 48 | + await SPHelper.default.saveSync(this.generationSearchKey(), JSON.stringify(this.searchHistoryData)); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | /** | 51 | /** |
| 52 | * 删除搜索记录(所有) | 52 | * 删除搜索记录(所有) |
| 53 | */ | 53 | */ |
| 54 | public async delSearchHistoryData(){ | 54 | public async delSearchHistoryData(){ |
| 55 | - SPHelper.default.deleteSync(this.SEARCH_HISTORY_KEY) | 55 | + SPHelper.default.deleteSync(this.generationSearchKey()) |
| 56 | this.searchHistoryData = [] | 56 | this.searchHistoryData = [] |
| 57 | } | 57 | } |
| 58 | /** | 58 | /** |
| @@ -62,11 +62,11 @@ class SearcherAboutDataModel{ | @@ -62,11 +62,11 @@ class SearcherAboutDataModel{ | ||
| 62 | if(this.searchHistoryData!=null && this.searchHistoryData.length>0){ | 62 | if(this.searchHistoryData!=null && this.searchHistoryData.length>0){ |
| 63 | this.searchHistoryData.splice(index,1) | 63 | this.searchHistoryData.splice(index,1) |
| 64 | }else{ | 64 | }else{ |
| 65 | - let history = SPHelper.default.getSync(this.SEARCH_HISTORY_KEY,"[]") as string | 65 | + let history = SPHelper.default.getSync(this.generationSearchKey(),"[]") as string |
| 66 | this.searchHistoryData = JSON.parse(history) | 66 | this.searchHistoryData = JSON.parse(history) |
| 67 | this.searchHistoryData.splice(index,1) | 67 | this.searchHistoryData.splice(index,1) |
| 68 | } | 68 | } |
| 69 | - SPHelper.default.saveSync(this.SEARCH_HISTORY_KEY, JSON.stringify(this.searchHistoryData)) | 69 | + SPHelper.default.saveSync(this.generationSearchKey(), JSON.stringify(this.searchHistoryData)) |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | /** | 72 | /** |
| @@ -79,7 +79,7 @@ class SearcherAboutDataModel{ | @@ -79,7 +79,7 @@ class SearcherAboutDataModel{ | ||
| 79 | } | 79 | } |
| 80 | return this.searchHistoryData | 80 | return this.searchHistoryData |
| 81 | } | 81 | } |
| 82 | - let history = SPHelper.default.getSync(this.SEARCH_HISTORY_KEY,"[]") as string | 82 | + let history = SPHelper.default.getSync(this.generationSearchKey(),"[]") as string |
| 83 | 83 | ||
| 84 | this.searchHistoryData = JSON.parse(history) | 84 | this.searchHistoryData = JSON.parse(history) |
| 85 | if(this.searchHistoryData.length>10){ | 85 | if(this.searchHistoryData.length>10){ |
| @@ -91,6 +91,15 @@ class SearcherAboutDataModel{ | @@ -91,6 +91,15 @@ class SearcherAboutDataModel{ | ||
| 91 | return this.searchHistoryData | 91 | return this.searchHistoryData |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | + public generationSearchKey():string{ | ||
| 95 | + let userId = UserDataLocal.getUserId() | ||
| 96 | + if(StringUtils.isEmpty(userId)){ | ||
| 97 | + return this.SEARCH_HISTORY_KEY + "_" + "0000111122223333" | ||
| 98 | + }else{ | ||
| 99 | + return this.SEARCH_HISTORY_KEY + "_" + userId | ||
| 100 | + } | ||
| 101 | + } | ||
| 102 | + | ||
| 94 | /** | 103 | /** |
| 95 | * 首页 搜索提示滚动内容 | 104 | * 首页 搜索提示滚动内容 |
| 96 | */ | 105 | */ |
| @@ -20,6 +20,7 @@ struct MineHomePage { | @@ -20,6 +20,7 @@ struct MineHomePage { | ||
| 20 | @State userName:string = "" | 20 | @State userName:string = "" |
| 21 | @State headPhotoUrl:string = "" | 21 | @State headPhotoUrl:string = "" |
| 22 | @State levelHead:string = "" | 22 | @State levelHead:string = "" |
| 23 | + userType:string = "1" | ||
| 23 | @State levelId:number = 0 | 24 | @State levelId:number = 0 |
| 24 | @State desc:string = "点击添加简介,让大家认识你" //text 搞两个样式,如果三行,就显示 另外一个text 没有显示高度的 | 25 | @State desc:string = "点击添加简介,让大家认识你" //text 搞两个样式,如果三行,就显示 另外一个text 没有显示高度的 |
| 25 | @State isHasIntroduction: boolean = false | 26 | @State isHasIntroduction: boolean = false |
| @@ -31,7 +32,6 @@ struct MineHomePage { | @@ -31,7 +32,6 @@ struct MineHomePage { | ||
| 31 | 32 | ||
| 32 | onPageShow(): void { | 33 | onPageShow(): void { |
| 33 | this.getUserInfo() | 34 | this.getUserInfo() |
| 34 | - this.getUserLevel() | ||
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | build() { | 37 | build() { |
| @@ -403,7 +403,20 @@ struct MineHomePage { | @@ -403,7 +403,20 @@ struct MineHomePage { | ||
| 403 | this.attentionNum = value.attentionNum | 403 | this.attentionNum = value.attentionNum |
| 404 | this.registTime = value.registTime | 404 | this.registTime = value.registTime |
| 405 | this.getRegisterDays() | 405 | this.getRegisterDays() |
| 406 | + | ||
| 407 | + this.userType = value.userType | ||
| 408 | + | ||
| 409 | + if(this.userType === "1"){ | ||
| 410 | + if(StringUtils.isNotEmpty(value.honoraryIcon)){ | ||
| 411 | + this.levelHead = value.honoraryIcon | ||
| 412 | + return | ||
| 413 | + } | ||
| 414 | + if(StringUtils.isNotEmpty(value.avatarFrame)){ | ||
| 415 | + this.levelHead = value.avatarFrame | ||
| 416 | + } | ||
| 417 | + } | ||
| 406 | } | 418 | } |
| 419 | + this.getUserLevel() | ||
| 407 | }).catch((err:Error)=>{ | 420 | }).catch((err:Error)=>{ |
| 408 | console.log(TAG,JSON.stringify(err)) | 421 | console.log(TAG,JSON.stringify(err)) |
| 409 | }) | 422 | }) |
| @@ -411,7 +424,11 @@ struct MineHomePage { | @@ -411,7 +424,11 @@ struct MineHomePage { | ||
| 411 | getUserLevel(){ | 424 | getUserLevel(){ |
| 412 | MinePageDatasModel.getUserLevelData(getContext(this)).then((value)=>{ | 425 | MinePageDatasModel.getUserLevelData(getContext(this)).then((value)=>{ |
| 413 | if(value!=null){ | 426 | if(value!=null){ |
| 414 | - this.levelHead = value.levelHead | 427 | + if(StringUtils.isEmpty(this.levelHead)){ |
| 428 | + if(this.userType === "1"){ | ||
| 429 | + this.levelHead = value.levelHead | ||
| 430 | + } | ||
| 431 | + } | ||
| 415 | this.levelId = value.levelId | 432 | this.levelId = value.levelId |
| 416 | } | 433 | } |
| 417 | }).catch((err:Error)=>{ | 434 | }).catch((err:Error)=>{ |
| @@ -3,6 +3,7 @@ import { display, router } from '@kit.ArkUI'; | @@ -3,6 +3,7 @@ import { display, router } from '@kit.ArkUI'; | ||
| 3 | import { ImageItemView } from '../components/view/ImageItemView'; | 3 | import { ImageItemView } from '../components/view/ImageItemView'; |
| 4 | import { ImageDownloadComponent } from '../components/ImageDownloadComponent'; | 4 | import { ImageDownloadComponent } from '../components/ImageDownloadComponent'; |
| 5 | import { Action } from 'wdBean'; | 5 | import { Action } from 'wdBean'; |
| 6 | +import { WindowModel } from 'wdKit/Index'; | ||
| 6 | 7 | ||
| 7 | const TAG = 'MultiPictureListPage'; | 8 | const TAG = 'MultiPictureListPage'; |
| 8 | 9 | ||
| @@ -23,6 +24,7 @@ export struct MultiPictureListPage { | @@ -23,6 +24,7 @@ export struct MultiPictureListPage { | ||
| 23 | // @Provide bgc: Color = Color.White; | 24 | // @Provide bgc: Color = Color.White; |
| 24 | 25 | ||
| 25 | aboutToAppear(): void { | 26 | aboutToAppear(): void { |
| 27 | + this.openFullScreen() | ||
| 26 | //获取宽高尺寸 | 28 | //获取宽高尺寸 |
| 27 | this.screenWidth = this.displayTool.width | 29 | this.screenWidth = this.displayTool.width |
| 28 | // this.picWidth = this.screenWidth - vp2px(52) | 30 | // this.picWidth = this.screenWidth - vp2px(52) |
| @@ -130,10 +132,36 @@ export struct MultiPictureListPage { | @@ -130,10 +132,36 @@ export struct MultiPictureListPage { | ||
| 130 | } | 132 | } |
| 131 | .width('100%') | 133 | .width('100%') |
| 132 | .height('100%') | 134 | .height('100%') |
| 135 | + .padding({top:$r('app.float.margin_44')}) | ||
| 133 | .backgroundColor(Color.Black) | 136 | .backgroundColor(Color.Black) |
| 134 | .id('e_picture_container') | 137 | .id('e_picture_container') |
| 135 | // 设置顶部绘制延伸到状态栏 | 138 | // 设置顶部绘制延伸到状态栏 |
| 136 | // 设置底部绘制延伸到导航条 | 139 | // 设置底部绘制延伸到导航条 |
| 137 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | 140 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) |
| 138 | } | 141 | } |
| 142 | + | ||
| 143 | + /** | ||
| 144 | + * 开启沉浸式 | ||
| 145 | + * TODO:颜色待根据业务接口修改 | ||
| 146 | + */ | ||
| 147 | + openFullScreen() { | ||
| 148 | + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) | ||
| 149 | + WindowModel.shared.setWindowLayoutFullScreen(true) | ||
| 150 | + // WindowModel.shared.setWindowSystemBarEnable([]) | ||
| 151 | + } | ||
| 152 | + | ||
| 153 | + aboutToDisappear(): void { | ||
| 154 | + console.log(TAG, 'aboutToDisappear') | ||
| 155 | + this.closeFullScreen() | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + /** | ||
| 159 | + * 关闭沉浸式 | ||
| 160 | + * TODO:颜色待根据业务接口修改 | ||
| 161 | + */ | ||
| 162 | + closeFullScreen() { | ||
| 163 | + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) | ||
| 164 | + WindowModel.shared.setWindowLayoutFullScreen(false) | ||
| 165 | + // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) | ||
| 166 | + } | ||
| 139 | } | 167 | } |
| @@ -38,10 +38,10 @@ struct OtherNormalUserHomePage { | @@ -38,10 +38,10 @@ struct OtherNormalUserHomePage { | ||
| 38 | @State commentNum:number = 0//评论数 | 38 | @State commentNum:number = 0//评论数 |
| 39 | @State attentionNum:number = 0//关注数 | 39 | @State attentionNum:number = 0//关注数 |
| 40 | @State desc:string = "" | 40 | @State desc:string = "" |
| 41 | + userType:string = "1" | ||
| 41 | 42 | ||
| 42 | aboutToAppear(){ | 43 | aboutToAppear(){ |
| 43 | this.getUserInfo() | 44 | this.getUserInfo() |
| 44 | - this.getUserLevel() | ||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | 47 | ||
| @@ -348,7 +348,20 @@ struct OtherNormalUserHomePage { | @@ -348,7 +348,20 @@ struct OtherNormalUserHomePage { | ||
| 348 | this.browseNum = StringUtils.isEmpty(value.browseNum)?0:value.browseNum | 348 | this.browseNum = StringUtils.isEmpty(value.browseNum)?0:value.browseNum |
| 349 | this.commentNum = StringUtils.isEmpty(value.commentNum)?0:value.commentNum | 349 | this.commentNum = StringUtils.isEmpty(value.commentNum)?0:value.commentNum |
| 350 | this.attentionNum = StringUtils.isEmpty(value.attentionNum)?0:value.attentionNum | 350 | this.attentionNum = StringUtils.isEmpty(value.attentionNum)?0:value.attentionNum |
| 351 | + | ||
| 352 | + this.userType = value.userType | ||
| 353 | + | ||
| 354 | + if(this.userType === "1"){ | ||
| 355 | + if(StringUtils.isNotEmpty(value.honoraryIcon)){ | ||
| 356 | + this.levelHead = value.honoraryIcon | ||
| 357 | + return | ||
| 358 | + } | ||
| 359 | + if(StringUtils.isNotEmpty(value.avatarFrame)){ | ||
| 360 | + this.levelHead = value.avatarFrame | ||
| 361 | + } | ||
| 362 | + } | ||
| 351 | } | 363 | } |
| 364 | + this.getUserLevel() | ||
| 352 | }).catch((err:Error)=>{ | 365 | }).catch((err:Error)=>{ |
| 353 | console.log(TAG,JSON.stringify(err)) | 366 | console.log(TAG,JSON.stringify(err)) |
| 354 | }) | 367 | }) |
| @@ -359,7 +372,11 @@ struct OtherNormalUserHomePage { | @@ -359,7 +372,11 @@ struct OtherNormalUserHomePage { | ||
| 359 | } | 372 | } |
| 360 | MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{ | 373 | MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{ |
| 361 | if(value!=null){ | 374 | if(value!=null){ |
| 362 | - this.levelHead = value[0].levelHead | 375 | + if(StringUtils.isEmpty(this.levelHead)){ |
| 376 | + if(this.userType === "1"){ | ||
| 377 | + this.levelHead = value[0].levelHead | ||
| 378 | + } | ||
| 379 | + } | ||
| 363 | this.levelId = value[0].level | 380 | this.levelId = value[0].level |
| 364 | } | 381 | } |
| 365 | }).catch((err:Error)=>{ | 382 | }).catch((err:Error)=>{ |
| @@ -4,16 +4,18 @@ import { router } from '@kit.ArkUI'; | @@ -4,16 +4,18 @@ 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 = '' | ||
| 7 | @State params:Record<string, string> = router.getParams() as Record<string, string>; | 8 | @State params:Record<string, string> = router.getParams() as Record<string, string>; |
| 8 | 9 | ||
| 9 | onPageShow() { | 10 | onPageShow() { |
| 10 | this.headPhotoUrl = this.params?.['headPhotoUrl']; | 11 | this.headPhotoUrl = this.params?.['headPhotoUrl']; |
| 12 | + this.headType = this.params?.['headType'] ?? ''; | ||
| 11 | } | 13 | } |
| 12 | 14 | ||
| 13 | build() { | 15 | build() { |
| 14 | Row() { | 16 | Row() { |
| 15 | Image(this.headPhotoUrl) | 17 | Image(this.headPhotoUrl) |
| 16 | - .alt($r('app.media.default_head')) | 18 | + .alt(this.headType.length > 0 ? $r('app.media.WDAccountOwnerHedaerDefaultIcon') : $r('app.media.default_head')) |
| 17 | .width('720lpx') | 19 | .width('720lpx') |
| 18 | .height('720lpx') | 20 | .height('720lpx') |
| 19 | .objectFit(ImageFit.Auto) | 21 | .objectFit(ImageFit.Auto) |
| @@ -22,7 +22,7 @@ import { | @@ -22,7 +22,7 @@ import { | ||
| 22 | postExecuteLikeParams, | 22 | postExecuteLikeParams, |
| 23 | postInteractAccentionOperateParams, | 23 | postInteractAccentionOperateParams, |
| 24 | postRecommendListParams, | 24 | postRecommendListParams, |
| 25 | - postThemeListParams | 25 | + GoldenPositionExtraBean |
| 26 | } from 'wdBean'; | 26 | } from 'wdBean'; |
| 27 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; | 27 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; |
| 28 | 28 | ||
| @@ -437,7 +437,7 @@ export class PageRepository { | @@ -437,7 +437,7 @@ export class PageRepository { | ||
| 437 | * @param params | 437 | * @param params |
| 438 | * @returns | 438 | * @returns |
| 439 | * */ | 439 | * */ |
| 440 | - static postThemeList(params: postThemeListParams) { | 440 | + static postThemeList(params: GoldenPositionExtraBean) { |
| 441 | let url = HttpUrlUtils.getThemeListUrl() | 441 | let url = HttpUrlUtils.getThemeListUrl() |
| 442 | Logger.info(TAG, "postThemeList url = " + url + JSON.stringify(params)) | 442 | Logger.info(TAG, "postThemeList url = " + url + JSON.stringify(params)) |
| 443 | return WDHttp.post<ResponseDTO<LiveReviewDTO>>(url, params) | 443 | return WDHttp.post<ResponseDTO<LiveReviewDTO>>(url, params) |
| @@ -3,6 +3,7 @@ import { touchMoveLoadMore, touchUpLoadMore } from './PullUpLoadMore'; | @@ -3,6 +3,7 @@ import { touchMoveLoadMore, touchUpLoadMore } from './PullUpLoadMore'; | ||
| 3 | import PageModel from '../viewmodel/PageModel'; | 3 | import PageModel from '../viewmodel/PageModel'; |
| 4 | import PageHelper from '../viewmodel/PageHelper'; | 4 | import PageHelper from '../viewmodel/PageHelper'; |
| 5 | import PageAdModel from '../viewmodel/PageAdvModel'; | 5 | import PageAdModel from '../viewmodel/PageAdvModel'; |
| 6 | +import { LoadStatus } from '../components/refresh/RefreshLayoutBean'; | ||
| 6 | 7 | ||
| 7 | export function listTouchEvent(pageModel: PageModel, pageAdvModel: PageAdModel, event: TouchEvent) { | 8 | export function listTouchEvent(pageModel: PageModel, pageAdvModel: PageAdModel, event: TouchEvent) { |
| 8 | switch (event.type) { | 9 | switch (event.type) { |
| @@ -46,7 +47,7 @@ export function listTouchEvent(pageModel: PageModel, pageAdvModel: PageAdModel, | @@ -46,7 +47,7 @@ export function listTouchEvent(pageModel: PageModel, pageAdvModel: PageAdModel, | ||
| 46 | export function touchMovePullRefresh(pageModel: PageModel, event: TouchEvent) { | 47 | export function touchMovePullRefresh(pageModel: PageModel, event: TouchEvent) { |
| 47 | if (pageModel.startIndex === 0) { | 48 | if (pageModel.startIndex === 0) { |
| 48 | pageModel.isPullRefreshOperation = true; | 49 | pageModel.isPullRefreshOperation = true; |
| 49 | - let height = vp2px(pageModel.pullDownRefreshHeight); | 50 | + let height = vp2px(Const.CUSTOM_REFRESH_DECIDE_HEIGHT); |
| 50 | pageModel.offsetY = event.touches[0].y - pageModel.downY; | 51 | pageModel.offsetY = event.touches[0].y - pageModel.downY; |
| 51 | // The sliding offset is greater than the pull-down refresh layout height, and the refresh condition is met. | 52 | // The sliding offset is greater than the pull-down refresh layout height, and the refresh condition is met. |
| 52 | if (pageModel.offsetY >= height) { | 53 | if (pageModel.offsetY >= height) { |
| @@ -98,12 +99,14 @@ export function pullRefreshState(pageModel: PageModel, state: number) { | @@ -98,12 +99,14 @@ export function pullRefreshState(pageModel: PageModel, state: number) { | ||
| 98 | pageModel.isCanRefresh = false; | 99 | pageModel.isCanRefresh = false; |
| 99 | pageModel.isRefreshing = false; | 100 | pageModel.isRefreshing = false; |
| 100 | pageModel.isVisiblePullDown = true; | 101 | pageModel.isVisiblePullDown = true; |
| 102 | + pageModel.load = LoadStatus.PRELOAD | ||
| 101 | break; | 103 | break; |
| 102 | case RefreshState.Release: | 104 | case RefreshState.Release: |
| 103 | pageModel.pullDownRefreshText = $r('app.string.release_refresh_text'); | 105 | pageModel.pullDownRefreshText = $r('app.string.release_refresh_text'); |
| 104 | pageModel.pullDownRefreshImage = $r('app.media.ic_pull_up_refresh'); | 106 | pageModel.pullDownRefreshImage = $r('app.media.ic_pull_up_refresh'); |
| 105 | pageModel.isCanRefresh = true; | 107 | pageModel.isCanRefresh = true; |
| 106 | pageModel.isRefreshing = false; | 108 | pageModel.isRefreshing = false; |
| 109 | + pageModel.load = LoadStatus.PRELOAD | ||
| 107 | break; | 110 | break; |
| 108 | case RefreshState.Refreshing: | 111 | case RefreshState.Refreshing: |
| 109 | pageModel.offsetY = vp2px(pageModel.pullDownRefreshHeight); | 112 | pageModel.offsetY = vp2px(pageModel.pullDownRefreshHeight); |
| @@ -111,18 +114,21 @@ export function pullRefreshState(pageModel: PageModel, state: number) { | @@ -111,18 +114,21 @@ export function pullRefreshState(pageModel: PageModel, state: number) { | ||
| 111 | pageModel.pullDownRefreshImage = $r('app.media.ic_pull_up_load'); | 114 | pageModel.pullDownRefreshImage = $r('app.media.ic_pull_up_load'); |
| 112 | pageModel.isCanRefresh = true; | 115 | pageModel.isCanRefresh = true; |
| 113 | pageModel.isRefreshing = true; | 116 | pageModel.isRefreshing = true; |
| 117 | + pageModel.load = LoadStatus.LOADING | ||
| 114 | break; | 118 | break; |
| 115 | case RefreshState.Success: | 119 | case RefreshState.Success: |
| 116 | pageModel.pullDownRefreshText = $r('app.string.refresh_success_text'); | 120 | pageModel.pullDownRefreshText = $r('app.string.refresh_success_text'); |
| 117 | pageModel.pullDownRefreshImage = $r('app.media.ic_succeed_refresh'); | 121 | pageModel.pullDownRefreshImage = $r('app.media.ic_succeed_refresh'); |
| 118 | pageModel.isCanRefresh = true; | 122 | pageModel.isCanRefresh = true; |
| 119 | pageModel.isRefreshing = true; | 123 | pageModel.isRefreshing = true; |
| 124 | + pageModel.load = LoadStatus.LOADED | ||
| 120 | break; | 125 | break; |
| 121 | case RefreshState.Fail: | 126 | case RefreshState.Fail: |
| 122 | pageModel.pullDownRefreshText = $r('app.string.refresh_fail_text'); | 127 | pageModel.pullDownRefreshText = $r('app.string.refresh_fail_text'); |
| 123 | pageModel.pullDownRefreshImage = $r('app.media.ic_fail_refresh'); | 128 | pageModel.pullDownRefreshImage = $r('app.media.ic_fail_refresh'); |
| 124 | pageModel.isCanRefresh = true; | 129 | pageModel.isCanRefresh = true; |
| 125 | pageModel.isRefreshing = true; | 130 | pageModel.isRefreshing = true; |
| 131 | + pageModel.load = LoadStatus.LOADED | ||
| 126 | break; | 132 | break; |
| 127 | default: | 133 | default: |
| 128 | break; | 134 | break; |
| @@ -34,7 +34,11 @@ export class RefreshConstants { | @@ -34,7 +34,11 @@ export class RefreshConstants { | ||
| 34 | /** | 34 | /** |
| 35 | * The refresh and load height. | 35 | * The refresh and load height. |
| 36 | */ | 36 | */ |
| 37 | - static readonly CUSTOM_LAYOUT_HEIGHT: number = 90; | 37 | + static readonly CUSTOM_LAYOUT_HEIGHT: number = 80; |
| 38 | + /** | ||
| 39 | + * 下拉刷新,判定距离 | ||
| 40 | + */ | ||
| 41 | + static readonly CUSTOM_REFRESH_DECIDE_HEIGHT: number = 20; | ||
| 38 | /** | 42 | /** |
| 39 | * Full the width. | 43 | * Full the width. |
| 40 | */ | 44 | */ |
| @@ -9,4 +9,10 @@ export class MineUserDetailItem{ | @@ -9,4 +9,10 @@ export class MineUserDetailItem{ | ||
| 9 | commentNum:number = 0//评论数 | 9 | commentNum:number = 0//评论数 |
| 10 | attentionNum:number = 0//关注数 | 10 | attentionNum:number = 0//关注数 |
| 11 | registTime:number = 0//账号注册时间 | 11 | registTime:number = 0//账号注册时间 |
| 12 | + | ||
| 13 | + honoraryIcon = ""//荣誉称号 (优先) | ||
| 14 | + avatarFrame:string = ""//最佳评论员头像框地址 | ||
| 15 | + | ||
| 16 | + | ||
| 17 | + | ||
| 12 | } | 18 | } |
| 1 | import { CompDTO, ContentDTO, PageDTO, PageInfoDTO } from 'wdBean'; | 1 | import { CompDTO, ContentDTO, PageDTO, PageInfoDTO } from 'wdBean'; |
| 2 | import { CompStyle, ViewType } from 'wdConstant/Index'; | 2 | import { CompStyle, ViewType } from 'wdConstant/Index'; |
| 3 | -import { CollectionUtils, DateTimeUtils, Logger, NetworkUtil } from 'wdKit'; | 3 | +import { CollectionUtils, DateTimeUtils, Logger, NetworkUtil, StringUtils } from 'wdKit'; |
| 4 | import { closeRefresh } from '../utils/PullDownRefresh'; | 4 | import { closeRefresh } from '../utils/PullDownRefresh'; |
| 5 | import PageModel from './PageModel'; | 5 | import PageModel from './PageModel'; |
| 6 | import PageViewModel from './PageViewModel'; | 6 | import PageViewModel from './PageViewModel'; |
| @@ -9,6 +9,7 @@ import { CompAdvBean } from 'wdBean/src/main/ets/bean/adv/AdvsRuleBean'; | @@ -9,6 +9,7 @@ import { CompAdvBean } from 'wdBean/src/main/ets/bean/adv/AdvsRuleBean'; | ||
| 9 | import PageAdModel from './PageAdvModel'; | 9 | import PageAdModel from './PageAdvModel'; |
| 10 | import { ArrayList } from '@kit.ArkTS'; | 10 | import { ArrayList } from '@kit.ArkTS'; |
| 11 | import { WDViewDefaultType } from '../components/view/EmptyComponent'; | 11 | import { WDViewDefaultType } from '../components/view/EmptyComponent'; |
| 12 | +import { CompAdvMatInfoBean } from 'wdBean/src/main/ets/bean/adv/CompAdvInfoBean'; | ||
| 12 | 13 | ||
| 13 | const TAG = 'PageHelper'; | 14 | const TAG = 'PageHelper'; |
| 14 | 15 | ||
| @@ -21,6 +22,7 @@ export class PageHelper { | @@ -21,6 +22,7 @@ export class PageHelper { | ||
| 21 | */ | 22 | */ |
| 22 | async refreshUI(pageModel: PageModel, pageAdvModel: PageAdModel) { | 23 | async refreshUI(pageModel: PageModel, pageAdvModel: PageAdModel) { |
| 23 | pageModel.loadStrategy = 2 | 24 | pageModel.loadStrategy = 2 |
| 25 | + pageModel.pageTotalCompSize = 0; | ||
| 24 | this.getPageInfo(pageModel, pageAdvModel) | 26 | this.getPageInfo(pageModel, pageAdvModel) |
| 25 | } | 27 | } |
| 26 | 28 | ||
| @@ -52,7 +54,7 @@ export class PageHelper { | @@ -52,7 +54,7 @@ export class PageHelper { | ||
| 52 | PageViewModel.getPageInfo(pageModel.pageId).then(pageInfo => { | 54 | PageViewModel.getPageInfo(pageModel.pageId).then(pageInfo => { |
| 53 | if (pageInfo == null) { | 55 | if (pageInfo == null) { |
| 54 | pageModel.viewType = ViewType.EMPTY; | 56 | pageModel.viewType = ViewType.EMPTY; |
| 55 | - pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoListContent; | 57 | + pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoContent1; |
| 56 | return; | 58 | return; |
| 57 | } | 59 | } |
| 58 | pageModel.pageInfo = pageInfo; | 60 | pageModel.pageInfo = pageInfo; |
| @@ -94,7 +96,7 @@ export class PageHelper { | @@ -94,7 +96,7 @@ export class PageHelper { | ||
| 94 | // 没数据,展示空页面 | 96 | // 没数据,展示空页面 |
| 95 | Logger.debug(TAG, 'aboutToAppear, data response page ' + pageModel.pageId + ', comp list is empty.'); | 97 | Logger.debug(TAG, 'aboutToAppear, data response page ' + pageModel.pageId + ', comp list is empty.'); |
| 96 | pageModel.viewType = ViewType.EMPTY; | 98 | pageModel.viewType = ViewType.EMPTY; |
| 97 | - pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoListContent; | 99 | + pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoContent1; |
| 98 | 100 | ||
| 99 | } | 101 | } |
| 100 | } | 102 | } |
| @@ -114,7 +116,6 @@ export class PageHelper { | @@ -114,7 +116,6 @@ export class PageHelper { | ||
| 114 | //移除音频 和 活动 | 116 | //移除音频 和 活动 |
| 115 | this.collectPageComp(pageModel, pageDto) | 117 | this.collectPageComp(pageModel, pageDto) |
| 116 | 118 | ||
| 117 | - | ||
| 118 | // pageModel.compList.push(...pageDto.compList) | 119 | // pageModel.compList.push(...pageDto.compList) |
| 119 | 120 | ||
| 120 | // TODO 暂时去掉互动数据,待优化。(主要是互动数据返回,如何渲染到ui上) | 121 | // TODO 暂时去掉互动数据,待优化。(主要是互动数据返回,如何渲染到ui上) |
| @@ -147,7 +148,7 @@ export class PageHelper { | @@ -147,7 +148,7 @@ export class PageHelper { | ||
| 147 | * 处理页面中的广告组件信息 | 148 | * 处理页面中的广告组件信息 |
| 148 | * @param pageDto | 149 | * @param pageDto |
| 149 | */ | 150 | */ |
| 150 | - private handlePageCompAdvPostion(pageCompList: ArrayList<CompDTO>, pageDto: PageDTO) { | 151 | + private handlePageCompAdvPostion(pageCompList: ArrayList<CompDTO>, pageModel: PageModel, pageDto: PageDTO) { |
| 151 | 152 | ||
| 152 | let compAdvList = pageDto.compAdList | 153 | let compAdvList = pageDto.compAdList |
| 153 | 154 | ||
| @@ -160,16 +161,17 @@ export class PageHelper { | @@ -160,16 +161,17 @@ export class PageHelper { | ||
| 160 | } | 161 | } |
| 161 | 162 | ||
| 162 | let pageCompSize = pageCompList.length // 信息流组件业务数量 | 163 | let pageCompSize = pageCompList.length // 信息流组件业务数量 |
| 163 | - console.error("ZZZXXXXX", " start--->" + pageCompSize); | ||
| 164 | - | 164 | + // console.error("ZZZXXXXX", " start--->" + pageCompSize); |
| 165 | if (pageCompSize == 0) { | 165 | if (pageCompSize == 0) { |
| 166 | flag = false | 166 | flag = false |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | if (flag) { | 169 | if (flag) { |
| 170 | + let bannerAdvIndex = 0; // banner组件展示数据投放 | ||
| 171 | + let layoutAdvIndex = 0; //稿件投放统计 | ||
| 170 | // 升序排序 | 172 | // 升序排序 |
| 171 | compAdvList.sort((a: CompAdvBean, b: CompAdvBean) => a.slotInfo.position - b.slotInfo.position) | 173 | compAdvList.sort((a: CompAdvBean, b: CompAdvBean) => a.slotInfo.position - b.slotInfo.position) |
| 172 | - console.error("ZZZXXXXX", " 排序后的广告--->" + JSON.stringify(compAdvList)); | 174 | + // console.error("ZZZXXXXX", " 排序后的广告--->" + JSON.stringify(compAdvList)); |
| 173 | //当前日期 | 175 | //当前日期 |
| 174 | let serverTimeLong: number = DateTimeUtils.getTimeStamp(); | 176 | let serverTimeLong: number = DateTimeUtils.getTimeStamp(); |
| 175 | for (let advBean of compAdvList) { | 177 | for (let advBean of compAdvList) { |
| @@ -192,22 +194,97 @@ export class PageHelper { | @@ -192,22 +194,97 @@ export class PageHelper { | ||
| 192 | // 插入轮播组件的广告 | 194 | // 插入轮播组件的广告 |
| 193 | if (4 == advSubType) { | 195 | if (4 == advSubType) { |
| 194 | 196 | ||
| 197 | + let position = slotInfo.position - 1; | ||
| 198 | + // 检测newCompList 集合中是否有轮播组件资源 | ||
| 199 | + let adCompId = slotInfo.compId; | ||
| 200 | + if (!StringUtils.isEmpty(adCompId)) { | ||
| 201 | + for (let compBean of pageCompList) { | ||
| 202 | + if (StringUtils.isEmpty(compBean.id)) { | ||
| 203 | + continue | ||
| 204 | + } | ||
| 205 | + let compId = compBean.id.toString(); | ||
| 206 | + //匹配组件 | ||
| 207 | + if (adCompId == compId) { | ||
| 208 | + // 运营位数据 | ||
| 209 | + let dataList = compBean.operDataList; | ||
| 210 | + if (dataList != null) { | ||
| 211 | + | ||
| 212 | + // 数组转成 ArrayList | ||
| 213 | + let changeArrayList = (dataList: ContentDTO[]) => { | ||
| 214 | + let compOperData: ArrayList<ContentDTO> = new ArrayList() | ||
| 215 | + for (let dataListBean of dataList) { | ||
| 216 | + compOperData.add(dataListBean) | ||
| 217 | + } | ||
| 218 | + return compOperData | ||
| 219 | + } | ||
| 220 | + | ||
| 221 | + let compOperData = changeArrayList(dataList) | ||
| 222 | + | ||
| 223 | + // 轮播组件广告数据转 业务信息 | ||
| 224 | + let changeContentDTO = (matInfo: CompAdvMatInfoBean) => { | ||
| 225 | + let advContentBean: ContentDTO = {} as ContentDTO; | ||
| 226 | + advContentBean.newsTitle = matInfo.advTitle | ||
| 227 | + advContentBean.objectType = matInfo.advType == "0" ? matInfo.advType.toString() : "4" | ||
| 228 | + advContentBean.coverUrl = matInfo.matImageUrl[0] | ||
| 229 | + advContentBean.linkUrl = matInfo.linkUrl | ||
| 230 | + advContentBean.openType = matInfo.linkType | ||
| 231 | + advContentBean.corner = '' | ||
| 232 | + return advContentBean | ||
| 233 | + } | ||
| 234 | + let advContentBean = changeContentDTO(matInfo) | ||
| 235 | + | ||
| 236 | + let dataListSize = dataList.length; | ||
| 237 | + if (position < dataListSize) { | ||
| 238 | + //dataList.add(position + bannerAdvIndex, advContentBean); | ||
| 239 | + compOperData.insert(advContentBean, position + bannerAdvIndex) | ||
| 240 | + } else { | ||
| 241 | + compOperData.add(advContentBean); | ||
| 242 | + } | ||
| 243 | + bannerAdvIndex = bannerAdvIndex + 1; | ||
| 244 | + | ||
| 245 | + // ArrayList转成 数组 | ||
| 246 | + compBean.operDataList = compOperData.convertToArray() | ||
| 247 | + } | ||
| 248 | + } | ||
| 249 | + } | ||
| 250 | + } | ||
| 251 | + | ||
| 195 | } else { | 252 | } else { |
| 253 | + | ||
| 254 | + | ||
| 196 | let advPosition = slotInfo.position //广告位置,从1开始 | 255 | let advPosition = slotInfo.position //广告位置,从1开始 |
| 256 | + // 页面的comp总数 - 这次请求的comp总数 = 剩余comp总数 | ||
| 197 | advPosition = advPosition - 1 | 257 | advPosition = advPosition - 1 |
| 198 | - let advComp: CompDTO = { | ||
| 199 | - compStyle: CompStyle.Card_Comp_Adv, | ||
| 200 | - matInfo: matInfo | ||
| 201 | - } as CompDTO; | ||
| 202 | - pageCompList.insert(advComp, 0) | 258 | + |
| 259 | + let a = pageModel.pageTotalCompSize - pageCompSize | ||
| 260 | + if (advPosition <= pageModel.pageTotalCompSize && advPosition >= a) { | ||
| 261 | + | ||
| 262 | + let b = advPosition - a; | ||
| 263 | + // console.error('ZZZXXXXX', matInfo.advSubType + '-------------' + matInfo.advTitle + " " + advPosition + " " + a + " " + b) | ||
| 264 | + if (b <= pageCompSize && b >= 0) { | ||
| 265 | + | ||
| 266 | + let advComp: CompDTO = { | ||
| 267 | + compStyle: CompStyle.Card_Comp_Adv, | ||
| 268 | + matInfo: matInfo | ||
| 269 | + } as CompDTO; | ||
| 270 | + | ||
| 271 | + if (pageCompSize == slotInfo.position) { | ||
| 272 | + pageCompList.add(advComp) | ||
| 273 | + } else { | ||
| 274 | + pageCompList.insert(advComp, b + layoutAdvIndex) | ||
| 275 | + } | ||
| 276 | + | ||
| 277 | + layoutAdvIndex = layoutAdvIndex + 1; | ||
| 278 | + | ||
| 279 | + } | ||
| 280 | + } | ||
| 203 | } | 281 | } |
| 204 | } | 282 | } |
| 205 | } | 283 | } |
| 206 | - | ||
| 207 | } | 284 | } |
| 208 | 285 | ||
| 209 | } | 286 | } |
| 210 | - console.error("ZZZXXXXX", " end--->" + pageCompList.length); | 287 | + // console.error("ZZZXXXXX", " end--->" + pageCompList.length); |
| 211 | } | 288 | } |
| 212 | 289 | ||
| 213 | 290 | ||
| @@ -228,19 +305,21 @@ export class PageHelper { | @@ -228,19 +305,21 @@ export class PageHelper { | ||
| 228 | 305 | ||
| 229 | //移除音频 和 活动 | 306 | //移除音频 和 活动 |
| 230 | this.collectPageComp(pageModel, data) | 307 | this.collectPageComp(pageModel, data) |
| 231 | - // | 308 | + |
| 232 | // pageModel.compList.push(...data.compList) | 309 | // pageModel.compList.push(...data.compList) |
| 233 | - PageViewModel.getInteractData(data.compList).then((data: CompDTO[]) => { | ||
| 234 | - // 刷新,替换所有数据 | ||
| 235 | - pageModel.compList.updateItems(sizeBefore, data) | ||
| 236 | - pageModel.timestamp = DateTimeUtils.getTimeStamp().toString() | ||
| 237 | - }) | 310 | + // TODO 暂时屏蔽,此处代码会造成 广告逻辑错乱,只有第一页有广告数据,随着加载更多,第二页也会出现广告数据 |
| 311 | + // PageViewModel.getInteractData(data.compList).then((data: CompDTO[]) => { | ||
| 312 | + // // 刷新,替换所有数据 | ||
| 313 | + // pageModel.compList.updateItems(sizeBefore, data) | ||
| 314 | + // pageModel.timestamp = DateTimeUtils.getTimeStamp().toString() | ||
| 315 | + // }) | ||
| 238 | } | 316 | } |
| 239 | }).catch((err: string | Resource) => { | 317 | }).catch((err: string | Resource) => { |
| 240 | promptAction.showToast({ message: err }); | 318 | promptAction.showToast({ message: err }); |
| 241 | }) | 319 | }) |
| 242 | } | 320 | } |
| 243 | 321 | ||
| 322 | + | ||
| 244 | /** | 323 | /** |
| 245 | * 移除comp | 324 | * 移除comp |
| 246 | */ | 325 | */ |
| @@ -256,11 +335,22 @@ export class PageHelper { | @@ -256,11 +335,22 @@ export class PageHelper { | ||
| 256 | if (contentInfo && (contentInfo.objectType === '13' || contentInfo.objectType === '3')) { | 335 | if (contentInfo && (contentInfo.objectType === '13' || contentInfo.objectType === '3')) { |
| 257 | Logger.debug(TAG, 'getGroupData 移除音频 和 活动'); | 336 | Logger.debug(TAG, 'getGroupData 移除音频 和 活动'); |
| 258 | } else { | 337 | } else { |
| 259 | - pageCompList.add(element) | 338 | + // 暂时屏蔽活动和音频详情入口 |
| 339 | + if (element.operDataList[0]?.objectType === '3' || element.operDataList[0]?.objectType === '13') { | ||
| 340 | + } else { | ||
| 341 | + pageCompList.add(element) | ||
| 342 | + } | ||
| 343 | + | ||
| 260 | } | 344 | } |
| 261 | } | 345 | } |
| 346 | + | ||
| 347 | + // 记录 | ||
| 348 | + pageModel.pageTotalCompSize = pageCompList.length + pageModel.pageTotalCompSize | ||
| 349 | + // console.error("ZZZXXXXX", " collectPageComp--->" + pageModel.pageTotalCompSize); | ||
| 350 | + | ||
| 262 | // 处理页面广告数据,投放到页面的位置 | 351 | // 处理页面广告数据,投放到页面的位置 |
| 263 | - //this.handlePageCompAdvPostion(pageCompList, pageDto); | 352 | + this.handlePageCompAdvPostion(pageCompList, pageModel, pageDto); |
| 353 | + | ||
| 264 | 354 | ||
| 265 | //遍历所有组件和稿件数据 push到页面 | 355 | //遍历所有组件和稿件数据 push到页面 |
| 266 | for (let element of pageCompList) { | 356 | for (let element of pageCompList) { |
| @@ -6,6 +6,7 @@ import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; | @@ -6,6 +6,7 @@ import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; | ||
| 6 | import { GroupInfoDTO, PageInfoDTO } from 'wdBean/src/main/ets/bean/navigation/PageInfoDTO'; | 6 | import { GroupInfoDTO, PageInfoDTO } from 'wdBean/src/main/ets/bean/navigation/PageInfoDTO'; |
| 7 | import { AdvRuleBean, CompAdvBean } from 'wdBean/src/main/ets/bean/adv/AdvsRuleBean'; | 7 | import { AdvRuleBean, CompAdvBean } from 'wdBean/src/main/ets/bean/adv/AdvsRuleBean'; |
| 8 | import { WDViewDefaultType } from '../components/view/EmptyComponent'; | 8 | import { WDViewDefaultType } from '../components/view/EmptyComponent'; |
| 9 | +import { LoadStatus } from '../components/refresh/RefreshLayoutBean'; | ||
| 9 | 10 | ||
| 10 | /** | 11 | /** |
| 11 | * 页面下拉刷新、上拉加载数据bean。 | 12 | * 页面下拉刷新、上拉加载数据bean。 |
| @@ -33,6 +34,7 @@ export default class PageModel { | @@ -33,6 +34,7 @@ export default class PageModel { | ||
| 33 | pullDownRefreshImage: Resource = $r('app.media.ic_pull_down_refresh'); | 34 | pullDownRefreshImage: Resource = $r('app.media.ic_pull_down_refresh'); |
| 34 | pullDownRefreshHeight: number = Const.CUSTOM_LAYOUT_HEIGHT; | 35 | pullDownRefreshHeight: number = Const.CUSTOM_LAYOUT_HEIGHT; |
| 35 | isVisiblePullDown: boolean = false; | 36 | isVisiblePullDown: boolean = false; |
| 37 | + load: LoadStatus = LoadStatus.IDLE; | ||
| 36 | pullUpLoadText: Resource = $r('app.string.pull_up_load_text'); | 38 | pullUpLoadText: Resource = $r('app.string.pull_up_load_text'); |
| 37 | pullUpLoadImage: Resource = $r('app.media.ic_pull_up_load'); | 39 | pullUpLoadImage: Resource = $r('app.media.ic_pull_up_load'); |
| 38 | pullUpLoadHeight: number = Const.CUSTOM_LAYOUT_HEIGHT; | 40 | pullUpLoadHeight: number = Const.CUSTOM_LAYOUT_HEIGHT; |
| @@ -54,6 +56,9 @@ export default class PageModel { | @@ -54,6 +56,9 @@ export default class PageModel { | ||
| 54 | timestamp: String = '1'; | 56 | timestamp: String = '1'; |
| 55 | 57 | ||
| 56 | 58 | ||
| 59 | + // 记录已经展示的稿件和组件数量 | ||
| 60 | + pageTotalCompSize: number = 0; | ||
| 61 | + | ||
| 57 | /** | 62 | /** |
| 58 | * 简单复制业务数据 | 63 | * 简单复制业务数据 |
| 59 | */ | 64 | */ |
| @@ -8,7 +8,8 @@ import { | @@ -8,7 +8,8 @@ import { | ||
| 8 | NavigationBodyDTO, | 8 | NavigationBodyDTO, |
| 9 | PageDTO, | 9 | PageDTO, |
| 10 | PageInfoBean, | 10 | PageInfoBean, |
| 11 | - PageInfoDTO | 11 | + PageInfoDTO, |
| 12 | + GoldenPositionExtraBean | ||
| 12 | } from 'wdBean'; | 13 | } from 'wdBean'; |
| 13 | 14 | ||
| 14 | import { CollectionUtils, Logger, ResourcesUtils, StringUtils } from 'wdKit'; | 15 | import { CollectionUtils, Logger, ResourcesUtils, StringUtils } from 'wdKit'; |
| @@ -379,10 +380,13 @@ export class PageViewModel extends BaseViewModel { | @@ -379,10 +380,13 @@ export class PageViewModel extends BaseViewModel { | ||
| 379 | }) | 380 | }) |
| 380 | } | 381 | } |
| 381 | 382 | ||
| 382 | - async postThemeList(sort: number, pageNum: number, pageSize: number) : Promise<LiveReviewDTO> { | 383 | + async postThemeList(sort: number, pageNum: number, pageSize: number,extra: string) : Promise<LiveReviewDTO> { |
| 384 | + let bean: GoldenPositionExtraBean = JSON.parse(extra) | ||
| 385 | + bean.pageNum = pageNum | ||
| 386 | + bean.pageSize = pageSize | ||
| 383 | return new Promise<LiveReviewDTO>((success, error) => { | 387 | return new Promise<LiveReviewDTO>((success, error) => { |
| 384 | Logger.info(TAG, `postThemeList pageInfo start`); | 388 | Logger.info(TAG, `postThemeList pageInfo start`); |
| 385 | - PageRepository.postThemeList({ sort, pageNum, pageSize }).then((resDTO) => { | 389 | + PageRepository.postThemeList(bean).then((resDTO) => { |
| 386 | if (!resDTO || !resDTO.data) { | 390 | if (!resDTO || !resDTO.data) { |
| 387 | Logger.error(TAG, 'postThemeList then navResDTO is empty'); | 391 | Logger.error(TAG, 'postThemeList then navResDTO is empty'); |
| 388 | error('resDTO is empty'); | 392 | error('resDTO is empty'); |
sight_harmony/features/wdComponent/src/main/resources/base/media/comp_adv_close_white.png
0 → 100644
476 Bytes
sight_harmony/features/wdComponent/src/main/resources/base/media/ic_collect_left_left.png
0 → 100644
845 Bytes
sight_harmony/features/wdComponent/src/main/resources/base/media/ic_collect_left_right.png
0 → 100644
2.06 KB
625 Bytes
1.99 KB
sight_harmony/features/wdComponent/src/main/resources/base/media/ic_collect_mid_right.png
0 → 100644
2.06 KB
sight_harmony/features/wdComponent/src/main/resources/base/media/ic_collect_right_left.png
0 → 100644
1.99 KB
sight_harmony/features/wdComponent/src/main/resources/base/media/ic_collect_right_right.png
0 → 100644
901 Bytes
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_comp_more_right_red.png
0 → 100644
352 Bytes
sight_harmony/features/wdComponent/src/main/resources/base/media/item_collect_tag_middle.webp
0 → 100644
No preview for this file type
221 Bytes
| 1 | +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="9" height="6" viewBox="0 0 9 6"><g><g><path d="M2.63066,0.5L7.79156,0.5C8.13703,0.5,8.3784,0.8420000000000001,8.26266,1.167505L6.84044,5.1675C6.76957,5.36684,6.5809,5.5,6.36934,5.5L1.208442,5.5C0.862974,5.5,0.6216,5.158,0.737335,4.8325L2.15956,0.832495C2.23043,0.633155,2.4191000000000003,0.5,2.63066,0.5" fill-rule="evenodd" fill="#ED2800" fill-opacity="1"/></g></g></svg> |
No preview for this file type
sight_harmony/features/wdComponent/src/main/resources/rawfile/font/BebasNeue_Regular.otf
deleted
100644 → 0
| 1 | import font from '@ohos.font' | 1 | import font from '@ohos.font' |
| 2 | import { LiveDetailsBean } from 'wdBean/Index' | 2 | import { LiveDetailsBean } from 'wdBean/Index' |
| 3 | -import { DateTimeUtils, StringUtils } from 'wdKit/Index' | 3 | +import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index' |
| 4 | import { LiveViewModel } from '../../viewModel/LiveViewModel' | 4 | import { LiveViewModel } from '../../viewModel/LiveViewModel' |
| 5 | import { HttpUtils } from 'wdNetwork/Index' | 5 | import { HttpUtils } from 'wdNetwork/Index' |
| 6 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | 6 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' |
| @@ -167,6 +167,11 @@ export struct LiveCountdownComponent { | @@ -167,6 +167,11 @@ export struct LiveCountdownComponent { | ||
| 167 | (data) => { | 167 | (data) => { |
| 168 | if (data.success) { | 168 | if (data.success) { |
| 169 | this.isAppointmentLive = !this.isAppointmentLive | 169 | this.isAppointmentLive = !this.isAppointmentLive |
| 170 | + if (this.isAppointmentLive) { | ||
| 171 | + ToastUtils.showToast('预约成功', 1000) | ||
| 172 | + } else { | ||
| 173 | + ToastUtils.showToast('取消预约成功', 1000) | ||
| 174 | + } | ||
| 170 | } | 175 | } |
| 171 | }, | 176 | }, |
| 172 | () => { | 177 | () => { |
| @@ -34,7 +34,7 @@ export struct TabComponent { | @@ -34,7 +34,7 @@ export struct TabComponent { | ||
| 34 | .layoutWeight(1) | 34 | .layoutWeight(1) |
| 35 | .vertical(false) | 35 | .vertical(false) |
| 36 | .barMode(BarMode.Fixed) | 36 | .barMode(BarMode.Fixed) |
| 37 | - .barWidth(200) | 37 | + .barWidth(70 * this.tabs.length) |
| 38 | .barHeight(48) | 38 | .barHeight(48) |
| 39 | .animationDuration(100) | 39 | .animationDuration(100) |
| 40 | .onChange((index: number) => { | 40 | .onChange((index: number) => { |
| 1 | import { LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' | 1 | import { LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' |
| 2 | -import { EmptyComponent, ErrorComponent, ListHasNoMoreDataUI, | ||
| 3 | - WDViewDefaultType } from 'wdComponent/Index' | 2 | +import { EmptyComponent, ErrorComponent, ListHasNoMoreDataUI, WDViewDefaultType } from 'wdComponent/Index' |
| 4 | import { TabLiveItemComponent } from './TabLiveItemComponent' | 3 | import { TabLiveItemComponent } from './TabLiveItemComponent' |
| 5 | import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' | 4 | import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' |
| 6 | import { RefreshLayoutBean } from 'wdComponent/src/main/ets/components/page/RefreshLayoutBean' | 5 | import { RefreshLayoutBean } from 'wdComponent/src/main/ets/components/page/RefreshLayoutBean' |
| @@ -59,10 +58,10 @@ export struct TabLiveComponent { | @@ -59,10 +58,10 @@ export struct TabLiveComponent { | ||
| 59 | // 加载更多 | 58 | // 加载更多 |
| 60 | ListItem() { | 59 | ListItem() { |
| 61 | if (this.pageModel.hasMore) { | 60 | if (this.pageModel.hasMore) { |
| 62 | - LoadMoreLayout({ | ||
| 63 | - refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullUpLoad, this.pageModel.pullUpLoadImage, | ||
| 64 | - this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight) | ||
| 65 | - }) | 61 | + // LoadMoreLayout({ |
| 62 | + // refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullUpLoad, this.pageModel.pullUpLoadImage, | ||
| 63 | + // this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight) | ||
| 64 | + // }) | ||
| 66 | } else { | 65 | } else { |
| 67 | ListHasNoMoreDataUI() | 66 | ListHasNoMoreDataUI() |
| 68 | } | 67 | } |
| @@ -90,7 +89,7 @@ export struct TabLiveComponent { | @@ -90,7 +89,7 @@ export struct TabLiveComponent { | ||
| 90 | if (data.barrageResponses && data.barrageResponses.length > 0) { | 89 | if (data.barrageResponses && data.barrageResponses.length > 0) { |
| 91 | /** | 90 | /** |
| 92 | * 在直播聊天添加一条新内容逻辑: | 91 | * 在直播聊天添加一条新内容逻辑: |
| 93 | - 判断 oldNewsId:迁移id非空 且 直播状态不是预约:"wait" | 92 | + 判断 oldNewsId:迁移id为空 且 直播状态不是预约:"wait" |
| 94 | 消息内容: | 93 | 消息内容: |
| 95 | 1.头像固定:APP默认头像 | 94 | 1.头像固定:APP默认头像 |
| 96 | 2.名称固定:人民日报主持人 | 95 | 2.名称固定:人民日报主持人 |
| @@ -106,17 +105,17 @@ export struct TabLiveComponent { | @@ -106,17 +105,17 @@ export struct TabLiveComponent { | ||
| 106 | if (StringUtils.isEmpty(this.liveDetailsBean.oldNewsId) | 105 | if (StringUtils.isEmpty(this.liveDetailsBean.oldNewsId) |
| 107 | && this.liveDetailsBean | 106 | && this.liveDetailsBean |
| 108 | && this.liveDetailsBean.liveInfo.liveState != 'wait') { | 107 | && this.liveDetailsBean.liveInfo.liveState != 'wait') { |
| 109 | - let liveRoomItemBeanTemp: LiveRoomItemBean = {} as LiveRoomItemBean | ||
| 110 | - liveRoomItemBeanTemp.text = this.liveDetailsBean.newIntroduction | ||
| 111 | - liveRoomItemBeanTemp.senderUserName = '人民日报主持人' | ||
| 112 | - liveRoomItemBeanTemp.pictureUrls=[] | ||
| 113 | - liveRoomItemBeanTemp.pictureUrls.push(this.liveDetailsBean?.fullColumnImgUrls[0]?.url) | ||
| 114 | - liveRoomItemBeanTemp.dataType='ZH_TEXT_AND_IMAGE_MSG' | ||
| 115 | - this.liveList.push(liveRoomItemBeanTemp) | 108 | + this.updateLiveListData() |
| 116 | } | 109 | } |
| 117 | } | 110 | } |
| 118 | } else { | 111 | } else { |
| 119 | - this.pageModel.viewType = ViewType.EMPTY; | 112 | + if (StringUtils.isEmpty(this.liveDetailsBean.oldNewsId) |
| 113 | + && this.liveDetailsBean | ||
| 114 | + && this.liveDetailsBean.liveInfo.liveState != 'wait') { | ||
| 115 | + this.updateLiveListData() | ||
| 116 | + } else { | ||
| 117 | + this.pageModel.viewType = ViewType.EMPTY; | ||
| 118 | + } | ||
| 120 | } | 119 | } |
| 121 | }, | 120 | }, |
| 122 | () => { | 121 | () => { |
| @@ -124,6 +123,21 @@ export struct TabLiveComponent { | @@ -124,6 +123,21 @@ export struct TabLiveComponent { | ||
| 124 | }) | 123 | }) |
| 125 | } | 124 | } |
| 126 | 125 | ||
| 126 | + updateLiveListData() { | ||
| 127 | + let liveRoomItemBeanTemp: LiveRoomItemBean = {} as LiveRoomItemBean | ||
| 128 | + liveRoomItemBeanTemp.text = this.liveDetailsBean.newIntroduction | ||
| 129 | + liveRoomItemBeanTemp.senderUserName = '人民日报主持人' | ||
| 130 | + liveRoomItemBeanTemp.pictureUrls = [] | ||
| 131 | + liveRoomItemBeanTemp.pictureUrls.push(this.liveDetailsBean?.fullColumnImgUrls[0]?.url) | ||
| 132 | + liveRoomItemBeanTemp.dataType = 'ZH_TEXT_AND_IMAGE_MSG' | ||
| 133 | + let temp = this.liveDetailsBean?.fullColumnImgUrls[0] | ||
| 134 | + if (temp) { | ||
| 135 | + liveRoomItemBeanTemp.pictureResolutions = [] | ||
| 136 | + liveRoomItemBeanTemp.pictureResolutions.push(`${temp.height}*${temp.weight}`) | ||
| 137 | + } | ||
| 138 | + this.liveList.push(liveRoomItemBeanTemp) | ||
| 139 | + } | ||
| 140 | + | ||
| 127 | aboutToDisappear(): void { | 141 | aboutToDisappear(): void { |
| 128 | } | 142 | } |
| 129 | } | 143 | } |
| @@ -28,7 +28,7 @@ export struct TabLiveItemComponent { | @@ -28,7 +28,7 @@ export struct TabLiveItemComponent { | ||
| 28 | .fontSize('14fp') | 28 | .fontSize('14fp') |
| 29 | .fontWeight(400) | 29 | .fontWeight(400) |
| 30 | .fontColor('#222222') | 30 | .fontColor('#222222') |
| 31 | - Text('主持人') | 31 | + Text(this.item.role === 'host' ? '主持人' : '嘉宾') |
| 32 | .maxLines(1) | 32 | .maxLines(1) |
| 33 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 33 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 34 | .fontSize('11fp') | 34 | .fontSize('11fp') |
| @@ -43,7 +43,7 @@ export struct TabLiveItemComponent { | @@ -43,7 +43,7 @@ export struct TabLiveItemComponent { | ||
| 43 | }) | 43 | }) |
| 44 | .borderRadius(2) | 44 | .borderRadius(2) |
| 45 | .margin({ left: 8 }) | 45 | .margin({ left: 8 }) |
| 46 | - .visibility('host' == this.item.role ? Visibility.Visible : Visibility.None) | 46 | + .visibility(StringUtils.isNotEmpty(this.item.role) ? Visibility.Visible : Visibility.None) |
| 47 | Text(DateTimeUtils.getCommentTime(new Date(this.item.time).getTime())) | 47 | Text(DateTimeUtils.getCommentTime(new Date(this.item.time).getTime())) |
| 48 | .maxLines(1) | 48 | .maxLines(1) |
| 49 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 49 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| @@ -85,21 +85,21 @@ export struct TabLiveItemComponent { | @@ -85,21 +85,21 @@ export struct TabLiveItemComponent { | ||
| 85 | List({ space: this.item.pictureUrls.length == 1 ? 0 : 5 }) { | 85 | List({ space: this.item.pictureUrls.length == 1 ? 0 : 5 }) { |
| 86 | ForEach(this.item.pictureUrls, (itemSub: string, index: number) => { | 86 | ForEach(this.item.pictureUrls, (itemSub: string, index: number) => { |
| 87 | ListItem() { | 87 | ListItem() { |
| 88 | - Image(itemSub) | ||
| 89 | - .width(`${100 / this.item.pictureUrls.length}%`) | ||
| 90 | - .height(this.item.pictureUrls.length > 1 ? 70 : 174) | ||
| 91 | - .objectFit(ImageFit.Auto) | ||
| 92 | - .borderRadius(4) | ||
| 93 | - }.onClick(() => { | ||
| 94 | - this.photoList = [] | ||
| 95 | - for (let item of this.item.pictureUrls) { | ||
| 96 | - this.photoList.push({ | ||
| 97 | - width: 0, | ||
| 98 | - height: 0, | ||
| 99 | - picPath: item, | ||
| 100 | - picDesc: '' | ||
| 101 | - }) | 88 | + if (this.item.pictureUrls.length > 1) { |
| 89 | + Image(itemSub) | ||
| 90 | + .width(`${100 / this.item.pictureUrls.length}%`) | ||
| 91 | + .height(70) | ||
| 92 | + .objectFit(ImageFit.Auto) | ||
| 93 | + .borderRadius(4) | ||
| 94 | + } else { | ||
| 95 | + Image(itemSub) | ||
| 96 | + .width(`100%`) | ||
| 97 | + // .aspectRatio(this.getAspectRation()) | ||
| 98 | + .height(177) | ||
| 99 | + .objectFit(ImageFit.Auto) | ||
| 100 | + .borderRadius(4) | ||
| 102 | } | 101 | } |
| 102 | + }.onClick(() => { | ||
| 103 | this.gotoMultipleListImagePage(index) | 103 | this.gotoMultipleListImagePage(index) |
| 104 | }) | 104 | }) |
| 105 | }) | 105 | }) |
| @@ -147,7 +147,7 @@ export struct TabLiveItemComponent { | @@ -147,7 +147,7 @@ export struct TabLiveItemComponent { | ||
| 147 | .margin({ | 147 | .margin({ |
| 148 | top: 8, | 148 | top: 8, |
| 149 | }) | 149 | }) |
| 150 | - .aspectRatio(Number.parseFloat(this.item.pictureResolutions[0]?.split('*')[0]) / Number.parseFloat(this.item.pictureResolutions[0]?.split('*')[1])) | 150 | + .aspectRatio(this.getAspectRation()) |
| 151 | .onClick(() => { | 151 | .onClick(() => { |
| 152 | this.gotoVideoPlayPage() | 152 | this.gotoVideoPlayPage() |
| 153 | }) | 153 | }) |
| @@ -188,6 +188,15 @@ export struct TabLiveItemComponent { | @@ -188,6 +188,15 @@ export struct TabLiveItemComponent { | ||
| 188 | * @param content | 188 | * @param content |
| 189 | * */ | 189 | * */ |
| 190 | gotoMultipleListImagePage(index: number) { | 190 | gotoMultipleListImagePage(index: number) { |
| 191 | + this.photoList = [] | ||
| 192 | + for (let item of this.item.pictureUrls) { | ||
| 193 | + this.photoList.push({ | ||
| 194 | + width: 0, | ||
| 195 | + height: 0, | ||
| 196 | + picPath: item, | ||
| 197 | + picDesc: '' | ||
| 198 | + }) | ||
| 199 | + } | ||
| 191 | let taskAction: Action = { | 200 | let taskAction: Action = { |
| 192 | type: 'JUMP_DETAIL_PAGE', | 201 | type: 'JUMP_DETAIL_PAGE', |
| 193 | params: { | 202 | params: { |
| @@ -204,4 +213,20 @@ export struct TabLiveItemComponent { | @@ -204,4 +213,20 @@ export struct TabLiveItemComponent { | ||
| 204 | aboutToDisappear(): void { | 213 | aboutToDisappear(): void { |
| 205 | 214 | ||
| 206 | } | 215 | } |
| 216 | + | ||
| 217 | + getAspectRation(): number { | ||
| 218 | + try { | ||
| 219 | + if (this.item && this.item.pictureResolutions && this.item.pictureResolutions.length > 0) { | ||
| 220 | + let temp: string[] = this.item.pictureResolutions[0]?.split('*') | ||
| 221 | + if (temp && temp.length == 2) { | ||
| 222 | + let width = Number.parseFloat(this.item.pictureResolutions[0]?.split('*')[0]) | ||
| 223 | + let height = Number.parseFloat(this.item.pictureResolutions[0]?.split('*')[1]) | ||
| 224 | + return height / width | ||
| 225 | + } | ||
| 226 | + } | ||
| 227 | + } catch (e) { | ||
| 228 | + return 1 | ||
| 229 | + } | ||
| 230 | + return 1 | ||
| 231 | + } | ||
| 207 | } | 232 | } |
| @@ -20,6 +20,9 @@ export struct PlayUIComponent { | @@ -20,6 +20,9 @@ export struct PlayUIComponent { | ||
| 20 | @Consume displayDirection: DisplayDirection | 20 | @Consume displayDirection: DisplayDirection |
| 21 | 21 | ||
| 22 | onChangeMenuVisible() { | 22 | onChangeMenuVisible() { |
| 23 | + if (!this.liveDetailsBean || !this.liveDetailsBean.liveInfo || this.liveDetailsBean?.liveInfo?.liveState === 'wait') { | ||
| 24 | + return | ||
| 25 | + } | ||
| 23 | let time: number = 0 | 26 | let time: number = 0 |
| 24 | if (this.isMenuVisible) { | 27 | if (this.isMenuVisible) { |
| 25 | setTimeout(() => { | 28 | setTimeout(() => { |
| @@ -38,14 +41,15 @@ export struct PlayUIComponent { | @@ -38,14 +41,15 @@ export struct PlayUIComponent { | ||
| 38 | this.totalTime = DateFormatUtil.secondToTime(Math.floor(duration / 1000)); | 41 | this.totalTime = DateFormatUtil.secondToTime(Math.floor(duration / 1000)); |
| 39 | this.progressVal = Math.floor(position * 100 / duration); | 42 | this.progressVal = Math.floor(position * 100 / duration); |
| 40 | } | 43 | } |
| 41 | - | ||
| 42 | } | 44 | } |
| 43 | 45 | ||
| 44 | build() { | 46 | build() { |
| 45 | Column() { | 47 | Column() { |
| 46 | - this.getTopUIComponent() | ||
| 47 | - this.getMiddleUIComponent() | ||
| 48 | - this.getBottomUIComponent() | 48 | + if (this.liveDetailsBean && this.liveDetailsBean.liveInfo) { |
| 49 | + this.getTopUIComponent() | ||
| 50 | + this.getMiddleUIComponent() | ||
| 51 | + this.getBottomUIComponent() | ||
| 52 | + } | ||
| 49 | } | 53 | } |
| 50 | .width('100%') | 54 | .width('100%') |
| 51 | .height('100%') | 55 | .height('100%') |
| @@ -67,7 +71,7 @@ export struct PlayUIComponent { | @@ -67,7 +71,7 @@ export struct PlayUIComponent { | ||
| 67 | this.displayDirection = DisplayDirection.VERTICAL | 71 | this.displayDirection = DisplayDirection.VERTICAL |
| 68 | WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ? | 72 | WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ? |
| 69 | window.Orientation.PORTRAIT : | 73 | window.Orientation.PORTRAIT : |
| 70 | - window.Orientation.LANDSCAPE) | 74 | + window.Orientation.LANDSCAPE_INVERTED) |
| 71 | // devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ? | 75 | // devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ? |
| 72 | // window.Orientation.PORTRAIT : | 76 | // window.Orientation.PORTRAIT : |
| 73 | // window.Orientation.LANDSCAPE); | 77 | // window.Orientation.LANDSCAPE); |
| @@ -106,15 +110,17 @@ export struct PlayUIComponent { | @@ -106,15 +110,17 @@ export struct PlayUIComponent { | ||
| 106 | } | 110 | } |
| 107 | this.getLiveStatusView() | 111 | this.getLiveStatusView() |
| 108 | } | 112 | } |
| 109 | - }.width('100%') | 113 | + } |
| 114 | + .width('100%') | ||
| 110 | .padding({ | 115 | .padding({ |
| 111 | - top: 20, | 116 | + top: 15, |
| 112 | bottom: 6, | 117 | bottom: 6, |
| 113 | left: 10, | 118 | left: 10, |
| 114 | right: 10 | 119 | right: 10 |
| 115 | }) | 120 | }) |
| 116 | .alignItems(HorizontalAlign.Start) | 121 | .alignItems(HorizontalAlign.Start) |
| 117 | .visibility(this.isMenuVisible ? Visibility.Visible : Visibility.None) | 122 | .visibility(this.isMenuVisible ? Visibility.Visible : Visibility.None) |
| 123 | + .linearGradient({ angle: 0, colors: [['#00000000', 0], ['#99000000', 1]] }) | ||
| 118 | } | 124 | } |
| 119 | 125 | ||
| 120 | @Builder | 126 | @Builder |
| @@ -194,6 +200,9 @@ export struct PlayUIComponent { | @@ -194,6 +200,9 @@ export struct PlayUIComponent { | ||
| 194 | .layoutWeight(1) | 200 | .layoutWeight(1) |
| 195 | .width('100%') | 201 | .width('100%') |
| 196 | .onClick(() => { | 202 | .onClick(() => { |
| 203 | + if (this.liveDetailsBean?.liveInfo?.liveState === 'wait') { | ||
| 204 | + return | ||
| 205 | + } | ||
| 197 | this.isMenuVisible = !this.isMenuVisible | 206 | this.isMenuVisible = !this.isMenuVisible |
| 198 | }) | 207 | }) |
| 199 | } | 208 | } |
| @@ -233,11 +242,12 @@ export struct PlayUIComponent { | @@ -233,11 +242,12 @@ export struct PlayUIComponent { | ||
| 233 | this.displayDirection = this.displayDirection == DisplayDirection.VERTICAL ? DisplayDirection.VIDEO_HORIZONTAL : DisplayDirection.VERTICAL | 242 | this.displayDirection = this.displayDirection == DisplayDirection.VERTICAL ? DisplayDirection.VIDEO_HORIZONTAL : DisplayDirection.VERTICAL |
| 234 | WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ? | 243 | WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ? |
| 235 | window.Orientation.PORTRAIT : | 244 | window.Orientation.PORTRAIT : |
| 236 | - window.Orientation.LANDSCAPE) | 245 | + window.Orientation.LANDSCAPE_INVERTED) |
| 237 | // devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ? | 246 | // devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ? |
| 238 | // window.Orientation.PORTRAIT : | 247 | // window.Orientation.PORTRAIT : |
| 239 | // window.Orientation.LANDSCAPE); | 248 | // window.Orientation.LANDSCAPE); |
| 240 | }) | 249 | }) |
| 250 | + .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) | ||
| 241 | } | 251 | } |
| 242 | } | 252 | } |
| 243 | .alignItems(VerticalAlign.Center) | 253 | .alignItems(VerticalAlign.Center) |
| @@ -32,6 +32,7 @@ export struct TopPlayComponent { | @@ -32,6 +32,7 @@ export struct TopPlayComponent { | ||
| 32 | playUrl = this.liveDetailsBean.liveInfo.vlive[0].replayUri | 32 | playUrl = this.liveDetailsBean.liveInfo.vlive[0].replayUri |
| 33 | } | 33 | } |
| 34 | this.playerController?.firstPlay(playUrl); | 34 | this.playerController?.firstPlay(playUrl); |
| 35 | + // this.playerController?.firstPlay('https://rmrbcmsonline.peopleapp.com/upload/rmh/video/mp4/202404/1713752415708fb81d0b8f137b.mp4'); | ||
| 35 | } | 36 | } |
| 36 | } | 37 | } |
| 37 | 38 |
| @@ -16,5 +16,6 @@ | @@ -16,5 +16,6 @@ | ||
| 16 | "wdConstant": "file:../../commons/wdConstant", | 16 | "wdConstant": "file:../../commons/wdConstant", |
| 17 | "wdDetailPlayApi": "file:../../features/wdDetailPlayApi", | 17 | "wdDetailPlayApi": "file:../../features/wdDetailPlayApi", |
| 18 | // "wdComponent": "file:../../features/wdComponent" | 18 | // "wdComponent": "file:../../features/wdComponent" |
| 19 | + "wdShare": "file:../../features/wdShare" | ||
| 19 | } | 20 | } |
| 20 | } | 21 | } |
| @@ -11,6 +11,7 @@ import { SPHelper, ToastUtils, NumberFormatterUtils } from 'wdKit'; | @@ -11,6 +11,7 @@ import { SPHelper, ToastUtils, NumberFormatterUtils } from 'wdKit'; | ||
| 11 | import { WDPlayerController } from 'wdPlayer/Index'; | 11 | import { WDPlayerController } from 'wdPlayer/Index'; |
| 12 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 12 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| 13 | import { SpConstants } from 'wdConstant/Index' | 13 | import { SpConstants } from 'wdConstant/Index' |
| 14 | +import { WDShare } from "wdShare" | ||
| 14 | 15 | ||
| 15 | interface ILikeStyleResp { | 16 | interface ILikeStyleResp { |
| 16 | url: Resource; | 17 | url: Resource; |
| @@ -336,6 +337,8 @@ export struct PlayerRightView { | @@ -336,6 +337,8 @@ export struct PlayerRightView { | ||
| 336 | .aspectRatio(1) | 337 | .aspectRatio(1) |
| 337 | .onClick((event: ClickEvent) => { | 338 | .onClick((event: ClickEvent) => { |
| 338 | ToastUtils.showToast('分享为公共方法,待开发', 1000); | 339 | ToastUtils.showToast('分享为公共方法,待开发', 1000); |
| 340 | + | ||
| 341 | + this.share() | ||
| 339 | }) | 342 | }) |
| 340 | Text('分享') | 343 | Text('分享') |
| 341 | .width('100%') | 344 | .width('100%') |
| @@ -349,4 +352,9 @@ export struct PlayerRightView { | @@ -349,4 +352,9 @@ export struct PlayerRightView { | ||
| 349 | } | 352 | } |
| 350 | .margin({ bottom: 20 }) | 353 | .margin({ bottom: 20 }) |
| 351 | } | 354 | } |
| 355 | + | ||
| 356 | + share() { | ||
| 357 | + | ||
| 358 | + WDShare.shareContent(this.contentDetailData) | ||
| 359 | + } | ||
| 352 | } | 360 | } |
| 1 | export { add } from "./src/main/ets/utils/Calc" | 1 | export { add } from "./src/main/ets/utils/Calc" |
| 2 | 2 | ||
| 3 | -export { HWLocationUtils } from './src/main/ets/location/HWLocationUtils' | ||
| 3 | +export { HWLocationUtils } from './src/main/ets/location/HWLocationUtils' | ||
| 4 | + | ||
| 5 | +export { WDPushNotificationManager } from "./src/main/ets/notification/WDPushNotificationManager" |
sight_harmony/features/wdHwAbility/src/main/ets/notification/WDPushNotificationManager.ets
0 → 100644
| 1 | + | ||
| 2 | +import { pushCommon, pushService } from '@kit.PushKit'; | ||
| 3 | +import { AAID } from '@kit.PushKit'; | ||
| 4 | +import { AccountManagerUtils, Logger, SPHelper, UserDataLocal } from 'wdKit/Index'; | ||
| 5 | +import { BusinessError } from '@kit.BasicServicesKit'; | ||
| 6 | +import notificationManager from '@ohos.notificationManager'; | ||
| 7 | +import { common, Want } from '@kit.AbilityKit'; | ||
| 8 | + | ||
| 9 | +const TAG = "NotificationManager" | ||
| 10 | + | ||
| 11 | +/* | ||
| 12 | + * 远程推送通知管理类 | ||
| 13 | + * Push Kit: https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/push-introduction-0000001726287974 | ||
| 14 | + * Notification Kit: https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/notification-overview-0000001822162741 | ||
| 15 | + * */ | ||
| 16 | +export class WDPushNotificationManager { | ||
| 17 | + | ||
| 18 | + private static instance: WDPushNotificationManager | ||
| 19 | + static getInstance() : WDPushNotificationManager { | ||
| 20 | + if (!WDPushNotificationManager.instance) { | ||
| 21 | + WDPushNotificationManager.instance = new WDPushNotificationManager() | ||
| 22 | + } | ||
| 23 | + return WDPushNotificationManager.instance | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + async requestEnableNotifications(context: common.UIAbilityContext) : Promise<boolean> { | ||
| 27 | + let enabled = await notificationManager.isNotificationEnabled() | ||
| 28 | + if (!enabled) { | ||
| 29 | + try { | ||
| 30 | + await notificationManager.requestEnableNotification(context) | ||
| 31 | + enabled = true | ||
| 32 | + } catch (err) { | ||
| 33 | + Logger.error(TAG, "请求通知权限报错: " + JSON.stringify(err)) | ||
| 34 | + let error = err as BusinessError | ||
| 35 | + if (error.code == 1600004) { | ||
| 36 | + Logger.error(TAG, "请求通知权限 - 用户已拒绝") | ||
| 37 | + } | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | + Logger.info(TAG, "推送 enabled " + enabled) | ||
| 41 | + return enabled | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + async fetchTokenAndBindProfileId() { | ||
| 45 | + try { | ||
| 46 | + const pushToken: string = await pushService.getToken(); | ||
| 47 | + Logger.info(TAG, "获取推送token: " + pushToken) | ||
| 48 | + | ||
| 49 | + //TODO: pushToken 上传至服务器 | ||
| 50 | + SPHelper.default.save("devicePushToken", pushToken) | ||
| 51 | + | ||
| 52 | + if (AccountManagerUtils.isLoginSync()) { | ||
| 53 | + this.bindUserProfileId(UserDataLocal.getUserId()) | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + } catch (err) { | ||
| 57 | + Logger.error(TAG, "获取推送token失败: " + JSON.stringify(err)) | ||
| 58 | + } | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + // 禁止推送 | ||
| 62 | + stopPush() { | ||
| 63 | + pushService.deleteToken() | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + /// 应用匿名标识符 | ||
| 67 | + async getAAID() { | ||
| 68 | + let aaid: string = "" | ||
| 69 | + try { | ||
| 70 | + aaid = await AAID.getAAID(); | ||
| 71 | + Logger.info(TAG, "获取应用匿名标识符AAID: " + aaid) | ||
| 72 | + } catch (err) { | ||
| 73 | + Logger.error(TAG, "获取应用匿名标识符AAID失败: " + JSON.stringify(err)) | ||
| 74 | + } | ||
| 75 | + return aaid | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + // TODO: 登录时调用 | ||
| 79 | + bindUserProfileId(profileId: string) { | ||
| 80 | + pushService.bindAppProfileId(pushCommon.AppProfileType.PROFILE_TYPE_APPLICATION_ACCOUNT, profileId).then(() => { | ||
| 81 | + Logger.info(TAG, "推送绑定profileId 成功: " + profileId) | ||
| 82 | + }).catch((err: BusinessError) => { | ||
| 83 | + Logger.error(TAG, "推送绑定profileId失败: " + profileId + " " + JSON.stringify(err)) | ||
| 84 | + }); | ||
| 85 | + } | ||
| 86 | + unbindUserProfileId(profileId: string) { | ||
| 87 | + pushService.unbindAppProfileId(profileId).then(() => { | ||
| 88 | + Logger.info(TAG, "推送解绑profileId 成功: " + profileId) | ||
| 89 | + }).catch((err: BusinessError) => { | ||
| 90 | + Logger.error(TAG, "推送解绑profileId失败: " + profileId + " " + JSON.stringify(err)) | ||
| 91 | + }); | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + sendLocalNotification() { | ||
| 95 | + let notificationRequest: notificationManager.NotificationRequest = { | ||
| 96 | + id: 1, | ||
| 97 | + content: { | ||
| 98 | + notificationContentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, | ||
| 99 | + normal: { | ||
| 100 | + title: "test_title", | ||
| 101 | + text: "test_text", | ||
| 102 | + additionalText: "test_additionalText" | ||
| 103 | + } | ||
| 104 | + } | ||
| 105 | + }; | ||
| 106 | + notificationManager.publish(notificationRequest).then(() => { | ||
| 107 | + console.info("publish success"); | ||
| 108 | + }).catch((err: BusinessError) => { | ||
| 109 | + console.error(`publish fail: ${JSON.stringify(err)}`); | ||
| 110 | + }); | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + setBadgeNumber(number: number) : Promise<void> { | ||
| 114 | + return notificationManager.setBadgeNumber(number) | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + // 接收推送数据,包括启动和二次点击拉起 | ||
| 118 | + // 参考:https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/push-dev-0000001727885258 | ||
| 119 | + onWant(want: Want) { | ||
| 120 | + Logger.info(TAG, "接收到推送?: " + JSON.stringify(want.parameters)) | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | +} |
| @@ -3,11 +3,10 @@ import { LoginInputComponent } from './LoginInputComponent' | @@ -3,11 +3,10 @@ import { LoginInputComponent } from './LoginInputComponent' | ||
| 3 | import { LoginViewModel } from './LoginViewModel' | 3 | import { LoginViewModel } from './LoginViewModel' |
| 4 | import router from '@ohos.router' | 4 | import router from '@ohos.router' |
| 5 | import promptAction from '@ohos.promptAction' | 5 | import promptAction from '@ohos.promptAction' |
| 6 | -import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/Index' | ||
| 7 | import { WDRouterRule, WDRouterPage } from 'wdRouter'; | 6 | import { WDRouterRule, WDRouterPage } from 'wdRouter'; |
| 8 | import { SettingPasswordParams } from './SettingPasswordLayout' | 7 | import { SettingPasswordParams } from './SettingPasswordLayout' |
| 9 | import { Router } from '@ohos.arkui.UIContext' | 8 | import { Router } from '@ohos.arkui.UIContext' |
| 10 | -import { SPHelper, ToastUtils } from 'wdKit/Index' | 9 | +import { EmitterEventId, EmitterUtils, SPHelper, ToastUtils } from 'wdKit/Index' |
| 11 | import { SpConstants } from 'wdConstant/Index' | 10 | import { SpConstants } from 'wdConstant/Index' |
| 12 | import { emitter } from '@kit.BasicServicesKit' | 11 | import { emitter } from '@kit.BasicServicesKit' |
| 13 | 12 | ||
| @@ -26,6 +25,7 @@ struct ForgetPasswordPage { | @@ -26,6 +25,7 @@ struct ForgetPasswordPage { | ||
| 26 | @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件 | 25 | @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件 |
| 27 | pageType:number = (router.getParams() as Record<string, number>)['pageType']; //0、登录->忘记密码 1、设置->重置密码 2、设置->更换手机号页面1 3、设置->更换手机号页面2 | 26 | pageType:number = (router.getParams() as Record<string, number>)['pageType']; //0、登录->忘记密码 1、设置->重置密码 2、设置->更换手机号页面1 3、设置->更换手机号页面2 |
| 28 | @State pageTitle:string = '找回密码'; | 27 | @State pageTitle:string = '找回密码'; |
| 28 | + @State codeStateSuccess:boolean=false | ||
| 29 | onCodeSend() { | 29 | onCodeSend() { |
| 30 | if (this.isCodeSend) { | 30 | if (this.isCodeSend) { |
| 31 | this.sendVerifyCode() | 31 | this.sendVerifyCode() |
| @@ -47,7 +47,8 @@ struct ForgetPasswordPage { | @@ -47,7 +47,8 @@ struct ForgetPasswordPage { | ||
| 47 | codeContent: $codeContent, | 47 | codeContent: $codeContent, |
| 48 | isSubmit: $isSubmit, | 48 | isSubmit: $isSubmit, |
| 49 | isCodeSend: $isCodeSend, | 49 | isCodeSend: $isCodeSend, |
| 50 | - pageType:this.pageType | 50 | + pageType:this.pageType, |
| 51 | + codeStateSuccess:$codeStateSuccess | ||
| 51 | }) | 52 | }) |
| 52 | Row() { | 53 | Row() { |
| 53 | Text("确认") | 54 | Text("确认") |
| @@ -99,16 +100,26 @@ struct ForgetPasswordPage { | @@ -99,16 +100,26 @@ struct ForgetPasswordPage { | ||
| 99 | 100 | ||
| 100 | if(this.pageType == 1){ | 101 | if(this.pageType == 1){ |
| 101 | this.loginViewModel.sendVerifyCodeByToken().then(()=>{ | 102 | this.loginViewModel.sendVerifyCodeByToken().then(()=>{ |
| 102 | - promptAction.showToast({ message: "验证码已发送成功" }) | 103 | + promptAction.showToast({ message: "已发送" }) |
| 104 | + this.codeStateSuccess=true | ||
| 105 | + this.isCodeSend=false | ||
| 103 | }).catch((message: string)=>{ | 106 | }).catch((message: string)=>{ |
| 104 | promptAction.showToast({ message: message }) | 107 | promptAction.showToast({ message: message }) |
| 108 | + this.codeStateSuccess=false | ||
| 109 | + this.isCodeSend=false | ||
| 105 | }) | 110 | }) |
| 106 | return | 111 | return |
| 107 | } | 112 | } |
| 108 | 113 | ||
| 109 | this.loginViewModel.sendVerifyCode(this.phoneContent).then((verifyCode) => { | 114 | this.loginViewModel.sendVerifyCode(this.phoneContent).then((verifyCode) => { |
| 110 | - promptAction.showToast({ message: "验证码已发送成功" }) | 115 | + promptAction.showToast({ message: "已发送" }) |
| 116 | + this.codeStateSuccess=true | ||
| 117 | + this.isCodeSend=false | ||
| 111 | Logger.debug(TAG, "sendVerifyCode: " + verifyCode) | 118 | Logger.debug(TAG, "sendVerifyCode: " + verifyCode) |
| 119 | + }).catch((message: string)=>{ | ||
| 120 | + promptAction.showToast({ message: message }) | ||
| 121 | + this.codeStateSuccess=false | ||
| 122 | + this.isCodeSend=false | ||
| 112 | }) | 123 | }) |
| 113 | 124 | ||
| 114 | } | 125 | } |
| @@ -146,7 +157,7 @@ struct ForgetPasswordPage { | @@ -146,7 +157,7 @@ struct ForgetPasswordPage { | ||
| 146 | codeContent:this.codeContent, | 157 | codeContent:this.codeContent, |
| 147 | pageType:this.pageType | 158 | pageType:this.pageType |
| 148 | } | 159 | } |
| 149 | - WDRouterRule.jumpWithPage(WDRouterPage.settingPasswordPage, params) | 160 | + WDRouterRule.jumpWithReplacePage(WDRouterPage.settingPasswordPage, params) |
| 150 | 161 | ||
| 151 | promptAction.showToast({message:"校验成功,准备跳转设置页面"}) | 162 | promptAction.showToast({message:"校验成功,准备跳转设置页面"}) |
| 152 | Logger.debug(TAG,"校验成功") | 163 | Logger.debug(TAG,"校验成功") |
| @@ -173,6 +184,10 @@ struct ForgetPasswordPage { | @@ -173,6 +184,10 @@ struct ForgetPasswordPage { | ||
| 173 | this.loginViewModel.changeBindPhone(this.phoneContent,this.codeContent).then(()=>{ | 184 | this.loginViewModel.changeBindPhone(this.phoneContent,this.codeContent).then(()=>{ |
| 174 | ToastUtils.shortToast('绑定成功') | 185 | ToastUtils.shortToast('绑定成功') |
| 175 | this.querySecurity() | 186 | this.querySecurity() |
| 187 | + }).catch((message: string) => { | ||
| 188 | + if (message != '') { | ||
| 189 | + ToastUtils.shortToast(message) | ||
| 190 | + } | ||
| 176 | }) | 191 | }) |
| 177 | } | 192 | } |
| 178 | 193 | ||
| @@ -189,7 +204,7 @@ struct ForgetPasswordPage { | @@ -189,7 +204,7 @@ struct ForgetPasswordPage { | ||
| 189 | sendEmitEvent(){ | 204 | sendEmitEvent(){ |
| 190 | // 定义一个eventId为1的事件,事件优先级为Low | 205 | // 定义一个eventId为1的事件,事件优先级为Low |
| 191 | let event: emitter.InnerEvent = { | 206 | let event: emitter.InnerEvent = { |
| 192 | - eventId: 10010, | 207 | + eventId: EmitterEventId.PHONE_CHANGE_SUCCESS, |
| 193 | priority: emitter.EventPriority.LOW | 208 | priority: emitter.EventPriority.LOW |
| 194 | }; | 209 | }; |
| 195 | 210 |
| 1 | import { SpConstants } from 'wdConstant/Index' | 1 | import { SpConstants } from 'wdConstant/Index' |
| 2 | -import { Logger, SPHelper } from 'wdKit' | 2 | +import { DateTimeUtils, Logger, SPHelper } from 'wdKit' |
| 3 | 3 | ||
| 4 | @Component | 4 | @Component |
| 5 | export struct LoginInputComponent { | 5 | export struct LoginInputComponent { |
| @@ -11,6 +11,8 @@ export struct LoginInputComponent { | @@ -11,6 +11,8 @@ export struct LoginInputComponent { | ||
| 11 | @Link isSubmit: boolean //是否可以提交 | 11 | @Link isSubmit: boolean //是否可以提交 |
| 12 | isFirst:boolean=true//是否第一次获取验证码 | 12 | isFirst:boolean=true//是否第一次获取验证码 |
| 13 | pageType?:number; //0、登录->忘记密码 1、设置->重置密码 2、设置->更换手机号页面1 3、设置->更换手机号页面2 | 13 | pageType?:number; //0、登录->忘记密码 1、设置->重置密码 2、设置->更换手机号页面1 3、设置->更换手机号页面2 |
| 14 | + lastTime: number = 0 | ||
| 15 | + @Link @Watch('startCount') codeStateSuccess: boolean //验证码获取成功与否回调 成功显示倒计时 | ||
| 14 | build() { | 16 | build() { |
| 15 | Column() { | 17 | Column() { |
| 16 | this.addCodeLayout() | 18 | this.addCodeLayout() |
| @@ -81,28 +83,24 @@ export struct LoginInputComponent { | @@ -81,28 +83,24 @@ export struct LoginInputComponent { | ||
| 81 | this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4) | 83 | this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4) |
| 82 | }) | 84 | }) |
| 83 | 85 | ||
| 84 | - Text(this.isCodeSend ? this.timeCount + "s" : this.isFirst?"发送验证码":'重新发送') | 86 | + Text(this.codeStateSuccess ? this.timeCount + "s" : this.isFirst?"发送验证码":'重新获取') |
| 85 | .fontColor(this.codeBtnState?'#ED2800':'#80ED2800') | 87 | .fontColor(this.codeBtnState?'#ED2800':'#80ED2800') |
| 86 | .width(110) | 88 | .width(110) |
| 87 | .fontSize(14) | 89 | .fontSize(14) |
| 88 | .fontWeight( FontWeight.Bold) | 90 | .fontWeight( FontWeight.Bold) |
| 89 | .height(48) | 91 | .height(48) |
| 90 | .textAlign(TextAlign.Center) | 92 | .textAlign(TextAlign.Center) |
| 93 | + .enabled(this.codeStateSuccess?false:true) | ||
| 91 | .onClick(() => { | 94 | .onClick(() => { |
| 92 | if (this.phoneContent.length < 11) { | 95 | if (this.phoneContent.length < 11) { |
| 93 | return | 96 | return |
| 94 | } | 97 | } |
| 98 | + let currentTime = DateTimeUtils.getTimeStamp() | ||
| 99 | + if (currentTime - this.lastTime < 500) { | ||
| 100 | + return | ||
| 101 | + } | ||
| 102 | + this.lastTime = currentTime; | ||
| 95 | this.isCodeSend = true | 103 | this.isCodeSend = true |
| 96 | - this.isFirst=false | ||
| 97 | - let time = setInterval(() => { | ||
| 98 | - Logger.debug("倒计时:" + this.timeCount) | ||
| 99 | - this.timeCount-- | ||
| 100 | - if (this.timeCount < 1) { | ||
| 101 | - this.isCodeSend = false | ||
| 102 | - this.timeCount = 60 | ||
| 103 | - clearInterval(time) | ||
| 104 | - } | ||
| 105 | - }, 1000) | ||
| 106 | 104 | ||
| 107 | }) | 105 | }) |
| 108 | 106 | ||
| @@ -122,4 +120,17 @@ export struct LoginInputComponent { | @@ -122,4 +120,17 @@ export struct LoginInputComponent { | ||
| 122 | securityNum = phoneNum.replace(needSecurityString,'****') | 120 | securityNum = phoneNum.replace(needSecurityString,'****') |
| 123 | return securityNum; | 121 | return securityNum; |
| 124 | } | 122 | } |
| 123 | + | ||
| 124 | + startCount() { | ||
| 125 | + this.isFirst = false | ||
| 126 | + let time = setInterval(() => { | ||
| 127 | + Logger.debug("倒计时:" + this.timeCount) | ||
| 128 | + this.timeCount-- | ||
| 129 | + if (this.timeCount < 1) { | ||
| 130 | + this.codeStateSuccess = false | ||
| 131 | + this.timeCount = 60 | ||
| 132 | + clearInterval(time) | ||
| 133 | + } | ||
| 134 | + }, 1000) | ||
| 135 | + } | ||
| 125 | } | 136 | } |
| @@ -60,7 +60,7 @@ export class LoginModel { | @@ -60,7 +60,7 @@ export class LoginModel { | ||
| 60 | let bean: Record<string, Object> = {}; | 60 | let bean: Record<string, Object> = {}; |
| 61 | bean['phone'] = phone | 61 | bean['phone'] = phone |
| 62 | bean['loginType'] = loginType | 62 | bean['loginType'] = loginType |
| 63 | - bean['deviceId'] = '60da5af6-9c59-3566-8622-8c6c00710994' | 63 | + bean['deviceId'] = HttpUtils.getDeviceId() |
| 64 | bean['verificationCode'] = verificationCode | 64 | bean['verificationCode'] = verificationCode |
| 65 | return new Promise<LoginBean>((success, fail) => { | 65 | return new Promise<LoginBean>((success, fail) => { |
| 66 | HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), bean).then((data: ResponseDTO<LoginBean>) => { | 66 | HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), bean).then((data: ResponseDTO<LoginBean>) => { |
| @@ -90,7 +90,7 @@ export class LoginModel { | @@ -90,7 +90,7 @@ export class LoginModel { | ||
| 90 | bean['userName'] = phone | 90 | bean['userName'] = phone |
| 91 | } | 91 | } |
| 92 | bean['loginType'] = loginType | 92 | bean['loginType'] = loginType |
| 93 | - bean['deviceId'] = '60da5af6-9c59-3566-8622-8c6c00710994' | 93 | + bean['deviceId'] = HttpUtils.getDeviceId() |
| 94 | bean['password'] = password | 94 | bean['password'] = password |
| 95 | bean['oldPassword'] = oldPassword | 95 | bean['oldPassword'] = oldPassword |
| 96 | return new Promise<LoginBean>((success, fail) => { | 96 | return new Promise<LoginBean>((success, fail) => { |
| 1 | -import { Logger, EmitterEventId, EmitterUtils } from 'wdKit' | 1 | +import { Logger, EmitterEventId, EmitterUtils, DateTimeUtils } from 'wdKit' |
| 2 | import { CustomProtocolDialog } from './CustomProtocolDialog' | 2 | import { CustomProtocolDialog } from './CustomProtocolDialog' |
| 3 | import router from '@ohos.router' | 3 | import router from '@ohos.router' |
| 4 | import { LoginViewModel } from './LoginViewModel' | 4 | import { LoginViewModel } from './LoginViewModel' |
| @@ -45,6 +45,8 @@ struct LoginPage { | @@ -45,6 +45,8 @@ struct LoginPage { | ||
| 45 | @State checkCodePage: boolean = true //判断是否是验证码页面 默认验证码登录 | 45 | @State checkCodePage: boolean = true //判断是否是验证码页面 默认验证码登录 |
| 46 | @State passwordSwitch: boolean = true //密码显示 | 46 | @State passwordSwitch: boolean = true //密码显示 |
| 47 | // @State isPasswordSubmit: boolean = false //账户密码状态 是否出发登录 | 47 | // @State isPasswordSubmit: boolean = false //账户密码状态 是否出发登录 |
| 48 | + lastTime: number = 0 | ||
| 49 | + @State codeStateSuccess:boolean=false | ||
| 48 | 50 | ||
| 49 | dialogController: CustomDialogController = new CustomDialogController({ | 51 | dialogController: CustomDialogController = new CustomDialogController({ |
| 50 | builder: CustomProtocolDialog({ | 52 | builder: CustomProtocolDialog({ |
| @@ -92,7 +94,8 @@ struct LoginPage { | @@ -92,7 +94,8 @@ struct LoginPage { | ||
| 92 | phoneContent: $phoneContent, | 94 | phoneContent: $phoneContent, |
| 93 | codeContent: $codeContent, | 95 | codeContent: $codeContent, |
| 94 | isSubmit: $isSubmit, | 96 | isSubmit: $isSubmit, |
| 95 | - isCodeSend: $isCodeSend | 97 | + isCodeSend: $isCodeSend, |
| 98 | + codeStateSuccess:$codeStateSuccess | ||
| 96 | }) | 99 | }) |
| 97 | } else { | 100 | } else { |
| 98 | this.addPassword() | 101 | this.addPassword() |
| @@ -136,7 +139,12 @@ struct LoginPage { | @@ -136,7 +139,12 @@ struct LoginPage { | ||
| 136 | if (!this.isSubmit) { | 139 | if (!this.isSubmit) { |
| 137 | return | 140 | return |
| 138 | } | 141 | } |
| 139 | - this.loginSubmit() | 142 | + let currentTime = DateTimeUtils.getTimeStamp() |
| 143 | + if (currentTime - this.lastTime > 500) { | ||
| 144 | + this.lastTime = currentTime | ||
| 145 | + this.loginSubmit() | ||
| 146 | + } | ||
| 147 | + | ||
| 140 | 148 | ||
| 141 | }) | 149 | }) |
| 142 | }.padding({ left: 25, right: 25 }).width('100%') | 150 | }.padding({ left: 25, right: 25 }).width('100%') |
| @@ -308,9 +316,14 @@ struct LoginPage { | @@ -308,9 +316,14 @@ struct LoginPage { | ||
| 308 | //发送验证码 | 316 | //发送验证码 |
| 309 | sendVerifyCode() { | 317 | sendVerifyCode() { |
| 310 | this.loginViewModel.sendVerifyCode(this.phoneContent).then((verifyCode) => { | 318 | this.loginViewModel.sendVerifyCode(this.phoneContent).then((verifyCode) => { |
| 311 | - promptAction.showToast({ message: "验证码已发送成功" }) | 319 | + promptAction.showToast({ message: "已发送" }) |
| 312 | Logger.debug(TAG, "sendVerifyCode: " + verifyCode) | 320 | Logger.debug(TAG, "sendVerifyCode: " + verifyCode) |
| 321 | + this.codeStateSuccess=true | ||
| 322 | + this.isCodeSend=false | ||
| 313 | }).catch((message:string)=>{ | 323 | }).catch((message:string)=>{ |
| 324 | + promptAction.showToast({ message: message }) | ||
| 325 | + this.codeStateSuccess=false | ||
| 326 | + this.isCodeSend=false | ||
| 314 | Logger.debug(TAG, "sendVerifyCode: " + message) | 327 | Logger.debug(TAG, "sendVerifyCode: " + message) |
| 315 | }) | 328 | }) |
| 316 | } | 329 | } |
| 1 | import { Logger } from 'wdKit/src/main/ets/utils/Logger' | 1 | import { Logger } from 'wdKit/src/main/ets/utils/Logger' |
| 2 | import { LoginModel } from './LoginModel' | 2 | import { LoginModel } from './LoginModel' |
| 3 | import { LoginBean } from './LoginBean' | 3 | import { LoginBean } from './LoginBean' |
| 4 | -import { SPHelper, StringUtils } from 'wdKit' | 4 | +import { EmitterEventId, EmitterUtils, SPHelper, StringUtils, UserDataLocal } from 'wdKit' |
| 5 | import { CheckVerifyBean } from './CheckVerifyBean' | 5 | import { CheckVerifyBean } from './CheckVerifyBean' |
| 6 | import cryptoFramework from '@ohos.security.cryptoFramework' | 6 | import cryptoFramework from '@ohos.security.cryptoFramework' |
| 7 | import buffer from '@ohos.buffer' | 7 | import buffer from '@ohos.buffer' |
| @@ -55,6 +55,7 @@ export class LoginViewModel { | @@ -55,6 +55,7 @@ export class LoginViewModel { | ||
| 55 | SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status) | 55 | SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status) |
| 56 | SPHelper.default.saveSync(SpConstants.USER_Type, data.userType) | 56 | SPHelper.default.saveSync(SpConstants.USER_Type, data.userType) |
| 57 | SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName) | 57 | SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName) |
| 58 | + EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS) | ||
| 58 | success(data) | 59 | success(data) |
| 59 | }).catch((error:string) => { | 60 | }).catch((error:string) => { |
| 60 | fail(error) | 61 | fail(error) |
| @@ -82,6 +83,7 @@ export class LoginViewModel { | @@ -82,6 +83,7 @@ export class LoginViewModel { | ||
| 82 | SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status) | 83 | SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status) |
| 83 | SPHelper.default.saveSync(SpConstants.USER_Type, data.userType) | 84 | SPHelper.default.saveSync(SpConstants.USER_Type, data.userType) |
| 84 | SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName) | 85 | SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName) |
| 86 | + EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS) | ||
| 85 | success(data) | 87 | success(data) |
| 86 | }).catch((value: string) => { | 88 | }).catch((value: string) => { |
| 87 | fail(value) | 89 | fail(value) |
| @@ -157,6 +159,7 @@ export class LoginViewModel { | @@ -157,6 +159,7 @@ export class LoginViewModel { | ||
| 157 | SPHelper.default.saveSync(SpConstants.USER_STATUS, '') | 159 | SPHelper.default.saveSync(SpConstants.USER_STATUS, '') |
| 158 | SPHelper.default.saveSync(SpConstants.USER_Type, '') | 160 | SPHelper.default.saveSync(SpConstants.USER_Type, '') |
| 159 | SPHelper.default.saveSync(SpConstants.USER_NAME, '') | 161 | SPHelper.default.saveSync(SpConstants.USER_NAME, '') |
| 162 | + UserDataLocal.clearUserData() | ||
| 160 | success(data) | 163 | success(data) |
| 161 | }).catch((message: string) => { | 164 | }).catch((message: string) => { |
| 162 | fail(message) | 165 | fail(message) |
| @@ -168,8 +171,8 @@ export class LoginViewModel { | @@ -168,8 +171,8 @@ export class LoginViewModel { | ||
| 168 | return new Promise<object>((success, fail) => { | 171 | return new Promise<object>((success, fail) => { |
| 169 | this.loginModel.changeBindPhone(phone, verificationCode).then((data: object) => { | 172 | this.loginModel.changeBindPhone(phone, verificationCode).then((data: object) => { |
| 170 | success(data) | 173 | success(data) |
| 171 | - }).catch(() => { | ||
| 172 | - fail() | 174 | + }).catch((message: string) => { |
| 175 | + fail(message) | ||
| 173 | }) | 176 | }) |
| 174 | }) | 177 | }) |
| 175 | } | 178 | } |
| @@ -3,6 +3,7 @@ import { Params } from 'wdBean/Index' | @@ -3,6 +3,7 @@ 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 | 7 | ||
| 7 | @Entry | 8 | @Entry |
| 8 | @Component | 9 | @Component |
| @@ -44,8 +45,13 @@ struct OneKeyLoginPage { | @@ -44,8 +45,13 @@ struct OneKeyLoginPage { | ||
| 44 | return | 45 | return |
| 45 | } | 46 | } |
| 46 | HuaweiAuth.sharedInstance().oneKeyLogin().then((authorizeCode) => { | 47 | HuaweiAuth.sharedInstance().oneKeyLogin().then((authorizeCode) => { |
| 47 | - | ||
| 48 | //TODO: 调用服务端接口登录 | 48 | //TODO: 调用服务端接口登录 |
| 49 | + | ||
| 50 | + ToastUtils.shortToast("获取到授权code: " + authorizeCode + ",由于需要后台接口支持,暂时先跳转其他登录方式") | ||
| 51 | + setTimeout(() => { | ||
| 52 | + router.replaceUrl({url: WDRouterPage.loginPage.url()}) | ||
| 53 | + }, 3000) | ||
| 54 | + | ||
| 49 | }).catch((error: BusinessError) => { | 55 | }).catch((error: BusinessError) => { |
| 50 | 56 | ||
| 51 | }) | 57 | }) |
| @@ -9,7 +9,7 @@ const TAG = "HuaweiOneKeyAuth" | @@ -9,7 +9,7 @@ const TAG = "HuaweiOneKeyAuth" | ||
| 9 | export default class HuaweiAuth { | 9 | export default class HuaweiAuth { |
| 10 | 10 | ||
| 11 | // 是否开启 | 11 | // 是否开启 |
| 12 | - static enable = false | 12 | + static enable = true |
| 13 | // 匿名手机号 | 13 | // 匿名手机号 |
| 14 | private _anonymousPhone?: string | 14 | private _anonymousPhone?: string |
| 15 | get anonymousPhone() { | 15 | get anonymousPhone() { |
| @@ -5,13 +5,40 @@ | @@ -5,13 +5,40 @@ | ||
| 5 | "lockfileVersion": 3, | 5 | "lockfileVersion": 3, |
| 6 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | 6 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", |
| 7 | "specifiers": { | 7 | "specifiers": { |
| 8 | + "@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19", | ||
| 9 | + "@umeng/common@^1.0.21": "@umeng/common@1.0.21", | ||
| 10 | + "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 8 | "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit" | 11 | "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit" |
| 9 | }, | 12 | }, |
| 10 | "packages": { | 13 | "packages": { |
| 14 | + "@umeng/analytics@1.0.19": { | ||
| 15 | + "name": "@umeng/analytics", | ||
| 16 | + "integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==", | ||
| 17 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har", | ||
| 18 | + "registryType": "ohpm" | ||
| 19 | + }, | ||
| 20 | + "@umeng/common@1.0.21": { | ||
| 21 | + "name": "@umeng/common", | ||
| 22 | + "integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==", | ||
| 23 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har", | ||
| 24 | + "registryType": "ohpm", | ||
| 25 | + "dependencies": { | ||
| 26 | + "libcommon.so": "./src/main/cpp/types/libcommon" | ||
| 27 | + } | ||
| 28 | + }, | ||
| 29 | + "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": { | ||
| 30 | + "name": "libcommon.so", | ||
| 31 | + "resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 32 | + "registryType": "local" | ||
| 33 | + }, | ||
| 11 | "wdKit@../../commons/wdKit": { | 34 | "wdKit@../../commons/wdKit": { |
| 12 | "name": "wdkit", | 35 | "name": "wdkit", |
| 13 | "resolved": "../../commons/wdKit", | 36 | "resolved": "../../commons/wdKit", |
| 14 | - "registryType": "local" | 37 | + "registryType": "local", |
| 38 | + "dependencies": { | ||
| 39 | + "@umeng/common": "^1.0.21", | ||
| 40 | + "@umeng/analytics": "^1.0.19" | ||
| 41 | + } | ||
| 15 | } | 42 | } |
| 16 | } | 43 | } |
| 17 | } | 44 | } |
| @@ -15,12 +15,12 @@ enum LogLevel { | @@ -15,12 +15,12 @@ enum LogLevel { | ||
| 15 | 15 | ||
| 16 | /** | 16 | /** |
| 17 | * Common log for all features. | 17 | * Common log for all features. |
| 18 | - * | 18 | + * @deprecated 弃用 |
| 19 | * @param {string} prefix Identifies the log tag. | 19 | * @param {string} prefix Identifies the log tag. |
| 20 | */ | 20 | */ |
| 21 | export class Logger { | 21 | export class Logger { |
| 22 | private static domain: number = 0xFF00; | 22 | private static domain: number = 0xFF00; |
| 23 | - private static prefix: string = 'MiguVideoApp'; | 23 | + private static prefix: string = 'SightApp'; |
| 24 | private static format: string = `%{public}s, %{public}s`; | 24 | private static format: string = `%{public}s, %{public}s`; |
| 25 | 25 | ||
| 26 | /** | 26 | /** |
| @@ -29,7 +29,7 @@ export class Logger { | @@ -29,7 +29,7 @@ export class Logger { | ||
| 29 | * @param Prefix Identifies the log tag. | 29 | * @param Prefix Identifies the log tag. |
| 30 | * @param domain Domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFFF. | 30 | * @param domain Domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFFF. |
| 31 | */ | 31 | */ |
| 32 | - constructor(prefix: string = 'MiguVideoApp', domain: number = 0xFF00) { | 32 | + constructor(prefix: string = 'SightApp', domain: number = 0xFF00) { |
| 33 | Logger.prefix = prefix; | 33 | Logger.prefix = prefix; |
| 34 | Logger.domain = domain; | 34 | Logger.domain = domain; |
| 35 | } | 35 | } |
| @@ -59,4 +59,4 @@ export class Logger { | @@ -59,4 +59,4 @@ export class Logger { | ||
| 59 | } | 59 | } |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | -export default new Logger('MiguVideoApp', 0xFF00) | ||
| 62 | +export default new Logger('SightApp', 0xFF00) |
sight_harmony/features/wdShare/.gitignore
0 → 100644
sight_harmony/features/wdShare/Index.ets
0 → 100644
| 1 | +{ | ||
| 2 | + "apiType": "stageMode", | ||
| 3 | + "buildOption": { | ||
| 4 | + }, | ||
| 5 | + "buildOptionSet": [ | ||
| 6 | + { | ||
| 7 | + "name": "release", | ||
| 8 | + "arkOptions": { | ||
| 9 | + "obfuscation": { | ||
| 10 | + "ruleOptions": { | ||
| 11 | + "enable": true, | ||
| 12 | + "files": [ | ||
| 13 | + "./obfuscation-rules.txt" | ||
| 14 | + ] | ||
| 15 | + } | ||
| 16 | + } | ||
| 17 | + }, | ||
| 18 | + }, | ||
| 19 | + ], | ||
| 20 | + "targets": [ | ||
| 21 | + { | ||
| 22 | + "name": "default" | ||
| 23 | + } | ||
| 24 | + ] | ||
| 25 | +} |
sight_harmony/features/wdShare/hvigorfile.ts
0 → 100644
| 1 | +# Define project specific obfuscation rules here. | ||
| 2 | +# You can include the obfuscation configuration files in the current module's build-profile.json5. | ||
| 3 | +# | ||
| 4 | +# For more details, see | ||
| 5 | +# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md | ||
| 6 | + | ||
| 7 | +# Obfuscation options: | ||
| 8 | +# -disable-obfuscation: disable all obfuscations | ||
| 9 | +# -enable-property-obfuscation: obfuscate the property names | ||
| 10 | +# -enable-toplevel-obfuscation: obfuscate the names in the global scope | ||
| 11 | +# -compact: remove unnecessary blank spaces and all line feeds | ||
| 12 | +# -remove-log: remove all console.* statements | ||
| 13 | +# -print-namecache: print the name cache that contains the mapping from the old names to new names | ||
| 14 | +# -apply-namecache: reuse the given cache file | ||
| 15 | + | ||
| 16 | +# Keep options: | ||
| 17 | +# -keep-property-name: specifies property names that you want to keep | ||
| 18 | +# -keep-global-name: specifies names that you want to keep in the global scope |
| 1 | +{ | ||
| 2 | + "meta": { | ||
| 3 | + "stableOrder": true | ||
| 4 | + }, | ||
| 5 | + "lockfileVersion": 3, | ||
| 6 | + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | + "specifiers": { | ||
| 8 | + "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | ||
| 9 | + "@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19", | ||
| 10 | + "@umeng/common@^1.0.21": "@umeng/common@1.0.21", | ||
| 11 | + "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 12 | + "wdBean@../wdBean": "wdBean@../wdBean", | ||
| 13 | + "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", | ||
| 14 | + "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", | ||
| 15 | + "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork", | ||
| 16 | + "wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter", | ||
| 17 | + "wdShareBase@../../commons/wdShareBase": "wdShareBase@../../commons/wdShareBase" | ||
| 18 | + }, | ||
| 19 | + "packages": { | ||
| 20 | + "@ohos/axios@2.2.0": { | ||
| 21 | + "name": "@ohos/axios", | ||
| 22 | + "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==", | ||
| 23 | + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | ||
| 24 | + "registryType": "ohpm" | ||
| 25 | + }, | ||
| 26 | + "@umeng/analytics@1.0.19": { | ||
| 27 | + "name": "@umeng/analytics", | ||
| 28 | + "integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==", | ||
| 29 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har", | ||
| 30 | + "registryType": "ohpm" | ||
| 31 | + }, | ||
| 32 | + "@umeng/common@1.0.21": { | ||
| 33 | + "name": "@umeng/common", | ||
| 34 | + "integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==", | ||
| 35 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har", | ||
| 36 | + "registryType": "ohpm", | ||
| 37 | + "dependencies": { | ||
| 38 | + "libcommon.so": "./src/main/cpp/types/libcommon" | ||
| 39 | + } | ||
| 40 | + }, | ||
| 41 | + "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": { | ||
| 42 | + "name": "libcommon.so", | ||
| 43 | + "resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 44 | + "registryType": "local" | ||
| 45 | + }, | ||
| 46 | + "wdBean@../wdBean": { | ||
| 47 | + "name": "wdbean", | ||
| 48 | + "resolved": "../wdBean", | ||
| 49 | + "registryType": "local" | ||
| 50 | + }, | ||
| 51 | + "wdConstant@../../commons/wdConstant": { | ||
| 52 | + "name": "wdconstant", | ||
| 53 | + "resolved": "../../commons/wdConstant", | ||
| 54 | + "registryType": "local" | ||
| 55 | + }, | ||
| 56 | + "wdKit@../../commons/wdKit": { | ||
| 57 | + "name": "wdkit", | ||
| 58 | + "resolved": "../../commons/wdKit", | ||
| 59 | + "registryType": "local", | ||
| 60 | + "dependencies": { | ||
| 61 | + "@umeng/common": "^1.0.21", | ||
| 62 | + "@umeng/analytics": "^1.0.19" | ||
| 63 | + } | ||
| 64 | + }, | ||
| 65 | + "wdNetwork@../../commons/wdNetwork": { | ||
| 66 | + "name": "wdnetwork", | ||
| 67 | + "resolved": "../../commons/wdNetwork", | ||
| 68 | + "registryType": "local", | ||
| 69 | + "dependencies": { | ||
| 70 | + "wdConstant": "file:../wdConstant", | ||
| 71 | + "wdKit": "file:../wdKit", | ||
| 72 | + "@ohos/axios": "^2.1.1" | ||
| 73 | + } | ||
| 74 | + }, | ||
| 75 | + "wdRouter@../../commons/wdRouter": { | ||
| 76 | + "name": "wdrouter", | ||
| 77 | + "resolved": "../../commons/wdRouter", | ||
| 78 | + "registryType": "local", | ||
| 79 | + "dependencies": { | ||
| 80 | + "wdKit": "file:../wdKit", | ||
| 81 | + "wdBean": "file:../../features/wdBean", | ||
| 82 | + "wdNetwork": "file:../../commons/wdNetwork", | ||
| 83 | + "wdConstant": "file:../../commons/wdConstant" | ||
| 84 | + } | ||
| 85 | + }, | ||
| 86 | + "wdShareBase@../../commons/wdShareBase": { | ||
| 87 | + "name": "wdsharebase", | ||
| 88 | + "resolved": "../../commons/wdShareBase", | ||
| 89 | + "registryType": "local", | ||
| 90 | + "packageType": "InterfaceHar" | ||
| 91 | + } | ||
| 92 | + } | ||
| 93 | +} |
| 1 | +{ | ||
| 2 | + "name": "wdshare", | ||
| 3 | + "version": "1.0.0", | ||
| 4 | + "description": "Please describe the basic information.", | ||
| 5 | + "main": "Index.ets", | ||
| 6 | + "author": "", | ||
| 7 | + "license": "Apache-2.0", | ||
| 8 | + "packageType": "InterfaceHar", | ||
| 9 | + "dependencies": { | ||
| 10 | + "wdKit": "file:../../commons/wdKit", | ||
| 11 | + "wdBean": "file:../../features/wdBean", | ||
| 12 | + "wdRouter": "file:../../commons/wdRouter", | ||
| 13 | + "wdShareBase": "file:../../commons/wdShareBase" | ||
| 14 | + } | ||
| 15 | +} |
| 1 | +import { ContentDetailDTO, ContentDTO, PageInfoDTO } from 'wdBean/Index'; | ||
| 2 | +import { ShareScene, ShareType, WDShareBase } from 'wdShareBase/Index'; | ||
| 3 | +import { ShareContentType } from 'wdShareBase/src/main/ets/Constant'; | ||
| 4 | + | ||
| 5 | +export class WDShare { | ||
| 6 | + | ||
| 7 | + static shareContent(content: ContentDetailDTO, pageName: string ="", pageId: string = "") { | ||
| 8 | + | ||
| 9 | + //TODO: 处理分享弹框交互和 海报逻辑 | ||
| 10 | + | ||
| 11 | + WDShareBase.getInstance().share({ | ||
| 12 | + to: ShareType.System, | ||
| 13 | + scene: ShareScene.System, | ||
| 14 | + type: ShareContentType.Link, | ||
| 15 | + obj: { | ||
| 16 | + title: content.shareInfo.shareTitle, | ||
| 17 | + desc: content.shareInfo.shareSummary, | ||
| 18 | + link: content.shareInfo.shareUrl, | ||
| 19 | + } | ||
| 20 | + }) | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + static shareProgram(program: ContentDTO, pageName: string ="", pageId: string = "") { | ||
| 24 | + | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + static shareSubject(subject: PageInfoDTO) { | ||
| 28 | + | ||
| 29 | + | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | +} |
| 1 | +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; | ||
| 2 | + | ||
| 3 | +export default function localUnitTest() { | ||
| 4 | + describe('localUnitTest',() => { | ||
| 5 | + // Defines a test suite. Two parameters are supported: test suite name and test suite function. | ||
| 6 | + beforeAll(() => { | ||
| 7 | + // Presets an action, which is performed only once before all test cases of the test suite start. | ||
| 8 | + // This API supports only one parameter: preset action function. | ||
| 9 | + }); | ||
| 10 | + beforeEach(() => { | ||
| 11 | + // Presets an action, which is performed before each unit test case starts. | ||
| 12 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 13 | + // This API supports only one parameter: preset action function. | ||
| 14 | + }); | ||
| 15 | + afterEach(() => { | ||
| 16 | + // Presets a clear action, which is performed after each unit test case ends. | ||
| 17 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 18 | + // This API supports only one parameter: clear action function. | ||
| 19 | + }); | ||
| 20 | + afterAll(() => { | ||
| 21 | + // Presets a clear action, which is performed after all test cases of the test suite end. | ||
| 22 | + // This API supports only one parameter: clear action function. | ||
| 23 | + }); | ||
| 24 | + it('assertContain', 0, () => { | ||
| 25 | + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. | ||
| 26 | + let a = 'abc'; | ||
| 27 | + let b = 'b'; | ||
| 28 | + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. | ||
| 29 | + expect(a).assertContain(b); | ||
| 30 | + expect(a).assertEqual(a); | ||
| 31 | + }); | ||
| 32 | + }); | ||
| 33 | +} |
| 1 | +{ | ||
| 2 | + "meta": { | ||
| 3 | + "stableOrder": true | ||
| 4 | + }, | ||
| 5 | + "lockfileVersion": 3, | ||
| 6 | + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | + "specifiers": { | ||
| 8 | + "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | ||
| 9 | + "@sensorsdata/analytics@^0.0.2": "@sensorsdata/analytics@0.0.2", | ||
| 10 | + "@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19", | ||
| 11 | + "@umeng/common@^1.0.21": "@umeng/common@1.0.21", | ||
| 12 | + "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 13 | + "wdBean@../wdBean": "wdBean@../wdBean", | ||
| 14 | + "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", | ||
| 15 | + "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", | ||
| 16 | + "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork" | ||
| 17 | + }, | ||
| 18 | + "packages": { | ||
| 19 | + "@ohos/axios@2.2.0": { | ||
| 20 | + "name": "@ohos/axios", | ||
| 21 | + "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==", | ||
| 22 | + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | ||
| 23 | + "registryType": "ohpm" | ||
| 24 | + }, | ||
| 25 | + "@sensorsdata/analytics@0.0.2": { | ||
| 26 | + "name": "@sensorsdata/analytics", | ||
| 27 | + "integrity": "sha512-SQCEmOw8ftGJmKtPl/1qUczZqu/yoQ4F2QHpK2Mayk+XctvNDSHn4QWengHj/pg36AopvuVfa0i6KR9c4KiIuQ==", | ||
| 28 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@sensorsdata/analytics/-/analytics-0.0.2.har", | ||
| 29 | + "registryType": "ohpm" | ||
| 30 | + }, | ||
| 31 | + "@umeng/analytics@1.0.19": { | ||
| 32 | + "name": "@umeng/analytics", | ||
| 33 | + "integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==", | ||
| 34 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har", | ||
| 35 | + "registryType": "ohpm" | ||
| 36 | + }, | ||
| 37 | + "@umeng/common@1.0.21": { | ||
| 38 | + "name": "@umeng/common", | ||
| 39 | + "integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==", | ||
| 40 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har", | ||
| 41 | + "registryType": "ohpm", | ||
| 42 | + "dependencies": { | ||
| 43 | + "libcommon.so": "./src/main/cpp/types/libcommon" | ||
| 44 | + } | ||
| 45 | + }, | ||
| 46 | + "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": { | ||
| 47 | + "name": "libcommon.so", | ||
| 48 | + "resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 49 | + "registryType": "local" | ||
| 50 | + }, | ||
| 51 | + "wdBean@../wdBean": { | ||
| 52 | + "name": "wdbean", | ||
| 53 | + "resolved": "../wdBean", | ||
| 54 | + "registryType": "local" | ||
| 55 | + }, | ||
| 56 | + "wdConstant@../../commons/wdConstant": { | ||
| 57 | + "name": "wdconstant", | ||
| 58 | + "resolved": "../../commons/wdConstant", | ||
| 59 | + "registryType": "local" | ||
| 60 | + }, | ||
| 61 | + "wdKit@../../commons/wdKit": { | ||
| 62 | + "name": "wdkit", | ||
| 63 | + "resolved": "../../commons/wdKit", | ||
| 64 | + "registryType": "local", | ||
| 65 | + "dependencies": { | ||
| 66 | + "@umeng/common": "^1.0.21", | ||
| 67 | + "@umeng/analytics": "^1.0.19" | ||
| 68 | + } | ||
| 69 | + }, | ||
| 70 | + "wdNetwork@../../commons/wdNetwork": { | ||
| 71 | + "name": "wdnetwork", | ||
| 72 | + "resolved": "../../commons/wdNetwork", | ||
| 73 | + "registryType": "local", | ||
| 74 | + "dependencies": { | ||
| 75 | + "wdConstant": "file:../wdConstant", | ||
| 76 | + "wdKit": "file:../wdKit", | ||
| 77 | + "@ohos/axios": "^2.1.1" | ||
| 78 | + } | ||
| 79 | + } | ||
| 80 | + } | ||
| 81 | +} |
| 1 | +{ | ||
| 2 | + "name": "wdtracking", | ||
| 3 | + "version": "1.0.0", | ||
| 4 | + "description": "Please describe the basic information.", | ||
| 5 | + "main": "Index.ets", | ||
| 6 | + "author": "", | ||
| 7 | + "license": "Apache-2.0", | ||
| 8 | + "packageType": "InterfaceHar", | ||
| 9 | + "dependencies": { | ||
| 10 | + "@sensorsdata/analytics": "^0.0.2", | ||
| 11 | + "wdKit": "file:../../commons/wdKit", | ||
| 12 | + "wdBean": "file:../../features/wdBean", | ||
| 13 | + "wdNetwork": "file:../../commons/wdNetwork", | ||
| 14 | +// "wdHwAbility": "file:../../features/wdHwAbility", | ||
| 15 | + "wdConstant": "file:../../commons/wdConstant" | ||
| 16 | + } | ||
| 17 | +} |
| 1 | +../../../../oh_modules/.ohpm/@sensorsdata+analytics@0.0.2/oh_modules/@sensorsdata/analytics |
| 1 | +../../wdBean |
| 1 | +../../../commons/wdConstant |
| 1 | +../../../commons/wdKit |
| 1 | +../../../commons/wdNetwork |
| @@ -17,6 +17,7 @@ import { | @@ -17,6 +17,7 @@ import { | ||
| 17 | import { HostEnum, HostManager, WDHttp } from 'wdNetwork'; | 17 | import { HostEnum, HostManager, WDHttp } from 'wdNetwork'; |
| 18 | import { LoginModule } from 'wdLogin/src/main/ets/LoginModule'; | 18 | import { LoginModule } from 'wdLogin/src/main/ets/LoginModule'; |
| 19 | import { ConfigurationConstant } from '@kit.AbilityKit'; | 19 | import { ConfigurationConstant } from '@kit.AbilityKit'; |
| 20 | +import { WDPushNotificationManager } from 'wdHwAbility/Index'; | ||
| 20 | 21 | ||
| 21 | export default class EntryAbility extends UIAbility { | 22 | export default class EntryAbility extends UIAbility { |
| 22 | onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { | 23 | onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { |
| @@ -44,6 +45,13 @@ export default class EntryAbility extends UIAbility { | @@ -44,6 +45,13 @@ export default class EntryAbility extends UIAbility { | ||
| 44 | EmitterUtils.receiveEvent(EmitterEventId.NETWORK_DISCONNECTED, (() => { | 45 | EmitterUtils.receiveEvent(EmitterEventId.NETWORK_DISCONNECTED, (() => { |
| 45 | Logger.info('network disconnected') | 46 | Logger.info('network disconnected') |
| 46 | })) | 47 | })) |
| 48 | + | ||
| 49 | + WDPushNotificationManager.getInstance().onWant(want) | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + // App活着情况下,点击推送通知进入 | ||
| 53 | + onNewWant(want: Want, launchParam: AbilityConstant.LaunchParam): void { | ||
| 54 | + WDPushNotificationManager.getInstance().onWant(want) | ||
| 47 | } | 55 | } |
| 48 | 56 | ||
| 49 | onDestroy(): void { | 57 | onDestroy(): void { |
| 1 | +{"v":"5.6.10","fr":60,"ip":0,"op":61,"w":216,"h":216,"nm":"阶段1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"形状图层 2","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":22,"s":[0]},{"t":30,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[108,105.128,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[80,80,100],"ix":6}},"ao":0,"shapes":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":26,"s":[2,2]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":30,"s":[32,32]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":40,"s":[32,32]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":50,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":60,"s":[72,72]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":70,"s":[80,80]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":80,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":90,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":170,"s":[0,0]},{"t":180,"s":[80,80]}],"ix":2},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":60,"s":[0,0],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":70,"s":[0,0],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":80,"s":[0,0],"to":[0,0],"ti":[0,0]},{"t":180,"s":[0,0]}],"ix":3},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":40,"s":[40]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":50,"s":[30]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":60,"s":[12]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":70,"s":[12]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":90,"s":[40]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":170,"s":[40]},{"t":180,"s":[12]}],"ix":4},"nm":"矩形路径 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.854901960784,0.854901960784,0.854901960784,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":8,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false}],"ip":0,"op":61,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"形状图层 1","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":22,"s":[0]},{"t":30,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[108,105.128,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[80,80,100],"ix":6}},"ao":0,"shapes":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":50,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":55,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":60,"s":[32,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":65,"s":[32,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":70,"s":[32,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":80,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":85,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":160,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":170,"s":[8,8]},{"t":180,"s":[32,8]}],"ix":2},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[0,0],"to":[-0.675,0],"ti":[1.667,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":55,"s":[0,0],"to":[-1.625,0],"ti":[0.74,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":60,"s":[-8,0],"to":[-0.47,0],"ti":[0.293,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":65,"s":[-8,0],"to":[-0.643,0],"ti":[-0.916,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":70,"s":[-9,0],"to":[1.333,0],"ti":[-1.5,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":80,"s":[0,0],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":160,"s":[0,0],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":170,"s":[0,0],"to":[-1.333,0],"ti":[1.333,0]},{"t":180,"s":[-8,0]}],"ix":3},"r":{"a":0,"k":4,"ix":4},"nm":"矩形路径 4","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":40,"s":[0,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":50,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":60,"s":[50,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":65,"s":[16,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":70,"s":[50,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":80,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":90,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":100,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":110,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":115,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":135,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":140,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":150,"s":[16,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":160,"s":[16,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":170,"s":[24,8]},{"t":180,"s":[50,8]}],"ix":2},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":40,"s":[0,0],"to":[13.333,0],"ti":[0,3]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[80,0],"to":[0,-3],"ti":[13.333,3]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":60,"s":[0,-18],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":65,"s":[-16,-18],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":70,"s":[0,-18],"to":[-13.333,3],"ti":[-13.333,-3]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":80,"s":[-80,0],"to":[6.982,1.571],"ti":[-36.763,0.427]},{"t":90,"s":[-4.023,11],"h":1},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":100,"s":[-0.023,11],"to":[33.441,-0.389],"ti":[-12.702,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":110,"s":[80,0],"to":[26.667,0],"ti":[-36.763,0.427]},{"t":120,"s":[-5,1],"h":1},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":130,"s":[-0.023,1],"to":[33.441,-0.389],"ti":[-12.702,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":140,"s":[80,0],"to":[26.667,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":150,"s":[-4,-20],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":160,"s":[-4,-20],"to":[0,0],"ti":[-12.702,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":170,"s":[80,0],"to":[26.667,0],"ti":[13.333,3]},{"t":180,"s":[0,-18]}],"ix":3},"r":{"a":0,"k":4,"ix":4},"nm":"矩形路径 3","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":40,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":50,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":60,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":65,"s":[50,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":70,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":80,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":90,"s":[0,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":100,"s":[0,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":110,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":115,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":135,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":140,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":150,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":160,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":170,"s":[24,8]},{"t":180,"s":[24,8]}],"ix":2},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":40,"s":[0,0],"to":[-13.333,0],"ti":[2,-3]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[-80,0],"to":[-2,3],"ti":[-11.333,-3]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":60,"s":[-12,18],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":65,"s":[0,18],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":70,"s":[-12,18],"to":[15.333,-3],"ti":[11.333,3]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":80,"s":[80,0],"to":[-5.54,-1.466],"ti":[34.366,0.891]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":89,"s":[-9,-10.939],"to":[-2.687,-0.07],"ti":[2.705,-0.032]},{"t":90,"s":[0,-11],"h":1},{"i":{"x":0.833,"y":0.813},"o":{"x":0.167,"y":0.167},"t":100,"s":[-0.023,-11],"to":[-33.471,0.39],"ti":[12.613,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.151},"t":110,"s":[-80,0],"to":[-26.667,0],"ti":[37.293,-0.434]},{"t":120,"s":[-1,-18],"h":1},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":130,"s":[-1,-18],"to":[-33.471,0.39],"ti":[12.613,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":140,"s":[-80,0],"to":[-26.667,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":150,"s":[12,-20],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":160,"s":[12,-20],"to":[0,0],"ti":[12.613,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":170,"s":[-80,0],"to":[-26.667,0],"ti":[-11.333,-3]},{"t":180,"s":[-12,18]}],"ix":3},"r":{"a":0,"k":4,"ix":4},"nm":"矩形路径 5","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.854901960784,0.854901960784,0.854901960784,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"rc","d":1,"s":{"a":0,"k":[80,80],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":12,"ix":4},"nm":"矩形路径 6","mn":"ADBE Vector Shape - Rect","hd":false}],"ip":0,"op":61,"st":0,"bm":0}],"markers":[]} |
| 1 | +{"v":"5.6.10","fr":30,"ip":0,"op":61,"w":216,"h":216,"nm":"循环","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"空 17","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[108,108,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[80,80,100],"ix":6}},"ao":0,"ip":0,"op":61,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"形状图层 9","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[0,0,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[],"ip":0,"op":62,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"形状图层 10","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[0,0,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[],"ip":0,"op":62,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"形状图层 8","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[0,0,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[],"ip":0,"op":62,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"形状图层 4","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[0,0,0],"ix":2},"a":{"a":0,"k":[-128.719,-846.25,0],"ix":1},"s":{"a":0,"k":[75,75,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0]],"o":[[0,0]],"v":[[-116.052,-812.547]],"c":false},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.854901960784,0.854901960784,0.854901960784,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"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":"形状 2","np":3,"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,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]],"v":[[-156.667,-856.417],[-157,-887.5],[-72.188,-887.5],[-72.25,-805],[-157,-805],[-157,-857.25],[-185.062,-876.875],[-185.25,-808.375],[-158,-828.688]],"c":false},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"rd","nm":"圆角 1","r":{"a":0,"k":6,"ix":1},"ix":2,"mn":"ADBE Vector Filter - RC","hd":false},{"ty":"st","c":{"a":0,"k":[0.854901960784,0.854901960784,0.854901960784,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"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":4,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":40,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":45,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":50,"s":[0]},{"t":55,"s":[100]}],"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":3,"nm":"修剪路径 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.854901960784,0.854901960784,0.854901960784,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":5,"nm":"修剪路径 2","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":40,"op":62,"st":-30,"bm":0},{"ddd":0,"ind":7,"ty":3,"nm":"空 10","parent":1,"sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[0,8,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":62,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"形状图层 6","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[0,0,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[],"ip":0,"op":62,"st":0,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"形状图层 3","parent":7,"sr":0.55,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":25,"s":[-29.233,-8.102,0],"to":[5.206,0,0],"ti":[-5.206,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":27.5,"s":[2,-8.102,0],"to":[0,0,0],"ti":[0,0,0]},{"t":30.000244140625,"s":[2,-8.102,0]}],"ix":2},"a":{"a":0,"k":[-161.25,-836.25,0],"ix":1},"s":{"a":0,"k":[75,75,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":25.05,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"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]],"v":[[-122.168,-825.454],[-122.187,-825.562],[-121.982,-825.563],[-122.169,-825.459],[-122.458,-825.25],[-122.125,-825.833],[-122.302,-825.428],[-122.263,-825.404],[-122.177,-825.24],[-122.129,-825.547],[-122.557,-825.307],[-122.006,-825.241],[-122.323,-825.531],[-122.287,-825.286],[-122.111,-825.556],[-122.067,-825.434],[-122.399,-825.651],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":25.325,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"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]],"v":[[-122.168,-825.454],[-122.187,-825.562],[-121.982,-825.563],[-122.169,-825.459],[-122.458,-825.25],[-122.125,-825.833],[-122.302,-825.428],[-122.263,-825.404],[-122.177,-825.24],[-122.129,-825.547],[-122.557,-825.307],[-122.006,-825.241],[-122.323,-825.531],[-122.287,-825.286],[-122.111,-825.556],[-122.067,-825.434],[-122.399,-825.651],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":25.6,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.002,-0.002],[0.004,-0.004],[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.008,0.008],[-0.012,0.012],[0,0]],"v":[[-104.503,-842.815],[-104.523,-842.923],[-104.317,-842.923],[-104.504,-842.819],[-104.794,-842.61],[-104.46,-843.194],[-104.637,-842.788],[-104.598,-842.765],[-104.512,-842.6],[-104.464,-842.908],[-104.892,-842.667],[-104.341,-842.602],[-104.658,-842.892],[-104.622,-842.647],[-104.446,-842.917],[-104.403,-842.794],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":25.875,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.788,-0.816],[2.14,-2.151],[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],[4.118,4.266],[-5.943,5.974],[0,0]],"v":[[-105.501,-856.621],[-105.521,-856.729],[-105.315,-856.73],[-105.502,-856.625],[-105.792,-856.417],[-105.458,-857],[-105.635,-856.594],[-105.596,-856.571],[-105.51,-856.406],[-105.462,-856.714],[-105.89,-856.473],[-105.339,-856.408],[-105.656,-856.698],[-105.621,-856.453],[-105.444,-856.723],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":26.15,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-6.79,-6.854],[2.14,-2.151],[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],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-128.668,-879.788],[-128.687,-879.896],[-128.482,-879.896],[-128.669,-879.792],[-128.958,-879.583],[-128.625,-880.167],[-128.802,-879.761],[-128.763,-879.738],[-128.677,-879.573],[-128.629,-879.881],[-129.057,-879.64],[-128.506,-879.574],[-128.823,-879.865],[-128.787,-879.62],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":26.425,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.899,0.868],[-3.133,-3.104],[-6.79,-6.854],[2.14,-2.151],[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],[3.047,-2.941],[6.288,6.23],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-141.642,-879.455],[-141.662,-879.563],[-141.456,-879.564],[-141.643,-879.459],[-141.933,-879.251],[-141.6,-879.834],[-141.776,-879.428],[-141.738,-879.405],[-141.652,-879.24],[-141.603,-879.548],[-142.032,-879.307],[-141.481,-879.242],[-141.797,-879.532],[-141.762,-879.287],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":26.7,"s":[{"i":[[0,0],[-0.032,0.018],[-0.012,-0.068],[0.06,-0.039],[-0.014,0.118],[-0.148,0.168],[0.045,-0.14],[-0.008,-0.013],[-0.042,0.045],[0.102,0.018],[-0.118,0.114],[0,0],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[-0.007,-0.036],[0.059,-0.035],[0.013,0.07],[-0.099,0.065],[0.026,-0.222],[0.097,-0.111],[-0.005,0.014],[0.034,0.052],[0.071,-0.076],[-0.161,-0.028],[2.702,-2.61],[0,0],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-161.668,-860.288],[-161.687,-860.396],[-161.482,-860.396],[-161.669,-860.292],[-161.958,-860.083],[-161.625,-860.667],[-161.802,-860.261],[-161.763,-860.238],[-161.677,-860.073],[-161.629,-860.381],[-162.057,-860.14],[-161.506,-860.074],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":26.975,"s":[{"i":[[0,0],[-0.032,0.018],[-0.012,-0.067],[0.06,-0.039],[-0.014,0.118],[-0.148,0.168],[0.045,-0.14],[-0.008,-0.013],[-0.042,0.045],[0.102,0.018],[-0.131,-0.098],[-0.007,-0.007],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[-0.007,-0.036],[0.059,-0.035],[0.013,0.07],[-0.099,0.065],[0.026,-0.222],[0.097,-0.11],[-0.005,0.014],[0.034,0.052],[0.071,-0.076],[-0.161,-0.028],[2.205,1.713],[0.015,0.015],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-182.524,-880.121],[-182.544,-880.229],[-182.338,-880.23],[-182.525,-880.125],[-182.815,-879.917],[-182.481,-880.5],[-182.658,-880.094],[-182.62,-880.071],[-182.533,-879.906],[-182.485,-880.214],[-182.913,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":27.25,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.131,1.223],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-194.334,-880.121],[-194.354,-880.229],[-194.148,-880.23],[-194.335,-880.125],[-194.625,-879.917],[-194.292,-880.5],[-194.468,-880.094],[-194.43,-880.071],[-194.344,-879.906],[-194.296,-880.214],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":27.525,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-217.668,-856.788],[-217.687,-856.896],[-217.482,-856.896],[-217.669,-856.792],[-217.958,-856.583],[-217.625,-857.167],[-217.802,-856.761],[-217.763,-856.738],[-217.677,-856.573],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":27.8,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[1.319,1.32],[-4.389,4.46],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-2.515,-2.517],[6.73,-6.839],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-217.501,-841.983],[-217.521,-842.091],[-217.315,-842.092],[-217.502,-841.988],[-217.792,-841.779],[-217.459,-842.362],[-217.635,-841.957],[-217.597,-841.933],[-217.511,-841.769],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":28.075,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-169.334,-794.121],[-169.354,-794.229],[-169.148,-794.23],[-169.335,-794.125],[-169.625,-793.917],[-169.292,-794.5],[-169.468,-794.094],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":28.35,"s":[{"i":[[0,0],[0.072,-0.109],[0,0],[0,0],[0,0],[0,0],[2.003,-2.004],[4.844,4.778],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[-0.007,0.131],[-0.038,0.059],[0,0],[0,0],[0,0],[0,0],[-4.875,4.877],[-12.044,-11.879],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-153.487,-794.01],[-153.507,-794.118],[-153.301,-794.119],[-153.488,-794.015],[-153.778,-793.806],[-153.444,-794.389],[-153.677,-793.928],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":28.625,"s":[{"i":[[0,0],[0.072,-0.109],[0,0],[0,0],[0,0],[0,0],[9.521,-9.728],[4.844,4.778],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[-0.007,0.131],[-0.038,0.059],[0,0],[0,0],[0,0],[0,0],[-4.823,4.928],[-12.044,-11.879],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-125.043,-822.621],[-125.062,-822.729],[-124.857,-822.73],[-125.044,-822.625],[-125.333,-822.417],[-125,-823],[-153.677,-793.928],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":28.9,"s":[{"i":[[0,0],[0.072,-0.109],[0,0],[0,0],[0,0],[0,0],[9.521,-9.728],[4.844,4.778],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[-0.007,0.131],[-0.038,0.059],[0,0],[0,0],[0,0],[0,0],[-4.823,4.928],[-12.044,-11.879],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-148.209,-846.954],[-148.229,-847.062],[-148.023,-847.063],[-148.21,-846.959],[-148.5,-846.75],[-125,-823],[-153.677,-793.928],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":29.175,"s":[{"i":[[0,0],[0.072,-0.109],[0,0],[0,0],[0,0],[0,0],[9.521,-9.728],[4.844,4.778],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[-0.007,0.131],[-0.038,0.059],[0,0],[0,0],[0,0],[0,0],[-4.823,4.928],[-12.044,-11.879],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-159.022,-836.308],[-159.041,-836.417],[-158.835,-836.417],[-159.023,-836.313],[-148.5,-846.75],[-125,-823],[-153.677,-793.928],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":29.45,"s":[{"i":[[0,0],[0,0],[-2.624,-2.5],[-1.61,1.597],[0,0],[0,0],[9.521,-9.728],[4.844,4.778],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[0,0],[0,0],[1.772,1.688],[3.515,-3.486],[0,0],[0,0],[-4.823,4.928],[-12.044,-11.879],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-169.043,-836.788],[-169.062,-836.396],[-169.19,-836.563],[-159.044,-836.292],[-148.5,-846.75],[-125,-823],[-153.677,-793.928],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":29.725,"s":[{"i":[[0,0],[0,0],[-2.624,-2.5],[-1.61,1.597],[0,0],[0,0],[9.521,-9.728],[4.844,4.778],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[0,0],[0,0],[1.772,1.688],[3.515,-3.486],[0,0],[0,0],[-4.823,4.928],[-12.044,-11.879],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-177.018,-844.48],[-177.062,-844.062],[-169.19,-836.563],[-159.044,-836.292],[-148.5,-846.75],[-125,-823],[-153.677,-793.928],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":30,"s":[{"i":[[0,0],[0,0],[-2.624,-2.5],[-1.61,1.597],[0,0],[0,0],[9.521,-9.728],[4.844,4.778],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[0,0],[0,0],[1.772,1.688],[3.515,-3.486],[0,0],[0,0],[-4.823,4.928],[-12.044,-11.879],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-164.376,-857.788],[-177.062,-844.062],[-169.19,-836.563],[-159.044,-836.292],[-148.5,-846.75],[-125,-823],[-153.677,-793.928],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":34.825,"s":[{"i":[[0,0],[0,0],[-2.624,-2.5],[-1.61,1.597],[0,0],[0,0],[9.521,-9.728],[4.844,4.778],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[0,0],[0,0],[1.772,1.688],[3.515,-3.486],[0,0],[0,0],[-4.823,4.928],[-12.044,-11.879],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-164.376,-857.788],[-177.062,-844.062],[-169.19,-836.563],[-159.044,-836.292],[-148.5,-846.75],[-125,-823],[-153.677,-793.928],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":35.325,"s":[{"i":[[0,0],[0,0],[-2.624,-2.5],[-1.61,1.597],[0,0],[0,0],[9.521,-9.728],[4.844,4.778],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[0,0],[0,0],[1.772,1.688],[3.515,-3.486],[0,0],[0,0],[-4.823,4.928],[-12.044,-11.879],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-164.376,-857.788],[-177.062,-844.062],[-169.19,-836.563],[-159.044,-836.292],[-148.5,-846.75],[-125,-823],[-153.677,-793.928],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":35.6,"s":[{"i":[[0,0],[0,0],[-2.619,-2.495],[-1.607,1.594],[0,0],[0,0],[9.521,-9.728],[4.844,4.778],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[0,0],[0,0],[1.768,1.684],[3.508,-3.479],[0,0],[0,0],[-4.823,4.928],[-12.044,-11.879],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-169.023,-836.787],[-169.043,-836.396],[-169.17,-836.563],[-159.044,-836.292],[-148.5,-846.75],[-125,-823],[-153.677,-793.928],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":35.875,"s":[{"i":[[0,0],[0.072,-0.109],[0,0],[0,0],[0,0],[0,0],[9.521,-9.728],[4.844,4.778],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[-0.007,0.131],[-0.038,0.059],[0,0],[0,0],[0,0],[0,0],[-4.823,4.928],[-12.044,-11.879],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-159.043,-836.288],[-159.062,-836.396],[-158.857,-836.396],[-159.044,-836.292],[-148.5,-846.75],[-125,-823],[-153.677,-793.928],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":36.15,"s":[{"i":[[0,0],[0.072,-0.109],[0,0],[0,0],[0,0],[0,0],[9.521,-9.728],[4.844,4.778],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[-0.007,0.131],[-0.038,0.059],[0,0],[0,0],[0,0],[0,0],[-4.823,4.928],[-12.044,-11.879],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-148.209,-846.954],[-148.229,-847.062],[-148.023,-847.063],[-148.21,-846.959],[-148.5,-846.75],[-125,-823],[-153.677,-793.928],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":36.425,"s":[{"i":[[0,0],[0.072,-0.109],[0,0],[0,0],[0,0],[0,0],[9.521,-9.728],[4.844,4.778],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[-0.007,0.131],[-0.038,0.059],[0,0],[0,0],[0,0],[0,0],[-4.823,4.928],[-12.044,-11.879],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-125.088,-822.669],[-125.108,-822.777],[-124.902,-822.777],[-125.089,-822.673],[-125.379,-822.464],[-125,-823],[-153.677,-793.928],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":36.7,"s":[{"i":[[0,0],[0.072,-0.109],[0,0],[0,0],[0,0],[0,0],[1.988,-1.989],[4.844,4.778],[13.374,13.191],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[-0.007,0.131],[-0.038,0.059],[0,0],[0,0],[0,0],[0,0],[-4.875,4.877],[-12.044,-11.879],[-2.538,-2.503],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-153.543,-793.954],[-153.562,-794.062],[-153.357,-794.063],[-153.544,-793.959],[-153.833,-793.75],[-153.5,-794.333],[-153.677,-793.928],[-169.43,-794.071],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":36.975,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[13.351,13.168],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-2.538,-2.504],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-169.429,-794.215],[-169.448,-794.323],[-169.242,-794.323],[-169.429,-794.219],[-169.719,-794.01],[-169.386,-794.593],[-169.562,-794.188],[-169.524,-794.165],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":37.25,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[1.322,1.323],[-4.398,4.469],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-2.52,-2.522],[6.743,-6.853],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-217.501,-841.954],[-217.521,-842.062],[-217.315,-842.063],[-217.502,-841.959],[-217.792,-841.75],[-217.458,-842.333],[-217.635,-841.928],[-217.596,-841.904],[-217.51,-841.74],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":37.525,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-6.365,6.314],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-217.668,-856.788],[-217.687,-856.896],[-217.482,-856.896],[-217.669,-856.792],[-217.958,-856.583],[-217.625,-857.167],[-217.802,-856.761],[-217.763,-856.738],[-217.677,-856.573],[-217.629,-856.881],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":37.8,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.142,1.233],[-3.502,-3.39],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[3.78,-3.749],[7.835,7.585],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-194.38,-880.076],[-194.4,-880.184],[-194.194,-880.184],[-194.381,-880.08],[-194.671,-879.871],[-194.337,-880.454],[-194.514,-880.049],[-194.475,-880.026],[-194.389,-879.861],[-194.341,-880.169],[-194.724,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":38.075,"s":[{"i":[[0,0],[-0.032,0.018],[-0.012,-0.068],[0.06,-0.039],[-0.014,0.118],[-0.148,0.168],[0.045,-0.14],[-0.008,-0.013],[-0.042,0.045],[0.102,0.018],[-0.129,-0.101],[0,0],[0,0],[-6.474,6.677],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[-0.007,-0.036],[0.059,-0.035],[0.013,0.07],[-0.099,0.065],[0.026,-0.222],[0.097,-0.111],[-0.005,0.014],[0.034,0.052],[0.071,-0.076],[-0.161,-0.028],[2.202,1.723],[0,0],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-182.501,-880.121],[-182.521,-880.229],[-182.315,-880.23],[-182.502,-880.125],[-182.792,-879.917],[-182.458,-880.5],[-182.635,-880.094],[-182.596,-880.071],[-182.51,-879.906],[-182.462,-880.214],[-182.89,-879.973],[-182.339,-879.908],[-161.823,-860.365],[-141.954,-879.953],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":38.35,"s":[{"i":[[0,0],[-0.032,0.018],[-0.012,-0.067],[0.06,-0.039],[-0.014,0.118],[-0.148,0.168],[0.045,-0.14],[-0.008,-0.013],[-0.042,0.045],[0.102,0.018],[-0.117,0.113],[0,0],[0,0],[-6.463,6.666],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[0,0]],"o":[[-0.007,-0.036],[0.059,-0.035],[0.013,0.07],[-0.099,0.065],[0.026,-0.222],[0.097,-0.11],[-0.005,0.014],[0.034,0.052],[0.071,-0.076],[-0.161,-0.028],[2.697,-2.605],[0,0],[0,0],[2.954,-3.047],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-161.629,-860.325],[-161.648,-860.433],[-161.443,-860.434],[-161.63,-860.329],[-161.919,-860.121],[-161.586,-860.704],[-161.763,-860.299],[-161.724,-860.275],[-161.638,-860.11],[-161.59,-860.418],[-162.018,-860.177],[-161.467,-860.112],[-161.784,-860.402],[-141.954,-879.952],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":38.625,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.901,0.87],[-3.139,-3.11],[-6.79,-6.854],[2.14,-2.151],[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],[3.053,-2.947],[6.3,6.242],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-141.668,-879.454],[-141.687,-879.563],[-141.482,-879.563],[-141.669,-879.459],[-141.958,-879.25],[-141.625,-879.833],[-141.802,-879.428],[-141.763,-879.404],[-141.677,-879.24],[-141.629,-879.548],[-142.057,-879.307],[-141.506,-879.241],[-141.823,-879.532],[-141.787,-879.287],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":38.9,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-6.79,-6.854],[2.14,-2.151],[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],[4.173,4.212],[-5.943,5.974],[0,0]],"v":[[-128.668,-879.788],[-128.687,-879.896],[-128.482,-879.896],[-128.669,-879.792],[-128.958,-879.583],[-128.625,-880.167],[-128.802,-879.761],[-128.763,-879.738],[-128.677,-879.573],[-128.629,-879.881],[-129.057,-879.64],[-128.506,-879.574],[-128.823,-879.865],[-128.787,-879.62],[-128.611,-879.89],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":39.175,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.799,-0.828],[2.14,-2.151],[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],[4.118,4.266],[-5.943,5.974],[0,0]],"v":[[-105.546,-856.666],[-105.566,-856.774],[-105.36,-856.775],[-105.547,-856.671],[-105.837,-856.462],[-105.504,-857.045],[-105.68,-856.64],[-105.642,-856.616],[-105.556,-856.451],[-105.507,-856.759],[-105.935,-856.519],[-105.385,-856.453],[-105.701,-856.743],[-105.666,-856.498],[-105.489,-856.768],[-105.401,-856.601],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":39.45,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"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]],"v":[[-104.501,-842.788],[-104.521,-842.896],[-104.315,-842.896],[-104.502,-842.792],[-104.792,-842.583],[-104.458,-843.167],[-104.635,-842.761],[-104.596,-842.738],[-104.51,-842.573],[-104.462,-842.881],[-104.89,-842.64],[-104.339,-842.574],[-104.656,-842.865],[-104.621,-842.62],[-104.444,-842.89],[-104.401,-842.767],[-104.733,-842.984],[-122.562,-825.062]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":39.725,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"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]],"v":[[-122.168,-825.454],[-122.187,-825.562],[-121.982,-825.563],[-122.169,-825.459],[-122.458,-825.25],[-122.125,-825.833],[-122.302,-825.428],[-122.263,-825.404],[-122.177,-825.24],[-122.129,-825.547],[-122.557,-825.307],[-122.006,-825.241],[-122.323,-825.531],[-122.287,-825.286],[-122.111,-825.556],[-122.067,-825.434],[-122.399,-825.651],[-122.562,-825.062]],"c":false}]},{"t":40.000146484375,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"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]],"v":[[-122.168,-825.454],[-122.187,-825.562],[-121.982,-825.563],[-122.169,-825.459],[-122.458,-825.25],[-122.125,-825.833],[-122.302,-825.428],[-122.263,-825.404],[-122.177,-825.24],[-122.129,-825.547],[-122.557,-825.307],[-122.006,-825.241],[-122.323,-825.531],[-122.287,-825.286],[-122.111,-825.556],[-122.067,-825.434],[-122.399,-825.651],[-122.562,-825.062]],"c":false}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"rd","nm":"圆角 1","r":{"a":0,"k":0,"ix":1},"ix":2,"mn":"ADBE Vector Filter - RC","hd":false},{"ty":"st","c":{"a":0,"k":[0.854901960784,0.854901960784,0.854901960784,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"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":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":25,"op":40,"st":-5.5,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"形状图层 2","parent":1,"sr":0.5,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-4,1,0],"ix":2},"a":{"a":0,"k":[-100,-843.5,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":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":9,"s":[{"i":[[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]],"v":[[-92.5,-835.156],[-92.444,-835.25],[-92.525,-835.206],[-92.45,-835.2],[-92.35,-835.3],[-92.4,-835.25],[-92.36,-835.214],[-92.339,-835.211],[-92.389,-835.226]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[{"i":[[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]],"v":[[-92.5,-835.156],[-120.364,-835.25],[-120.38,-835.233],[-120.305,-835.227],[-120.205,-835.326],[-120.255,-835.277],[-120.215,-835.24],[-120.194,-835.238],[-120.244,-835.253]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10.25,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-130.55,-836.9],[-130.45,-837],[-130.5,-836.95],[-130.46,-836.914],[-130.439,-836.911],[-130.489,-836.927]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10.5,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-129.25,-840],[-129.15,-840.1],[-129.2,-840.05],[-129.16,-840.014],[-129.139,-840.011],[-129.189,-840.027]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":11.25,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-129.25,-840],[-70.75,-877],[-70.5,-877.25],[-70.06,-877.614],[-69.939,-877.611],[-69.889,-877.726]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":11.5,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0.257,-4.242],[0.048,-1.1],[0.15,0.2],[0,0]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[-0.25,4.125],[-0.015,0.338],[-0.223,-0.297],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-129.25,-840],[-70.75,-877],[-67,-873.5],[-67.008,-872.753],[-66.525,-872.625],[-66.75,-872.013]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":11.75,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0.257,-4.242],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[-0.25,4.125],[0,0],[0,0],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-129.25,-840],[-70.75,-877],[-67,-873.5],[-66.983,-873.003],[-67,-873],[-67.083,-872.938]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":12.75,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0.257,-4.242],[0.386,-8.798],[0,0],[0.139,0.19]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[-0.25,4.125],[-0.119,2.705],[0,0],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-129.25,-840],[-70.75,-877],[-67,-873.5],[-69.183,-825.003],[-69.45,-818.25],[-69.267,-818.188]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":13,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0.257,-4.242],[0.483,-10.997],[0,0],[0.173,0.238]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[-0.25,4.125],[-0.148,3.381],[0,0],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-129.25,-840],[-70.75,-877],[-67,-873.5],[-69.733,-813.003],[-74.75,-811.75],[-74.5,-811.688]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":14,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0.257,-4.242],[0.483,-10.997],[1.5,2],[0,0]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[-0.25,4.125],[-0.148,3.381],[-2.23,-2.973],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-129.25,-840],[-70.75,-877],[-67,-873.5],[-69.733,-813.003],[-74.75,-811.75],[-106.25,-853.688]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":19,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0.257,-4.242],[0.483,-10.997],[1.5,2],[0,0]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[-0.25,4.125],[-0.148,3.381],[-2.23,-2.973],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-129.25,-840],[-70.75,-877],[-67,-873.5],[-69.733,-813.003],[-74.75,-811.75],[-106.25,-853.688]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0.257,-4.242],[0.483,-10.997],[0,0],[0.173,0.238]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[-0.25,4.125],[-0.148,3.381],[0,0],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-129.25,-840],[-70.75,-877],[-67,-873.5],[-69.733,-813.003],[-74.75,-811.75],[-74.5,-811.688]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20.25,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0.257,-4.242],[0.386,-8.798],[0,0],[0.139,0.19]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[-0.25,4.125],[-0.119,2.705],[0,0],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-129.25,-840],[-70.75,-877],[-67,-873.5],[-69.183,-825.003],[-69.45,-818.25],[-69.267,-818.188]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":21.25,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0.257,-4.242],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[-0.25,4.125],[0,0],[0,0],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-129.25,-840],[-70.75,-877],[-67,-873.5],[-66.983,-873.003],[-67,-873],[-67.083,-872.938]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":21.5,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0.257,-4.242],[0.048,-1.1],[0.15,0.2],[0,0]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[-0.25,4.125],[-0.015,0.338],[-0.223,-0.297],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-129.25,-840],[-70.75,-877],[-67,-873.5],[-67.008,-872.753],[-66.525,-872.625],[-66.75,-872.013]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":21.75,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-129.25,-840],[-70.75,-877],[-70.5,-877.25],[-70.06,-877.614],[-69.939,-877.611],[-69.889,-877.726]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":22.5,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-129.25,-840],[-129.15,-840.1],[-129.2,-840.05],[-129.16,-840.014],[-129.139,-840.011],[-129.189,-840.027]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":22.75,"s":[{"i":[[0,0],[0,0],[0.75,1.906],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[-0.782,-1.988],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-92.5,-835.156],[-127.344,-835.25],[-130.625,-836.906],[-130.55,-836.9],[-130.45,-837],[-130.5,-836.95],[-130.46,-836.914],[-130.439,-836.911],[-130.489,-836.927]],"c":false}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":23,"s":[{"i":[[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]],"v":[[-92.5,-835.156],[-120.364,-835.25],[-120.38,-835.233],[-120.305,-835.227],[-120.205,-835.326],[-120.255,-835.277],[-120.215,-835.24],[-120.194,-835.238],[-120.244,-835.253]],"c":false}]},{"t":24,"s":[{"i":[[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]],"v":[[-92.5,-835.156],[-92.444,-835.25],[-92.525,-835.206],[-92.45,-835.2],[-92.35,-835.3],[-92.4,-835.25],[-92.36,-835.214],[-92.339,-835.211],[-92.389,-835.226]],"c":false}]}],"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.854901960784,0.854901960784,0.854901960784,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":8.5,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":9,"s":[8]},{"t":9.5,"s":[8]}],"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":4,"op":24.5,"st":-7.5,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"外框","parent":1,"sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":-19.5,"s":[0]},{"t":-15.5,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[0,0,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":-10.5,"s":[32,32]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":-5.5,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":-0.5,"s":[72,72]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":4.5,"s":[72,72]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":9.5,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":14.5,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":54.5,"s":[0,0]},{"t":59.5,"s":[72,72]}],"ix":2},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":-0.5,"s":[0,0],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":4.5,"s":[0,0],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":9.5,"s":[0,0],"to":[0,0],"ti":[0,0]},{"t":59.5,"s":[0,0]}],"ix":3},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":-10.5,"s":[40]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":-5.5,"s":[30]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":-0.5,"s":[12]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":4.5,"s":[12]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":9.5,"s":[40]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":54.5,"s":[40]},{"t":59.5,"s":[12]}],"ix":4},"nm":"矩形路径 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.854901960784,0.854901960784,0.854901960784,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":8,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false}],"ip":-0.5,"op":62,"st":-30.5,"bm":0},{"ddd":0,"ind":12,"ty":4,"nm":"形状图层 5","parent":1,"sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":-19,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":-15,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":14.5,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":15,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":17,"s":[0]},{"t":17.5,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[0,0,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":-5,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":0,"s":[32,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":2.5,"s":[32,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":5,"s":[32,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":9.5,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":12.5,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":50,"s":[0,0]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":55,"s":[8,8]},{"t":60,"s":[32,8]}],"ix":2},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":-5,"s":[0,0],"to":[-1.333,0],"ti":[1.5,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[-8,0],"to":[-0.47,0],"ti":[0.293,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":2.5,"s":[-8,0],"to":[-0.643,0],"ti":[-0.916,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":5,"s":[-9,0],"to":[1.333,0],"ti":[-1.5,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":9.5,"s":[0,0],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[0,0],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":55,"s":[0,0],"to":[-1.333,0],"ti":[1.333,0]},{"t":60,"s":[-8,0]}],"ix":3},"r":{"a":0,"k":4,"ix":4},"nm":"矩形路径 4","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":-5,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":0,"s":[50,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":2.5,"s":[16,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":5,"s":[50,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":10,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":14.5,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":17.5,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":20,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":25,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":27.5,"s":[6,6]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":30,"s":[6,6]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":35,"s":[6,6]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":40,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":45,"s":[16,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":50,"s":[16,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":55,"s":[24,8]},{"t":60,"s":[50,8]}],"ix":2},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":-5,"s":[80,0],"to":[-13.333,-3],"ti":[13.333,3]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[0,-18],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":2.5,"s":[-16,-18],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":5,"s":[0,-18],"to":[-13.333,3],"ti":[-13.333,-3]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[-80,0],"to":[2.36,0.531],"ti":[-8.775,0.054]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":14.5,"s":[-25.6,0.037],"to":[1.115,-0.007],"ti":[-1.57,0.018]},{"t":17.5,"s":[28,0],"h":1},{"t":19,"s":[33,0],"h":1},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[38,0],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":25,"s":[80,0],"to":[21.757,-0.253],"ti":[31.158,-0.084]},{"t":27.5,"s":[40,0],"h":1},{"t":30,"s":[39,0],"h":1},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":35,"s":[39,0],"to":[-9.983,0.027],"ti":[-5.123,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":40,"s":[80,0],"to":[26.667,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":45,"s":[-4,-16],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[-4,-16],"to":[0,0],"ti":[-12.702,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":55,"s":[80,0],"to":[26.667,0],"ti":[13.333,3]},{"t":60,"s":[0,-18]}],"ix":3},"r":{"a":0,"k":4,"ix":4},"nm":"矩形路径 3","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":0,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":2.5,"s":[50,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":5,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":10,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":14.5,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":17.5,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":20,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":25,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":27.5,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":30,"s":[6,6]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":35,"s":[6,6]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":40,"s":[24,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":45,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":50,"s":[8,8]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":55,"s":[24,8]},{"t":60,"s":[24,8]}],"ix":2},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":-5,"s":[-80,0],"to":[11.333,3],"ti":[-11.333,-3]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[-12,18],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":2.5,"s":[0,18],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":5,"s":[-12,18],"to":[15.333,-3],"ti":[11.333,3]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[80,0],"to":[-5.54,-1.466],"ti":[34.366,0.891]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":14.5,"s":[28,0],"to":[-2.687,-0.07],"ti":[37.293,-0.434]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":17.5,"s":[-25,0],"to":[-21.127,0.246],"ti":[-5.31,0.1]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":19,"s":[-31,-0.091],"to":[3.103,-0.058],"ti":[13.753,-0.16]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[-38,0],"to":[-33.471,0.39],"ti":[12.613,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":25,"s":[-80,0],"to":[-8.727,0],"ti":[-18.481,-0.021]},{"t":27.5,"s":[-40,0],"h":1},{"t":30,"s":[-36,0],"h":1},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":35,"s":[-36,0],"to":[5.828,-0.956],"ti":[-3.003,1.787]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":40,"s":[-80,0],"to":[9.053,-5.387],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":45,"s":[12,-16],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":50,"s":[12,-16],"to":[0,0],"ti":[12.613,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":55,"s":[-80,0],"to":[-26.667,0],"ti":[-11.333,-3]},{"t":60,"s":[-12,18]}],"ix":3},"r":{"a":0,"k":4,"ix":4},"nm":"矩形路径 5","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.854901960784,0.854901960784,0.854901960784,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"rc","d":1,"s":{"a":0,"k":[80,80],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":12,"ix":4},"nm":"矩形路径 6","mn":"ADBE Vector Shape - Rect","hd":false}],"ip":0,"op":62,"st":-30,"bm":0}],"markers":[]} |
| @@ -31,10 +31,10 @@ struct ENewspaper { | @@ -31,10 +31,10 @@ struct ENewspaper { | ||
| 31 | 31 | ||
| 32 | pageTransition() { | 32 | pageTransition() { |
| 33 | // 定义页面进入时的效果,从底侧滑入 | 33 | // 定义页面进入时的效果,从底侧滑入 |
| 34 | - PageTransitionEnter({ type: RouteType.None, duration: 300 }) | 34 | + PageTransitionEnter({ type: RouteType.Push, duration: 400 }) |
| 35 | .slide(SlideEffect.Bottom) | 35 | .slide(SlideEffect.Bottom) |
| 36 | // 定义页面退出时的效果,向底侧滑出 | 36 | // 定义页面退出时的效果,向底侧滑出 |
| 37 | - PageTransitionExit({ type: RouteType.None, duration: 300 }) | 37 | + PageTransitionExit({ type: RouteType.Pop, duration: 400 }) |
| 38 | .slide(SlideEffect.Bottom) | 38 | .slide(SlideEffect.Bottom) |
| 39 | } | 39 | } |
| 40 | 40 |
| @@ -2,9 +2,8 @@ import { BottomNavigationComponent, LogoutViewModel, PermissionDesComponent } fr | @@ -2,9 +2,8 @@ import { BottomNavigationComponent, LogoutViewModel, PermissionDesComponent } fr | ||
| 2 | import { BreakpointConstants } from 'wdConstant'; | 2 | import { BreakpointConstants } from 'wdConstant'; |
| 3 | 3 | ||
| 4 | import { BreakpointSystem, EmitterEventId, EmitterUtils, Logger } from 'wdKit'; | 4 | import { BreakpointSystem, EmitterEventId, EmitterUtils, Logger } from 'wdKit'; |
| 5 | -import router from '@ohos.router'; | ||
| 6 | -import { promptAction } from '@kit.ArkUI'; | ||
| 7 | -import { HWLocationUtils } from 'wdHwAbility/Index'; | 5 | +import { HWLocationUtils, WDPushNotificationManager } from 'wdHwAbility/Index'; |
| 6 | +import { common } from '@kit.AbilityKit'; | ||
| 8 | 7 | ||
| 9 | 8 | ||
| 10 | const TAG = 'MainPage'; | 9 | const TAG = 'MainPage'; |
| @@ -24,6 +23,16 @@ struct MainPage { | @@ -24,6 +23,16 @@ struct MainPage { | ||
| 24 | aboutToAppear() { | 23 | aboutToAppear() { |
| 25 | HWLocationUtils.startLocationService() | 24 | HWLocationUtils.startLocationService() |
| 26 | this.breakpointSystem.register() | 25 | this.breakpointSystem.register() |
| 26 | + | ||
| 27 | + let context = getContext(this) as common.UIAbilityContext | ||
| 28 | + WDPushNotificationManager.getInstance().requestEnableNotifications(context).then((enabled) => { | ||
| 29 | + if (enabled) { | ||
| 30 | + WDPushNotificationManager.getInstance().fetchTokenAndBindProfileId() | ||
| 31 | + | ||
| 32 | + // WDPushNotificationManager.getInstance().sendLocalNotification() | ||
| 33 | + } | ||
| 34 | + }) | ||
| 35 | + | ||
| 27 | Logger.info(TAG, `aboutToAppear `); | 36 | Logger.info(TAG, `aboutToAppear `); |
| 28 | EmitterUtils.receiveEvent(EmitterEventId.FORCE_USER_LOGIN_OUT, () => { | 37 | EmitterUtils.receiveEvent(EmitterEventId.FORCE_USER_LOGIN_OUT, () => { |
| 29 | LogoutViewModel.clearLoginInfo() | 38 | LogoutViewModel.clearLoginInfo() |
| @@ -33,6 +42,11 @@ struct MainPage { | @@ -33,6 +42,11 @@ struct MainPage { | ||
| 33 | }) | 42 | }) |
| 34 | } | 43 | } |
| 35 | 44 | ||
| 45 | + pageTransition() { | ||
| 46 | + PageTransitionEnter({ type: RouteType.None, duration: 0 }) | ||
| 47 | + PageTransitionExit({ type: RouteType.None, duration: 0 }) | ||
| 48 | + } | ||
| 49 | + | ||
| 36 | aboutToDisappear() { | 50 | aboutToDisappear() { |
| 37 | this.breakpointSystem.unregister() | 51 | this.breakpointSystem.unregister() |
| 38 | Logger.info(TAG, 'aboutToDisappear'); | 52 | Logger.info(TAG, 'aboutToDisappear'); |
| 1 | import { Action } from 'wdBean'; | 1 | import { Action } from 'wdBean'; |
| 2 | import { SpacialTopicPageComponent } from 'wdComponent' | 2 | import { SpacialTopicPageComponent } from 'wdComponent' |
| 3 | import { CommonConstants } from 'wdConstant' | 3 | import { CommonConstants } from 'wdConstant' |
| 4 | -import { Logger } from 'wdKit' | 4 | +import { Logger, WindowModel } from 'wdKit' |
| 5 | import router from '@ohos.router'; | 5 | import router from '@ohos.router'; |
| 6 | 6 | ||
| 7 | const TAG = 'SpacialTopicPage'; | 7 | const TAG = 'SpacialTopicPage'; |
| @@ -27,6 +27,7 @@ struct SpacialTopicPage { | @@ -27,6 +27,7 @@ struct SpacialTopicPage { | ||
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | aboutToAppear() { | 29 | aboutToAppear() { |
| 30 | + WindowModel.shared.setWindowLayoutFullScreen(true) | ||
| 30 | Logger.info(TAG, 'aboutToAppear'); | 31 | Logger.info(TAG, 'aboutToAppear'); |
| 31 | let action: Action = router.getParams() as Action | 32 | let action: Action = router.getParams() as Action |
| 32 | this.action = action | 33 | this.action = action |
| @@ -34,14 +35,17 @@ struct SpacialTopicPage { | @@ -34,14 +35,17 @@ struct SpacialTopicPage { | ||
| 34 | 35 | ||
| 35 | aboutToDisappear() { | 36 | aboutToDisappear() { |
| 36 | Logger.info(TAG, 'aboutToDisappear'); | 37 | Logger.info(TAG, 'aboutToDisappear'); |
| 38 | + WindowModel.shared.setWindowLayoutFullScreen(false) | ||
| 37 | } | 39 | } |
| 38 | 40 | ||
| 39 | onPageShow() { | 41 | onPageShow() { |
| 42 | + WindowModel.shared.setWindowLayoutFullScreen(true) | ||
| 40 | Logger.info(TAG, 'onPageShow'); | 43 | Logger.info(TAG, 'onPageShow'); |
| 41 | } | 44 | } |
| 42 | 45 | ||
| 43 | onPageHide() { | 46 | onPageHide() { |
| 44 | Logger.info(TAG, 'onPageHide'); | 47 | Logger.info(TAG, 'onPageHide'); |
| 48 | + WindowModel.shared.setWindowLayoutFullScreen(false) | ||
| 45 | } | 49 | } |
| 46 | 50 | ||
| 47 | onBackPress() { | 51 | onBackPress() { |
| @@ -181,12 +181,12 @@ struct LaunchAdvertisingPage { | @@ -181,12 +181,12 @@ struct LaunchAdvertisingPage { | ||
| 181 | //端外打开 | 181 | //端外打开 |
| 182 | 182 | ||
| 183 | ProcessUtils.jumpExternalWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) | 183 | ProcessUtils.jumpExternalWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) |
| 184 | - clearInterval(this.timer) | 184 | + //clearInterval(this.timer) |
| 185 | 185 | ||
| 186 | }else { | 186 | }else { |
| 187 | //端内打开 | 187 | //端内打开 |
| 188 | ProcessUtils.gotoDefaultWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) | 188 | ProcessUtils.gotoDefaultWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) |
| 189 | - clearInterval(this.timer) | 189 | + //clearInterval(this.timer) |
| 190 | 190 | ||
| 191 | } | 191 | } |
| 192 | } | 192 | } |
| @@ -35,7 +35,7 @@ struct LaunchPage { | @@ -35,7 +35,7 @@ struct LaunchPage { | ||
| 35 | alignment: DialogAlignment.Center, | 35 | alignment: DialogAlignment.Center, |
| 36 | offset: { dx: 0, dy: '-24' }, | 36 | offset: { dx: 0, dy: '-24' }, |
| 37 | customStyle: true, | 37 | customStyle: true, |
| 38 | - autoCancel: false | 38 | + autoCancel: false, |
| 39 | }); | 39 | }); |
| 40 | 40 | ||
| 41 | onCancel() { | 41 | onCancel() { |
| @@ -110,6 +110,9 @@ struct LaunchPage { | @@ -110,6 +110,9 @@ struct LaunchPage { | ||
| 110 | if (dataModel.launchAdInfo.length) { | 110 | if (dataModel.launchAdInfo.length) { |
| 111 | //跳转广告页 | 111 | //跳转广告页 |
| 112 | this.jumpToAdvertisingPage(); | 112 | this.jumpToAdvertisingPage(); |
| 113 | + | ||
| 114 | + //WDRouterRule.jumpWithReplacePage(WDRouterPage.privacyPage) | ||
| 115 | + | ||
| 113 | }else { | 116 | }else { |
| 114 | //直接跳转首页 | 117 | //直接跳转首页 |
| 115 | WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) | 118 | WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) |
| @@ -156,7 +159,7 @@ struct LaunchPage { | @@ -156,7 +159,7 @@ struct LaunchPage { | ||
| 156 | build(){ | 159 | build(){ |
| 157 | 160 | ||
| 158 | Stack({alignContent:Alignment.Bottom}){ | 161 | Stack({alignContent:Alignment.Bottom}){ |
| 159 | - Image($r('app.media.app_icon')) | 162 | + Image($r('app.media.LaunchPage_logo')) |
| 160 | .width('278lpx') | 163 | .width('278lpx') |
| 161 | .height('154lpx') | 164 | .height('154lpx') |
| 162 | .margin({ | 165 | .margin({ |
| @@ -3,59 +3,35 @@ import webview from '@ohos.web.webview'; | @@ -3,59 +3,35 @@ import webview from '@ohos.web.webview'; | ||
| 3 | import router from '@ohos.router'; | 3 | import router from '@ohos.router'; |
| 4 | import { GlobalContext } from '../../utils/GlobalContext' | 4 | import { GlobalContext } from '../../utils/GlobalContext' |
| 5 | import { WDRouterRule } from 'wdRouter'; | 5 | import { WDRouterRule } from 'wdRouter'; |
| 6 | +import { LikeComponent } from 'wdComponent' | ||
| 6 | 7 | ||
| 7 | @Entry | 8 | @Entry |
| 8 | @Component | 9 | @Component |
| 9 | struct PrivacyPage { | 10 | struct PrivacyPage { |
| 10 | @State message: string = 'Hello World' | 11 | @State message: string = 'Hello World' |
| 11 | - webController: webview.WebviewController = new webview.WebviewController(); | ||
| 12 | - //@State params: object = router.getParams(); | 12 | + model: Record<string, string> = {} |
| 13 | + | ||
| 14 | + aboutToAppear(): void { | ||
| 15 | + | ||
| 16 | + this.model['contentId'] = '30044572938' //必须 | ||
| 17 | + this.model['userName'] = '人民日报网友5MbdHk' | ||
| 18 | + this.model['contentType'] = '8' //必须 | ||
| 19 | + this.model['title'] = '“神器”还是“安慰剂”?中学生“体考神器”调查' | ||
| 20 | + this.model['userHeaderUrl'] = "" | ||
| 21 | + this.model['channelId'] = "2002" //必须 | ||
| 22 | + //this.model['status'] = "1" //必须 | ||
| 23 | + | ||
| 24 | + | ||
| 25 | + | ||
| 26 | + } | ||
| 27 | + | ||
| 13 | 28 | ||
| 14 | build() { | 29 | build() { |
| 15 | Row() { | 30 | Row() { |
| 16 | Column() { | 31 | Column() { |
| 17 | - // Web component loading H5. | ||
| 18 | - Web({ src: 'https://www.baidu.com', controller: this.webController }) | ||
| 19 | - .zoomAccess(false) | ||
| 20 | - .width('100%') | ||
| 21 | - .height('100%') | ||
| 22 | - .aspectRatio(1) | ||
| 23 | - // .onConfirm((event) => { | ||
| 24 | - // AlertDialog.show({ | ||
| 25 | - // message: Const.WEB_ALERT_DIALOG_TEXT_VALUE + event?.message, | ||
| 26 | - // confirm: { | ||
| 27 | - // value: $r('app.string.web_alert_dialog_button_value'), | ||
| 28 | - // action: () => { | ||
| 29 | - // event?.result.handleConfirm(); | ||
| 30 | - // } | ||
| 31 | - // }, | ||
| 32 | - // cancel: () => { | ||
| 33 | - // event?.result.handleCancel(); | ||
| 34 | - // } | ||
| 35 | - // }); | ||
| 36 | - // return true; | ||
| 37 | - // }) | ||
| 38 | - // .onErrorReceive((event) => { | ||
| 39 | - // if (event?.error.getErrorInfo() === 'ERR_INTERNET_DISCONNECTED') { | ||
| 40 | - // prompt.showToast({ | ||
| 41 | - // message: $r('app.string.internet_err'), | ||
| 42 | - // duration: Const.WebConstant_DURATION | ||
| 43 | - // }) | ||
| 44 | - // } | ||
| 45 | - // if (event?.error.getErrorInfo() === 'ERR_CONNECTION_TIMED_OUT') { | ||
| 46 | - // prompt.showToast({ | ||
| 47 | - // message: $r('app.string.internet_err'), | ||
| 48 | - // duration: Const.WebConstant_DURATION | ||
| 49 | - // }) | ||
| 50 | - // } | ||
| 51 | - // }) | ||
| 52 | - // .onProgressChange((event) => { | ||
| 53 | - // if (event?.newProgress === Const.WebConstant_PROGRESS_MAX) { | ||
| 54 | - // this.isLoading = false; | ||
| 55 | - // clearInterval(this.intervalLoading); | ||
| 56 | - // this.intervalLoading = -1; | ||
| 57 | - // } | ||
| 58 | - // }) | 32 | + |
| 33 | + LikeComponent({data: this.model,componentType:1}) | ||
| 34 | + | ||
| 59 | } | 35 | } |
| 60 | .width('100%') | 36 | .width('100%') |
| 61 | } | 37 | } |
| @@ -134,7 +134,7 @@ export default struct CustomDialogComponent { | @@ -134,7 +134,7 @@ export default struct CustomDialogComponent { | ||
| 134 | Text($r('app.string.dialog_text_privacy_statement')) | 134 | Text($r('app.string.dialog_text_privacy_statement')) |
| 135 | .width('90%') | 135 | .width('90%') |
| 136 | .fontColor($r('app.color.dialog_text_color')) | 136 | .fontColor($r('app.color.dialog_text_color')) |
| 137 | - .fontSize(13).margin({top:20}) | 137 | + .fontSize(14).margin({top:20}) |
| 138 | Row() { | 138 | Row() { |
| 139 | Text($r('app.string.dialog_button_disagree')) | 139 | Text($r('app.string.dialog_button_disagree')) |
| 140 | .fancy() | 140 | .fancy() |
| @@ -3,8 +3,9 @@ import { WdWebComponent } from 'wdWebComponent'; | @@ -3,8 +3,9 @@ import { WdWebComponent } from 'wdWebComponent'; | ||
| 3 | import router from '@ohos.router'; | 3 | import router from '@ohos.router'; |
| 4 | import { CommonConstants } from 'wdConstant' | 4 | import { CommonConstants } from 'wdConstant' |
| 5 | import { BridgeWebViewControl } from 'wdJsBridge'; | 5 | import { BridgeWebViewControl } from 'wdJsBridge'; |
| 6 | -import { detailedSkeleton } from 'wdComponent/src/main/ets/components/skeleton/detailSkeleton' | 6 | + |
| 7 | const TAG = 'DefaultWebPage' | 7 | const TAG = 'DefaultWebPage' |
| 8 | + | ||
| 8 | @Entry | 9 | @Entry |
| 9 | @Component | 10 | @Component |
| 10 | struct DefaultWebPage { | 11 | struct DefaultWebPage { |
| @@ -16,9 +17,6 @@ struct DefaultWebPage { | @@ -16,9 +17,6 @@ struct DefaultWebPage { | ||
| 16 | 17 | ||
| 17 | build() { | 18 | build() { |
| 18 | Column() { | 19 | Column() { |
| 19 | - if (!this.isPageEnd) { | ||
| 20 | - detailedSkeleton() | ||
| 21 | - } | ||
| 22 | Stack({ alignContent: Alignment.Bottom }) { | 20 | Stack({ alignContent: Alignment.Bottom }) { |
| 23 | Column() { | 21 | Column() { |
| 24 | WdWebComponent({ | 22 | WdWebComponent({ |
-
Please register or login to post a comment