wangliang_wd

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

* 'main' of http://192.168.1.42/developOne/harmonyPool: (23 commits)
  ref |> 阿里播放器设置配置默认开启硬解码
  ref |> 更新最新的H5模板
  fix |> 20784 搜索结果,粗分割线应通道左右两侧,不应留间距,见截图。
  fix:  我的评论列表,点击评论的视频稿件后,偶发不能弹出评论列表
  feat: 20527 【折叠屏】搜索 点击庆祝人民政协成立七十五周年,图片截断了
  fix: 早晚报详情中,语音播报动效,背景色看不清楚,特别是在白色图片上
  fix: 沉浸式视频页,视频的简介超长时,末尾展示的... 颜色需要和简介一致
  feat: 20563 折叠屏没有展开的情况下,查看号主动态稿件详情,关注按钮没有右对齐
  fix: 对电子报进行语音播放,切换到视频频道,视频开始播放后、语音没有暂停
  feat: 19239 功能缺陷 直播跳转
  feat: 20771 搜索结果的4个tab列表以及我的预约列表、意见反馈列表,左右两侧边距,需要修改为16
  ref |> 解决从我的评论列表进入文章或动态后,立即返回时存在潜在崩溃问题
  ref |> 因为友盟SDK打包被混淆,临时关闭wdKit模块混淆
  fix: 沉浸式播放,断网后上滑,视频无法加载和上滑,恢复网络后视频重新播放,无法上滑切换下一个视频
  ref |> 文章详情页复用模板是调用交互接口显示骨架屏
  ref |> 新增设备,更新profile
  fix |> 20764 【网络切换】断网后访问新闻频道,频道展示无网络的默认缺省页,网络恢复后再次访问该频道,频道数据未自动加载,不应一直显示无网络的默认缺省页。
  fix: 横屏视频左侧上下滑动调节屏幕亮度,右侧上下滑动调节音量逻辑优化
  cleanup |> 多余的H5模板资源
  ref |> 文章详情页Web容器复用02
  ...
Showing 49 changed files with 1275 additions and 1592 deletions

Too many changes to show.

To preserve performance only 49 of 49+ files are displayed.

@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 "arkOptions": { 13 "arkOptions": {
14 "obfuscation": { 14 "obfuscation": {
15 "ruleOptions": { 15 "ruleOptions": {
16 - "enable": true, 16 + "enable": false,
17 "files": [ 17 "files": [
18 "./obfuscation-rules.txt" 18 "./obfuscation-rules.txt"
19 ] 19 ]
1 export { WdWebComponent } from './src/main/ets/pages/WdWebComponent' 1 export { WdWebComponent } from './src/main/ets/pages/WdWebComponent'
2 2
3 -export { WdWebLocalComponent } from './src/main/ets/pages/WdWebLocalComponent'  
  3 +export { WdWebLocalComponent } from './src/main/ets/pages/WdWebLocalComponent'
  4 +
  5 +export { WebEvents, WebNodeController } from './src/main/ets/webPool/WebLocalPool'
  6 +export { WebPoolManager } from './src/main/ets/webPool/WebPoolManager'
  7 +export { WebArticleEventHandler } from './src/main/ets/webPool/WebArticleEventHandler'
@@ -26,6 +26,7 @@ export const enum NativeCallH5Event { @@ -26,6 +26,7 @@ export const enum NativeCallH5Event {
26 export const enum NativeCallH5Type { 26 export const enum NativeCallH5Type {
27 jsCall_receiveAppData = 'jsCall_receiveAppData', 27 jsCall_receiveAppData = 'jsCall_receiveAppData',
28 jsCall_appNotifyEvent = 'jsCall_appNotifyEvent', 28 jsCall_appNotifyEvent = 'jsCall_appNotifyEvent',
  29 + jsCall_clearAppData = 'jsCall_clearAppData',
29 // TODO 业务自行新增类型,自行调用,例: 30 // TODO 业务自行新增类型,自行调用,例:
30 // TODO this.webviewControl.callHandle(NativeCallH5Type.jsCall_receiveAppData,xxxx) 31 // TODO this.webviewControl.callHandle(NativeCallH5Type.jsCall_receiveAppData,xxxx)
31 32
@@ -9,18 +9,20 @@ import { window } from '@kit.ArkUI'; @@ -9,18 +9,20 @@ import { window } from '@kit.ArkUI';
9 import { NativeCallH5Type,NativeCallH5Event,eventParams } from './NativeCallH5Type'; 9 import { NativeCallH5Type,NativeCallH5Event,eventParams } from './NativeCallH5Type';
10 import { AudioSuspensionModel } from '../viewmodel/AudioSuspensionModel' 10 import { AudioSuspensionModel } from '../viewmodel/AudioSuspensionModel'
11 import { BusinessError } from '@kit.BasicServicesKit'; 11 import { BusinessError } from '@kit.BasicServicesKit';
  12 +import { WebPoolManager } from '../webPool/WebPoolManager';
  13 +import { WebEvents } from '../webPool/WebLocalPool';
12 14
13 const TAG = 'WdWebLocalComponent'; 15 const TAG = 'WdWebLocalComponent';
14 16
15 @Component 17 @Component
16 export struct WdWebLocalComponent { 18 export struct WdWebLocalComponent {
  19 + webPoolTargetId: string = ''
17 webviewControl: BridgeWebViewControl = new BridgeWebViewControl() 20 webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
18 onWebPrepared: () => void = () => { 21 onWebPrepared: () => void = () => {
19 } 22 }
20 @Prop backVisibility: boolean = false 23 @Prop backVisibility: boolean = false
21 - @Prop webResource: Resource = {} as Resource  
22 @Prop @Watch('onReloadStateChanged') reload: number = 0 24 @Prop @Watch('onReloadStateChanged') reload: number = 0
23 - @State webHeight: string | number = '100%' 25 + @State webHeight: Length = '100%'
24 @Link isPageEnd: boolean 26 @Link isPageEnd: boolean
25 @State videoUrl: string = '' 27 @State videoUrl: string = ''
26 @State positionWidth: number = 0 28 @State positionWidth: number = 0
@@ -75,6 +77,21 @@ export struct WdWebLocalComponent { @@ -75,6 +77,21 @@ export struct WdWebLocalComponent {
75 } 77 }
76 78
77 aboutToAppear(): void { 79 aboutToAppear(): void {
  80 +
  81 + let eventHandler = WebPoolManager.sharedInstance().getWebEventHandler(this.webPoolTargetId)
  82 + if (!eventHandler) {
  83 + Logger.error(TAG, '当前target不应拿不到nodeController');
  84 + } else {
  85 + eventHandler.pageEndBlock = this.onPageEnd.bind(this)
  86 + if (eventHandler.pageLoadEnd) {
  87 + this.onPageEnd()
  88 +
  89 + // 开始复用
  90 + this.startResuse()
  91 + }
  92 + eventHandler.currentPageOperateBlock = this.currentPageOperate.bind(this)
  93 + }
  94 +
78 EmitterUtils.receiveEvent(EmitterEventId.AUDIO_CHANGE_STATUS, (status) => { 95 EmitterUtils.receiveEvent(EmitterEventId.AUDIO_CHANGE_STATUS, (status) => {
79 Logger.debug(TAG, "接收音频播放状态 = " + status); 96 Logger.debug(TAG, "接收音频播放状态 = " + status);
80 if (!this.isPause) { 97 if (!this.isPause) {
@@ -101,50 +118,7 @@ export struct WdWebLocalComponent { @@ -101,50 +118,7 @@ export struct WdWebLocalComponent {
101 118
102 Row() { 119 Row() {
103 RelativeContainer() { 120 RelativeContainer() {
104 - Web({  
105 - src: this.webResource,  
106 - controller: this.webviewControl,  
107 - renderMode: RenderMode.SYNC_RENDER  
108 - })// Web({ src: this.webResource, controller: this.webviewControl })  
109 - .backgroundColor(Color.White)  
110 - .domStorageAccess(true)  
111 - .databaseAccess(true)  
112 - .javaScriptAccess(true)  
113 - .imageAccess(true)  
114 - .mixedMode(MixedMode.All)  
115 - .onlineImageAccess(true)  
116 - .cacheMode(this.mode)  
117 - // .enableNativeEmbedMode(true)  
118 - // .layoutMode(WebLayoutMode.FIT_CONTENT)  
119 - .nestedScroll({  
120 - scrollForward: NestedScrollMode.SELF_FIRST,  
121 - scrollBackward: NestedScrollMode.PARENT_FIRST  
122 - })  
123 - .width('100%')  
124 - .height(this.webHeight)  
125 - .onPageBegin((event) => {  
126 - this.onPageBegin(event?.url);  
127 - })  
128 - .onPageEnd((event) => {  
129 - this.onPageEnd(event?.url)  
130 - })  
131 - .onLoadIntercept((event) => {  
132 - let url: string = event.data.getRequestUrl().toString()  
133 - url = url.replace("%(?![0-9a-fA-F]{2})", "%25")  
134 - .replace("\\+", "%2B");  
135 - url = decodeURIComponent(url)  
136 - Logger.debug(TAG, 'Web onLoadIntercept url: ' + url);  
137 - if (url.startsWith(BridgeUtil.YY_RETURN_DATA)) {  
138 - this.webviewControl.handlerReturnData(url)  
139 - return true  
140 - }  
141 - if (url.startsWith(BridgeUtil.YY_OVERRIDE_SCHEMA)) {  
142 - // this.webviewControl.flushMessageQueue()  
143 - this.webviewControl.receiveDataFromH5(url)  
144 - return true  
145 - }  
146 - return this.onLoadIntercept(event.data.getRequestUrl().toString());  
147 - }) 121 + NodeContainer(WebPoolManager.sharedInstance().getWebNodeController(this.webPoolTargetId))
148 .id('web') 122 .id('web')
149 .alignRules({ 123 .alignRules({
150 top: { anchor: "__container__", align: VerticalAlign.Top }, 124 top: { anchor: "__container__", align: VerticalAlign.Top },
@@ -171,20 +145,6 @@ export struct WdWebLocalComponent { @@ -171,20 +145,6 @@ export struct WdWebLocalComponent {
171 } 145 }
172 } 146 }
173 147
174 - private registerHandlers(): void {  
175 - // 注册h5调用js相关  
176 - for (let i = 0; i < H5CallNativeType.JsCallTypeList.length; i++) {  
177 - let handleName = H5CallNativeType.JsCallTypeList[i];  
178 - let handle = (data: Message, f: Callback) => {  
179 - Logger.debug('registerHandlers handlerName: ' + JSON.stringify(data.data))  
180 - this.setCurrentPageOperate8(data)  
181 - this.setCurrentPageOperate9(data)  
182 - this.defaultPerformJSCallNative(data, f)  
183 - };  
184 - this.webviewControl.registerHandler(handleName, { handle: handle });  
185 - }  
186 - }  
187 -  
188 //webview 高度设置 148 //webview 高度设置
189 private setCurrentPageOperate8: (data: Message) => void = (data) => { 149 private setCurrentPageOperate8: (data: Message) => void = (data) => {
190 150
@@ -198,20 +158,22 @@ export struct WdWebLocalComponent { @@ -198,20 +158,22 @@ export struct WdWebLocalComponent {
198 { 158 {
199 this.webHeight = Number(data?.data?.webViewHeight) || '100%' 159 this.webHeight = Number(data?.data?.webViewHeight) || '100%'
200 } 160 }
  161 +
  162 + WebPoolManager.sharedInstance().getWebNodeController(this.webPoolTargetId)?.updateWebHeight(this.webHeight)
201 } 163 }
202 } 164 }
203 // 暂停音频悬浮窗 165 // 暂停音频悬浮窗
204 pauseAudioCom() { 166 pauseAudioCom() {
205 // 判断当前窗口是否已显示,使用callback异步回调。 167 // 判断当前窗口是否已显示,使用callback异步回调。
206 - this.AudioSuspension.floatWindowClass.get().isShowing((err: BusinessError, data) => {  
207 - const errCode: number = err.code;  
208 - if (errCode) {  
209 - return;  
210 - } 168 + try {
  169 + let data = this.AudioSuspension.floatWindowClass.get().isWindowShowing();
  170 + // console.info(TAG, 'window is showing: ' + data);
211 if(data) { 171 if(data) {
212 this.AudioSuspension.playerController.get()?.pause(); 172 this.AudioSuspension.playerController.get()?.pause();
213 } 173 }
214 - }); 174 + } catch (exception) {
  175 + console.error(TAG, `Failed to check whether the window is showing. Cause code: ${exception.code}, message: ${exception.message}`);
  176 + }
215 } 177 }
216 //播放视频 178 //播放视频
217 private setCurrentPageOperate9: (data: Message) => void = (data) => { 179 private setCurrentPageOperate9: (data: Message) => void = (data) => {
@@ -228,29 +190,18 @@ export struct WdWebLocalComponent { @@ -228,29 +190,18 @@ export struct WdWebLocalComponent {
228 /** 190 /**
229 * 默认【CallNative】逻辑处理 191 * 默认【CallNative】逻辑处理
230 */ 192 */
231 - private defaultPerformJSCallNative: (data: Message, f: Callback) => void = (data: Message, f: Callback) => { 193 + private currentPageOperate: (data: Message, f: Callback) => void = (data: Message, f: Callback) => {
  194 + this.setCurrentPageOperate8(data)
  195 + this.setCurrentPageOperate9(data)
232 performJSCallNative(data, f) 196 performJSCallNative(data, f)
233 } 197 }
234 198
235 - onPageBegin: (url?: string) => void = () => {  
236 - Logger.debug(TAG, 'onPageBegin');  
237 - this.registerHandlers();  
238 - //有时序问题 必须延时执行  
239 - setTimeout(() => {  
240 - BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)  
241 - }, 200)  
242 - }  
243 onPageEnd: (url?: string) => void = () => { 199 onPageEnd: (url?: string) => void = () => {
244 Logger.debug(TAG, 'onPageEnd'); 200 Logger.debug(TAG, 'onPageEnd');
245 this.onWebPrepared() 201 this.onWebPrepared()
246 this.isPageEnd = true 202 this.isPageEnd = true
247 } 203 }
248 204
249 - onLoadIntercept: (url?: string) => boolean = () => {  
250 - Logger.debug(TAG, 'onLoadIntercept return false');  
251 - return false  
252 - }  
253 -  
254 onReloadStateChanged() { 205 onReloadStateChanged() {
255 Logger.info(TAG, `onReloadStateChanged:::refresh, this.reload: ${this.reload}`); 206 Logger.info(TAG, `onReloadStateChanged:::refresh, this.reload: ${this.reload}`);
256 if (this.reload > 0) { 207 if (this.reload > 0) {
@@ -258,6 +209,14 @@ export struct WdWebLocalComponent { @@ -258,6 +209,14 @@ export struct WdWebLocalComponent {
258 } 209 }
259 } 210 }
260 211
  212 + startResuse() {
  213 + let params = {'event':NativeCallH5Event.NativeCallH5EventStartLoadingOnReuse} as eventParams;
  214 + let jsonString = JSON.stringify(params);
  215 + this.webviewControl.callHandle(NativeCallH5Type.jsCall_appNotifyEvent, jsonString, (data: string) => {
  216 + Logger.debug(TAG, "开始复用,H5回调" + data);
  217 + })
  218 + }
  219 +
261 startPlay() { 220 startPlay() {
262 this.cancelProgressTimer() 221 this.cancelProgressTimer()
263 this.controller.start() 222 this.controller.start()
  1 +import { BridgeUtil, BridgeWebViewControl, Callback } from "wdJsBridge";
  2 +import { Message } from "wdJsBridge/src/main/ets/bean/Message";
  3 +import { Logger } from "wdKit";
  4 +import { H5CallNativeType } from "../pages/H5CallNativeType";
  5 +import { NativeCallH5Type } from "../pages/NativeCallH5Type";
  6 +import { WebEvents } from "./WebLocalPool";
  7 +
  8 +const TAG = 'WebArticleEventHandler'
  9 +
  10 +export class WebArticleEventHandler implements WebEvents {
  11 + webviewControl?: BridgeWebViewControl
  12 +
  13 + pageLoadEnd: boolean = false
  14 + pageEndBlock?:(event: OnPageEndEvent) => void
  15 +
  16 + currentPageOperateBlock?: (data: Message, f: Callback) => void
  17 +
  18 + constructor(webviewControl: BridgeWebViewControl) {
  19 + this.webviewControl = webviewControl
  20 + }
  21 +
  22 +
  23 + //MARK: ----
  24 + onPrepareForReuse(): boolean {
  25 + if (!this.webviewControl || this.pageLoadEnd == false) {
  26 + return false
  27 + }
  28 + this.webviewControl?.callHandle(NativeCallH5Type.jsCall_clearAppData, '', (data) => {
  29 + })
  30 + return true
  31 + }
  32 +
  33 + onPageBegin(event: OnPageBeginEvent): void {
  34 + Logger.debug(TAG, 'onPageBegin');
  35 + this.registerHandlers();
  36 + //有时序问题 必须延时执行
  37 + setTimeout(() => {
  38 + BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl!)
  39 + }, 200)
  40 + }
  41 +
  42 + onPageEnd(event: OnPageEndEvent): void {
  43 + Logger.debug(TAG, 'onPageEnd');
  44 + this.pageLoadEnd = true
  45 + if (this.pageEndBlock) {
  46 + this.pageEndBlock(event)
  47 + }
  48 + }
  49 +
  50 + onLoadIntercept(event: OnLoadInterceptEvent): boolean {
  51 + let url: string = event.data.getRequestUrl().toString()
  52 + url = url.replace("%(?![0-9a-fA-F]{2})", "%25")
  53 + .replace("\\+", "%2B");
  54 + url = decodeURIComponent(url)
  55 + Logger.debug(TAG, 'Web onLoadIntercept url: ' + url);
  56 + if (url.startsWith(BridgeUtil.YY_RETURN_DATA)) {
  57 + this.webviewControl?.handlerReturnData(url)
  58 + return true
  59 + }
  60 + if (url.startsWith(BridgeUtil.YY_OVERRIDE_SCHEMA)) {
  61 + // this.webviewControl.flushMessageQueue()
  62 + this.webviewControl?.receiveDataFromH5(url)
  63 + return true
  64 + }
  65 + return false;
  66 + }
  67 +
  68 + private registerHandlers(): void {
  69 + // 注册h5调用js相关
  70 + for (let i = 0; i < H5CallNativeType.JsCallTypeList.length; i++) {
  71 + let handleName = H5CallNativeType.JsCallTypeList[i];
  72 + let handle = (data: Message, f: Callback) => {
  73 + Logger.debug('registerHandlers handlerName: ' + JSON.stringify(data.data))
  74 + if (this.currentPageOperateBlock) {
  75 + this.currentPageOperateBlock(data, f)
  76 + }
  77 + };
  78 + this.webviewControl?.registerHandler(handleName, { handle: handle });
  79 + }
  80 + }
  81 +
  82 +}
  1 +import { UIContext } from '@ohos.arkui.UIContext';
  2 +import { NodeController, BuilderNode, FrameNode } from '@ohos.arkui.node';
  3 +import { BusinessError } from '@ohos.base';
  4 +import { WebNetErrorList } from '@ohos.web.netErrorList';
  5 +import { Logger } from 'wdKit';
  6 +
  7 +// @Builder中为动态组件的具体组件内容
  8 +// WebViewPoolData为入参封装类
  9 +class WebViewPoolData {
  10 + target: string = ''
  11 + webOption: WebOptions = { } as WebOptions
  12 + webEvents?: WebEvents = undefined
  13 + webHeight: Length = 0
  14 +
  15 + constructor(webOption: WebOptions, target: string, webHeight: Length, webEvent?:WebEvents) {
  16 + this.webOption = webOption
  17 + this.webEvents = webEvent
  18 + this.target = target
  19 + this.webHeight = webHeight
  20 + }
  21 +}
  22 +
  23 +const TAG = 'WebViewPool';
  24 +
  25 +// 影响web组件加载的网络错误码
  26 +class webLoadFail {
  27 + static ERR_TIMED_OUT = WebNetErrorList.ERR_TIMED_OUT;
  28 + static ERR_NETWORK_CHANGED = WebNetErrorList.ERR_NETWORK_CHANGED;
  29 +}
  30 +
  31 +// 不需要重试刷新的网络错误码
  32 +class excludeRetryLoad {
  33 + static ERR_FAILED = WebNetErrorList.ERR_FAILED;
  34 +}
  35 +
  36 +function isErrorCode(code: string) {
  37 + return Object.keys(webLoadFail).includes(code);
  38 +}
  39 +
  40 +@Component
  41 +export struct DynamicWebView {
  42 + target: string = '';
  43 + private webOption: WebOptions = { } as WebOptions
  44 + private webEvents?: WebEvents = undefined
  45 + @Prop webHeight: Length
  46 +
  47 + aboutToAppear(): void {
  48 +
  49 + }
  50 +
  51 + build() {
  52 + Row() {
  53 + Web(this.webOption)
  54 + .backgroundColor(Color.White)
  55 + .domStorageAccess(true)
  56 + .databaseAccess(true)
  57 + .javaScriptAccess(true)
  58 + .imageAccess(true)
  59 + .mixedMode(MixedMode.All)
  60 + .onlineImageAccess(true)
  61 + .nestedScroll({
  62 + scrollForward: NestedScrollMode.SELF_FIRST,
  63 + scrollBackward: NestedScrollMode.PARENT_FIRST
  64 + })
  65 + .width('100%')
  66 + .height('100%')
  67 + .onPageBegin((event) => {
  68 + this.webEvents?.onPageBegin(event)
  69 + })
  70 + .onPageEnd((event) => {
  71 + this.webEvents?.onPageEnd(event)
  72 + })
  73 + .onLoadIntercept((event) => {
  74 + if (!this.webEvents) {
  75 + return false
  76 + }
  77 + return this.webEvents?.onLoadIntercept(event);
  78 + })
  79 + }.width('100%')
  80 + .height(this.webHeight)
  81 + }
  82 +}
  83 +
  84 +@Builder
  85 +export function webBuilder(data: WebViewPoolData) {
  86 + DynamicWebView({
  87 + webOption: data.webOption,
  88 + target: data.target,
  89 + webEvents: data.webEvents,
  90 + webHeight: data.webHeight
  91 + })
  92 +}
  93 +
  94 +export class WebNodeController extends NodeController {
  95 + private rootNode: BuilderNode<[WebViewPoolData]> | null = null;
  96 + public webOption: WebOptions = { } as WebOptions
  97 + public webEvents?: WebEvents = undefined
  98 + private webHeight: Length = 0
  99 + private target: string = '';
  100 + public webNodeInTree:boolean = false;
  101 +
  102 + constructor(webOption: WebOptions, target: string, webHeight: Length, webEvent?:WebEvents) {
  103 + super();
  104 + this.webOption = webOption
  105 + this.webEvents = webEvent
  106 + this.target = target
  107 + this.webHeight = webHeight
  108 + }
  109 +
  110 + aboutToAppear(): void {
  111 + this.webNodeInTree = true;
  112 + Logger.debug(TAG, `WebNodeController aboutToAppear target: ${this.target} ==> url:${this.webOption.src.toString()}`);
  113 + }
  114 +
  115 + aboutToDisappear(): void {
  116 + try {
  117 + this.webNodeInTree = false;
  118 + // 下树时给commonWebView加载空白页面
  119 + // if (!getNWeb(this.target)) {
  120 + // this.webOption.controller?.loadData(
  121 + // "<html><body bgcolor=\"#18181A\"></body></html>",
  122 + // "text/html",
  123 + // "UTF-8"
  124 + // );
  125 + // }
  126 + Logger.debug(TAG, `WebNodeController aboutToDisappear target: ${this.target} ==> url:${this.webOption.src.toString()}`);
  127 + } catch (error) {
  128 + Logger.error(TAG,`ErrorCode: ${(error as BusinessError).code}, Message: ${(error as BusinessError).message}`);
  129 + }
  130 + }
  131 +
  132 + makeNode(context: UIContext): FrameNode | null {
  133 + if (!context) {
  134 + Logger.error(TAG, " uicontext is undifined : " + (context === undefined));
  135 + }
  136 + if (this.rootNode != null) {
  137 + // 返回FrameNode节点
  138 + return this.rootNode.getFrameNode();
  139 + }
  140 + // 返回null控制动态组件脱离绑定节点
  141 + return null;
  142 + }
  143 +
  144 + // 此函数为自定义函数,可作为初始化函数使用
  145 + // 通过UIContext初始化BuilderNode,再通过BuilderNode中的build接口初始化@Builder中的内容
  146 + initWeb(uiContext: UIContext) {
  147 + if (this.rootNode != null) {
  148 + return;
  149 + }
  150 + this.rootNode = new BuilderNode(uiContext);
  151 + this.rootNode.build(wrapBuilder<[WebViewPoolData]>(webBuilder),
  152 + new WebViewPoolData(this.webOption, this.target, this.webHeight, this.webEvents));
  153 + }
  154 +
  155 + prepareForReuse(): boolean | undefined {
  156 + return this.webEvents?.onPrepareForReuse()
  157 + }
  158 +
  159 + destoryWeb() {
  160 + this.rootNode?.dispose()
  161 + this.rootNode = null
  162 + }
  163 +
  164 + updateWebHeight(webHeight: Length) {
  165 + try {
  166 + if (this.rootNode !== null) {
  167 + this.webHeight = webHeight
  168 + this.rootNode.update(new WebViewPoolData(this.webOption, this.target, this.webHeight, this.webEvents));
  169 + }
  170 + } catch (err) {
  171 + Logger.warn(TAG, `commonWebView update error : ${err}`);
  172 + }
  173 + }
  174 +
  175 + updateWebEvents(webEvent: WebEvents) {
  176 + try {
  177 + if (this.rootNode !== null) {
  178 + this.webEvents = webEvent
  179 + this.rootNode.update(new WebViewPoolData(this.webOption, this.target, this.webHeight, this.webEvents));
  180 + }
  181 + } catch (err) {
  182 + Logger.warn(TAG, `commonWebView update error : ${err}`);
  183 + }
  184 + }
  185 +
  186 +
  187 +
  188 +
  189 +}
  190 +
  191 +export interface WebEvents {
  192 + onPrepareForReuse(): boolean
  193 + onPageBegin(event: OnPageBeginEvent): void;
  194 + onPageEnd(event: OnPageEndEvent): void;
  195 + onLoadIntercept(event: OnLoadInterceptEvent): boolean;
  196 +}
  197 +
  198 +// 创建Map保存所需要的NodeController
  199 +const nodeMap: Map<string, WebNodeControllerInfo> = new Map();
  200 +
  201 +// NodeController内容和创建时间戳
  202 +class WebNodeControllerInfo {
  203 + webNodeController?: WebNodeController;
  204 + createTime: number = 0;
  205 +
  206 + constructor(webNodeController: WebNodeController, createTime: number) {
  207 + this.webNodeController = webNodeController;
  208 + this.createTime = createTime;
  209 + }
  210 +}
  211 +
  212 +// 自定义获取NodeController接口
  213 +export const getPoolWebNodeController = (target: string): WebNodeController | undefined => {
  214 + return nodeMap.get(target)?.webNodeController;
  215 +}
  216 +
  217 +// 自定义获取WebviewController接口
  218 +export const getPoolWebController = (target: string): WebviewController | undefined => {
  219 + return nodeMap.get(target)?.webNodeController?.webOption.controller as WebviewController;
  220 +}
  221 +
  222 +// 初始化需要UIContext 需在Ability获取
  223 +export const createReuseableWeb = (uiContext: UIContext, webOption: WebOptions, target: string, webHeight: Length, webEvent?:WebEvents) => {
  224 + // 创建NodeController
  225 + let baseNode = new WebNodeController(webOption, target, webHeight, webEvent);
  226 + // 初始化自定义Web组件
  227 + baseNode.initWeb(uiContext);
  228 + nodeMap.set(target, new WebNodeControllerInfo(baseNode, Date.now()));
  229 +}
  230 +
  231 +export const destoryReuseableWeb = (target: string) => {
  232 + if (nodeMap.get(target)) {
  233 + getPoolWebNodeController(target)?.destoryWeb()
  234 + nodeMap.delete(target)
  235 + }
  236 +}
  1 +import { BridgeWebViewControl } from "wdJsBridge"
  2 +import { AppUtils } from "wdKit"
  3 +import { createReuseableWeb, destoryReuseableWeb, getPoolWebNodeController, WebNodeController } from "./WebLocalPool"
  4 +import { util } from "@kit.ArkTS"
  5 +import { WebArticleEventHandler } from "./WebArticleEventHandler"
  6 +
  7 +interface ArticleWebInterface {
  8 + uiContext: UIContext,
  9 + webSrc: string | Resource,
  10 + webController: BridgeWebViewControl
  11 + webArticleEventHandler: WebArticleEventHandler
  12 +}
  13 +
  14 +const MAX_POOL_COUNT = 2
  15 +
  16 +export class WebPoolManager {
  17 +
  18 + private webTargets: string[] = []
  19 +
  20 + private constructor() {
  21 + }
  22 + private static manager: WebPoolManager
  23 + static sharedInstance() : WebPoolManager {
  24 + if (!WebPoolManager.manager) {
  25 + WebPoolManager.manager = new WebPoolManager()
  26 + }
  27 + return WebPoolManager.manager
  28 + }
  29 +
  30 + createArticleWeb(param: ArticleWebInterface, taking?: boolean) : string {
  31 + let target = util.generateRandomUUID()
  32 + createReuseableWeb(param.uiContext,
  33 + {src: param.webSrc, controller: param.webController, renderMode: RenderMode.SYNC_RENDER},
  34 + target,
  35 + 800,
  36 + param.webArticleEventHandler
  37 + )
  38 + if (taking != true && this.webTargets.length < MAX_POOL_COUNT) {
  39 + this.webTargets.push(target)
  40 + }
  41 + return target
  42 + }
  43 +
  44 + // 取一个可用的target,不存在则根据参数创建
  45 + // 当使用完成,需要调用recycleTarget()
  46 + takeAvaiableArticleWebTarget(param: ArticleWebInterface): string {
  47 + if (this.webTargets.length) {
  48 + let target = this.webTargets.splice(0, 1).pop()!
  49 +
  50 + // 当pool里没有缓存,主动提前加载一个
  51 + if (this.webTargets.length == 0) {
  52 + setTimeout(() => {
  53 + this.createArticleWeb(param)
  54 + }, 500)
  55 + }
  56 + return target
  57 + }
  58 + return this.createArticleWeb(param, true)
  59 + }
  60 +
  61 + // 回收target
  62 + recycleTarget(target: string) {
  63 + let nodeController = getPoolWebNodeController(target)
  64 + if (!nodeController) {
  65 + let index = this.webTargets.indexOf(target)
  66 + if (index >= 0) {
  67 + this.webTargets.splice(index, 1)
  68 + }
  69 + return
  70 + }
  71 +
  72 + if (this.webTargets.length < MAX_POOL_COUNT) {
  73 + if (nodeController.prepareForReuse() == true) {
  74 + this.webTargets.push(target)
  75 + return
  76 + }
  77 + }
  78 +
  79 + this.destoryTarget(target)
  80 + }
  81 +
  82 + // 撤底销毁
  83 + destoryTarget(target: string) {
  84 + destoryReuseableWeb(target)
  85 + let index = this.webTargets.indexOf(target)
  86 + if (index >= 0) {
  87 + this.webTargets.splice(index, 1)
  88 + }
  89 + }
  90 +
  91 + getWebNodeController(target: string) : WebNodeController | undefined {
  92 + return getPoolWebNodeController(target)
  93 + }
  94 + getWebController(target: string) : BridgeWebViewControl | undefined {
  95 + return getPoolWebNodeController(target)?.webOption.controller as BridgeWebViewControl
  96 + }
  97 + getWebEventHandler(target: string) : WebArticleEventHandler | undefined {
  98 + return getPoolWebNodeController(target)?.webEvents as WebArticleEventHandler
  99 + }
  100 +
  101 +
  102 +}
@@ -111,4 +111,6 @@ export { GrayManageModel } from './src/main/ets/viewmodel/GrayManageModel' @@ -111,4 +111,6 @@ export { GrayManageModel } from './src/main/ets/viewmodel/GrayManageModel'
111 111
112 export { VoiceInputView } from './src/main/ets/components/comment/view/VoiceInputView' 112 export { VoiceInputView } from './src/main/ets/components/comment/view/VoiceInputView'
113 113
  114 +export { ComponentModule } from './src/main/ets/ComponentModule'
  115 +
114 // export {voicese} 116 // export {voicese}
  1 +import { BridgeUtil, BridgeWebViewControl } from "wdJsBridge";
  2 +import { WebArticleEventHandler, WebPoolManager } from "wdWebComponent";
  3 +
  4 +export class ComponentModule {
  5 +
  6 + static preInitArticleWebTemplate(context: UIContext) {
  7 +
  8 + let webviewControl = new BridgeWebViewControl()
  9 + WebPoolManager.sharedInstance().createArticleWeb({
  10 + uiContext: context,
  11 + webSrc: $rawfile("apph5/index.html"),
  12 + webController: webviewControl,
  13 + webArticleEventHandler: new WebArticleEventHandler(webviewControl)
  14 + })
  15 + }
  16 +}
@@ -129,7 +129,11 @@ export struct DynamicDetailComponent { @@ -129,7 +129,11 @@ export struct DynamicDetailComponent {
129 }) 129 })
130 130
131 } 131 }
  132 +
132 aboutToDisappear() { 133 aboutToDisappear() {
  134 + if (this.lastTimeoutId) {
  135 + clearTimeout(this.lastTimeoutId)
  136 + }
133 this.viewBlogInsightIntentShare() 137 this.viewBlogInsightIntentShare()
134 138
135 } 139 }
@@ -171,11 +175,13 @@ export struct DynamicDetailComponent { @@ -171,11 +175,13 @@ export struct DynamicDetailComponent {
171 color: '#0D000000', // 5% 透明度的黑色 175 color: '#0D000000', // 5% 透明度的黑色
172 style: BorderStyle.Solid 176 style: BorderStyle.Solid
173 }) 177 })
174 - Image(this.contentDetailData.rmhInfo?.honoraryIcon)  
175 - .width($r('app.float.margin_48'))  
176 - .height($r('app.float.margin_48'))  
177 - .objectFit(ImageFit.Cover)  
178 - .borderRadius($r('app.float.margin_24')) 178 + if (!!this.contentDetailData.rmhInfo?.honoraryIcon) {
  179 + Image(this.contentDetailData.rmhInfo?.honoraryIcon)
  180 + .width($r('app.float.margin_48'))
  181 + .height($r('app.float.margin_48'))
  182 + .objectFit(ImageFit.Cover)
  183 + .borderRadius($r('app.float.margin_24'))
  184 + }
179 if (!StringUtils.isEmpty(this.contentDetailData.rmhInfo?.authIcon)) { 185 if (!StringUtils.isEmpty(this.contentDetailData.rmhInfo?.authIcon)) {
180 Stack() { 186 Stack() {
181 Image(this.contentDetailData.rmhInfo?.authIcon) 187 Image(this.contentDetailData.rmhInfo?.authIcon)
@@ -188,8 +194,8 @@ export struct DynamicDetailComponent { @@ -188,8 +194,8 @@ export struct DynamicDetailComponent {
188 .alignContent(Alignment.BottomEnd) 194 .alignContent(Alignment.BottomEnd)
189 } 195 }
190 } 196 }
191 - .width($r('app.float.margin_48'))  
192 - .height($r('app.float.margin_48')) 197 + .width(!!this.contentDetailData.rmhInfo?.honoraryIcon ? $r('app.float.margin_48') : $r('app.float.margin_36'))
  198 + .height(!!this.contentDetailData.rmhInfo?.honoraryIcon ? $r('app.float.margin_48') : $r('app.float.margin_36'))
193 .alignContent(Alignment.Center) 199 .alignContent(Alignment.Center)
194 .onClick(async () => { 200 .onClick(async () => {
195 let retvalue = await FastClickUtil.isMinDelayTime() 201 let retvalue = await FastClickUtil.isMinDelayTime()
@@ -199,6 +205,7 @@ export struct DynamicDetailComponent { @@ -199,6 +205,7 @@ export struct DynamicDetailComponent {
199 ProcessUtils.gotoPeopleShipHomePage(this.contentDetailData.rmhInfo == null ? "" : 205 ProcessUtils.gotoPeopleShipHomePage(this.contentDetailData.rmhInfo == null ? "" :
200 this.contentDetailData.rmhInfo.rmhId) 206 this.contentDetailData.rmhInfo.rmhId)
201 }) 207 })
  208 + .margin({right: 6})
202 209
203 Column() { 210 Column() {
204 //昵称 211 //昵称
@@ -225,8 +232,6 @@ export struct DynamicDetailComponent { @@ -225,8 +232,6 @@ export struct DynamicDetailComponent {
225 .height(14) 232 .height(14)
226 .lineHeight(14) 233 .lineHeight(14)
227 } 234 }
228 - .width('70%')  
229 - .margin({ right: $r('app.float.margin_6') })  
230 235
231 Blank() 236 Blank()
232 if ((this.contentDetailData.rmhPlatform == 1 && this.contentDetailData?.rmhInfo?.userType != "5") && !StringUtils.isEmpty(this.followStatus)) { 237 if ((this.contentDetailData.rmhPlatform == 1 && this.contentDetailData?.rmhInfo?.userType != "5") && !StringUtils.isEmpty(this.followStatus)) {
@@ -274,10 +279,13 @@ export struct DynamicDetailComponent { @@ -274,10 +279,13 @@ export struct DynamicDetailComponent {
274 }) 279 })
275 } 280 }
276 } 281 }
277 - }.padding({  
278 - left: $r('app.float.vp_16')  
279 - , right: $r('app.float.vp_16')  
280 - }).width('100%') 282 + }
  283 + .margin({
  284 + left: $r('app.float.vp_16'),
  285 + right: $r('app.float.vp_16')
  286 + })
  287 + .width('calc(100% - 32vp)')
  288 +
281 //标题 289 //标题
282 Text(this.titleText()) 290 Text(this.titleText())
283 .fontColor($r('app.color.color_222222')) 291 .fontColor($r('app.color.color_222222'))
@@ -640,7 +648,9 @@ export struct DynamicDetailComponent { @@ -640,7 +648,9 @@ export struct DynamicDetailComponent {
640 } 648 }
641 .width(CommonConstants.FULL_WIDTH) 649 .width(CommonConstants.FULL_WIDTH)
642 .height(CommonConstants.FULL_HEIGHT) 650 .height(CommonConstants.FULL_HEIGHT)
643 - .padding({ bottom: 100 }) 651 + .padding({
  652 + bottom: 100,
  653 + })
644 .scrollBar(BarState.Off) 654 .scrollBar(BarState.Off)
645 .alignSelf(ItemAlign.Start) 655 .alignSelf(ItemAlign.Start)
646 } 656 }
@@ -674,7 +684,7 @@ export struct DynamicDetailComponent { @@ -674,7 +684,7 @@ export struct DynamicDetailComponent {
674 .height(100) 684 .height(100)
675 685
676 } 686 }
677 - .margin({bottom: 65}) 687 + .margin({bottom: 65, top: 10})
678 } 688 }
679 .alignSelf(ItemAlign.Start) 689 .alignSelf(ItemAlign.Start)
680 .backgroundColor('#FFFFFFFF') 690 .backgroundColor('#FFFFFFFF')
@@ -75,65 +75,71 @@ export struct FeedBackActivity { @@ -75,65 +75,71 @@ export struct FeedBackActivity {
75 Stack({ alignContent: Alignment.Bottom }) { 75 Stack({ alignContent: Alignment.Bottom }) {
76 Scroll(this.scroller) { 76 Scroll(this.scroller) {
77 Column() { 77 Column() {
78 - Text($r('app.string.feedback_opinion_type'))  
79 - .fontColor($r('app.color.color_222222'))  
80 - .fontSize($r('app.float.font_size_14_5'))  
81 - .fontWeight(600)  
82 - .width('100%')  
83 - .margin({ left: 24, top: $r('app.float.vp_14') })  
84 - Blank()  
85 - .height(0.5)  
86 - .width('94%')  
87 - .margin({ top: $r('app.float.vp_12') })  
88 - .backgroundColor($r('app.color.color_EDEDED'))  
89 - GridRow({  
90 - columns:3,  
91 - }) {  
92 - ForEach(this.feedbackTypeBeans, (feedbackTypeBean: FeedbackTypeBean, index: number) => {  
93 - GridCol({  
94 - }) {  
95 - Row(){  
96 - Image(feedbackTypeBean.isSelect ? $r('app.media.checkbox_true') : $r('app.media.checkbox_false'))  
97 - .width(17)  
98 - .height(17)  
99 - Text(feedbackTypeBean.classifyName)  
100 - .fontColor($r('app.color.color_222222'))  
101 - .fontSize($r('app.float.font_size_14'))  
102 - .margin({ left: $r('app.float.vp_4') })  
103 - }  
104 - .width($r('app.float.margin_115'))  
105 - .height($r('app.float.vp_22'))  
106 - .margin({bottom:$r('app.float.margin_16')})  
107 - .backgroundColor($r('app.color.color_fff'))  
108 - .onClick(() => {  
109 - let temp = {} as FeedbackTypeBean  
110 - temp.id = feedbackTypeBean.id  
111 - temp.classifyName = feedbackTypeBean.classifyName  
112 - if(feedbackTypeBean.isSelect){  
113 - temp.isSelect = false  
114 - }else{  
115 - temp.isSelect = true 78 + Column() {
  79 + Text($r('app.string.feedback_opinion_type'))
  80 + .fontColor($r('app.color.color_222222'))
  81 + .fontSize($r('app.float.font_size_14_5'))
  82 + .fontWeight(600)
  83 + .width('100%')
  84 + .margin({ left: 24, top: $r('app.float.vp_14') })
  85 + Blank()
  86 + .height(0.5)
  87 + .width('94%')
  88 + .margin({ top: $r('app.float.vp_12') })
  89 + .backgroundColor($r('app.color.color_EDEDED'))
  90 + GridRow({
  91 + columns: 3,
  92 + }) {
  93 + ForEach(this.feedbackTypeBeans, (feedbackTypeBean: FeedbackTypeBean, index: number) => {
  94 + GridCol({}) {
  95 + Row() {
  96 + Image(feedbackTypeBean.isSelect ? $r('app.media.checkbox_true') : $r('app.media.checkbox_false'))
  97 + .width(17)
  98 + .height(17)
  99 + Text(feedbackTypeBean.classifyName)
  100 + .fontColor($r('app.color.color_222222'))
  101 + .fontSize($r('app.float.font_size_14'))
  102 + .margin({ left: $r('app.float.vp_4') })
116 } 103 }
117 - this.feedbackTypeBeans[index] = temp  
118 - this.canSubmit = this.checkSubmit()  
119 - TrackingButton.click('submit_feedback',TrackConstants.PageName.FeedbackPage,TrackConstants.PageName.FeedbackPage,{  
120 - 'feedback_type':feedbackTypeBean.id+'' 104 + .width($r('app.float.margin_115'))
  105 + .height($r('app.float.vp_22'))
  106 + .margin({ bottom: $r('app.float.margin_16') })
  107 + .backgroundColor($r('app.color.color_fff'))
  108 + .onClick(() => {
  109 + let temp = {} as FeedbackTypeBean
  110 + temp.id = feedbackTypeBean.id
  111 + temp.classifyName = feedbackTypeBean.classifyName
  112 + if (feedbackTypeBean.isSelect) {
  113 + temp.isSelect = false
  114 + } else {
  115 + temp.isSelect = true
  116 + }
  117 + this.feedbackTypeBeans[index] = temp
  118 + this.canSubmit = this.checkSubmit()
  119 + TrackingButton.click('submit_feedback', TrackConstants.PageName.FeedbackPage,
  120 + TrackConstants.PageName.FeedbackPage, {
  121 + 'feedback_type': feedbackTypeBean.id + ''
  122 + })
121 }) 123 })
122 - })  
123 - }  
124 - }) 124 + }
  125 + })
  126 + }
  127 + .width('90%')
  128 + .margin({ top: $r('app.float.vp_16') })
125 } 129 }
126 - .width('90%')  
127 - .margin({top:$r('app.float.vp_16')}) 130 + .padding({left: 6, right: 6})
  131 +
128 Blank() 132 Blank()
129 .height($r('app.float.margin_5')) 133 .height($r('app.float.margin_5'))
130 .backgroundColor($r('app.color.color_F5F5F5')) 134 .backgroundColor($r('app.color.color_F5F5F5'))
131 - Text($r('app.string.feedback_opinion_tv'))  
132 - .fontColor($r('app.color.color_222222'))  
133 - .fontSize($r('app.float.font_size_14_5'))  
134 - .fontWeight(600)  
135 - .width(CommonConstants.FULL_WIDTH)  
136 - .margin({ left: 24, top: $r('app.float.vp_12') }) 135 +
  136 + Column() {
  137 + Text($r('app.string.feedback_opinion_tv'))
  138 + .fontColor($r('app.color.color_222222'))
  139 + .fontSize($r('app.float.font_size_14_5'))
  140 + .fontWeight(600)
  141 + .width(CommonConstants.FULL_WIDTH)
  142 + .margin({ left: 24, top: $r('app.float.vp_12') })
137 Stack({ alignContent: Alignment.BottomEnd }) { 143 Stack({ alignContent: Alignment.BottomEnd }) {
138 TextArea({ placeholder: $r('app.string.feedback_comments'),text: this.editValue.classifyName}) 144 TextArea({ placeholder: $r('app.string.feedback_comments'),text: this.editValue.classifyName})
139 .width(CommonConstants.FULL_WIDTH) 145 .width(CommonConstants.FULL_WIDTH)
@@ -158,7 +164,7 @@ export struct FeedBackActivity { @@ -158,7 +164,7 @@ export struct FeedBackActivity {
158 } 164 }
159 // Logger.debug(TAG, "onChange " + value) 165 // Logger.debug(TAG, "onChange " + value)
160 this.textNumLabel = value.length 166 this.textNumLabel = value.length
161 - this.canSubmit = this.checkSubmit() 167 + this.canSubmit = this.checkSubmit()
162 }) 168 })
163 GridRow({ 169 GridRow({
164 columns:5, 170 columns:5,
@@ -231,8 +237,8 @@ export struct FeedBackActivity { @@ -231,8 +237,8 @@ export struct FeedBackActivity {
231 } 237 }
232 } 238 }
233 } 239 }
234 - .margin({bottom: $r('app.float.vp_12'), right: $r('app.float.vp_11')})  
235 - .fontSize($r('app.float.font_size_13_5')) 240 + .margin({bottom: $r('app.float.vp_12'), right: $r('app.float.vp_11')})
  241 + .fontSize($r('app.float.font_size_13_5'))
236 } 242 }
237 .height(200) 243 .height(200)
238 .width('94%') 244 .width('94%')
@@ -243,52 +249,54 @@ export struct FeedBackActivity { @@ -243,52 +249,54 @@ export struct FeedBackActivity {
243 249
244 250
245 251
246 - Text($r('app.string.feedback_email'))  
247 - .fontColor($r('app.color.color_222222'))  
248 - .fontSize($r('app.float.font_size_13_2'))  
249 - .width('94%')  
250 - .margin({ top: $r('app.float.margin_24') })  
251 -  
252 - Row() {  
253 - Blank().width('3%')  
254 - Text($r('app.string.feedback_mail'))  
255 - .height(CommonConstants.FULL_HEIGHT) 252 + Text($r('app.string.feedback_email'))
256 .fontColor($r('app.color.color_222222')) 253 .fontColor($r('app.color.color_222222'))
257 .fontSize($r('app.float.font_size_13_2')) 254 .fontSize($r('app.float.font_size_13_2'))
258 - .fontWeight(600)  
259 - .padding({left: $r('app.float.margin_12') })  
260 - .backgroundColor($r('app.color.color_F5F5F5'))  
261 - .borderRadius({  
262 - topLeft: 4,  
263 - topRight: 0,  
264 - bottomLeft: 4,  
265 - bottomRight: 0,  
266 - }) 255 + .width('94%')
  256 + .margin({ top: $r('app.float.margin_24') })
267 257
268 - TextInput({ placeholder: $r('app.string.feedback_hideemail') })  
269 - .width(0)  
270 - .layoutWeight(1)  
271 - .height(CommonConstants.FULL_HEIGHT)  
272 - .fontColor($r('app.color.color_222222'))  
273 - .fontSize($r('app.float.font_size_13_2'))  
274 - .placeholderColor($r('app.color.color_CCCCCC'))  
275 - .placeholderFont({size:$r('app.float.font_size_13_2')})  
276 - .backgroundColor($r('app.color.color_F5F5F5'))  
277 - .borderRadius({  
278 - topLeft: 0,  
279 - topRight: 4,  
280 - bottomLeft: 0,  
281 - bottomRight: 4,  
282 - })  
283 - .onChange((value) => {  
284 - this.email = value  
285 - })  
286 - Blank().width('3%') 258 + Row() {
  259 + Blank().width('3%')
  260 + Text($r('app.string.feedback_mail'))
  261 + .height(CommonConstants.FULL_HEIGHT)
  262 + .fontColor($r('app.color.color_222222'))
  263 + .fontSize($r('app.float.font_size_13_2'))
  264 + .fontWeight(600)
  265 + .padding({left: $r('app.float.margin_12') })
  266 + .backgroundColor($r('app.color.color_F5F5F5'))
  267 + .borderRadius({
  268 + topLeft: 4,
  269 + topRight: 0,
  270 + bottomLeft: 4,
  271 + bottomRight: 0,
  272 + })
  273 +
  274 + TextInput({ placeholder: $r('app.string.feedback_hideemail') })
  275 + .width(0)
  276 + .layoutWeight(1)
  277 + .height(CommonConstants.FULL_HEIGHT)
  278 + .fontColor($r('app.color.color_222222'))
  279 + .fontSize($r('app.float.font_size_13_2'))
  280 + .placeholderColor($r('app.color.color_CCCCCC'))
  281 + .placeholderFont({size:$r('app.float.font_size_13_2')})
  282 + .backgroundColor($r('app.color.color_F5F5F5'))
  283 + .borderRadius({
  284 + topLeft: 0,
  285 + topRight: 4,
  286 + bottomLeft: 0,
  287 + bottomRight: 4,
  288 + })
  289 + .onChange((value) => {
  290 + this.email = value
  291 + })
  292 + Blank().width('3%')
  293 + }
  294 + .height(42)
  295 + .width(CommonConstants.FULL_WIDTH)
  296 + .margin({top: $r('app.float.margin_16')})
  297 + Blank().layoutWeight(1)
287 } 298 }
288 - .height(42)  
289 - .width(CommonConstants.FULL_WIDTH)  
290 - .margin({top: $r('app.float.margin_16')})  
291 - Blank().layoutWeight(1) 299 + .padding({left: 6, right: 6})
292 } 300 }
293 } 301 }
294 .width(CommonConstants.FULL_WIDTH) 302 .width(CommonConstants.FULL_WIDTH)
@@ -313,6 +321,7 @@ export struct FeedBackActivity { @@ -313,6 +321,7 @@ export struct FeedBackActivity {
313 }) 321 })
314 .margin({ bottom: 64+64+15 }) 322 .margin({ bottom: 64+64+15 })
315 } 323 }
  324 + .padding({left: 6, right: 6})
316 } 325 }
317 } 326 }
318 .backgroundColor($r('app.color.color_fff')) 327 .backgroundColor($r('app.color.color_fff'))
@@ -558,6 +558,9 @@ export struct ImageAndTextPageComponent { @@ -558,6 +558,9 @@ export struct ImageAndTextPageComponent {
558 } 558 }
559 559
560 aboutToDisappear() { 560 aboutToDisappear() {
  561 + if (this.lastTimeoutId) {
  562 + clearTimeout(this.lastTimeoutId)
  563 + }
561 //意图上报 564 //意图上报
562 this.viewBlogInsightIntentShare() 565 this.viewBlogInsightIntentShare()
563 } 566 }
@@ -8,7 +8,7 @@ import { @@ -8,7 +8,7 @@ import {
8 } from 'wdBean'; 8 } from 'wdBean';
9 import { Logger, SPHelper, NetworkUtil, DisplayUtils } from 'wdKit'; 9 import { Logger, SPHelper, NetworkUtil, DisplayUtils } from 'wdKit';
10 import { SpConstants } from 'wdConstant'; 10 import { SpConstants } from 'wdConstant';
11 -import { WdWebLocalComponent } from 'wdWebComponent'; 11 +import { WdWebLocalComponent, WebArticleEventHandler, WebPoolManager } from 'wdWebComponent';
12 import { NativeCallH5Type } from 'wdWebComponent/src/main/ets/pages/NativeCallH5Type'; 12 import { NativeCallH5Type } from 'wdWebComponent/src/main/ets/pages/NativeCallH5Type';
13 import { BridgeWebViewControl } from 'wdJsBridge/Index'; 13 import { BridgeWebViewControl } from 'wdJsBridge/Index';
14 14
@@ -19,6 +19,7 @@ export struct ImageAndTextWebComponent { @@ -19,6 +19,7 @@ export struct ImageAndTextWebComponent {
19 @State reload: number = 0; 19 @State reload: number = 0;
20 @Link isPageEnd: boolean 20 @Link isPageEnd: boolean
21 @Prop @Watch('onDetailDataUpdated') contentDetailData: ContentDetailDTO [] = [] as ContentDetailDTO [] 21 @Prop @Watch('onDetailDataUpdated') contentDetailData: ContentDetailDTO [] = [] as ContentDetailDTO []
  22 + webPoolTargetId: string = ''
22 webviewControl: BridgeWebViewControl = new BridgeWebViewControl() 23 webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
23 private h5ReceiveAppData: H5ReceiveDetailBean = { dataSource: '2' } as H5ReceiveDetailBean 24 private h5ReceiveAppData: H5ReceiveDetailBean = { dataSource: '2' } as H5ReceiveDetailBean
24 private webPrepared = false; 25 private webPrepared = false;
@@ -95,14 +96,27 @@ export struct ImageAndTextWebComponent { @@ -95,14 +96,27 @@ export struct ImageAndTextWebComponent {
95 96
96 aboutToAppear(): void { 97 aboutToAppear(): void {
97 Logger.debug(TAG, 'H5模板加载控件 aboutToAppear'); 98 Logger.debug(TAG, 'H5模板加载控件 aboutToAppear');
  99 +
  100 + this.webPoolTargetId = WebPoolManager.sharedInstance().takeAvaiableArticleWebTarget({
  101 + uiContext: this.getUIContext(),
  102 + webSrc: $rawfile("apph5/index.html"),
  103 + webController: this.webviewControl,
  104 + webArticleEventHandler: new WebArticleEventHandler(this.webviewControl)
  105 + })
  106 + this.webviewControl = WebPoolManager.sharedInstance().getWebController(this.webPoolTargetId)!
  107 + }
  108 +
  109 + aboutToDisappear(): void {
  110 + Logger.debug(TAG, 'H5模板加载控件 aboutToDisappear');
  111 + WebPoolManager.sharedInstance().recycleTarget(this.webPoolTargetId)
98 } 112 }
99 113
100 build() { 114 build() {
101 Column() { 115 Column() {
102 WdWebLocalComponent({ 116 WdWebLocalComponent({
  117 + webPoolTargetId: this.webPoolTargetId,
103 webviewControl: this.webviewControl, 118 webviewControl: this.webviewControl,
104 reload:this.reload, 119 reload:this.reload,
105 - webResource: $rawfile('apph5/index.html'),  
106 backVisibility: false, 120 backVisibility: false,
107 onWebPrepared: this.onWebPrepared.bind(this), 121 onWebPrepared: this.onWebPrepared.bind(this),
108 isPageEnd: $isPageEnd 122 isPageEnd: $isPageEnd
@@ -34,7 +34,7 @@ export struct Card19Component { @@ -34,7 +34,7 @@ export struct Card19Component {
34 } 34 }
35 35
36 titleInit() { 36 titleInit() {
37 - const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.title); 37 + const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.title || this.contentDTO.newsTitle);
38 this.titleMarked = titleInitRes.titleMarked; 38 this.titleMarked = titleInitRes.titleMarked;
39 this.textArr = titleInitRes.textArr; 39 this.textArr = titleInitRes.textArr;
40 } 40 }
@@ -52,8 +52,9 @@ export struct Card19Component { @@ -52,8 +52,9 @@ export struct Card19Component {
52 pageName: this.pageName, 52 pageName: this.pageName,
53 isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg 53 isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg
54 } 54 }
55 - ) // 标题  
56 - if (this.contentDTO.newsTitle) { 55 + )
  56 + // 标题
  57 + if (this.contentDTO.title || this.contentDTO.newsTitle ) {
57 Text() { 58 Text() {
58 if (this.titleMarked) { 59 if (this.titleMarked) {
59 ForEach(this.textArr, (textItem: textItem) => { 60 ForEach(this.textArr, (textItem: textItem) => {
@@ -292,9 +293,7 @@ struct createImg { @@ -292,9 +293,7 @@ struct createImg {
292 .backgroundColor(0xf5f5f5) 293 .backgroundColor(0xf5f5f5)
293 // .aspectRatio(this.onePicW > this.onePicH ? 343 / 198 : 228 / 305) 294 // .aspectRatio(this.onePicW > this.onePicH ? 343 / 198 : 228 / 305)
294 .width('100%') 295 .width('100%')
295 - .constraintSize({  
296 - maxHeight: this.onePicW > this.onePicH ? 198 : 305  
297 - }) 296 + .aspectRatio(this.onePicW / this.onePicH < 1.5 ? 343 / 198 : 343 / 305)
298 .autoResize(true) 297 .autoResize(true)
299 .borderRadius(this.caclImageRadius(index)) 298 .borderRadius(this.caclImageRadius(index))
300 .borderStyle(BorderStyle.Solid) 299 .borderStyle(BorderStyle.Solid)
@@ -23,48 +23,60 @@ export struct MoreComponent { @@ -23,48 +23,60 @@ export struct MoreComponent {
23 23
24 build() { 24 build() {
25 if (this.showDetail) { 25 if (this.showDetail) {
26 - ForEach(this.contentDTO.sameContentList, (item: ContentDTO, index: number) => {  
27 - if (item.appStyle !== "9") {  
28 - CardParser({compDTO:new CompDTO, contentDTO: item })  
29 - } else {  
30 - Column(){  
31 - Card9Component({ compDTO: new CompDTO, contentDTO:item, pageId: "", pageName: "" })  
32 -  
33 - Divider()  
34 - .width('100%')  
35 - .color($r('app.color.color_F5F5F5'))  
36 - .strokeWidth(4) 26 + Column(){
  27 + ForEach(this.contentDTO.sameContentList, (item: ContentDTO, index: number) => {
  28 + if (item.appStyle !== "9") {
  29 + CardParser({compDTO:new CompDTO, contentDTO: item ,isNeedDivider:index === this.contentDTO.sameContentList.length -1 ? false:true})
  30 + .padding({left: 6, right: 6})
  31 + } else {
  32 + Column(){
  33 + Card9Component({ compDTO: new CompDTO, contentDTO:item, pageId: "", pageName: "" })
  34 +
  35 + if(index != this.contentDTO.sameContentList.length -1){
  36 + Divider()
  37 + .width('100%')
  38 + .color($r('app.color.color_F5F5F5'))
  39 + .strokeWidth(4)
  40 + }
  41 + }
  42 + .padding({left: 6, right: 6})
37 } 43 }
38 - }  
39 - })  
40 -  
41 -  
42 - } else {  
43 - Column() {  
44 -  
45 - Row() {  
46 - Text('点击展开更多相似')  
47 - .fontSize(16)  
48 - Text(`(${this.contentDTO.sameContentListSize})`)  
49 - .fontSize(16)  
50 - Image($r('app.media.comment_unfold'))  
51 - .width(16)  
52 - .height(16)  
53 - }  
54 - .justifyContent(FlexAlign.Center)  
55 - .width('100%')  
56 - .height(48)  
57 - .backgroundColor(0xffffff)  
58 - .onClick(() => {  
59 - this.showDetail = true;  
60 }) 44 })
61 45
62 Divider() 46 Divider()
63 - .width('100%') 47 + .width('100%' )
64 .color($r('app.color.color_F5F5F5')) 48 .color($r('app.color.color_F5F5F5'))
65 .strokeWidth(5) 49 .strokeWidth(5)
  50 + }
66 51
  52 + } else {
  53 + Column(){
  54 + Column() {
  55 +
  56 + Row() {
  57 + Text('点击展开更多相似')
  58 + .fontSize(16)
  59 + Text(`(${this.contentDTO.sameContentListSize})`)
  60 + .fontSize(16)
  61 + Image($r('app.media.comment_unfold'))
  62 + .width(16)
  63 + .height(16)
  64 + }
  65 + .justifyContent(FlexAlign.Center)
  66 + .width('100%')
  67 + .height(48)
  68 + .backgroundColor(0xffffff)
  69 + .onClick(() => {
  70 + this.showDetail = true;
  71 + })
  72 + }
  73 + .padding({left: 10 + 6 , right: 10 + 6})
67 } 74 }
  75 +
  76 + Divider()
  77 + .width('100%' )
  78 + .color($r('app.color.color_F5F5F5'))
  79 + .strokeWidth(5)
68 } 80 }
69 81
70 82
@@ -72,6 +84,11 @@ export struct MoreComponent { @@ -72,6 +84,11 @@ export struct MoreComponent {
72 } 84 }
73 85
74 dealSearchSameList() { 86 dealSearchSameList() {
  87 + //来回返回,会重新触发 dealSearchSameList,如果已经获取过 sameList 不再重新获取
  88 + if(this.contentDTO.sameContentList.length > 0){
  89 + return
  90 + }
  91 +
75 let resultData : SearchDescription[] = JSON.parse(this.contentDTO.sameContentListJson) as SearchDescription[] 92 let resultData : SearchDescription[] = JSON.parse(this.contentDTO.sameContentListJson) as SearchDescription[]
76 93
77 let data: contentListParams = { 94 let data: contentListParams = {
@@ -140,7 +140,7 @@ export struct AppointmentListUI { @@ -140,7 +140,7 @@ export struct AppointmentListUI {
140 .cachedCount(4) 140 .cachedCount(4)
141 .scrollBar(BarState.Off) 141 .scrollBar(BarState.Off)
142 .edgeEffect(EdgeEffect.None) 142 .edgeEffect(EdgeEffect.None)
143 - .margin({ top: 4, left: 12, right: 12}) 143 + .margin({ top: 4, left: 16, right: 16})
144 .layoutWeight(1) 144 .layoutWeight(1)
145 } 145 }
146 146
1 import { BottomNavi, CommonConstants, ViewType } from 'wdConstant'; 1 import { BottomNavi, CommonConstants, ViewType } from 'wdConstant';
2 import { EmitterEventId, EmitterUtils, Logger, NetworkUtil } from 'wdKit'; 2 import { EmitterEventId, EmitterUtils, Logger, NetworkUtil } from 'wdKit';
3 -import { EmptyComponent } from '../view/EmptyComponent'; 3 +import { EmptyComponent, WDViewDefaultType } from '../view/EmptyComponent';
4 import PageModel from '../../viewmodel/PageModel'; 4 import PageModel from '../../viewmodel/PageModel';
5 import { autoRefresh, onActionEnd, onActionStart, onActionUpdate } from '../../utils/PullDownRefresh'; 5 import { autoRefresh, onActionEnd, onActionStart, onActionUpdate } from '../../utils/PullDownRefresh';
6 import LoadMoreLayout from './LoadMoreLayout'; 6 import LoadMoreLayout from './LoadMoreLayout';
@@ -317,6 +317,11 @@ export struct PageComponent { @@ -317,6 +317,11 @@ export struct PageComponent {
317 // console.log(TAG, 'page onAutoRefresh111 ' + this.needload) 317 // console.log(TAG, 'page onAutoRefresh111 ' + this.needload)
318 if (this.needload) { 318 if (this.needload) {
319 this.getData(); 319 this.getData();
  320 + }else{
  321 + let netStatus = NetworkUtil.isNetConnected()
  322 + if(this.pageModel.emptyType === WDViewDefaultType.WDViewDefaultType_NoNetwork && netStatus ){
  323 + this.onAutoRefresh()
  324 + }
320 } 325 }
321 this.needload = false; 326 this.needload = false;
322 } 327 }
@@ -24,9 +24,9 @@ export struct SearchHotsComponent{ @@ -24,9 +24,9 @@ export struct SearchHotsComponent{
24 } 24 }
25 }).catch((err:Error)=>{ 25 }).catch((err:Error)=>{
26 console.log(TAG,JSON.stringify(err)) 26 console.log(TAG,JSON.stringify(err))
27 - if(this.searchHotsData.length === 0){  
28 - this.searchHotsData.push(new SearchHotContentItem("二十大",0,1))  
29 - } 27 + // if(this.searchHotsData.length === 0){
  28 + // this.searchHotsData.push(new SearchHotContentItem("二十大",0,1))
  29 + // }
30 }) 30 })
31 } 31 }
32 32
@@ -283,13 +283,13 @@ export struct SearchResultContentComponent { @@ -283,13 +283,13 @@ export struct SearchResultContentComponent {
283 if (this.data_rmh.length === 1) { 283 if (this.data_rmh.length === 1) {
284 ListItem() { 284 ListItem() {
285 FollowChildComponent({ data: this.bean, type: 1 ,searchText: decodeURI(this.keywords)}) 285 FollowChildComponent({ data: this.bean, type: 1 ,searchText: decodeURI(this.keywords)})
286 - }.padding({ left: "31lpx", right: "31lpx" }) 286 + }.padding({ left: 10 + 6 , right: 10 + 6})
287 } else { 287 } else {
288 ListItem() { 288 ListItem() {
289 Column() { 289 Column() {
290 this.SearchListUI() 290 this.SearchListUI()
291 } 291 }
292 - } 292 + }.padding({left: 6, right: 6})
293 } 293 }
294 } 294 }
295 LazyForEach(this.data, (item: ContentDTO, index: number) => { 295 LazyForEach(this.data, (item: ContentDTO, index: number) => {
@@ -297,6 +297,7 @@ export struct SearchResultContentComponent { @@ -297,6 +297,7 @@ export struct SearchResultContentComponent {
297 Column() { 297 Column() {
298 if (this.searchType == "activity") { 298 if (this.searchType == "activity") {
299 ActivityItemComponent({ contentDTO: item }) 299 ActivityItemComponent({ contentDTO: item })
  300 + .padding({left: 6, right: 6})
300 } else if (item.sameContentListSize > 0) { 301 } else if (item.sameContentListSize > 0) {
301 MoreComponent({ contentDTO: item }) 302 MoreComponent({ contentDTO: item })
302 } else if (item.appStyle == "9") { 303 } else if (item.appStyle == "9") {
@@ -309,8 +310,10 @@ export struct SearchResultContentComponent { @@ -309,8 +310,10 @@ export struct SearchResultContentComponent {
309 }) 310 })
310 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 311 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
311 } 312 }
  313 + .padding({left: 6, right: 6})
312 } else { 314 } else {
313 CardParser({ compDTO: new CompDTO, contentDTO: item }) 315 CardParser({ compDTO: new CompDTO, contentDTO: item })
  316 + .padding({left: 6, right: 6})
314 } 317 }
315 } 318 }
316 } 319 }
@@ -321,6 +324,7 @@ export struct SearchResultContentComponent { @@ -321,6 +324,7 @@ export struct SearchResultContentComponent {
321 ListItem() { 324 ListItem() {
322 ListHasNoMoreDataUI() 325 ListHasNoMoreDataUI()
323 } 326 }
  327 + .padding({left: 6, right: 6})
324 } 328 }
325 } 329 }
326 .cachedCount(5) 330 .cachedCount(5)
@@ -338,6 +342,7 @@ export struct SearchResultContentComponent { @@ -338,6 +342,7 @@ export struct SearchResultContentComponent {
338 .backgroundColor($r('app.color.white')) 342 .backgroundColor($r('app.color.white'))
339 .height('100%') 343 .height('100%')
340 .width('100%') 344 .width('100%')
  345 +
341 } 346 }
342 347
343 @Builder 348 @Builder
@@ -73,13 +73,9 @@ export class AudioSuspensionModel { @@ -73,13 +73,9 @@ export class AudioSuspensionModel {
73 // 显示悬浮窗。 73 // 显示悬浮窗。
74 public showWindow() { 74 public showWindow() {
75 // 判断当前窗口是否已显示,使用callback异步回调。 75 // 判断当前窗口是否已显示,使用callback异步回调。
76 - this.floatWindowClass.get().isShowing((err: BusinessError, data) => {  
77 - const errCode: number = err.code;  
78 - if (errCode) {  
79 - // console.error(TAG, 'Failed window is showing Cause:' + JSON.stringify(err));  
80 - return;  
81 - }  
82 - // console.info(TAG, 'window is showing: ' + JSON.stringify(data)); 76 + try {
  77 + let data = this.floatWindowClass.get().isWindowShowing();
  78 + // console.info(TAG, 'window is showing: ' + data);
83 if(data === false) { 79 if(data === false) {
84 // 显示当前窗口,使用callback异步回调。 80 // 显示当前窗口,使用callback异步回调。
85 this.floatWindowClass.get().showWindow((err: BusinessError) => { 81 this.floatWindowClass.get().showWindow((err: BusinessError) => {
@@ -91,7 +87,9 @@ export class AudioSuspensionModel { @@ -91,7 +87,9 @@ export class AudioSuspensionModel {
91 // console.info(TAG, 'floatWindowClass Succeeded in showing the window.'); 87 // console.info(TAG, 'floatWindowClass Succeeded in showing the window.');
92 }); 88 });
93 } 89 }
94 - }); 90 + } catch (exception) {
  91 + console.error(TAG, `Failed to check whether the window is showing. Cause code: ${exception.code}, message: ${exception.message}`);
  92 + }
95 } 93 }
96 94
97 // 设置悬浮窗尺寸 95 // 设置悬浮窗尺寸
@@ -120,6 +120,7 @@ export class PageHelper { @@ -120,6 +120,7 @@ export class PageHelper {
120 pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoContent1; 120 pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoContent1;
121 return; 121 return;
122 } else { 122 } else {
  123 + pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_Default
123 //更新数据 124 //更新数据
124 pageModel.compList.addItems(liveReviewDTO.list); 125 pageModel.compList.addItems(liveReviewDTO.list);
125 this.refreshUIEnd(pageModel, true); 126 this.refreshUIEnd(pageModel, true);
@@ -138,6 +139,7 @@ export class PageHelper { @@ -138,6 +139,7 @@ export class PageHelper {
138 this.refreshUIEnd(pageModel, false) 139 this.refreshUIEnd(pageModel, false)
139 return; 140 return;
140 } 141 }
  142 + pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_Default
141 pageModel.pageInfo = pageInfo; 143 pageModel.pageInfo = pageInfo;
142 if (pageInfo.md5 == pageModel.displayPageInfoMd5) { 144 if (pageInfo.md5 == pageModel.displayPageInfoMd5) {
143 // 缓存一致,不解析 145 // 缓存一致,不解析
@@ -199,7 +199,7 @@ @@ -199,7 +199,7 @@
199 <div class="head-link-block" v-if="hasHeadLink" @click="moreInformationClick"> 199 <div class="head-link-block" v-if="hasHeadLink" @click="moreInformationClick">
200 <img v-if="darkMode === 'light'" src="./image/headLinkIcon.svg" alt=""> 200 <img v-if="darkMode === 'light'" src="./image/headLinkIcon.svg" alt="">
201 <img v-if="darkMode === 'dark'" src="./image/dark/headLinkIcon.svg" alt=""> 201 <img v-if="darkMode === 'dark'" src="./image/dark/headLinkIcon.svg" alt="">
202 - <span class="head-link-block-str" v-html="details.newLinkObject.newsTitle"></span> 202 + <span class="head-link-block-str" v-html="details.newLinkObject ? details.newLinkObject.newsTitle : ''"></span>
203 </div> 203 </div>
204 <!-- 导读 --> 204 <!-- 导读 -->
205 <div class="new-intro-box droidSerif" v-if="details.newIntroduction"> 205 <div class="new-intro-box droidSerif" v-if="details.newIntroduction">
@@ -219,7 +219,7 @@ @@ -219,7 +219,7 @@
219 <div class="cdescrip_text" v-if="details.rmhDesc" @click="skipCustomerNumberPage">{{details.rmhDesc}}</div> 219 <div class="cdescrip_text" v-if="details.rmhDesc" @click="skipCustomerNumberPage">{{details.rmhDesc}}</div>
220 </div> 220 </div>
221 <!-- @click.stop阻止事件冒泡 --> 221 <!-- @click.stop阻止事件冒泡 -->
222 - <template v-if="!isOwer && showButton"> 222 + <template v-if="!isOwer">
223 <div class="clook-btn clook" @click.stop="clookBtn" v-if="clookStatusSee || showClook"> 223 <div class="clook-btn clook" @click.stop="clookBtn" v-if="clookStatusSee || showClook">
224 <template v-if="clookBtnActive"> 224 <template v-if="clookBtnActive">
225 <img class="clook-loading anticon-spin" src="./image/loading_clock.svg" alt=""> 225 <img class="clook-loading anticon-spin" src="./image/loading_clock.svg" alt="">
@@ -276,14 +276,8 @@ @@ -276,14 +276,8 @@
276 <div class="aft anmite-vote" v-if="voteState.status == 1 || !details.endTimePoint"> 276 <div class="aft anmite-vote" v-if="voteState.status == 1 || !details.endTimePoint">
277 <div class="jdat" v-if="optionList.length"> 277 <div class="jdat" v-if="optionList.length">
278 <div class="pkjd-box" v-if="optionList[0].votesBf != 0 || optionList[1].votesBf != 0"> 278 <div class="pkjd-box" v-if="optionList[0].votesBf != 0 || optionList[1].votesBf != 0">
279 - <span  
280 - class="s s1"  
281 - :style="optionList.length ? optionList[0].oneStyleAfter : undefined"  
282 - ></span>  
283 - <spsn  
284 - class="s s2"  
285 - :style="optionList.length ? optionList[1].twoStyleAfter : undefined"  
286 - ></spsn> 279 + <span class="s s1" :style="optionList.length ? optionList[0].oneStyleAfter : undefined"></span>
  280 + <spsn class="s s2" :style="optionList.length ? optionList[1].twoStyleAfter : undefined"></spsn>
287 </div> 281 </div>
288 <span 282 <span
289 v-if="optionList[0].votesBf === 0 && optionList[1].votesBf === 0" 283 v-if="optionList[0].votesBf === 0 && optionList[1].votesBf === 0"
@@ -427,7 +421,7 @@ @@ -427,7 +421,7 @@
427 </div> 421 </div>
428 422
429 <!-- 分享 --> 423 <!-- 分享 -->
430 - <!-- <div class="share" v-if="shareOpen" :style="{ marginTop: actieInfo.show ? '0.64rem' : undefined }"> 424 + <div class="share" v-if="shareOpen" :style="{ marginTop: actieInfo.show ? '0.64rem' : undefined }">
431 <div 425 <div
432 v-if="details.shareInfo.sharePosterOpen == 1" 426 v-if="details.shareInfo.sharePosterOpen == 1"
433 class="sharePoster share-wrapper share-box" 427 class="sharePoster share-wrapper share-box"
@@ -506,7 +500,7 @@ @@ -506,7 +500,7 @@
506 <span>微博</span> 500 <span>微博</span>
507 </div> 501 </div>
508 </div> 502 </div>
509 - </div> --> 503 + </div>
510 <div class="reload-page" v-if="baseNode == 'dev'" @click="mockAppClearData">模拟app复用重新加载</div> 504 <div class="reload-page" v-if="baseNode == 'dev'" @click="mockAppClearData">模拟app复用重新加载</div>
511 </div> 505 </div>
512 506
@@ -533,6 +527,7 @@ @@ -533,6 +527,7 @@
533 <div id="hidden"></div> 527 <div id="hidden"></div>
534 <div id="hiddenArticle"></div> 528 <div id="hiddenArticle"></div>
535 <!-- Plugin 的 JS 文件 --> 529 <!-- Plugin 的 JS 文件 -->
  530 +<script src="./js/plugin/error-stack-parser.min.js"></script>
536 <script src="./js/plugin/jquery.min.js"></script> 531 <script src="./js/plugin/jquery.min.js"></script>
537 <script src="./js/plugin/vue3.min.js"></script> 532 <script src="./js/plugin/vue3.min.js"></script>
538 <script src="./js/plugin/day.min.js"></script> 533 <script src="./js/plugin/day.min.js"></script>
@@ -18,7 +18,7 @@ function useAudio(audioState, details) { @@ -18,7 +18,7 @@ function useAudio(audioState, details) {
18 play: [], 18 play: [],
19 pause: [], 19 pause: [],
20 error: [], 20 error: [],
21 - ended: [], 21 + ended: []
22 } 22 }
23 23
24 const start = () => { 24 const start = () => {
@@ -69,7 +69,6 @@ function useAudio(audioState, details) { @@ -69,7 +69,6 @@ function useAudio(audioState, details) {
69 audioEvent.error.push(errorFun) 69 audioEvent.error.push(errorFun)
70 audioEvent.ended.push(endedFun) 70 audioEvent.ended.push(endedFun)
71 71
72 -  
73 const playFun = function () { 72 const playFun = function () {
74 if (item_audio) { 73 if (item_audio) {
75 audioPlayNum.value += 1 74 audioPlayNum.value += 1
@@ -150,32 +149,39 @@ function useAudio(audioState, details) { @@ -150,32 +149,39 @@ function useAudio(audioState, details) {
150 audioStylePlay.style.display = 'block' 149 audioStylePlay.style.display = 'block'
151 } 150 }
152 151
153 - if (audioEvent.duration.length) { 152 + if (audioEvent.duration && audioEvent.duration.length) {
154 item_audio.removeEventListener('durationchange', audioEvent.duration[key]) 153 item_audio.removeEventListener('durationchange', audioEvent.duration[key])
155 } 154 }
156 155
157 - if (audioEvent.time.length) { 156 + if (audioEvent.time && audioEvent.time.length) {
158 item_audio.removeEventListener('timeupdate', audioEvent.time[key]) 157 item_audio.removeEventListener('timeupdate', audioEvent.time[key])
159 } 158 }
160 159
161 - if (audioEvent.ended.length) { 160 + if (audioEvent.ended && audioEvent.ended.length) {
162 item_audio.removeEventListener('ended', audioEvent.ended[key]) 161 item_audio.removeEventListener('ended', audioEvent.ended[key])
163 } 162 }
164 163
165 - if (audioEvent.error.length) { 164 + if (audioEvent.error && audioEvent.error.length) {
166 item_audio.removeEventListener('error', audioEvent.error[key]) 165 item_audio.removeEventListener('error', audioEvent.error[key])
167 } 166 }
168 167
169 - if (audioEvent.play.length) { 168 + if (audioEvent.play && audioEvent.play.length) {
170 audioStylePlay.removeEventListener('click', audioEvent.play[key]) 169 audioStylePlay.removeEventListener('click', audioEvent.play[key])
171 } 170 }
172 171
173 - if (audioEvent.pause.length) { 172 + if (audioEvent.pause && audioEvent.pause.length) {
174 audioStylePause.removeEventListener('click', audioEvent.pause[key]) 173 audioStylePause.removeEventListener('click', audioEvent.pause[key])
175 } 174 }
176 175
177 }) 176 })
178 - audioEvent = {} 177 + audioEvent = {
  178 + duration: [],
  179 + time: [],
  180 + play: [],
  181 + pause: [],
  182 + error: [],
  183 + ended: []
  184 + }
179 } 185 }
180 186
181 return { 187 return {
@@ -189,7 +189,6 @@ function useEditorContent(details, netstutas, audioState, loadlmageOnlyWifiSwitc @@ -189,7 +189,6 @@ function useEditorContent(details, netstutas, audioState, loadlmageOnlyWifiSwitc
189 str = str.replace(/<VIDEO(.*?)poster="(.*?)"(.*?)>/g, '<VIDEO$1poster="" data-poster="$2"$3>') 189 str = str.replace(/<VIDEO(.*?)poster="(.*?)"(.*?)>/g, '<VIDEO$1poster="" data-poster="$2"$3>')
190 str = str.replace(/<p>\s*<\/p>/g, '') 190 str = str.replace(/<p>\s*<\/p>/g, '')
191 str = str.replace(/[\u200B-\u200D\uFEFF]/g, '') 191 str = str.replace(/[\u200B-\u200D\uFEFF]/g, '')
192 - str = str.replace(/‘/g, '\'')  
193 str = htmlDecode(str) 192 str = htmlDecode(str)
194 // 这一步去除元素与元素之间的空格 193 // 这一步去除元素与元素之间的空格
195 str = str.replace(/>\s+</g, '><') 194 str = str.replace(/>\s+</g, '><')
@@ -220,6 +219,10 @@ function useEditorContent(details, netstutas, audioState, loadlmageOnlyWifiSwitc @@ -220,6 +219,10 @@ function useEditorContent(details, netstutas, audioState, loadlmageOnlyWifiSwitc
220 jqHtml('#newsContent', { type: 'set', str }) 219 jqHtml('#newsContent', { type: 'set', str })
221 const realHtml = jqHtml('#newsContent', { type: 'get' }) 220 const realHtml = jqHtml('#newsContent', { type: 'get' })
222 jqHtml('#newsContent', { type: 'set', str: '' }) 221 jqHtml('#newsContent', { type: 'set', str: '' })
  222 + mainProcessProgress['8'] = {
  223 + status:'success',
  224 + message: '准备调用:handleArticleStr方法'
  225 + }
223 domUtil.handleArticleStr(realHtml, (type, option) => { 226 domUtil.handleArticleStr(realHtml, (type, option) => {
224 if (type === 1) { 227 if (type === 1) {
225 addPreview() 228 addPreview()
@@ -235,13 +238,23 @@ function useEditorContent(details, netstutas, audioState, loadlmageOnlyWifiSwitc @@ -235,13 +238,23 @@ function useEditorContent(details, netstutas, audioState, loadlmageOnlyWifiSwitc
235 }, details.value, netstutas.value, loadlmageOnlyWifiSwitch.value) 238 }, details.value, netstutas.value, loadlmageOnlyWifiSwitch.value)
236 239
237 clearEmptyPel() 240 clearEmptyPel()
238 - // errorBlock(  
239 - // './image/content_fail.svg',  
240 - // '获取内容失败,请重试',  
241 - // true  
242 - // )  
243 changeContentHtmlHeight({ type: 'done-before' }) 241 changeContentHtmlHeight({ type: 'done-before' })
  242 + // setTimeout(() => {
  243 + // if (document.querySelector('.error-block').style.display !== 'block') {
  244 + // mainProcessProgress['9'] = {
  245 + // status:'success',
  246 + // message: '页面开始展示,去除骨架屏'
  247 + // }
  248 + // appBlock(true)
  249 + // mobileApp(true)
  250 + // startShowArticle = true
  251 + // }
  252 + // }, 4000)
244 if (document.querySelector('.error-block').style.display !== 'block') { 253 if (document.querySelector('.error-block').style.display !== 'block') {
  254 + mainProcessProgress['9'] = {
  255 + status:'success',
  256 + message: '页面开始展示,去除骨架屏'
  257 + }
245 appBlock(true) 258 appBlock(true)
246 mobileApp(true) 259 mobileApp(true)
247 startShowArticle = true 260 startShowArticle = true
@@ -306,8 +319,6 @@ function useEditorContent(details, netstutas, audioState, loadlmageOnlyWifiSwitc @@ -306,8 +319,6 @@ function useEditorContent(details, netstutas, audioState, loadlmageOnlyWifiSwitc
306 const inner = dataInfo && (typeof dataInfo === 'undefined' 319 const inner = dataInfo && (typeof dataInfo === 'undefined'
307 ? 'undefined' 320 ? 'undefined'
308 : typeof dataInfo === 'object' && dataInfo.jumpType && dataInfo.jumpType == 'internal') 321 : typeof dataInfo === 'object' && dataInfo.jumpType && dataInfo.jumpType == 'internal')
309 - console.log(inner)  
310 - console.log(dataInfo)  
311 if (inner && url) { 322 if (inner && url) {
312 jumpAppInnerFun(dataInfo, url) 323 jumpAppInnerFun(dataInfo, url)
313 } else if (url) { 324 } else if (url) {
@@ -20,7 +20,7 @@ function useImage(details, netstutas, loadlmageOnlyWifiSwitch) { @@ -20,7 +20,7 @@ function useImage(details, netstutas, loadlmageOnlyWifiSwitch) {
20 imageLoadedLen.value += 1 20 imageLoadedLen.value += 1
21 } 21 }
22 22
23 - if (hasPreview) { 23 + if (hasPreview && record.parentNode) {
24 record.parentNode.setAttribute('status', 'success') 24 record.parentNode.setAttribute('status', 'success')
25 record.parentNode.classList.remove('error') 25 record.parentNode.classList.remove('error')
26 record.parentNode.classList.remove('minHeight') 26 record.parentNode.classList.remove('minHeight')
@@ -43,7 +43,7 @@ function useImage(details, netstutas, loadlmageOnlyWifiSwitch) { @@ -43,7 +43,7 @@ function useImage(details, netstutas, loadlmageOnlyWifiSwitch) {
43 } 43 }
44 44
45 45
46 - if (hasPreview) { 46 + if (hasPreview && record.parentNode) {
47 record.parentNode.setAttribute('status', 'error') 47 record.parentNode.setAttribute('status', 'error')
48 record.parentNode.classList.remove('success') 48 record.parentNode.classList.remove('success')
49 record.parentNode.classList.remove('loading') 49 record.parentNode.classList.remove('loading')
@@ -82,7 +82,7 @@ function useImage(details, netstutas, loadlmageOnlyWifiSwitch) { @@ -82,7 +82,7 @@ function useImage(details, netstutas, loadlmageOnlyWifiSwitch) {
82 imageLoadedLen.value += 1 82 imageLoadedLen.value += 1
83 } 83 }
84 84
85 - if (hasPreview) { 85 + if (hasPreview && record.parentNode) {
86 record.parentNode.setAttribute('status', 'error') 86 record.parentNode.setAttribute('status', 'error')
87 record.parentNode.classList.remove('success') 87 record.parentNode.classList.remove('success')
88 record.parentNode.classList.remove('loading') 88 record.parentNode.classList.remove('loading')
@@ -61,8 +61,10 @@ function useVideo() { @@ -61,8 +61,10 @@ function useVideo() {
61 61
62 const isGiveWidth = !!height 62 const isGiveWidth = !!height
63 63
64 - videoItem.setAttribute('data-height', `${styleHeight}px`)  
65 - videoItem.style.height = `${styleHeight}px` 64 + if (videoItem) {
  65 + videoItem.setAttribute('data-height', `${styleHeight}px`)
  66 + videoItem.style.height = `${styleHeight}px`
  67 + }
66 videoItem.parentNode.style.width = `100%` 68 videoItem.parentNode.style.width = `100%`
67 videoItem.parentNode.style.height = `${styleHeight}px` 69 videoItem.parentNode.style.height = `${styleHeight}px`
68 70
@@ -87,8 +89,10 @@ function useVideo() { @@ -87,8 +89,10 @@ function useVideo() {
87 if (isGiveWidth) return 89 if (isGiveWidth) return
88 const newHeight = !!playerWdith && !!playerHieght ? Number(width) * Number(playerHieght) / Number( 90 const newHeight = !!playerWdith && !!playerHieght ? Number(width) * Number(playerHieght) / Number(
89 playerWdith) : 300 91 playerWdith) : 300
90 - videoItem.setAttribute('data-height', `${newHeight}px`)  
91 - videoItem.style.height = `${newHeight}px` 92 + if (videoItem) {
  93 + videoItem.setAttribute('data-height', `${newHeight}px`)
  94 + videoItem.style.height = `${newHeight}px`
  95 + }
92 videoItem.parentNode.style.width = `100%` 96 videoItem.parentNode.style.width = `100%`
93 videoItem.parentNode.style.height = `${newHeight}px` 97 videoItem.parentNode.style.height = `${newHeight}px`
94 callback(newHeight) 98 callback(newHeight)
1 dayjs.extend(dayjs_plugin_localizedFormat) 1 dayjs.extend(dayjs_plugin_localizedFormat)
2 dayjs.extend(dayjs_plugin_relativeTime) 2 dayjs.extend(dayjs_plugin_relativeTime)
3 3
4 -const { onMounted, onUnmounted, toRefs, nextTick, watchEffect, toRef } = Vue 4 +const { toRefs, nextTick, toRef } = Vue
5 5
6 function compareTimeArray(obj1, obj2, key, sort) { 6 function compareTimeArray(obj1, obj2, key, sort) {
7 const val1 = obj1[key] 7 const val1 = obj1[key]
@@ -50,7 +50,6 @@ const app = Vue.createApp({ @@ -50,7 +50,6 @@ const app = Vue.createApp({
50 const isRmh = ref(null) 50 const isRmh = ref(null)
51 const isNewspaper = ref(null) 51 const isNewspaper = ref(null)
52 const browseStr = ref('') 52 const browseStr = ref('')
53 - const showButton = ref(false)  
54 53
55 const state = reactive({ 54 const state = reactive({
56 clientHeight: 0, 55 clientHeight: 0,
@@ -217,8 +216,8 @@ const app = Vue.createApp({ @@ -217,8 +216,8 @@ const app = Vue.createApp({
217 // document.documentElement.setAttribute('data-size', state.appFontSize) 216 // document.documentElement.setAttribute('data-size', state.appFontSize)
218 state.environment = window.config.VUE_BASE_HEADER.environment 217 state.environment = window.config.VUE_BASE_HEADER.environment
219 // channelId.value = 2038 218 // channelId.value = 2038
220 - state.relId = 500004384175  
221 - state.contentId = 30037827178 219 + // state.relId = 500005771692
  220 + state.contentId = 30037846595
222 contentId = state.contentId 221 contentId = state.contentId
223 clearInterval(time.value) 222 clearInterval(time.value)
224 setTimeout(() => { 223 setTimeout(() => {
@@ -235,16 +234,13 @@ const app = Vue.createApp({ @@ -235,16 +234,13 @@ const app = Vue.createApp({
235 } 234 }
236 document.querySelector('.error-block').style.display = 'none' 235 document.querySelector('.error-block').style.display = 'none'
237 setRemUnit() 236 setRemUnit()
238 - /*config数据是由H5预埋,App加载完成后 app主动传递的方法名请求数据 */ 237 + /* config数据是由H5预埋,App加载完成后 app主动传递的方法名请求数据 */
239 const config = window.config.VUE_CONTENT_CONFIG 238 const config = window.config.VUE_CONTENT_CONFIG
240 try { 239 try {
241 const data = 240 const data =
242 typeof config === 'object' ? config : JSON.parse(config) 241 typeof config === 'object' ? config : JSON.parse(config)
243 - if (data.dataJson) {  
244 - const dataJson =  
245 - typeof data.dataJson === 'object'  
246 - ? data.dataJson  
247 - : JSON.parse(data.dataJson) 242 + const dataJson = handleAppData(config)
  243 + if (dataJson) {
248 state.sourcePage = dataJson.sourcePage 244 state.sourcePage = dataJson.sourcePage
249 clearInterval(time.value) 245 clearInterval(time.value)
250 // console.log(`详情接口完成:${dayjs().format('HH:mm:ss:SSS')} - ${dayjs() 246 // console.log(`详情接口完成:${dayjs().format('HH:mm:ss:SSS')} - ${dayjs()
@@ -269,7 +265,6 @@ const app = Vue.createApp({ @@ -269,7 +265,6 @@ const app = Vue.createApp({
269 //通用设备imei 265 //通用设备imei
270 state.deviceId = state.appHeader.device_id 266 state.deviceId = state.appHeader.device_id
271 state.userId = state.appHeader.userId 267 state.userId = state.appHeader.userId
272 - logInfo(state.userId)  
273 // App服务协议 268 // App服务协议
274 state.agreementURL = state.appHeader.agreementURL 269 state.agreementURL = state.appHeader.agreementURL
275 //0:无网 1:Wi-Fi 2:2G 3:3G 4:4G 5:5G 270 //0:无网 1:Wi-Fi 2:2G 3:3G 4:4G 5:5G
@@ -278,7 +273,6 @@ const app = Vue.createApp({ @@ -278,7 +273,6 @@ const app = Vue.createApp({
278 state.environment = state.appHeader.environment 273 state.environment = state.appHeader.environment
279 }) 274 })
280 } catch (e) { 275 } catch (e) {
281 -  
282 } 276 }
283 277
284 try { 278 try {
@@ -286,7 +280,6 @@ const app = Vue.createApp({ @@ -286,7 +280,6 @@ const app = Vue.createApp({
286 } catch (e) {} 280 } catch (e) {}
287 281
288 try { 282 try {
289 - // console.log('详情初始数据', data)  
290 if (data.dataExt) { 283 if (data.dataExt) {
291 hasAppLoginExtra = true 284 hasAppLoginExtra = true
292 285
@@ -317,12 +310,11 @@ const app = Vue.createApp({ @@ -317,12 +310,11 @@ const app = Vue.createApp({
317 } 310 }
318 311
319 // 处理详情 312 // 处理详情
320 - let initialRes = dataJson.responseMap  
321 - initialRes =  
322 - typeof initialRes === 'object'  
323 - ? initialRes  
324 - : JSON.parse(initialRes)  
325 - initData(initialRes, dataJson.contentId) 313 + mainProcessProgress['3'] = {
  314 + status:'success',
  315 + message: '准备调用:initData方法'
  316 + }
  317 + initData(handleAppDetails(dataJson.responseMap), dataJson.contentId)
326 } else { 318 } else {
327 errorResponse() 319 errorResponse()
328 errorBlock( 320 errorBlock(
@@ -331,6 +323,13 @@ const app = Vue.createApp({ @@ -331,6 +323,13 @@ const app = Vue.createApp({
331 true 323 true
332 ) 324 )
333 } 325 }
  326 + } else {
  327 + errorResponse()
  328 + errorBlock(
  329 + './image/no_net.svg',
  330 + '网络出小差了,请检查网络后重试',
  331 + true
  332 + )
334 } 333 }
335 } catch (e) { } 334 } catch (e) { }
336 } 335 }
@@ -339,7 +338,16 @@ const app = Vue.createApp({ @@ -339,7 +338,16 @@ const app = Vue.createApp({
339 if (window.config.VUE_BASE_NODE === 'dev') { 338 if (window.config.VUE_BASE_NODE === 'dev') {
340 if (devApp || window.config.devApp) { 339 if (devApp || window.config.devApp) {
341 const details = res.data ? res.data.length > 0 ? res.data[0] : {} : {} 340 const details = res.data ? res.data.length > 0 ? res.data[0] : {} : {}
  341 + mainProcessProgress['1'] = {
  342 + status:'success',
  343 + message: 'App给到的数据',
  344 + appData: res
  345 + }
342 hasDetails = true 346 hasDetails = true
  347 + mainProcessProgress['4'] = {
  348 + status:'success',
  349 + message: '准备调用:handleArticle方法'
  350 + }
343 handleArticle(details) 351 handleArticle(details)
344 352
345 return 353 return
@@ -347,9 +355,9 @@ const app = Vue.createApp({ @@ -347,9 +355,9 @@ const app = Vue.createApp({
347 355
348 const response = await axiosRequest({ 356 const response = await axiosRequest({
349 url: '/content/zh/c/content/detail', 357 url: '/content/zh/c/content/detail',
350 - methot: 'post', 358 + methot: 'get',
351 appStatus: false, 359 appStatus: false,
352 - isMock: true, 360 + // isMock: true,
353 // weakNetwork: true, 361 // weakNetwork: true,
354 // mockTimeOut: 10, 362 // mockTimeOut: 10,
355 //环境 363 //环境
@@ -357,14 +365,9 @@ const app = Vue.createApp({ @@ -357,14 +365,9 @@ const app = Vue.createApp({
357 //接口前缀 365 //接口前缀
358 prefix: '/api/rmrb-bff-display-zh', 366 prefix: '/api/rmrb-bff-display-zh',
359 //给接口传的数据 367 //给接口传的数据
360 - data: {  
361 - contents: [  
362 - {  
363 - //内容id  
364 - contentId: id,  
365 - relId: state.relId  
366 - }  
367 - ] 368 + params: {
  369 + contentId: id,
  370 + relId: state.relId
368 }, 371 },
369 //请求头信息 372 //请求头信息
370 headers: state.appHeader 373 headers: state.appHeader
@@ -375,7 +378,16 @@ const app = Vue.createApp({ @@ -375,7 +378,16 @@ const app = Vue.createApp({
375 if (response.success) { 378 if (response.success) {
376 if (response.data) { 379 if (response.data) {
377 const details = response.data.length > 0 ? response.data[0] : {} 380 const details = response.data.length > 0 ? response.data[0] : {}
  381 + mainProcessProgress['1'] = {
  382 + status:'success',
  383 + message: 'App给到的数据',
  384 + appData: response
  385 + }
378 hasDetails = true 386 hasDetails = true
  387 + mainProcessProgress['4'] = {
  388 + status:'success',
  389 + message: '准备调用:handleArticle方法'
  390 + }
379 handleArticle(details) 391 handleArticle(details)
380 } else { 392 } else {
381 errorResponse() 393 errorResponse()
@@ -399,6 +411,10 @@ const app = Vue.createApp({ @@ -399,6 +411,10 @@ const app = Vue.createApp({
399 hasDetails = true 411 hasDetails = true
400 // 获取用户登录状态 412 // 获取用户登录状态
401 if (hasAppLoginExtra) { 413 if (hasAppLoginExtra) {
  414 + mainProcessProgress['4'] = {
  415 + status:'success',
  416 + message: '准备调用:handleArticle方法'
  417 + }
402 handleArticle(details) 418 handleArticle(details)
403 } else { 419 } else {
404 // const nowDate = dayjs() 420 // const nowDate = dayjs()
@@ -413,6 +429,10 @@ const app = Vue.createApp({ @@ -413,6 +429,10 @@ const app = Vue.createApp({
413 state.creatorID = loginStatusResponse && loginStatusResponse.creatorID 429 state.creatorID = loginStatusResponse && loginStatusResponse.creatorID
414 state.isLogined = 430 state.isLogined =
415 loginStatusResponse && loginStatusResponse.isLogined 431 loginStatusResponse && loginStatusResponse.isLogined
  432 + mainProcessProgress['4'] = {
  433 + status:'success',
  434 + message: '准备调用:handleArticle方法'
  435 + }
416 handleArticle(details) 436 handleArticle(details)
417 }) 437 })
418 } catch (e) { } 438 } catch (e) { }
@@ -453,8 +473,16 @@ const app = Vue.createApp({ @@ -453,8 +473,16 @@ const app = Vue.createApp({
453 state.details = deepCopy(details) 473 state.details = deepCopy(details)
454 state.originDataSource = deepCopy(details) 474 state.originDataSource = deepCopy(details)
455 if (window.config.VUE_BASE_NODE === 'dev') { 475 if (window.config.VUE_BASE_NODE === 'dev') {
  476 + mainProcessProgress['5'] = {
  477 + status:'success',
  478 + message: '准备调用:initApp方法'
  479 + }
456 initApp(details) 480 initApp(details)
457 } else { 481 } else {
  482 + mainProcessProgress['5'] = {
  483 + status:'success',
  484 + message: '准备调用:initApp方法'
  485 + }
458 initApp(details) 486 initApp(details)
459 try { 487 try {
460 // H5传递数据至App 488 // H5传递数据至App
@@ -531,6 +559,10 @@ const app = Vue.createApp({ @@ -531,6 +559,10 @@ const app = Vue.createApp({
531 if (pageError) { 559 if (pageError) {
532 changeAppError() 560 changeAppError()
533 } 561 }
  562 + mainProcessProgress['7'] = {
  563 + status:'success',
  564 + message: '准备调用:initEditorStr方法'
  565 + }
534 initEditorStr(isNewspaper.value) 566 initEditorStr(isNewspaper.value)
535 }) 567 })
536 } 568 }
@@ -642,13 +674,11 @@ const app = Vue.createApp({ @@ -642,13 +674,11 @@ const app = Vue.createApp({
642 if (state.isLogined == 1) { 674 if (state.isLogined == 1) {
643 // 已登录 675 // 已登录
644 if (window.config.VUE_BASE_NODE === 'dev') { 676 if (window.config.VUE_BASE_NODE === 'dev') {
645 - showButton.value = true  
646 showClook.value = true 677 showClook.value = true
647 } else { 678 } else {
648 clookStatus(true) // 查"关注"状态 , 更新按钮上的文字 679 clookStatus(true) // 查"关注"状态 , 更新按钮上的文字
649 } 680 }
650 } else { 681 } else {
651 - showButton.value = true  
652 showClook.value = true 682 showClook.value = true
653 } 683 }
654 } 684 }
@@ -674,6 +704,10 @@ const app = Vue.createApp({ @@ -674,6 +704,10 @@ const app = Vue.createApp({
674 if (actieInfo.title) { actieInfo.show = true } 704 if (actieInfo.title) { actieInfo.show = true }
675 } 705 }
676 706
  707 + mainProcessProgress['6'] = {
  708 + status:'success',
  709 + message: '准备调用:getOthersStatus回调方法'
  710 + }
677 if (callBack) callBack() 711 if (callBack) callBack()
678 } 712 }
679 713
@@ -1052,13 +1086,11 @@ const app = Vue.createApp({ @@ -1052,13 +1086,11 @@ const app = Vue.createApp({
1052 headers: state.appHeader, 1086 headers: state.appHeader,
1053 showError: false 1087 showError: false
1054 }) 1088 })
1055 - showButton.value = true  
1056 if (response.success) { 1089 if (response.success) {
1057 clookStatusSee.value = response.data[0].status == '1' ? false : true // '1' 是已关注 '0'是未关注 1090 clookStatusSee.value = response.data[0].status == '1' ? false : true // '1' 是已关注 '0'是未关注
1058 } 1091 }
1059 } else { 1092 } else {
1060 if (state.creatorID == state.details.rmhId) { 1093 if (state.creatorID == state.details.rmhId) {
1061 - showButton.value = true  
1062 isOwer.value = true 1094 isOwer.value = true
1063 clookStatusSee.value = false 1095 clookStatusSee.value = false
1064 nextTick(() => { 1096 nextTick(() => {
@@ -1093,7 +1125,6 @@ const app = Vue.createApp({ @@ -1093,7 +1125,6 @@ const app = Vue.createApp({
1093 const code = statusResponseMap.code 1125 const code = statusResponseMap.code
1094 const data = statusResponseMap.data 1126 const data = statusResponseMap.data
1095 if ([ 200, '0' ].includes(code)) { 1127 if ([ 200, '0' ].includes(code)) {
1096 - showButton.value = true  
1097 if (data) { 1128 if (data) {
1098 if (data[0].status == '1') { 1129 if (data[0].status == '1') {
1099 state.initClockStatus = !initStatus 1130 state.initClockStatus = !initStatus
@@ -1356,24 +1387,7 @@ const app = Vue.createApp({ @@ -1356,24 +1387,7 @@ const app = Vue.createApp({
1356 data: [ 1387 data: [
1357 { 1388 {
1358 voteInfo: shallowMergeObj(state.originDataSource.voteInfo, { 1389 voteInfo: shallowMergeObj(state.originDataSource.voteInfo, {
1359 - options: [  
1360 - {  
1361 - backColor: '#486FFF',  
1362 - index: 1,  
1363 - optionId: 8537,  
1364 - summary: 2,  
1365 - totalVotes: 1,  
1366 - wordColor: '#FFFFFF'  
1367 - },  
1368 - {  
1369 - backColor: '#486FFF',  
1370 - index: 2,  
1371 - optionId: 8538,  
1372 - summary: 1,  
1373 - totalVotes: 0,  
1374 - wordColor: '#FFFFFF'  
1375 - }  
1376 - ] 1390 + options: voteOtions.value
1377 }) 1391 })
1378 } 1392 }
1379 ] 1393 ]
@@ -1407,16 +1421,14 @@ const app = Vue.createApp({ @@ -1407,16 +1421,14 @@ const app = Vue.createApp({
1407 sendNative( 1421 sendNative(
1408 'jsCall_callAppService', 1422 'jsCall_callAppService',
1409 { 1423 {
1410 - method: 'post', 1424 + method: 'get',
1411 url: '/api/rmrb-bff-display-zh/content/zh/c/content/detail', 1425 url: '/api/rmrb-bff-display-zh/content/zh/c/content/detail',
1412 parameters: { 1426 parameters: {
1413 - contents: shallowMergeObj({  
1414 - contentId: eq  
1415 - }, reLInfo) 1427 + contentId: eq,
  1428 + ...reLInfo
1416 } 1429 }
1417 }, 1430 },
1418 (res) => { 1431 (res) => {
1419 - logInfo('res', res)  
1420 try { 1432 try {
1421 const refResponse = 1433 const refResponse =
1422 typeof res === 'object' ? res : JSON.parse(res) 1434 typeof res === 'object' ? res : JSON.parse(res)
@@ -1456,6 +1468,7 @@ const app = Vue.createApp({ @@ -1456,6 +1468,7 @@ const app = Vue.createApp({
1456 const voteStatus = async (vId, index, callBack) => { 1468 const voteStatus = async (vId, index, callBack) => {
1457 if (window.config.VUE_BASE_NODE === 'dev') { 1469 if (window.config.VUE_BASE_NODE === 'dev') {
1458 voteInit.value = true 1470 voteInit.value = true
  1471 + state.voteState.optionId = voteOtions.value[0].optionId
1459 state.voteState.status = 1 // 决定是投票前0 还是 投票后1 1472 state.voteState.status = 1 // 决定是投票前0 还是 投票后1
1460 nextTick(() => handleVoteList()) 1473 nextTick(() => handleVoteList())
1461 if (state.details.voteInfo.style === 1) { 1474 if (state.details.voteInfo.style === 1) {
@@ -1493,10 +1506,12 @@ const app = Vue.createApp({ @@ -1493,10 +1506,12 @@ const app = Vue.createApp({
1493 if ([ 200, '0' ].includes(code) && data) { 1506 if ([ 200, '0' ].includes(code) && data) {
1494 if (Object.keys(data).length > 0) { 1507 if (Object.keys(data).length > 0) {
1495 try { 1508 try {
  1509 + voteInit.value = true
1496 state.voteState.status = data.status // 决定是投票前0 还是 投票后1 1510 state.voteState.status = data.status // 决定是投票前0 还是 投票后1
1497 state.voteState.optionId = data.optionId // 返回的是 被投票项的 optionId ,没投就是 '' 1511 state.voteState.optionId = data.optionId // 返回的是 被投票项的 optionId ,没投就是 ''
1498 nextTick(() => handleVoteList()) 1512 nextTick(() => handleVoteList())
1499 - } catch (e) {} 1513 + } catch (e) {
  1514 + }
1500 if (state.details.voteInfo.style === 1) { 1515 if (state.details.voteInfo.style === 1) {
1501 // 展示对 √ 1516 // 展示对 √
1502 if (index) { 1517 if (index) {
@@ -1914,6 +1929,7 @@ const app = Vue.createApp({ @@ -1914,6 +1929,7 @@ const app = Vue.createApp({
1914 document.querySelector('.skeleton-loading').classList.add('active') 1929 document.querySelector('.skeleton-loading').classList.add('active')
1915 appBlock(false) 1930 appBlock(false)
1916 1931
  1932 + mainProcessProgress = {}
1917 time.value = '' 1933 time.value = ''
1918 deviceType.value = judgTerminal() === 1 ? 'ad' : 'ios' 1934 deviceType.value = judgTerminal() === 1 ? 'ad' : 'ios'
1919 statrTime.value = dayjs() 1935 statrTime.value = dayjs()
@@ -1928,7 +1944,6 @@ const app = Vue.createApp({ @@ -1928,7 +1944,6 @@ const app = Vue.createApp({
1928 isNewspaper.value = false 1944 isNewspaper.value = false
1929 voteInit.value = false 1945 voteInit.value = false
1930 showClook.value = false 1946 showClook.value = false
1931 - showButton.value = false  
1932 optionList.value = [] 1947 optionList.value = []
1933 subjectList.value = [] 1948 subjectList.value = []
1934 channelList.value = [] 1949 channelList.value = []
@@ -2054,7 +2069,6 @@ const app = Vue.createApp({ @@ -2054,7 +2069,6 @@ const app = Vue.createApp({
2054 optionList, 2069 optionList,
2055 showClook, 2070 showClook,
2056 clookStatusSee, 2071 clookStatusSee,
2057 - showButton,  
2058 timeLine, 2072 timeLine,
2059 shareOpen, 2073 shareOpen,
2060 hasReadCount, 2074 hasReadCount,
@@ -2092,5 +2106,6 @@ const app = Vue.createApp({ @@ -2092,5 +2106,6 @@ const app = Vue.createApp({
2092 app.mount('#app') 2106 app.mount('#app')
2093 2107
2094 app.config.errorHandler = (err) => { 2108 app.config.errorHandler = (err) => {
2095 - h5ErrorPage(err.toString()) 2109 + const ev = handleJsError('vue-errorHandler', err, err.message)
  2110 + h5ErrorPage(ev, err)
2096 } 2111 }
  1 +!function(e,t){"use strict";"function"==typeof define&&define.amd?define("stackframe",[],t):"object"==typeof exports?module.exports=t():e.StackFrame=t()}(this,function(){"use strict";function e(e){return e.charAt(0).toUpperCase()+e.substring(1)}function t(e){return function(){return this[e]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],i=["fileName","functionName","source"],a=r.concat(n,i,["args"],["evalOrigin"]);function o(t){if(t)for(var r=0;r<a.length;r++)void 0!==t[a[r]]&&this["set"+e(a[r])](t[a[r]])}o.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof o)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new o(e)}},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",r=this.getColumnNumber()||"",n=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+r+")":"[eval]:"+t+":"+r:n?n+" ("+e+":"+t+":"+r+")":e+":"+t+":"+r}},o.fromString=function(e){var t=e.indexOf("("),r=e.lastIndexOf(")"),n=e.substring(0,t),i=e.substring(t+1,r).split(","),a=e.substring(r+1);if(0===a.indexOf("@"))var s=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a,""),c=s[1],u=s[2],f=s[3];return new o({functionName:n,args:i||void 0,fileName:c,lineNumber:u||void 0,columnNumber:f||void 0})};for(var s=0;s<r.length;s++)o.prototype["get"+e(r[s])]=t(r[s]),o.prototype["set"+e(r[s])]=function(e){return function(t){this[e]=Boolean(t)}}(r[s]);for(var c=0;c<n.length;c++)o.prototype["get"+e(n[c])]=t(n[c]),o.prototype["set"+e(n[c])]=function(e){return function(t){if(r=t,isNaN(parseFloat(r))||!isFinite(r))throw new TypeError(e+" must be a Number");var r;this[e]=Number(t)}}(n[c]);for(var u=0;u<i.length;u++)o.prototype["get"+e(i[u])]=t(i[u]),o.prototype["set"+e(i[u])]=function(e){return function(t){this[e]=String(t)}}(i[u]);return o}),function(e,t){"use strict";"function"==typeof define&&define.amd?define("error-stack-parser",["stackframe"],t):"object"==typeof exports?module.exports=t(require("stackframe")):e.ErrorStackParser=t(e.StackFrame)}(this,function(e){"use strict";var t=/(^|@)\S+:\d+/,r=/^\s*at .*(\S+:\d+|\(native\))/m,n=/^(eval@)?(\[native code])?$/;return{parse:function(e){if(void 0!==e.stacktrace||void 0!==e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(r))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw new Error("Cannot parse given Error object")},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter(function(e){return!!e.match(r)},this).map(function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var r=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;var i=this.extractLocation(n?n[1]:r),a=n&&r||void 0,o=["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0];return new e({functionName:a,fileName:o,lineNumber:i[1],columnNumber:i[2],source:t})},this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter(function(e){return!e.match(n)},this).map(function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new e({functionName:t});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=t.match(r),i=n&&n[1]?n[1]:void 0,a=this.extractLocation(t.replace(r,""));return new e({functionName:i,fileName:a[0],lineNumber:a[1],columnNumber:a[2],source:t})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=t.message.split("\n"),i=[],a=2,o=n.length;a<o;a+=2){var s=r.exec(n[a]);s&&i.push(new e({fileName:s[2],lineNumber:s[1],source:n[a]}))}return i},parseOpera10:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=t.stacktrace.split("\n"),i=[],a=0,o=n.length;a<o;a+=2){var s=r.exec(n[a]);s&&i.push(new e({functionName:s[3]||void 0,fileName:s[2],lineNumber:s[1],source:n[a]}))}return i},parseOpera11:function(r){return r.stack.split("\n").filter(function(e){return!!e.match(t)&&!e.match(/^Error created at/)},this).map(function(t){var r,n=t.split("@"),i=this.extractLocation(n.pop()),a=n.shift()||"",o=a.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;a.match(/\(([^)]*)\)/)&&(r=a.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var s=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new e({functionName:o,args:s,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:t})},this)}}});
  2 +//# sourceMappingURL=error-stack-parser.min.js.map
@@ -15,7 +15,7 @@ function playerVideo(player, events) { @@ -15,7 +15,7 @@ function playerVideo(player, events) {
15 const top = player.container.parentNode.offsetTop 15 const top = player.container.parentNode.offsetTop
16 const left = player.container.parentNode.getBoundingClientRect().left 16 const left = player.container.parentNode.getBoundingClientRect().left
17 const videoLandscape = width > height ? '1' : (width < height ? '2' : '') 17 const videoLandscape = width > height ? '1' : (width < height ? '2' : '')
18 - const videoUrl = player.options.record.url 18 + const videoUrl = player.options ? player.options.record ? player.options.record.url : '' : ''
19 19
20 if (window.config.VUE_BASE_NODE === 'dev') { 20 if (window.config.VUE_BASE_NODE === 'dev') {
21 console.log('视频播放', width, height, left, top, videoLandscape) 21 console.log('视频播放', width, height, left, top, videoLandscape)
@@ -31,7 +31,7 @@ class videoEnPlayer extends Emitter { @@ -31,7 +31,7 @@ class videoEnPlayer extends Emitter {
31 31
32 initOhtersPlayer() { 32 initOhtersPlayer() {
33 const domId = this.container.getAttribute('id') 33 const domId = this.container.getAttribute('id')
34 - const url = this.options.record.url 34 + const url = this.options ? this.options.record ? this.options.record.url : '' : ''
35 const isDark = document.querySelector('html').getAttribute('dark-mode') === 'true' 35 const isDark = document.querySelector('html').getAttribute('dark-mode') === 'true'
36 this.originPoster = this.options.record.poster 36 this.originPoster = this.options.record.poster
37 this.previewPoster = this.options.record.poster 37 this.previewPoster = this.options.record.poster
@@ -157,7 +157,9 @@ class DomUtil { @@ -157,7 +157,9 @@ class DomUtil {
157 157
158 // 处理所有表格属性 158 // 处理所有表格属性
159 for (let i = 0; i < tableAllDom.length; i++) { 159 for (let i = 0; i < tableAllDom.length; i++) {
160 - tableAllDom[i].setAttribute('width', '') 160 + if (tableAllDom[i]) {
  161 + tableAllDom[i].setAttribute('width', '')
  162 + }
161 } 163 }
162 164
163 // 处理图片点亮 165 // 处理图片点亮
@@ -833,7 +835,7 @@ class DomUtil { @@ -833,7 +835,7 @@ class DomUtil {
833 const isInline = style && style.display ? style.display.indexOf('inline') > -1 : false 835 const isInline = style && style.display ? style.display.indexOf('inline') > -1 : false
834 if (!classList.includes('not-preview-image') && name !== 'people' && !isInline) { 836 if (!classList.includes('not-preview-image') && name !== 'people' && !isInline) {
835 effectImage.push(imageDom[i]) 837 effectImage.push(imageDom[i])
836 - } else { 838 + } else if (imageDom[i]) {
837 imageDom[i].setAttribute('status', 'loading') 839 imageDom[i].setAttribute('status', 'loading')
838 } 840 }
839 } else { 841 } else {
@@ -959,8 +961,10 @@ class DomUtil { @@ -959,8 +961,10 @@ class DomUtil {
959 let height = 0 961 let height = 0
960 const videoEl = videoDomList[i] 962 const videoEl = videoDomList[i]
961 const videoElId = `origin-video-${i}` 963 const videoElId = `origin-video-${i}`
962 - videoEl.setAttribute('id', videoElId)  
963 - videoEl.setAttribute('class', 'en-origin-video') 964 + if (videoEl) {
  965 + videoEl.setAttribute('id', videoElId)
  966 + videoEl.setAttribute('class', 'en-origin-video')
  967 + }
964 const src = videoDomList[i].getAttribute('src') 968 const src = videoDomList[i].getAttribute('src')
965 if (!src) break 969 if (!src) break
966 if (videoEl && videoEl.style.display === 'none') break 970 if (videoEl && videoEl.style.display === 'none') break
@@ -1034,7 +1038,9 @@ class DomUtil { @@ -1034,7 +1038,9 @@ class DomUtil {
1034 const aEl = document.querySelectorAll('#newsContent a') 1038 const aEl = document.querySelectorAll('#newsContent a')
1035 for (let i = 0; i < aEl.length; i++) { 1039 for (let i = 0; i < aEl.length; i++) {
1036 const url = aEl[i].getAttribute('href') 1040 const url = aEl[i].getAttribute('href')
1037 - aEl[i].setAttribute('data-href', url || '') 1041 + if (aEl[i]) {
  1042 + aEl[i].setAttribute('data-href', url || '')
  1043 + }
1038 aEl[i].removeAttribute('href') 1044 aEl[i].removeAttribute('href')
1039 aEl[i].style.textDecoration = 'underline' 1045 aEl[i].style.textDecoration = 'underline'
1040 } 1046 }
1 -function h5ErrorPage(message) { 1 +const ERROR_ID = []
  2 +
  3 +function h5ErrorPage(message, error) {
  4 + if (error && !getIsReportId(error)) return
  5 +
2 pageErrorTypePoint({ errorMessage: message }) 6 pageErrorTypePoint({ errorMessage: message })
3 errorBlock( 7 errorBlock(
4 './image/content_fail.svg', 8 './image/content_fail.svg',
@@ -6,13 +10,49 @@ function h5ErrorPage(message) { @@ -6,13 +10,49 @@ function h5ErrorPage(message) {
6 ) 10 )
7 } 11 }
8 12
  13 +function getErrorId(val) {
  14 + return window.btoa(decodeURIComponent(encodeURIComponent(val)))
  15 +}
  16 +
  17 +function getIsReportId(error) {
  18 + const id = getErrorId(error?.message || error?.fileName)
  19 + const even = item => item === id
  20 + if (ERROR_ID.some(even)) {
  21 + console.warn(`Duplicate error, not reported, ${error?.message}`)
  22 + return false
  23 + } else {
  24 + ERROR_ID.push(id)
  25 + return true
  26 + }
  27 +}
  28 +
  29 +function handleJsError(type, ev, message) {
  30 + let stackFrame = ErrorStackParser.parse(ev)[0]
  31 + // 错误文件、行号、列号、源文件、堆栈等等
  32 + let { source } = stackFrame
  33 + const stack = `${type}: ` + message + ` ${trim(source)}`
  34 + return stack
  35 +}
9 36
10 window.onerror = function (message, source, lineno, colno, error) { 37 window.onerror = function (message, source, lineno, colno, error) {
11 - h5ErrorPage(message) 38 + console.log(111)
  39 + const ev = handleJsError('window-onerror', error, error.message)
  40 + h5ErrorPage(ev, error)
12 } 41 }
13 42
  43 +window.addEventListener('error', function (error) {
  44 + const ev = handleJsError('addEventListener-error', error.error, error.message)
  45 + h5ErrorPage(ev, error)
  46 +})
  47 +
14 window.addEventListener('unhandledrejection', function (e) { 48 window.addEventListener('unhandledrejection', function (e) {
15 e.preventDefault() 49 e.preventDefault()
16 - h5ErrorPage(e.reason.stack) 50 + const ev = handleJsError('unhandledrejection-error', e.reason, e.reason.message)
  51 + h5ErrorPage(ev, e.reason)
  52 + // 唯一id判断
  53 + // const error = e.reason.stack
  54 + // const errorSource = extractParenthesesContent(error || '')
  55 + // const first = error ? error.split('\n')[0] : error
  56 + // h5ErrorPage(first + ` (${errorSource.map(el => `"${el}"`).join('、')})`)
17 return true 57 return true
18 }) 58 })
@@ -21,6 +21,8 @@ const userAgent = navigator.userAgent @@ -21,6 +21,8 @@ const userAgent = navigator.userAgent
21 // 页面加载模式 21 // 页面加载模式
22 var darkMode = 'light' 22 var darkMode = 'light'
23 // var darkMode = 'dark' 23 // var darkMode = 'dark'
  24 +// 页面主进程进度
  25 +var mainProcessProgress = {}
24 26
25 /** 27 /**
26 * @Author gx12358 28 * @Author gx12358
@@ -266,6 +266,81 @@ function setHtmlBaseOptions(appData) { @@ -266,6 +266,81 @@ function setHtmlBaseOptions(appData) {
266 } 266 }
267 } 267 }
268 268
  269 +/**
  270 + * @Author gx12358
  271 + * @DateTime 2024/9/23
  272 + * @lastTime 2024/9/23
  273 + * @description 处理客户端给到的数据
  274 + */
  275 +function handleAppData(appData) {
  276 + const data =
  277 + typeof appData === 'object' ? appData : JSON.parse(appData)
  278 + if (data.dataJson) {
  279 + const dataJson =
  280 + typeof data.dataJson === 'object'
  281 + ? data.dataJson
  282 + : JSON.parse(data.dataJson)
  283 + return dataJson
  284 + }
  285 +
  286 + return null
  287 +}
  288 +
  289 +/**
  290 + * @Author gx12358
  291 + * @DateTime 2024/9/23
  292 + * @lastTime 2024/9/23
  293 + * @description 拿到详情接口数据
  294 + */
  295 +function handleAppDetails(responseMap) {
  296 + let initialRes = responseMap
  297 + initialRes =
  298 + typeof initialRes === 'object'
  299 + ? initialRes
  300 + : JSON.parse(initialRes)
  301 +
  302 + return initialRes
  303 +}
  304 +
  305 +/**
  306 + * @Author gx12358
  307 + * @DateTime 2024/9/23
  308 + * @lastTime 2024/9/23
  309 + * @description appData - init
  310 + */
  311 +function detailsChange(appData, responseCallback) {
  312 + // const data =
  313 + // typeof appData === 'object' ? appData : JSON.parse(appData)
  314 + const dataJson = handleAppData(appData)
  315 + // try {
  316 + // sendNative(
  317 + // 'jsCall_h5TrackingEvent',
  318 + // {
  319 + // eventId: 'h5_article_page_browse',
  320 + // parameters: {
  321 + // appData: JSON.stringify(data)
  322 + // }
  323 + // }
  324 + // )
  325 + // } catch (e) {}
  326 + mainProcessProgress = {}
  327 + mainProcessProgress['1'] = {
  328 + status:'success',
  329 + message: 'App给到的数据',
  330 + appData: JSON.stringify(handleAppDetails(dataJson))
  331 + }
  332 + window.config.VUE_CONTENT_CONFIG = appData
  333 + setHtmlBaseOptions(appData)
  334 + if (document.querySelector('#detail-change')) {
  335 + mainProcessProgress['2'] = {
  336 + status:'success',
  337 + message: '准备调用:requestApp方法'
  338 + }
  339 + document.querySelector('#detail-change').click()
  340 + }
  341 + if (responseCallback) responseCallback(appData)
  342 +}
  343 +
269 /* 该方法由H5预埋,App加载完成后 app主动传递数据用。 */ 344 /* 该方法由H5预埋,App加载完成后 app主动传递数据用。 */
270 document.addEventListener('DOMContentLoaded', function () { 345 document.addEventListener('DOMContentLoaded', function () {
271 if (window.config.VUE_BASE_NODE === 'dev') { 346 if (window.config.VUE_BASE_NODE === 'dev') {
@@ -325,23 +400,13 @@ document.addEventListener('DOMContentLoaded', function () { @@ -325,23 +400,13 @@ document.addEventListener('DOMContentLoaded', function () {
325 if (judgTerminal() === 1) { 400 if (judgTerminal() === 1) {
326 connectWebViewJavascriptBridge(function (bridge) { 401 connectWebViewJavascriptBridge(function (bridge) {
327 bridge.registerHandler('jsCall_receiveAppData', function (appData, responseCallback) { 402 bridge.registerHandler('jsCall_receiveAppData', function (appData, responseCallback) {
328 - window.config.VUE_CONTENT_CONFIG = appData  
329 - setHtmlBaseOptions(appData)  
330 - if (document.querySelector('#detail-change')) {  
331 - document.querySelector('#detail-change').click()  
332 - }  
333 - if (responseCallback) responseCallback(appData) 403 + detailsChange(appData, responseCallback)
334 }) 404 })
335 }) 405 })
336 } else { 406 } else {
337 setupWebViewJavascriptBridge(function (bridge) { 407 setupWebViewJavascriptBridge(function (bridge) {
338 bridge.registerHandler('jsCall_receiveAppData', function (appData, responseCallback) { 408 bridge.registerHandler('jsCall_receiveAppData', function (appData, responseCallback) {
339 - window.config.VUE_CONTENT_CONFIG = appData  
340 - setHtmlBaseOptions(appData)  
341 - if (document.querySelector('#detail-change')) {  
342 - document.querySelector('#detail-change').click()  
343 - }  
344 - if (responseCallback) responseCallback(appData) 409 + detailsChange(appData, responseCallback)
345 }) 410 })
346 }) 411 })
347 } 412 }
@@ -1019,8 +1019,16 @@ function pageErrorTypePoint({ @@ -1019,8 +1019,16 @@ function pageErrorTypePoint({
1019 newsId, 1019 newsId,
1020 errorMessage 1020 errorMessage
1021 }) { 1021 }) {
1022 - logInfo('contentId', newsId || contentId)  
1023 - logInfo('error', errorMessage) 1022 + const parameters = {
  1023 + newsId: newsId || contentId,
  1024 + errorMessage,
  1025 + userAgent,
  1026 + date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
  1027 + mainProcessProgress: JSON.stringify(mainProcessProgress)
  1028 + }
  1029 + logInfo(Object.assign(parameters, {
  1030 + mainProcessProgress
  1031 + }))
1024 try { 1032 try {
1025 sendNative('jsCall_currentPageOperate', { 1033 sendNative('jsCall_currentPageOperate', {
1026 operateType: '50' 1034 operateType: '50'
@@ -1032,10 +1040,7 @@ function pageErrorTypePoint({ @@ -1032,10 +1040,7 @@ function pageErrorTypePoint({
1032 'jsCall_h5TrackingEvent', 1040 'jsCall_h5TrackingEvent',
1033 { 1041 {
1034 eventId: 'h5_article_page_error', 1042 eventId: 'h5_article_page_error',
1035 - parameters: {  
1036 - newsId: newsId || contentId,  
1037 - errorMessage  
1038 - } 1043 + parameters
1039 } 1044 }
1040 ) 1045 )
1041 } catch (e) {} 1046 } catch (e) {}
@@ -1381,7 +1386,7 @@ function jumpAppInnerFun(record, url) { @@ -1381,7 +1386,7 @@ function jumpAppInnerFun(record, url) {
1381 if (window.config.VUE_BASE_NODE === 'dev') { 1386 if (window.config.VUE_BASE_NODE === 'dev') {
1382 axiosRequest({ 1387 axiosRequest({
1383 url: '/content/zh/c/content/detail', 1388 url: '/content/zh/c/content/detail',
1384 - methot: 'post', 1389 + methot: 'get',
1385 appStatus: false, 1390 appStatus: false,
1386 // isMock: true, 1391 // isMock: true,
1387 // weakNetwork: true, 1392 // weakNetwork: true,
@@ -1391,14 +1396,11 @@ function jumpAppInnerFun(record, url) { @@ -1391,14 +1396,11 @@ function jumpAppInnerFun(record, url) {
1391 //接口前缀 1396 //接口前缀
1392 prefix: '/api/rmrb-bff-display-zh', 1397 prefix: '/api/rmrb-bff-display-zh',
1393 //给接口传的数据 1398 //给接口传的数据
1394 - data: {  
1395 - contents: [  
1396 - {  
1397 - //内容id  
1398 - contentId: record.contentId,  
1399 - relId: record.relId  
1400 - }  
1401 - ] 1399 + params: {
  1400 + //内容id
  1401 + contentId: record.contentId,
  1402 + relId: record.relId,
  1403 + relType: record.relType,
1402 }, 1404 },
1403 //请求头信息 1405 //请求头信息
1404 headers: shallowMerge({ 1406 headers: shallowMerge({
@@ -1425,16 +1427,13 @@ function jumpAppInnerFun(record, url) { @@ -1425,16 +1427,13 @@ function jumpAppInnerFun(record, url) {
1425 sendNative( 1427 sendNative(
1426 'jsCall_callAppService', 1428 'jsCall_callAppService',
1427 { 1429 {
1428 - method: 'post', 1430 + method: 'get',
1429 url: '/api/rmrb-bff-display-zh/content/zh/c/content/detail', 1431 url: '/api/rmrb-bff-display-zh/content/zh/c/content/detail',
1430 - parameters: {  
1431 - contents: [  
1432 - {  
1433 - //内容id  
1434 - contentId: record.contentId,  
1435 - relId: record.relId  
1436 - }  
1437 - ] 1432 + parameters: {
  1433 + //内容id
  1434 + contentId: record.contentId,
  1435 + relId: record.relId,
  1436 + relType: record.relType,
1438 } 1437 }
1439 }, 1438 },
1440 (res) => { 1439 (res) => {
@@ -173,19 +173,17 @@ export struct DetailPlayLiveCommon { @@ -173,19 +173,17 @@ export struct DetailPlayLiveCommon {
173 // 判断当前窗口是否已显示,使用callback异步回调。 173 // 判断当前窗口是否已显示,使用callback异步回调。
174 // Logger.info(TAG, 'this.liveState', this.liveState) 174 // Logger.info(TAG, 'this.liveState', this.liveState)
175 if(this.liveState !== 'wait') { 175 if(this.liveState !== 'wait') {
176 - this.AudioSuspension.floatWindowClass.get().isShowing((err: BusinessError, data) => {  
177 - const errCode: number = err.code;  
178 - if (errCode) {  
179 - // console.error(TAG, 'Failed window is showing Cause:' + JSON.stringify(err));  
180 - return;  
181 - }  
182 - // console.info(TAG, 'window is showing: ' + JSON.stringify(data)); 176 + try {
  177 + let data = this.AudioSuspension.floatWindowClass.get().isWindowShowing();
  178 + // console.info(TAG, 'window is showing: ' + data);
183 if(data) { 179 if(data) {
184 this.isShowAudioCom = true 180 this.isShowAudioCom = true
185 this.AudioSuspension.playerController.get()?.pause(); 181 this.AudioSuspension.playerController.get()?.pause();
186 this.AudioSuspension.minimize() 182 this.AudioSuspension.minimize()
187 } 183 }
188 - }); 184 + } catch (exception) {
  185 + console.error(TAG, `Failed to check whether the window is showing. Cause code: ${exception.code}, message: ${exception.message}`);
  186 + }
189 } 187 }
190 } 188 }
191 189
1 import { Action, 1 import { Action,
2 ContentDetailDTO, ContentDTO, InteractDataDTO, PeopleShipNextListDTO } from 'wdBean/Index'; 2 ContentDetailDTO, ContentDTO, InteractDataDTO, PeopleShipNextListDTO } from 'wdBean/Index';
3 -import { NetworkUtil, WindowModel } from 'wdKit'; 3 +import { EmitterEventId, EmitterUtils, NetworkType, NetworkUtil, WindowModel } from 'wdKit';
4 import { ContentDetailRequest } from 'wdDetailPlayApi/Index' 4 import { ContentDetailRequest } from 'wdDetailPlayApi/Index'
5 import { ResponseDTO } from 'wdNetwork/Index'; 5 import { ResponseDTO } from 'wdNetwork/Index';
6 import { DetailPlayShortVideoPage } from './DetailPlayShortVideoPage' 6 import { DetailPlayShortVideoPage } from './DetailPlayShortVideoPage'
@@ -55,6 +55,7 @@ export struct DetailVideoListPage { @@ -55,6 +55,7 @@ export struct DetailVideoListPage {
55 private AudioSuspension = new AudioSuspensionModel() 55 private AudioSuspension = new AudioSuspensionModel()
56 @State isShowAudioCom: boolean = false 56 @State isShowAudioCom: boolean = false
57 @StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0 57 @StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0
  58 + @State timer: number = -1
58 59
59 // async getRmhDetail() { 60 // async getRmhDetail() {
60 // // 注册监听网络连接 61 // // 注册监听网络连接
@@ -119,6 +120,30 @@ export struct DetailVideoListPage { @@ -119,6 +120,30 @@ export struct DetailVideoListPage {
119 this.getDetail() 120 this.getDetail()
120 } 121 }
121 122
  123 + // 注册监听网络连接
  124 + EmitterUtils.receiveEvent(EmitterEventId.NETWORK_CONNECTED, (async (str?: string) => {
  125 + if (this.timer) {
  126 + clearTimeout(this.timer)
  127 + }
  128 + this.timer = setTimeout(() => {
  129 + let type: NetworkType | null = null
  130 + if (str) {
  131 + type = JSON.parse(str) as NetworkType
  132 + }
  133 + // 注册监听网络连接
  134 + if (type != NetworkType.TYPE_UNKNOWN) {
  135 + console.log(TAG, '网络连接状态变化', type)
  136 + if(type == NetworkType.TYPE_CELLULAR || type == NetworkType.TYPE_WIFI) {
  137 + if (!this.peopleShipHomeCreatorId) {
  138 + this.queryVideoList()
  139 + } else {
  140 + this.getRmhPublishNexts(this.peopleShipHomeCreatorId, `${this.data[this.currentIndex].newsId}`, 1, 1, 10, systemDateTime.getTime(false));
  141 + }
  142 + }
  143 + }
  144 + }, 1000)
  145 + }))
  146 +
122 } 147 }
123 148
124 149
@@ -164,19 +189,17 @@ export struct DetailVideoListPage { @@ -164,19 +189,17 @@ export struct DetailVideoListPage {
164 this.pageShowTime = DateTimeUtils.getTimeStamp() 189 this.pageShowTime = DateTimeUtils.getTimeStamp()
165 190
166 // 判断当前窗口是否已显示,使用callback异步回调。 191 // 判断当前窗口是否已显示,使用callback异步回调。
167 - this.AudioSuspension.floatWindowClass.get().isShowing((err: BusinessError, data) => {  
168 - const errCode: number = err.code;  
169 - if (errCode) {  
170 - // console.error(TAG, 'Failed window is showing Cause:' + JSON.stringify(err));  
171 - return;  
172 - }  
173 - // console.info(TAG, 'window is showing: ' + JSON.stringify(data)); 192 + try {
  193 + let data = this.AudioSuspension.floatWindowClass.get().isWindowShowing();
  194 + // console.info(TAG, 'window is showing: ' + data);
174 if(data) { 195 if(data) {
175 this.isShowAudioCom = true 196 this.isShowAudioCom = true
176 this.AudioSuspension.playerController.get()?.pause(); 197 this.AudioSuspension.playerController.get()?.pause();
177 this.AudioSuspension.minimize() 198 this.AudioSuspension.minimize()
178 } 199 }
179 - }); 200 + } catch (exception) {
  201 + console.error(TAG, `Failed to check whether the window is showing. Cause code: ${exception.code}, message: ${exception.message}`);
  202 + }
180 203
181 const action: Action = router.getParams() as Action; 204 const action: Action = router.getParams() as Action;
182 if (action) { 205 if (action) {
@@ -185,11 +208,11 @@ export struct DetailVideoListPage { @@ -185,11 +208,11 @@ export struct DetailVideoListPage {
185 // 目的子组件watch生效 208 // 目的子组件watch生效
186 setTimeout(() => { 209 setTimeout(() => {
187 this.showCommentList = true 210 this.showCommentList = true
188 - }, 300) 211 + }, 1000)
189 } 212 }
  213 + // console.log(TAG, 'onPageShow showComment', action.params.extra.showComment)
190 } 214 }
191 } 215 }
192 - // console.log(TAG, 'onPageShow', JSON.stringify(action.params))  
193 } 216 }
194 217
195 onPageHide(): void { 218 onPageHide(): void {
@@ -443,7 +466,9 @@ export struct DetailVideoListPage { @@ -443,7 +466,9 @@ export struct DetailVideoListPage {
443 .displayCount(1, true) 466 .displayCount(1, true)
444 .onChange((index: number) => { 467 .onChange((index: number) => {
445 this.currentIndex = index 468 this.currentIndex = index
446 - if (this.currentIndex === this.data.length - 1) { 469 + // if (this.currentIndex === this.data.length - 1) {
  470 + // 倒数第二个开始请求下一页数据解决视频上滑卡顿
  471 + if (this.currentIndex === this.data.length - 2) {
447 // TODO:下拉刷新“努力加载中” 472 // TODO:下拉刷新“努力加载中”
448 if (!this.peopleShipHomeCreatorId) { 473 if (!this.peopleShipHomeCreatorId) {
449 this.queryVideoList() 474 this.queryVideoList()
@@ -9,7 +9,9 @@ import { @@ -9,7 +9,9 @@ import {
9 contentListParams, 9 contentListParams,
10 getRecCompInfoParams 10 getRecCompInfoParams
11 } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; 11 } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
12 -import { NetworkUtil, Logger, WindowModel, DateTimeUtils, LazyDataSource } from 'wdKit/Index'; 12 +import { NetworkUtil, Logger, WindowModel, DateTimeUtils, LazyDataSource, EmitterUtils,
  13 + EmitterEventId,
  14 + NetworkType} from 'wdKit/Index';
13 import { PictureLoading } from './PictureLoading'; 15 import { PictureLoading } from './PictureLoading';
14 import { DisplayDirection } from 'wdConstant/Index'; 16 import { DisplayDirection } from 'wdConstant/Index';
15 import { window } from '@kit.ArkUI'; 17 import { window } from '@kit.ArkUI';
@@ -70,6 +72,7 @@ export struct VideoChannelDetail { @@ -70,6 +72,7 @@ export struct VideoChannelDetail {
70 @Provide onlyWifiLoadVideo: boolean = false 72 @Provide onlyWifiLoadVideo: boolean = false
71 @Provide toastTextVisible: boolean = false 73 @Provide toastTextVisible: boolean = false
72 @StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0 74 @StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0
  75 + @State timer: number = -1
73 76
74 autoRefreshChange() { 77 autoRefreshChange() {
75 if (this.topNavIndex === 0 && !this.isRequesting) { 78 if (this.topNavIndex === 0 && !this.isRequesting) {
@@ -140,6 +143,25 @@ export struct VideoChannelDetail { @@ -140,6 +143,25 @@ export struct VideoChannelDetail {
140 aboutToAppear() { 143 aboutToAppear() {
141 this.getDetail() 144 this.getDetail()
142 // Logger.info(TAG, 'aboutToAppear'); 145 // Logger.info(TAG, 'aboutToAppear');
  146 + // 注册监听网络连接
  147 + EmitterUtils.receiveEvent(EmitterEventId.NETWORK_CONNECTED, (async (str?: string) => {
  148 + if (this.timer) {
  149 + clearTimeout(this.timer)
  150 + }
  151 + this.timer = setTimeout(() => {
  152 + let type: NetworkType | null = null
  153 + if (str) {
  154 + type = JSON.parse(str) as NetworkType
  155 + }
  156 + // 注册监听网络连接
  157 + if (type != NetworkType.TYPE_UNKNOWN) {
  158 + console.log(TAG, '网络连接状态变化', type)
  159 + if(type == NetworkType.TYPE_CELLULAR || type == NetworkType.TYPE_WIFI) {
  160 + this.getRecCompInfo()
  161 + }
  162 + }
  163 + }, 1000)
  164 + }))
143 } 165 }
144 166
145 aboutToDisappear(): void { 167 aboutToDisappear(): void {
@@ -331,7 +353,9 @@ export struct VideoChannelDetail { @@ -331,7 +353,9 @@ export struct VideoChannelDetail {
331 this.currentIndex = index 353 this.currentIndex = index
332 // console.info('onChange==', index.toString()) 354 // console.info('onChange==', index.toString())
333 355
334 - if (this.currentIndex === this.data.length - 1) { 356 + // if (this.currentIndex === this.data.length - 1) {
  357 + // 倒数第二个开始请求下一页数据解决视频上滑卡顿
  358 + if (this.currentIndex === this.data.length - 2) {
335 this.pageNum++ 359 this.pageNum++
336 this.refreshTime = new Date().getTime() 360 this.refreshTime = new Date().getTime()
337 this.loadStrategy = 'push_up' 361 this.loadStrategy = 'push_up'
@@ -18,6 +18,7 @@ export struct PlayerFullScreenView { @@ -18,6 +18,7 @@ export struct PlayerFullScreenView {
18 @State videoDuration: number = this.contentDetailData?.videoInfo?.[0]?.videoDuration || 1 18 @State videoDuration: number = this.contentDetailData?.videoInfo?.[0]?.videoDuration || 1
19 @State showOperator: boolean = true 19 @State showOperator: boolean = true
20 private timer: number = -1 20 private timer: number = -1
  21 + private debounceTimer: number = -1
21 @State upProVal: string = '' 22 @State upProVal: string = ''
22 @State duration: string = DateTimeUtils.secondToTime(this.videoDuration) 23 @State duration: string = DateTimeUtils.secondToTime(this.videoDuration)
23 @State startX: number = 0 24 @State startX: number = 0
@@ -80,6 +81,13 @@ export struct PlayerFullScreenView { @@ -80,6 +81,13 @@ export struct PlayerFullScreenView {
80 }, 5000) 81 }, 5000)
81 } 82 }
82 83
  84 + debounce(func: () => void, wait: number) {
  85 + if (this.debounceTimer) {
  86 + clearTimeout(this.debounceTimer);
  87 + }
  88 + this.debounceTimer = setTimeout(func, wait);
  89 + }
  90 +
83 build() { 91 build() {
84 Stack({ alignContent: Alignment.Center }) { 92 Stack({ alignContent: Alignment.Center }) {
85 Row() { 93 Row() {
@@ -121,7 +129,7 @@ export struct PlayerFullScreenView { @@ -121,7 +129,7 @@ export struct PlayerFullScreenView {
121 .gesture( 129 .gesture(
122 PanGesture(this.panOptionBright) 130 PanGesture(this.panOptionBright)
123 .onActionStart((event?: GestureEvent) => { 131 .onActionStart((event?: GestureEvent) => {
124 - console.log(TAG, 'onActionEnd this.panOptionBright') 132 + // console.log(TAG, 'onActionEnd this.panOptionBright')
125 this.isShowBright = true 133 this.isShowBright = true
126 this.playerController?.onBrightActionStart(event!); 134 this.playerController?.onBrightActionStart(event!);
127 }) 135 })
@@ -129,9 +137,9 @@ export struct PlayerFullScreenView { @@ -129,9 +137,9 @@ export struct PlayerFullScreenView {
129 this.playerController?.onBrightActionUpdate(event!); 137 this.playerController?.onBrightActionUpdate(event!);
130 }) 138 })
131 .onActionEnd(() => { 139 .onActionEnd(() => {
132 - setTimeout(() => {  
133 - this.isShowBright = false  
134 - }, 500) 140 + this.debounce(() => {
  141 + this.isShowBright = false;
  142 + }, 1000);
135 this.playerController?.onActionEnd(); 143 this.playerController?.onActionEnd();
136 }) 144 })
137 ) 145 )
@@ -154,9 +162,9 @@ export struct PlayerFullScreenView { @@ -154,9 +162,9 @@ export struct PlayerFullScreenView {
154 this.playerController?.onVolumeActionUpdate(event!); 162 this.playerController?.onVolumeActionUpdate(event!);
155 }) 163 })
156 .onActionEnd(() => { 164 .onActionEnd(() => {
157 - setTimeout(() => {  
158 - this.isShowVolume = false  
159 - }, 500) 165 + this.debounce(() => {
  166 + this.isShowVolume = false;
  167 + }, 1000);
160 this.playerController?.onActionEnd(); 168 this.playerController?.onActionEnd();
161 }) 169 })
162 ) 170 )
@@ -249,7 +249,16 @@ export struct PlayerTitleView { @@ -249,7 +249,16 @@ export struct PlayerTitleView {
249 } 249 }
250 }) 250 })
251 if (this.isOverLines) { 251 if (this.isOverLines) {
252 - Span('... 全文') 252 + Span('... ')
  253 + .fontColor(Color.White)
  254 + .fontWeight(400)
  255 + .fontFamily('PingFang SC-Regular')
  256 + .fontSize(12)
  257 + .onClick(() => {
  258 + this.isOpenDetail = true
  259 + this.dialogController?.open()
  260 + })
  261 + Span('全文')
253 .fontColor('#99FFFFFF') 262 .fontColor('#99FFFFFF')
254 .fontWeight(400) 263 .fontWeight(400)
255 .fontFamily('PingFang SC-Regular') 264 .fontFamily('PingFang SC-Regular')
@@ -309,9 +318,18 @@ export struct PlayerTitleView { @@ -309,9 +318,18 @@ export struct PlayerTitleView {
309 .fontWeight(600) 318 .fontWeight(600)
310 .fontFamily('PingFang SC-Regular') 319 .fontFamily('PingFang SC-Regular')
311 if (this.isTitleOverLines) { 320 if (this.isTitleOverLines) {
312 - Span('... 全文') 321 + Span('... ')
  322 + .fontColor(Color.White)
  323 + .fontWeight(400)
  324 + .fontFamily('PingFang SC-Regular')
  325 + .fontSize(12)
  326 + .onClick(() => {
  327 + this.isOpenDetail = true
  328 + this.dialogController?.open()
  329 + })
  330 + Span('全文')
313 .fontColor('#99FFFFFF') 331 .fontColor('#99FFFFFF')
314 - .fontWeight(600) 332 + .fontWeight(400)
315 .fontFamily('PingFang SC-Regular') 333 .fontFamily('PingFang SC-Regular')
316 .fontSize(12) 334 .fontSize(12)
317 .onClick(() => { 335 .onClick(() => {
@@ -32,6 +32,7 @@ export function setupPlayerConfig(player: AliPlayer) { @@ -32,6 +32,7 @@ export function setupPlayerConfig(player: AliPlayer) {
32 config.mMaxBufferDuration = 50000 32 config.mMaxBufferDuration = 50000
33 config.mHighBufferDuration = 3000 33 config.mHighBufferDuration = 3000
34 config.mStartBufferDuration = 50 34 config.mStartBufferDuration = 50
  35 + config.mEnableLowLatencyMode = true
35 player.setConfig(config) 36 player.setConfig(config)
36 } 37 }
37 } 38 }
1 -import { LogoutViewModel } from 'wdComponent'; 1 +import { ComponentModule, LogoutViewModel } from 'wdComponent';
2 import { GrayManageModel, mournsInfoModel } from 'wdComponent/src/main/ets/viewmodel/GrayManageModel' 2 import { GrayManageModel, mournsInfoModel } from 'wdComponent/src/main/ets/viewmodel/GrayManageModel'
3 import { BreakpointConstants, SpConstants } from 'wdConstant'; 3 import { BreakpointConstants, SpConstants } from 'wdConstant';
4 4
@@ -14,6 +14,8 @@ import { BottomNavigationComponent } from './view/BottomNavigationComponent'; @@ -14,6 +14,8 @@ import { BottomNavigationComponent } from './view/BottomNavigationComponent';
14 import LaunchDataModel from './viewModel/LaunchDataModel'; 14 import LaunchDataModel from './viewModel/LaunchDataModel';
15 import { LaunchPageModel } from './viewModel/LaunchPageModel'; 15 import { LaunchPageModel } from './viewModel/LaunchPageModel';
16 import { JSON } from '@kit.ArkTS'; 16 import { JSON } from '@kit.ArkTS';
  17 +import { WebArticleEventHandler, WebPoolManager } from 'wdWebComponent';
  18 +import { BridgeWebViewControl } from 'wdJsBridge';
17 19
18 const TAG = 'MainPage'; 20 const TAG = 'MainPage';
19 21
@@ -60,6 +62,10 @@ struct MainPage { @@ -60,6 +62,10 @@ struct MainPage {
60 } catch (e) { 62 } catch (e) {
61 Logger.error(TAG, `Unexpected Text in JSON ??` + JSON.stringify(e) +" " + dataModelStr); 63 Logger.error(TAG, `Unexpected Text in JSON ??` + JSON.stringify(e) +" " + dataModelStr);
62 } 64 }
  65 +
  66 + setTimeout(() => {
  67 + ComponentModule.preInitArticleWebTemplate(this.getUIContext())
  68 + }, 500)
63 } 69 }
64 70
65 pageTransition() { 71 pageTransition() {
@@ -101,38 +101,39 @@ struct Index { @@ -101,38 +101,39 @@ struct Index {
101 } 101 }
102 102
103 build() { 103 build() {
104 - Stack({ alignContent: Alignment.End }) {  
105 - Progress(  
106 - {  
107 - value: this.progressVal,  
108 - total: 100,  
109 - type: ProgressType.Linear,  
110 - })  
111 - .style({  
112 - enableSmoothEffect: false  
113 - })  
114 - .color("#ED2800")  
115 - .backgroundColor($r('app.color.white'))  
116 - .width("100%")  
117 - .height(3)  
118 - .margin({ top: 57 })  
119 - .visibility(this.isExpand ? Visibility.Visible : Visibility.Hidden) 104 + Column(){
120 Stack({ alignContent: Alignment.End }) { 105 Stack({ alignContent: Alignment.End }) {
121 - Column() { //标题 时间 进度条  
122 - Marquee({  
123 - start: true,  
124 - step: 5,  
125 - loop: Number.POSITIVE_INFINITY,  
126 - fromStart: true,  
127 - src: this.audioTitle 106 + Progress(
  107 + {
  108 + value: this.progressVal,
  109 + total: 100,
  110 + type: ProgressType.Linear,
  111 + })
  112 + .style({
  113 + enableSmoothEffect: false
128 }) 114 })
129 - .width("60%")  
130 - .height(20)  
131 - .fontColor('#222222')  
132 - .fontSize(14)  
133 - .fontFamily('PingFang SC-Medium')  
134 - .fontWeight(500)  
135 - .alignSelf(ItemAlign.Start) 115 + .color("#ED2800")
  116 + .backgroundColor($r('app.color.white'))
  117 + .width("100%")
  118 + .height(3)
  119 + .margin({ top: 56 })
  120 + .visibility(this.isExpand ? Visibility.Visible : Visibility.Hidden)
  121 + Stack({ alignContent: Alignment.End }) {
  122 + Column() { //标题 时间 进度条
  123 + Marquee({
  124 + start: true,
  125 + step: 5,
  126 + loop: Number.POSITIVE_INFINITY,
  127 + fromStart: true,
  128 + src: this.audioTitle
  129 + })
  130 + .width("60%")
  131 + .height(20)
  132 + .fontColor('#222222')
  133 + .fontSize(14)
  134 + .fontFamily('PingFang SC-Medium')
  135 + .fontWeight(500)
  136 + .alignSelf(ItemAlign.Start)
136 // .onStart(() => { 137 // .onStart(() => {
137 // console.info('Marquee animation complete onStart') 138 // console.info('Marquee animation complete onStart')
138 // }) 139 // })
@@ -143,118 +144,127 @@ struct Index { @@ -143,118 +144,127 @@ struct Index {
143 // console.info('Marquee animation complete onFinish') 144 // console.info('Marquee animation complete onFinish')
144 // }) 145 // })
145 146
146 - Row() {  
147 - Text(this.currentTime)  
148 - .fontSize(12)  
149 - .fontColor("#999999")  
150 - .height("100%")  
151 - .alignSelf(ItemAlign.Start)  
152 - Text("/" + this.totalTime)  
153 - .fontSize(12)  
154 - .fontColor("#999999")  
155 - .height("100%")  
156 - .alignSelf(ItemAlign.Start) 147 + Row() {
  148 + Text(this.currentTime)
  149 + .fontSize(12)
  150 + .fontColor("#999999")
  151 + .height("100%")
  152 + .alignSelf(ItemAlign.Start)
  153 + Text("/" + this.totalTime)
  154 + .fontSize(12)
  155 + .fontColor("#999999")
  156 + .height("100%")
  157 + .alignSelf(ItemAlign.Start)
157 158
  159 + }
  160 + .width("100%")
  161 + .height(16)
  162 + .margin({ top: 4})
158 } 163 }
159 - .width("100%")  
160 - .height(16)  
161 - .margin({ top: 4}) 164 + .padding({
  165 + top: 10,
  166 + bottom: 10,
  167 + left: 10,
  168 + right: 0
  169 + })
  170 + .width(247)
  171 + .height(60)
  172 + .justifyContent(FlexAlign.Start)
  173 + // .onClick(() => {
  174 + // let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_NEWS_INFO_DATA_MODEL,'') as string
  175 + // console.log(TAG, dataModelStr)
  176 + // let dataModel : CompInfoBean = JSON.parse(dataModelStr)
  177 + // //公共跳转
  178 + // let content: ContentDTO = {
  179 + // objectId: this.itemBeanClicked.newsId + '',
  180 + // objectType: this.itemBeanClicked.newsType + '',
  181 + // relId: this.itemBeanClicked.relId + '',
  182 + // relType: this.itemBeanClicked.relType ?? '0'
  183 + // } as ContentDTO
  184 + // ProcessUtils.processPage(content)
  185 + // })
  186 +
  187 + Row() {
  188 + Image(this.currentStatus === PlayerConstants.STATUS_START ? $r("app.media.icon_audio_pause_svg") : $r("app.media.icon_audio_playing_svg"))
  189 + .objectFit(ImageFit.Contain)
  190 + .width(24)
  191 + .height(24)
  192 + .margin({ right: 12 })
  193 + .gesture(
  194 + TapGesture()
  195 + .onAction((event: GestureEvent) => {
  196 + if (this.AudioSuspension.playerController) {
  197 + this.AudioSuspension.playerController.get().switchPlayOrPause()
  198 + }
  199 + }))
  200 + Image($r("app.media.icon_audio_close"))
  201 + .objectFit(ImageFit.Contain)
  202 + .width(24)
  203 + .height(24)
  204 + .gesture(
  205 + TapGesture()
  206 + .onAction((event: GestureEvent) => {
  207 + if (this.AudioSuspension.playerController) {
  208 + this.AudioSuspension.playerController.get().pause()
  209 + this.AudioSuspension.minimize()
  210 + BackgroundAudioController.sharedController().destorySession()
  211 + }
  212 + }))
  213 + }
  214 + .width(80)
  215 + .height(60)
162 } 216 }
163 - .padding({  
164 - top: 10,  
165 - bottom: 10,  
166 - left: 10,  
167 - right: 0  
168 - })  
169 - .width(243)  
170 - .height(60)  
171 - .justifyContent(FlexAlign.Start)  
172 - // .onClick(() => {  
173 - // let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_NEWS_INFO_DATA_MODEL,'') as string  
174 - // console.log(TAG, dataModelStr)  
175 - // let dataModel : CompInfoBean = JSON.parse(dataModelStr)  
176 - // //公共跳转  
177 - // let content: ContentDTO = {  
178 - // objectId: this.itemBeanClicked.newsId + '',  
179 - // objectType: this.itemBeanClicked.newsType + '',  
180 - // relId: this.itemBeanClicked.relId + '',  
181 - // relType: this.itemBeanClicked.relType ?? '0'  
182 - // } as ContentDTO  
183 - // ProcessUtils.processPage(content)  
184 - // }) 217 + .visibility(this.isExpand ? Visibility.Visible : Visibility.Hidden)
185 218
186 Row() { 219 Row() {
187 - Image(this.currentStatus === PlayerConstants.STATUS_START ? $r("app.media.icon_audio_pause_svg") : $r("app.media.icon_audio_playing_svg"))  
188 - .objectFit(ImageFit.Contain)  
189 - .width(24)  
190 - .height(24)  
191 - .margin({ right: 12 })  
192 - .gesture(  
193 - TapGesture()  
194 - .onAction((event: GestureEvent) => {  
195 - if (this.AudioSuspension.playerController) {  
196 - this.AudioSuspension.playerController.get().switchPlayOrPause()  
197 - }  
198 - }))  
199 - Image($r("app.media.icon_audio_close"))  
200 - .objectFit(ImageFit.Contain)  
201 - .width(24)  
202 - .height(24)  
203 - .gesture(  
204 - TapGesture()  
205 - .onAction((event: GestureEvent) => {  
206 - if (this.AudioSuspension.playerController) {  
207 - this.AudioSuspension.playerController.get().pause()  
208 - this.AudioSuspension.minimize()  
209 - BackgroundAudioController.sharedController().destorySession()  
210 - }  
211 - })) 220 + LottieView({
  221 + name: this.name,
  222 + path: "lottie/audio_animation_playing.json",
  223 + lottieWidth: 24,
  224 + lottieHeight: 24,
  225 + autoplay: false,
  226 + loop: true
  227 + })
212 } 228 }
213 - .width(80) 229 + .justifyContent(FlexAlign.Center)
  230 + .width(60)
214 .height(60) 231 .height(60)
  232 + .visibility(!this.isExpand ? Visibility.Visible : Visibility.Hidden)
215 } 233 }
216 - .visibility(this.isExpand ? Visibility.Visible : Visibility.Hidden)  
217 -  
218 - Row() {  
219 - LottieView({  
220 - name: this.name,  
221 - path: "lottie/audio_animation_playing.json",  
222 - lottieWidth: 24,  
223 - lottieHeight: 24,  
224 - autoplay: false,  
225 - loop: true  
226 - })  
227 - }  
228 - .justifyContent(FlexAlign.Center)  
229 - .width(60)  
230 - .height(60)  
231 - .visibility(!this.isExpand ? Visibility.Visible : Visibility.Hidden)  
232 - }  
233 - .parallelGesture(  
234 - GestureGroup(GestureMode.Parallel,  
235 - TapGesture()  
236 - .onAction((event?: GestureEvent) => {  
237 - this.isExpand = true  
238 - this.AudioSuspension.resizeWindow(this.expandWidth, this.expandHeight)  
239 - }),  
240 - PanGesture(this.panOption)  
241 - //手势识别成功回调。  
242 - // .onActionStart((event: GestureEvent) => {  
243 - // console.info('Pan start');  
244 - // }) 234 + .parallelGesture(
  235 + GestureGroup(GestureMode.Parallel,
  236 + TapGesture()
  237 + .onAction((event?: GestureEvent) => {
  238 + this.isExpand = true
  239 + this.AudioSuspension.resizeWindow(this.expandWidth, this.expandHeight)
  240 + }),
  241 + PanGesture(this.panOption)
  242 + //手势识别成功回调。
  243 + // .onActionStart((event: GestureEvent) => {
  244 + // console.info('Pan start');
  245 + // })
245 // 手势移动过程中回调。发生拖拽时,获取到触摸点的位置,并将位置信息传递给windowPosition 246 // 手势移动过程中回调。发生拖拽时,获取到触摸点的位置,并将位置信息传递给windowPosition
246 - .onActionUpdate((event: GestureEvent) => {  
247 - // this.windowPosition.x += event.offsetX;  
248 - let newY = this.windowPosition.y + event.offsetY;  
249 - this.windowPosition.y = Math.min(Math.max(newY, this.topSafeHeight), this.bottomSafeHeight);  
250 - })  
251 - //手势识别成功,手指抬起后触发回调。 247 + .onActionUpdate((event: GestureEvent) => {
  248 + // this.windowPosition.x += event.offsetX;
  249 + let newY = this.windowPosition.y + event.offsetY;
  250 + this.windowPosition.y = Math.min(Math.max(newY, this.topSafeHeight), this.bottomSafeHeight);
  251 + })
  252 + //手势识别成功,手指抬起后触发回调。
252 // .onActionEnd(() => { 253 // .onActionEnd(() => {
253 // console.info('Pan end'); 254 // console.info('Pan end');
254 // }) 255 // })
  256 + )
255 ) 257 )
256 - )  
257 - .borderRadius(4)  
258 - .backgroundColor(Color.White) 258 + .borderRadius(4)
  259 + .shadow({
  260 + radius: vp2px(5),
  261 + color: 'rgba(0, 0, 0, 0.10)',
  262 + offsetX: 0,
  263 + offsetY: 1
  264 + }) // 设
  265 + .backgroundColor(Color.White)
  266 + }
  267 + .padding(1)
  268 +
259 } 269 }
260 } 270 }
@@ -269,7 +269,6 @@ export struct BottomNavigationComponent { @@ -269,7 +269,6 @@ export struct BottomNavigationComponent {
269 269
270 // 底导切换函数 270 // 底导切换函数
271 async onBottomNavigationIndexChange(navItem: BottomNavDTO, index: number) { 271 async onBottomNavigationIndexChange(navItem: BottomNavDTO, index: number) {
272 - // Logger.info(TAG, `onBottomNavigationIndexChange to Index:${index},this.currentNavIndex: ${this.currentNavIndex}`);  
273 272
274 if (navItem.name === '我的') { 273 if (navItem.name === '我的') {
275 this.barBackgroundColor = Color.White 274 this.barBackgroundColor = Color.White
@@ -306,10 +305,12 @@ export struct BottomNavigationComponent { @@ -306,10 +305,12 @@ export struct BottomNavigationComponent {
306 } 305 }
307 } 306 }
308 if (index >= 0 && index != this.currentNavIndex) { 307 if (index >= 0 && index != this.currentNavIndex) {
  308 + this.onBottomNavigationIndexChange(this.bottomNavList[index], index)
309 // 切底导 309 // 切底导
310 this.currentNavIndex = index 310 this.currentNavIndex = index
311 } 311 }
312 312
  313 +
313 setTimeout(() => { 314 setTimeout(() => {
314 // 底导切换后,触发顶导切换 315 // 底导切换后,触发顶导切换
315 this.assignChannel = new AssignChannelParam() 316 this.assignChannel = new AssignChannelParam()
@@ -55,28 +55,27 @@ export struct VideoChannelPage { @@ -55,28 +55,27 @@ export struct VideoChannelPage {
55 async aboutToAppear() { 55 async aboutToAppear() {
56 // 背景图高度 56 // 背景图高度
57 this.backgroundImageH = px2vp(this.topSafeHeight) + 44 57 this.backgroundImageH = px2vp(this.topSafeHeight) + 44
58 - // console.info(`cj2024 backgroundImageH = ${this.backgroundImageH} this.topSafeHeight = ${this.topSafeHeight}`) 58 + // console.info(TAG, `cj2024 backgroundImageH = ${this.backgroundImageH} this.topSafeHeight = ${this.topSafeHeight}`)
59 this.setBarBackgroundColor() 59 this.setBarBackgroundColor()
60 - if (this.currentTopNavSelectedIndex === 0) {  
61 - this.handleAudio(this.topNavList[0])  
62 - }  
63 } 60 }
64 61
65 /** 62 /**
66 * 切换顶部导航index 63 * 切换顶部导航index
67 */ 64 */
68 setTabbarActive() { 65 setTabbarActive() {
  66 + // console.info(TAG, `setTabbarActive`)
69 let index = this.topNavList.findIndex((item: TopNavDTO, index) => { 67 let index = this.topNavList.findIndex((item: TopNavDTO, index) => {
70 return Number(this.assignChannel.channelId) == item.channelId && Number(this.assignChannel.pageId) == item.pageId 68 return Number(this.assignChannel.channelId) == item.channelId && Number(this.assignChannel.pageId) == item.pageId
71 }) || 0 69 }) || 0
72 this.clickTopNav(index) 70 this.clickTopNav(index)
  71 + this.setBarBackgroundColor()
73 } 72 }
74 73
75 /** 74 /**
76 * 顶导、底导切换下标都到改变背景色,进入或退出沉浸式 75 * 顶导、底导切换下标都到改变背景色,进入或退出沉浸式
77 */ 76 */
78 setBarBackgroundColor() { 77 setBarBackgroundColor() {
79 - 78 + // console.info(TAG, `setBarBackgroundColor`)
80 if (this.isImmerseChannel() && CompUtils.isVideo(this.currentBottomNavInfo)) { 79 if (this.isImmerseChannel() && CompUtils.isVideo(this.currentBottomNavInfo)) {
81 this.barBackgroundColor = Color.Black 80 this.barBackgroundColor = Color.Black
82 this.isImmersive = true 81 this.isImmersive = true
@@ -86,7 +85,8 @@ export struct VideoChannelPage { @@ -86,7 +85,8 @@ export struct VideoChannelPage {
86 this.barBackgroundColor = Color.White 85 this.barBackgroundColor = Color.White
87 ColorUtils.changeTopStatusBarColor(this.navItem.statusBarColor, 1) 86 ColorUtils.changeTopStatusBarColor(this.navItem.statusBarColor, 1)
88 } 87 }
89 - 88 + // 底导为视频同时顶导为视频时关闭音频悬浮窗
  89 + this.handleAudio()
90 } 90 }
91 91
92 /** 92 /**
@@ -124,22 +124,20 @@ export struct VideoChannelPage { @@ -124,22 +124,20 @@ export struct VideoChannelPage {
124 } 124 }
125 125
126 // 控制音频悬浮窗显隐 126 // 控制音频悬浮窗显隐
127 - handleAudio(navItem: TopNavDTO) {  
128 - if (navItem.name === '视频') { 127 + handleAudio() {
  128 + if (this.isImmerseChannel() && CompUtils.isVideo(this.currentBottomNavInfo)) {
129 // 判断当前窗口是否已显示,使用callback异步回调。 129 // 判断当前窗口是否已显示,使用callback异步回调。
130 - this.AudioSuspension.floatWindowClass.get().isShowing((err: BusinessError, data) => {  
131 - const errCode: number = err.code;  
132 - if (errCode) {  
133 - // console.error(TAG, 'Failed window is showing Cause:' + JSON.stringify(err));  
134 - return;  
135 - }  
136 - // console.info(TAG, 'window is showing: ' + JSON.stringify(data)); 130 + try {
  131 + let data = this.AudioSuspension.floatWindowClass.get().isWindowShowing();
  132 + // console.info(TAG, 'window is showing: ' + data);
137 if(data) { 133 if(data) {
138 this.isShowAudioCom = true 134 this.isShowAudioCom = true
139 this.AudioSuspension.playerController.get()?.pause(); 135 this.AudioSuspension.playerController.get()?.pause();
140 this.AudioSuspension.minimize() 136 this.AudioSuspension.minimize()
141 } 137 }
142 - }); 138 + } catch (exception) {
  139 + console.error(TAG, `Failed to check whether the window is showing. Cause code: ${exception.code}, message: ${exception.message}`);
  140 + }
143 } else { 141 } else {
144 // console.info(TAG, 'this.isShowAudioCom: ' + this.isShowAudioCom); 142 // console.info(TAG, 'this.isShowAudioCom: ' + this.isShowAudioCom);
145 if (this.isShowAudioCom) { 143 if (this.isShowAudioCom) {
@@ -164,7 +162,7 @@ export struct VideoChannelPage { @@ -164,7 +162,7 @@ export struct VideoChannelPage {
164 clickTopNav(index: number) { 162 clickTopNav(index: number) {
165 // 视频tab埋点 163 // 视频tab埋点
166 const tab = this.topNavList[index] 164 const tab = this.topNavList[index]
167 - this.handleAudio(tab) 165 + this.handleAudio()
168 // Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`); 166 // Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`);
169 const params: ParamType = { 167 const params: ParamType = {
170 "pageName": tab.name, 168 "pageName": tab.name,
@@ -178,6 +176,7 @@ export struct VideoChannelPage { @@ -178,6 +176,7 @@ export struct VideoChannelPage {
178 } 176 }
179 this.currentTopNavSelectedIndex = index 177 this.currentTopNavSelectedIndex = index
180 this.swiperController.changeIndex(index, true) 178 this.swiperController.changeIndex(index, true)
  179 + this.setBarBackgroundColor()
181 } 180 }
182 181
183 @Builder 182 @Builder
1 -.prism-player .prism-big-play-btn{background:url(./img/bigplay.png) no-repeat;background-size:contain;width:64px;height:64px}.prism-player .prism-big-play-btn .outter{border:7px solid rgba(255,255,255,.51);width:64px;height:64px;border-radius:100%;position:absolute;box-sizing:border-box;top:0;left:0}.prism-player .prism-big-play-btn:hover{cursor:pointer}.prism-player .prism-play-btn{width:24px;height:24px;background:url(./img/smallplay.png) no-repeat;background-size:contain}.prism-player .prism-play-btn:hover{cursor:pointer}.prism-player .prism-live-display{font-size:12px;color:#ebecec;line-height:44px;text-align:center;margin:0}.prism-player .live-shift-display:hover{cursor:pointer;font-size:14px}.prism-player .prism-play-btn.playing{background:url(./img/smallpause.png) no-repeat;background-size:contain}.prism-player .prism-play-btn.playing:hover{cursor:pointer}.prism-player .prism-fullscreen-btn{width:24px;height:24px;background:url(./img/fullscreen.png) no-repeat;background-size:contain}.prism-player .prism-fullscreen-btn:hover{cursor:pointer}.prism-player .prism-fullscreen-btn.fullscreen{background:url(./img/smallscreen.png) no-repeat;background-size:contain}.prism-player .prism-fullscreen-btn.fullscreen:hover{animation:hoverAnimationScale 1s 1;-moz-animation:hoverAnimationScale 1s 1;-webkit-animation:hoverAnimationScale 1s 1;-o-animation:hoverAnimationScale 1s 1;cursor:pointer}.prism-player .prism-volume{position:relative}.prism-player .prism-volume .volume-icon{width:28px;height:28px;background:url(./img/volume.png);background-size:contain}.prism-player .prism-volume .volume-icon .long-horizontal{width:3px;background:#ebecec;height:18px;position:absolute;right:5px;top:50%;-ms-transform:translateY(-50%);transform:translateY(-50%)}.prism-player .prism-volume .volume-icon .short-horizontal{width:3px;background:#ebecec;height:8px;position:absolute;right:10px;top:50%;-ms-transform:translateY(-50%);transform:translateY(-50%)}.prism-player .prism-volume .volume-icon:hover{-ms-transform-origin:0 50%;transform-origin:0 50%;background-size:contain;cursor:pointer}.prism-player .prism-volume .mute .long-horizontal{-ms-transform:rotate(-45deg);transform:rotate(-45deg);height:12px;top:10px;left:22px}.prism-player .prism-volume .mute .short-horizontal{-ms-transform:rotate(45deg);transform:rotate(45deg);height:12px;top:10px;left:22px}.prism-player .prism-volume-control{position:absolute;bottom:44px;display:none;background:rgba(60,60,60,.95);box-shadow:0 0 6px 0 rgba(0,0,0,.1);width:32px;height:130px;z-index:10000}.prism-player .prism-volume-control .volume-control-icon{width:32px;height:32px;background:url(./img/unmutevolume.png) no-repeat;background-size:contain}.prism-player .prism-volume-control .volume-control-icon:hover{cursor:pointer;background:url(./img/volumehover.png) no-repeat;background-size:contain}.prism-player .prism-volume-control .volume-control-icon.mute{background:url(./img/volumemute.png) no-repeat;background-size:contain}.prism-player .prism-volume-control .volume-control-icon.mute:hover{background:url(./img/volumemutehover.png) no-repeat;background-size:contain;cursor:pointer}.prism-player .prism-volume-control:hover{cursor:pointer}.prism-player .prism-volume-control .volume-control-icon{position:absolute;bottom:6px;left:8px;width:26px;height:26px}.prism-player .prism-volume-control .volume-range{position:absolute;left:14px;bottom:10px;border-radius:1px;background:#6c6262;box-shadow:inset 1px 1px 1px 0 rgba(0,0,0,.06);width:4px;height:100px}.prism-player .prism-volume-control .volume-value{width:100%;height:0%;background:#30adf2;position:absolute;border-radius:1px;bottom:0}.prism-player .prism-volume-control .volume-cursor{position:absolute;bottom:0;background:#fff;width:15px;height:15px;border-radius:15px;left:-6px}.prism-player .prism-volume-control .volume-cursor:hover{background:#00c1de}.prism-player .prism-animation{width:64px;height:64px;border-radius:64px;opacity:0;position:absolute;left:50%;top:50%;-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.prism-player .prism-play-animation{background:url(./img/playanimation.png) no-repeat;background-size:contain}.prism-player .prism-pause-animation{background:url(./img/pauseanimation.png) no-repeat;background-size:contain}.prism-player .play-apply-animation{animation:prismplayanimation 1s 1;-moz-animation:prismplayanimation 1s 1;-webkit-animation:prismplayanimation 1s 1;-o-animation:prismplayanimation 1s 1;animation-fill-mode:both}@keyframes prismplayanimation{0%{width:32px;height:32px;border-radius:32px;opacity:0}50%{width:32px;height:32px;border-radius:32px;opacity:1}99%{width:76px;height:76px;border-radius:76px;opacity:0}100%{width:0;height:0}}@keyframes spinoffPulse{0%{transform:rotate(0);-webkit-transform:rotate(0);-moz-transform:rotate(0)}100%{transform:rotate(360deg);-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg)}}@keyframes hoverAnimationRotate{0%{transform:rotate(0);-webkit-transform:rotate(0);-moz-transform:rotate(0)}50%{transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg)}100%{transform:rotate(0);-webkit-transform:rotate(0);-moz-transform:rotate(0)}}@keyframes hoverAnimationScale{0%{transform:scale(1);-webkit-transform:scale(1);-moz-transform:scale(1)}50%{transform:scale(1.2);-webkit-transform:scale(1.2);-moz-transform:scale(1.2)}100%{transform:scale(1);-webkit-transform:scale(1);-moz-transform:scale(1)}}@keyframes hoverAnimationScaleX{0%{transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1)}50%{transform:scaleX(1.2);-webkit-transform:scaleX(1.2);-moz-transform:scaleX(1.2)}100%{transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1)}}@keyframes hoverVolumeAnimation{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.volume-hover-animation{animation:hoverVolumeAnimation .3s 1;-moz-animation:hoverVolumeAnimation .3s 1;-webkit-animation:hoverVolumeAnimation .3s 1;-o-animation:hoverVolumeAnimation .3s 1}@keyframes hoverPlayButtonAnimation{0%{width:63px;height:63px;border:7px solid #fff}60%{width:90px;height:90px;border:7px solid rgba(255,255,255,.51)}100%{width:97px;height:97px;border:14px solid rgba(255,255,255,0)}}@keyframes warn{0%{transform:scale(1);opacity:0}25%{transform:scale(1);opacity:.1}50%{transform:scale(1.1);opacity:.3}75%{transform:scale(1.5);opacity:.5}100%{transform:scale(2);opacity:0}}.big-playbtn-hover-animation{animation:warn 1s ease-out;-moz-animation:warn 1s ease-out;-webkit-animation:warn 1s ease-out;-o-animation:warn 1s ease-out}.big-playbtn-hover-animation1{animation:hoverPlayButtonAnimation 1s 1;-moz-animation:hoverPlayButtonAnimation 1s 1;-webkit-animation:hoverPlayButtonAnimation 1s 1;-o-animation:hoverPlayButtonAnimation 1s 1}.prism-player{background-color:#000;position:relative}.prism-player a{text-decoration:none}.prism-player video{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);-ms-transform-origin:center;-moz-transform-origin:center;-webkit-transform-origin:center;-o-transform-origin:center}.prism-player .x5-full-screen{object-fit:fill;object-position:50% 50%}.prism-player .x5-top-left{object-fit:contain;object-position:0 0}.prism-player .prism-cover{width:100%;height:100%;background-repeat:no-repeat;background-position:center;background-size:cover;position:absolute;top:0;left:0;z-index:11}.prism-player .prism-text-overlay{width:100%;height:100%;position:absolute;top:0;left:0;z-index:9;pointer-events:none}.prism-player .prism-ErrorMessage{width:100%;height:100%;background-color:#000;background-repeat:no-repeat;background-position:center;background-size:contain;position:absolute;z-index:99;top:0;left:0;overflow:hidden;display:none}.prism-player .prism-ErrorMessage .prism-error-content{margin-top:20px;padding:0 5px}.prism-player .prism-ErrorMessage .prism-error-content p{text-align:center;font-size:12px;color:#fff}.prism-player .prism-ErrorMessage .prism-error-operation{margin-top:10px;margin-bottom:10px;padding-bottom:5px;border-bottom:1.5px;border-bottom-color:rgba(255,255,255,.15);border-bottom-style:dotted;text-align:center}.prism-player .prism-ErrorMessage .prism-error-operation a{width:80px;height:32px;line-height:32px;vertical-align:top;display:inline-block;margin-left:10px}.prism-player .prism-ErrorMessage .prism-error-operation a.prism-button-refresh{color:#21c5e0;border:solid 1px #21c5e0}.prism-player .prism-ErrorMessage .prism-error-operation a.prism-button-refresh:hover{color:#05d3f5;border-color:#05d3f5;cursor:pointer}.prism-player .prism-ErrorMessage .prism-error-operation a.prism-button-refresh:active{color:#026a7b;border-color:#026a7b}.prism-player .prism-ErrorMessage .prism-error-operation .prism-button-orange:visited{color:#05d3f5}.prism-player .prism-ErrorMessage .prism-detect-info{color:#fff;font-size:10px}.prism-player .prism-ErrorMessage .prism-detect-info p{padding:0 5px;word-break:break-all;margin:0 0 4px}.prism-player .prism-ErrorMessage .prism-detect-info span.info-label{display:inline-block;font-weight:700}.prism-player .prism-ErrorMessage .prism-detect-info span.info-content{color:gray}.prism-player .prism-big-play-btn{display:none;z-index:1000}.prism-player .prism-license-watermark{z-index:100;position:absolute;width:300px;height:120px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;right:20px;top:20px;border:1px solid rgba(216,216,216,.12);box-shadow:0 0 12px 0 rgba(130,130,130,.2);border-radius:2px;backdrop-filter:blur(4px);background-color:rgba(255,255,255,.12)}.prism-player .prism-license-watermark .no-authorization{font-weight:500;font-size:24px;color:rgba(255,255,255,.9);text-shadow:1px 1px 2px rgba(0,0,0,.5);margin:0 50px}.prism-player .prism-license-watermark .apply-button{margin-top:12px;padding:5px 20px;background-color:#00bcd4;border:1px solid #26c5da;font-weight:400;font-size:14px;color:#fff;line-height:20px;cursor:pointer}.prism-player .prism-controlbar{width:100%;height:44px;position:relative;z-index:10;font-size:14px}.prism-player .prism-controlbar .prism-controlbar-bg{background:rgba(75,75,75,.15);width:100%;height:40px;position:absolute;bottom:0;left:0;z-index:-1}.prism-player .prism-time-display{height:40px;line-height:40px;color:#a4aab3;font-size:12px}.prism-player .prism-time-display .current-time{color:#fff}.prism-player .prism-live-time-display{height:44px;line-height:44px;color:#a4aab3;font-size:12px}.prism-player .prism-live-time-display span{display:inline}.prism-player .prism-live-time-display .live-text{margin-left:5px;font-size:12px;color:#ebecec}.prism-player .prism-live-time-display .current-time{color:#fff}.prism-player .prism-fullscreen-btn:hover{animation:hoverAnimationScale 1s 1;-moz-animation:hoverAnimationScale 1s 1;-webkit-animation:hoverAnimationScale 1s 1;-o-animation:hoverAnimationScale 1s 1}.prism-player .prism-liveshift-progress,.prism-player .prism-progress{bottom:40px!important;width:100%;height:4px;background:rgba(195,197,198,.5);box-shadow:inset 1px 1px 1px 0 rgba(0,0,0,.06);position:relative;cursor:pointer}.prism-player .prism-liveshift-progress .prism-progress-time,.prism-player .prism-progress .prism-progress-time{position:absolute;top:-25px;background:rgba(0,0,0,.8);box-shadow:0 0 5px 0 rgba(0,0,0,.1);-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.1);color:#fff;font-size:14px;border-radius:7.5px;padding:0 6px 0 6px;text-align:center;white-space:nowrap}.prism-player .prism-liveshift-progress .prism-progress-loaded,.prism-player .prism-progress .prism-progress-loaded{position:absolute;top:0;left:0;width:0;height:100%;background:#c3c5c6}.prism-player .prism-liveshift-progress .prism-progress-played,.prism-player .prism-progress .prism-progress-played{position:absolute;top:0;left:0;width:0;height:100%;background-color:#00c1de}.prism-player .prism-liveshift-progress .prism-progress-cursor,.prism-player .prism-progress .prism-progress-cursor{position:absolute;border-radius:8px;top:-5px;width:16px;height:16px;overflow:hidden;box-sizing:content-box;background:url(./img/dragcursorhover.png) center;display:none}.prism-player .prism-liveshift-progress .prism-progress-cursor img,.prism-player .prism-progress .prism-progress-cursor img{width:14px;height:14px;position:absolute;top:50%;left:50%;-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.prism-player .prism-liveshift-progress .cursor-hover,.prism-player .prism-progress .cursor-hover{border-radius:9px;width:18px;height:18px;top:-5px!important}.prism-player .prism-liveshift-progress .cursor-hover img,.prism-player .prism-progress .cursor-hover img{width:16px;height:16px}.prism-player .prism-liveshift-progress .prism-progress-marker,.prism-player .prism-progress .prism-progress-marker{width:100%;height:100%;position:absolute}.prism-player .prism-liveshift-progress .prism-progress-marker .prism-marker-dot,.prism-player .prism-progress .prism-progress-marker .prism-marker-dot{position:absolute;background:#d9edf7;width:5px;height:100%;border-radius:20%}.prism-player .prism-progress-hover{cursor:pointer;height:6px;transition:height .1s}.prism-player .prism-progress-hover .prism-marker-dot{width:10px;height:80%;top:8%;border-radius:30%}.prism-player .prism-progress-hover .prism-progress-cursor{top:-4px}.prism-player .prism-liveshift-progress{background:0 0}.prism-player .prism-liveshift-progress .prism-enable-liveshift{cursor:pointer;position:absolute;background:#fff;height:4px}.prism-player .prism-liveshift-progress .prism-enable-liveshift:hover{height:6px;transition:height .1s}.prism-player .prism-liveshift-progress .prism-liveshift-seperator{height:15px;position:absolute;right:0;top:-8px;color:#fff;margin-right:5px;margin-left:5px;right:-65px}.prism-player .prism-marker-text{padding:5px;background:rgba(0,0,0,.8);position:absolute;max-width:180px;max-height:100px;bottom:50px;color:#fff;border-radius:3px;z-index:9999;display:none;overflow:auto}.prism-player .prism-marker-text p{text-align:center;word-break:break-all;margin:0;font-size:12px}.prism-player .prism-loading{width:55px;height:55px;z-index:10}.prism-player .prism-loading .circle-androidFirefox{background-color:rgba(0,0,0,0);border:5px solid;border-color:rgba(0,193,222,.2) rgba(0,193,222,.5) rgba(0,193,222,.7) rgba(0,193,222,.1);opacity:.9;border-radius:50px;width:45px;height:45px;margin:0 auto}.prism-player .prism-loading .circle{background-color:rgba(0,0,0,0);border:5px solid;border-color:rgba(0,193,222,.2) rgba(0,193,222,.5) rgba(0,193,222,.7) rgba(0,193,222,.1);opacity:.9;border-radius:50px;width:45px;height:45px;margin:0 auto;-moz-animation:spinoffPulse .9s infinite linear;-webkit-animation:spinoffPulse .9s infinite linear}.prism-player .prism-hide{display:none}.prism-player .prism-snapshot-btn{width:32px;height:32px;background:url(./img/snapshot.png) no-repeat;background-size:contain}.prism-player .prism-snapshot-btn:hover{animation:hoverAnimationScale 1s 1;-moz-animation:hoverAnimationScale 1s 1;-webkit-animation:hoverAnimationScale 1s 1;-o-animation:hoverAnimationScale 1s 1;cursor:pointer}.prism-player .prism-snapshot-btn:active{displa:block}.prism-player .prism-info-display{width:100%;color:#fff;font-size:18px;text-align:center;top:50%;position:absolute;z-index:900;height:44px;line-height:28px;font-size:16px;padding:10px 12px 10px 12px}.prism-player .prism-info-display span{color:#00c1de}.prism-player .prism-info-left-bottom{width:auto!important;top:auto!important;bottom:70px;left:20px!important;text-align:left}.prism-player .prism-info-top-center{width:auto!important;top:20px!important;left:50%!important;text-align:left!important;-ms-transform:translateX(-50%)!important;transform:translateX(-50%)!important;color:red!important}.prism-player .prism-info-black{color:#000!important}.prism-player .prism-auto-stream-selector{position:absolute;bottom:50%;width:100%;margin:auto;color:#efeff4;display:none}.prism-player .prism-auto-stream-selector p.tip-text{text-align:center}.prism-player .prism-auto-stream-selector .operators{width:100px;margin:auto}.prism-player .prism-button-cancel{font-size:16px;border:1px #ffffffa8 solid;padding:2px 5px 2px 5px;color:#ffffffa8;margin-left:5px;background:#503f3f3d}.prism-player .prism-button-ok{font-size:16px;border:1px #fff solid;padding:2px 5px 2px 5px;color:#fff;background:#503f3f63}.prism-player .prism-button-cancel:hover,.prism-player .prism-button-ok:hover{color:#f5f5f5}.prism-player .prism-cc-btn{height:24px;width:24px;background:url(./img/cc.png) center no-repeat;background-size:contain}.prism-player .prism-cc-btn:hover{cursor:pointer;animation:hoverAnimationScale 1s 1;-moz-animation:hoverAnimationScale 1s 1;-webkit-animation:hoverAnimationScale 1s 1;-o-animation:hoverAnimationScale 1s 1}.prism-player .prism-setting-btn{height:24px;width:24px;background:url(./img/setting.png) center no-repeat;background-size:contain}.prism-player .prism-setting-btn:hover{cursor:pointer;animation:hoverAnimationRotate 1s 1;-moz-animation:hoverAnimationRotate 1s 1;-webkit-animation:hoverAnimationRotate 1s 1;-o-animation:hoverAnimationRotate 1s 1}.prism-player .prism-setting-list{background:rgba(60,60,60,.95);width:220px;position:absolute;right:14px;bottom:45px;display:none;z-index:10000;text-align:left}.prism-player .prism-setting-list .prism-setting-item{font-size:14px;color:#ebecec;height:30px}.prism-player .prism-setting-list .prism-setting-item .setting-content{width:100%}.prism-player .prism-setting-list .prism-setting-item .setting-content:hover{background:rgba(216,216,216,.1);cursor:pointer}.prism-player .prism-setting-list .prism-setting-item .setting-content span{line-height:30px}.prism-player .prism-setting-list .prism-setting-item .setting-content .setting-title{margin-left:15px}.prism-player .prism-setting-list .prism-setting-item .setting-content .current-setting{float:right;max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.prism-player .prism-setting-list .prism-setting-item .array{display:inline-block;border-right:2px solid;border-bottom:2px solid;border-color:#fff;width:8px;height:8px;-ms-transform:rotate(-45deg);transform:rotate(-45deg);margin-right:10px;margin-top:10px;margin-left:10px;float:right}.prism-player .prism-setting-selector{right:40px;position:absolute;bottom:45px;width:150px;background:rgba(60,60,60,.95);font-size:14px;color:#ebecec;display:none;z-index:10000;text-align:left}.prism-player .prism-setting-selector .header{background:#242424;width:150px;height:30px}.prism-player .prism-setting-selector .header:hover{cursor:pointer}.prism-player .prism-setting-selector .header .left-array{display:inline-block;border-left:2px solid;border-bottom:2px solid;border-color:#fff;width:8px;height:8px;-ms-transform:rotate(45deg);transform:rotate(45deg);margin-right:6px;margin-top:12px;margin-left:16px;float:left}.prism-player .prism-setting-selector .header span{line-height:30px}.prism-player .prism-setting-selector ul.selector-list::-webkit-scrollbar{width:10px;background-color:#424242}.prism-player .prism-setting-selector ul.selector-list::-webkit-scrollbar-track{background-color:#424242}.prism-player .prism-setting-selector ul.selector-list::-webkit-scrollbar-thumb{background-color:#8e8e8e;border:1px solid #424242;border-radius:5px}.prism-player .prism-setting-selector ul{list-style-type:none;padding-left:0;max-height:150px;overflow-y:auto;padding-left:13px;margin-top:5px}.prism-player .prism-setting-selector ul li{height:28px;padding-left:10px}.prism-player .prism-setting-selector ul li.current{color:#30adf2;padding-left:0}.prism-player .prism-setting-selector ul li.current:before{content:"";display:inline-block;line-height:0;border:5px solid transparent;border-left-color:#30adf2;border-right-width:0;margin-top:5px;padding-right:5px}.prism-player .prism-setting-selector ul li:hover{background:rgba(216,216,216,.1);cursor:pointer}.prism-player .prism-setting-selector ul span{line-height:28px;max-width:110px;display:inline-block;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.prism-player .prism-thumbnail{border:1px solid rgba(0,0,0,.8);width:174px;height:98px;position:absolute;bottom:50px;display:none;z-index:10}.prism-player .prism-thumbnail .none{border:none}.prism-player .prism-thumbnail span{font-size:12px;color:#fff;line-height:20px;background:rgba(0,0,0,.8);text-align:center;text-shadow:1px 1px 4px #373d41;padding-left:5px;padding-right:5px;display:inline-block;position:absolute;bottom:0;left:33%}.prism-player .prism-tooltip{background:#3c3c3c;box-shadow:0 0 5px 0 rgba(0,0,0,.1);height:28px;margin:0;padding-left:5px;padding-right:5px;padding-top:0;padding-bottom:0;position:absolute;bottom:50px;color:#fff;line-height:28px;font-size:10px;white-space:nowrap;display:none;z-index:10}.prism-player .disabled{pointer-events:none;color:gray}:-webkit-full-screen{width:100%!important;height:100%!important}:-moz-full-screen{width:100%!important;height:100%!important}:-ms-full-screen{width:100%!important;height:100%!important}:-ms-fullscreen{width:100%!important;height:100%!important}:-webkit-full-screen{width:100%!important;height:100%!important}:fullscreen{width:100%!important;height:100%!important}body.prism-full-window{padding:0;margin:0;height:100%;overflow-y:auto}.prism-fullscreen{position:fixed;overflow:hidden;z-index:99999;left:0!important;top:0!important;bottom:0!important;right:0!important;width:100%!important;height:100%!important;position:absolute!important}.prism-button{cursor:pointer;text-align:center;text-shadow:0 1px 1px rgba(0,0,0,.3);border-radius:.5em;box-shadow:0 1px 2px rgba(0,0,0,.2)}.prism-button-orange{color:#a56117;border:solid 1px #a56117}.prism-button-retry{color:#f2dede;border:solid 1px #f2dede}.prism-button-orange:hover{color:#d67400;border-color:#d67400}.prism-button-orange:active{color:#d67400;border-color:#d67400}.prism-button-orange:visited{color:#d67400}.prism-button-retry:hover{color:#fcf8e3;border-color:#fcf8e3}.prism-button-retry:active{color:#fcf8e3;border-color:#fcf8e3}.prism-button-retry:visited{color:#fcf8e3}.prism-center{position:absolute;left:50%;-ms-transform:translateX(-50%);transform:translateX(-50%)}.prism-width90{width:90%}.prism-stream-selector{font-size:16px;position:relative;line-height:32px}.prism-stream-selector .current-stream-selector{text-align:center;width:70px;display:none;color:#efeff4}.prism-stream-selector .current-stream-selector:hover{cursor:pointer;color:#00c1de}.prism-stream-selector .stream-selector-tip{color:#fff;text-align:center;padding:2px 5px 2px 5px;display:none;position:absolute;bottom:61.5px;white-space:nowrap;left:43%;font-size:18px}.prism-stream-selector .stream-selector-list{position:absolute;bottom:32px;background:rgba(0,0,0,.5);color:#efeff4;padding:5px 5px 0 5px;width:70px;margin:0;display:none}.prism-stream-selector .stream-selector-list li{list-style-type:none;text-align:center;white-space:nowrap;padding:0 2px 0 2px;line-height:24px}.prism-stream-selector .stream-selector-list li:last-child{margin-bottom:10px}.prism-stream-selector .stream-selector-list li.current{color:#00c1de}.prism-stream-selector .stream-selector-list li span.current{color:#00c1de}.prism-stream-selector .stream-selector-list li:hover{cursor:pointer;color:#00c1de}.prism-speed-selector{font-size:16px;position:relative;line-height:32px}.prism-speed-selector .current-speed-selector{color:#efeff4;text-align:center;width:60px}.prism-speed-selector .current-speed-selector:hover{cursor:pointer;color:#00c1de}.prism-speed-selector .speed-selector-list{position:absolute;bottom:32px;background:rgba(0,0,0,.5);color:#efeff4;padding:5px 5px 0 5px;display:none;margin:0}.prism-speed-selector .speed-selector-list li{list-style-type:none;text-align:center;white-space:nowrap;padding:0 2px 0 2px;line-height:24px}.prism-speed-selector .speed-selector-list li:last-child{margin-bottom:10px}.prism-speed-selector .speed-selector-list li.current{color:#00c1de}.prism-speed-selector .speed-selector-list li span.current{color:#00c1de}.prism-speed-selector .speed-selector-list li:hover{cursor:pointer;color:#00c1de}.prism-ai-container{position:absolute;overflow:hidden}.prism-ai-container .prism-ai-marking{font-size:12px;position:absolute}.prism-ai-container .prism-ai-marking[vh=large]{font-size:18px}.prism-ai-container .prism-ai-marking[vh=middle]{font-size:16px}.prism-ai-container .prism-ai-marking .prism-ai-rect-region{position:relative;display:inline-block}.prism-ai-container .prism-ai-marking .prism-ai-rect-region .prism-ai-title{height:0;-ms-transform:translateY(-40px);transform:translateY(-40px)}.prism-ai-container .prism-ai-marking .prism-ai-rect-region .prism-ai-title p{background:#ff1d00;text-align:center;width:100%;color:#fff;word-break:keep-all;margin:10px 0 0 0}.prism-ai-container .prism-ai-marking .prism-ai-rect-region .prism-ai-title .top-left-anchor{width:5px;height:5px;border-top-color:red;border-top-style:solid;border-left-color:red;border-left-style:solid;border-width:1px;-ms-transform:translate(-5px,10px);transform:translate(-5px,10px)}.prism-ai-container .prism-ai-marking .prism-ai-rect-region .prism-ai-title .top-right-anchor{width:5px;height:5px;border-top-color:red;border-top-style:solid;border-right-color:red;border-right-style:solid;border-width:1px;-ms-transform:translate(5px,5px);transform:translate(5px,5px);float:right}.prism-ai-container .prism-ai-marking .prism-ai-rect-region .prism-ai-rect{border-style:solid;border-color:#ff1d00;border-width:1px;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;color:rgba(255,29,0,.3);background:rgba(255,29,0,.1)}.prism-ai-container .prism-ai-marking .prism-ai-rect-region .prism-ai-rect .prism-ai-slash-container{overflow:hidden;width:100%;height:100%;position:absolute}.prism-ai-container .prism-ai-marking .prism-ai-rect-region .prism-ai-rect .prism-ai-slash{content:"";display:block;box-sizing:border-box;border-top-width:1px;border-top-style:solid;height:10px;margin-top:15px;border-bottom-width:1px;border-bottom-style:solid;transform:rotateZ(-45deg) scaleX(2);-ms-transform-origin:bottom center;transform-origin:bottom center}.prism-ai-container .prism-ai-marking .prism-ai-rect-region .prism-ai-rect .prism-ai-top-slash{margin-top:-10px!important}.prism-ai-container .prism-ai-marking .prism-ai-rect-region .anchor-plug{position:absolute}.prism-ai-container .prism-ai-marking .prism-ai-rect-region .top-left{top:-7px;left:-2px}.prism-ai-container .prism-ai-marking .prism-ai-rect-region .top-right{top:-7px;right:-2px}.prism-ai-container .prism-ai-marking .prism-ai-rect-region .bottom-left{bottom:-8px;left:-2px}.prism-ai-container .prism-ai-marking .prism-ai-rect-region .bottom-right{bottom:-8px;right:-2px}.prism-ai-container .prism-ai-marking .prism-ai-labels{color:#fff;float:right;background:rgba(0,0,0,.4);padding-top:5px;padding-bottom:5px}.prism-ai-container .prism-ai-marking .prism-ai-labels p{text-align:left;padding-left:5px;padding-right:5px;margin:0}.prism-ai-container .prism-ai-marking .prism-ai-labels a{padding-left:5px;padding-right:5px}.prism-ai-container .prism-ai-marking .prism-ai-labels p[vh=large]{padding-left:25px;padding-right:25px}.prism-ai-container .prism-ai-marking .prism-ai-labels p[vh=middle]{padding-left:15px;padding-right:15px}video::-webkit-media-text-track-container{overflow:visible!important}video::cue{line-height:1.7}.loading-center{position:absolute;top:50%;left:50%;-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}  
1 -/****reset****/  
2 -body,  
3 -div,  
4 -table,  
5 -tr,  
6 -td,  
7 -th,  
8 -h1,  
9 -h2,  
10 -h3,  
11 -h4,  
12 -h5,  
13 -h6,  
14 -form,  
15 -input,  
16 -button,  
17 -label,  
18 -select,  
19 -textarea,  
20 -p,  
21 -u,  
22 -i,  
23 -em,  
24 -ul,  
25 -ol,  
26 -li,  
27 -dl,  
28 -dd,  
29 -dt,  
30 -img,  
31 -article,  
32 -aside,  
33 -details,  
34 -figcaption,  
35 -figure,  
36 -footer,  
37 -header,  
38 -menu,  
39 -nav,  
40 -section {  
41 - box-sizing: border-box;  
42 - margin: 0;  
43 - padding: 0;  
44 - font-size: 100%;  
45 - vertical-align: baseline;  
46 - border: 0;  
47 - outline: 0;  
48 -}  
49 -li {  
50 - list-style: none;  
51 -}  
52 -h1,  
53 -h2,  
54 -h3,  
55 -h4,  
56 -h5,  
57 -h6 {  
58 - font-size: 100%;  
59 -}  
60 -table {  
61 - border-collapse: collapse;  
62 - border-spacing: 0;  
63 - width: 100%;  
64 -}  
65 -a,  
66 -input,  
67 -select,  
68 -textarea,  
69 -area,  
70 -button {  
71 - outline: none;  
72 - font-family: inherit;  
73 - font-size: inherit;  
74 - border: none;  
75 - background: none;  
76 - color: inherit;  
77 -}  
78 -a {  
79 - text-decoration: none;  
80 -}  
81 -a:hover {  
82 - text-decoration: none;  
83 -}  
84 -textarea {  
85 - overflow: auto;  
86 - resize: none;  
87 -}  
88 -input[type="button"],  
89 -input[type="submit"],  
90 -input[type="reset"] {  
91 - cursor: pointer;  
92 - -webkit-appearance: none;  
93 -}  
94 -html,  
95 -body {  
96 - overflow-x: hidden;  
97 - width: 100%;  
98 - height: 100%;  
99 - background: #ffffff;  
100 -}  
101 -* {  
102 - -webkit-overflow-scrolling: touch;  
103 -}  
104 -html {  
105 - -webkit-tap-highlight-color: transparent;  
106 -}  
107 -body {  
108 - text-align: left;  
109 -}  
110 -body #app {  
111 - height: 100%;  
112 -}  
113 -body #app::-webkit-scrollbar {  
114 - display: none;  
115 -}  
116 -body #app::-webkit-scrollbar-thumb {  
117 - display: none;  
118 -}  
119 -body #app::-webkit-scrollbar-track {  
120 - display: none;  
121 -}  
122 -.fl {  
123 - float: left;  
124 -}  
125 -.fr {  
126 - float: right;  
127 -}  
128 -.clearfix {  
129 - zoom: 1;  
130 -}  
131 -.clearfix::before,  
132 -.clearfix::after {  
133 - display: table;  
134 - content: " ";  
135 -}  
136 -.clearfix::after {  
137 - clear: both;  
138 - height: 0;  
139 - font-size: 0;  
140 - visibility: hidden;  
141 -}  
142 -.ant-skeleton {  
143 - display: table;  
144 - width: 100%;  
145 -}  
146 -.ant-skeleton + .ant-skeleton {  
147 - margin-top: 0.64rem;  
148 -}  
149 -.ant-skeleton.active {  
150 - display: none;  
151 -}  
152 -.ant-skeleton-content {  
153 - display: table-cell;  
154 - width: 100%;  
155 - margin-bottom: 0.64rem;  
156 - vertical-align: top;  
157 -}  
158 -.ant-skeleton-content .ant-skeleton-title {  
159 - width: 100%;  
160 - height: 0.53333rem;  
161 - margin-top: 0.26667rem;  
162 - background: #f2f2f2;  
163 -}  
164 -.ant-skeleton-content .ant-skeleton-title + .ant-skeleton-paragraph {  
165 - margin-top: 0.64rem;  
166 -}  
167 -.ant-skeleton-content .ant-skeleton-paragraph {  
168 - padding: 0;  
169 -}  
170 -.ant-skeleton-content .ant-skeleton-paragraph > li {  
171 - width: 23.3%;  
172 - height: 0.32rem;  
173 - list-style: none;  
174 - background: #f2f2f2;  
175 -}  
176 -.ant-skeleton-content .ant-skeleton-paragraph > li + li {  
177 - margin-top: 0.26667rem;  
178 -}  
179 -.ant-skeleton-content .ant-skeleton-paragraph > li:last-child:not(:first-child):not(:nth-child(2)) {  
180 - width: 61%;  
181 -}  
182 -.ant-skeleton.ant-skeleton-active .ant-skeleton-avatar,  
183 -.ant-skeleton.ant-skeleton-active .ant-skeleton-button,  
184 -.ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-paragraph > li,  
185 -.ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-title,  
186 -.ant-skeleton.ant-skeleton-active .ant-skeleton-image,  
187 -.ant-skeleton.ant-skeleton-active .ant-skeleton-input {  
188 - background: -webkit-gradient(linear, left top, right top, color-stop(25%, #f2f2f2), color-stop(37%, #e6e6e6), color-stop(63%, #f2f2f2));  
189 - background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);  
190 - background-size: 400% 100%;  
191 - animation: ant-skeleton-loading 1.4s ease infinite;  
192 -}  
193 -@keyframes ant-skeleton-loading {  
194 - 0% {  
195 - background-position: 100% 50%;  
196 - }  
197 - 100% {  
198 - background-position: 0 50%;  
199 - }  
200 -}  
201 -@keyframes spinner-anime {  
202 - 100% {  
203 - transform: rotate(360deg);  
204 - }  
205 -}  
206 -.toast-loading {  
207 - position: fixed;  
208 - top: 0;  
209 - left: 0;  
210 - width: 100%;  
211 - height: 100%;  
212 - display: flex;  
213 - justify-content: center;  
214 - align-items: center;  
215 - text-align: center;  
216 - z-index: 9999999999;  
217 -}  
218 -.toast-loading.active {  
219 - display: none;  
220 -}  
221 -.toast-loading.none {  
222 - display: none;  
223 -}  
224 -.toast-loading .loading-cont {  
225 - display: flex;  
226 - flex-direction: column;  
227 - justify-content: center;  
228 - align-items: center;  
229 - padding: 15px 15px;  
230 - border-radius: 7px;  
231 - background-clip: padding-box;  
232 - color: #fff;  
233 - background-color: rgba(58, 58, 58, 0.9);  
234 - font-size: 15px;  
235 - line-height: 20px;  
236 -}  
237 -.toast-loading .loading-cont .svg {  
238 - margin: 0;  
239 - width: 32px;  
240 - height: 32px;  
241 - display: inline-block;  
242 - width: 20px;  
243 - height: 20px;  
244 - background-image: url("../../../../../../../wdComponent/src/main/resources/rawfile/apph5/image/loading.svg");  
245 - background-position: 50%;  
246 - background-size: 100%;  
247 - background-repeat: no-repeat;  
248 - animation: spinner-anime 1s linear infinite;  
249 -}  
250 -.toast-loading .loading-cont .svg-text {  
251 - display: inline-block;  
252 - position: relative;  
253 - top: 4px;  
254 -}  
255 -.skeleton-loading {  
256 - display: block;  
257 - padding: 0.32rem 0.48rem 0;  
258 - height: 17.57333333rem;  
259 - overflow: hidden;  
260 -}  
261 -.skeleton-loading.active {  
262 - position: fixed;  
263 - left: 0;  
264 - top: 0;  
265 - width: 100%;  
266 - opacity: 0;  
267 - visibility: hidden;  
268 - z-index: -1;  
269 -}  
270 -.skeleton-loading.none {  
271 - display: none;  
272 -}  
273 -.error-block {  
274 - display: none;  
275 - box-sizing: border-box;  
276 - text-align: center;  
277 - padding-top: 3.76rem;  
278 -}  
279 -.error-block.active {  
280 - display: block;  
281 -}  
282 -.error-block .error-block-image {  
283 - text-align: center;  
284 -}  
285 -.error-block .error-block-image img {  
286 - width: 4.26666667rem;  
287 - height: 2.98666667rem;  
288 -}  
289 -.error-block .error-block-retry-btn {  
290 - width: 2.13333333rem;  
291 - height: 0.74666667rem;  
292 - border-radius: 0.08rem;  
293 - border: 0.02666667rem solid #EDEDED;  
294 - margin: 0 auto;  
295 - margin-top: 0.42666667rem;  
296 - font-size: 0.32rem;  
297 - font-weight: bold;  
298 - line-height: 0.74666667rem;  
299 - text-align: center;  
300 - color: #666666;  
301 -}  
302 -.error-block .error-block-description-title {  
303 - text-align: center;  
304 - margin: 0 auto;  
305 - font-size: 14px;  
306 - color: rgba(51, 51, 51, 0.5);  
307 -}  
308 -.ellipsis1 {  
309 - overflow: hidden;  
310 - text-overflow: ellipsis;  
311 - display: -webkit-box;  
312 - -webkit-line-clamp: 1;  
313 - line-clamp: 1;  
314 - -webkit-box-orient: vertical;  
315 - word-wrap: break-word;  
316 -}  
317 -#app.fixed {  
318 - position: fixed;  
319 - left: 0;  
320 - top: 0;  
321 - z-index: -1;  
322 - visibility: hidden;  
323 - opacity: 0;  
324 - width: 100%;  
325 -}  
326 -.gx-mobile.fixed {  
327 - position: fixed;  
328 - left: 0;  
329 - top: 0;  
330 - z-index: -1;  
331 - visibility: hidden;  
332 - opacity: 0;  
333 - width: 100%;  
334 - height: 17.57333333rem;  
335 -}  
336 -.gx-mobile.active {  
337 - animation-name: fadeIn;  
338 - animation-duration: 0.2s;  
339 -}  
340 -.refresh-content {  
341 - height: 100%;  
342 -}  
343 -.refresh-content .van-pull-refresh {  
344 - height: 100%;  
345 -}  
346 -html {  
347 - transition: color 300ms, background-color 300ms;  
348 -}  
349 -body .van-image__error,  
350 -body .van-image__loading {  
351 - display: block;  
352 -}  
353 -body .prism-fullscreen {  
354 - z-index: 999999 !important;  
355 -}  
356 -body .prism-player .prism-animation,  
357 -body .prism-player .prism-detect-info,  
358 -body .prism-player .prism-button,  
359 -body .prism-player .prism-setting-quality,  
360 -body .prism-player .prism-setting-audio,  
361 -body .prism-player .prism-setting-cc,  
362 -body .prism-player .prism-cc-btn,  
363 -body .prism-player .prism-volume,  
364 -body .prism-player .prism-tooltip,  
365 -body .prism-player .prism-setting-btn,  
366 -body .prism-player .prism-button-retry,  
367 -body .prism-player .dplayer-thumb,  
368 -body .prism-player .prism-progress-played,  
369 -body .prism-player .prism-progress-cursor,  
370 -body .prism-player .prism-progress-hover,  
371 -body .prism-player .prism-big-play-btn,  
372 -body .prism-player .prism-controlbar,  
373 -body .prism-player .prism-info-display,  
374 -body .prism-player .prism-text-overlay,  
375 -body .prism-player .prism-error-operation,  
376 -body .prism-player .prism-ErrorMessage,  
377 -body .prism-player .prism-cover,  
378 -body .prism-player .prism-loading {  
379 - display: none !important;  
380 -}  
381 -#__vconsole {  
382 - z-index: 10000000;  
383 -}  
384 -#__vconsole .vc-switch {  
385 - z-index: 10000000;  
386 -}  
387 -#__vconsole .vc-panel {  
388 - min-height: unset !important;  
389 - height: 500px !important;  
390 -}  
391 -#app {  
392 - overflow-y: hidden;  
393 - overflow-x: hidden;  
394 -}  
395 -#app .van-loading {  
396 - text-align: center;  
397 -}  
398 -html[dark-mode] body {  
399 - background-color: #161827;  
400 -}  
401 -html[dark-mode] body .gx-mobile .vote {  
402 - background-color: #1D1F2F;  
403 -}  
404 -html[dark-mode] body .gx-mobile .suggested .suggested-title {  
405 - color: #d9d9d9ff;  
406 -}  
407 -html[dark-mode] body .gx-mobile .suggested .suggested-item_title {  
408 - color: #d9d9d9ff !important;  
409 -}  
410 -html[dark-mode] body .gx-mobile .suggested .subtitle {  
411 - color: #d9d9d9ff !important;  
412 -}  
413 -html[dark-mode] body .gx-mobile .suggested .left span {  
414 - color: #ffffff5c !important;  
415 -}  
416 -html[dark-mode] body .gx-mobile .title {  
417 - color: #d9d9d9ff;  
418 -}  
419 -html[dark-mode] body .gx-mobile .ptxt {  
420 - color: #ffffffab;  
421 -}  
422 -html[dark-mode] body .gx-mobile .btsIem {  
423 - background-color: #161828;  
424 -}  
425 -html[dark-mode] body .gx-mobile .stx {  
426 - color: #ffffffab !important;  
427 -}  
428 -html[dark-mode] body .gx-mobile .jd .s1 {  
429 - background: linear-gradient(270deg, #e5111eff 0%, #ffb5b9ff 100%);  
430 -}  
431 -html[dark-mode] body .gx-mobile .jd .s2 {  
432 - background-color: #393A47 !important;  
433 -}  
434 -html[dark-mode] body .gx-mobile .open {  
435 - background: linear-gradient(179.9deg, #1d1f2e00 0%, #1d1f2eff 48%, #1d1f2eff 99%);  
436 -}  
437 -html[dark-mode] body .gx-mobile .open img {  
438 - width: 0.42667rem;  
439 - height: 0.42667rem;  
440 -}  
441 -html[dark-mode] body .gx-mobile .time {  
442 - color: rgba(255, 255, 255, 0.4);  
443 -}  
444 -html[dark-mode] body .gx-mobile #newsContent {  
445 - background-color: #12131e !important;  
446 - color: #ccc;  
447 -}  
448 -html[dark-mode] body .gx-mobile #newsContent h1,  
449 -html[dark-mode] body .gx-mobile #newsContent h2,  
450 -html[dark-mode] body .gx-mobile #newsContent div,  
451 -html[dark-mode] body .gx-mobile #newsContent h3,  
452 -html[dark-mode] body .gx-mobile #newsContent p,  
453 -html[dark-mode] body .gx-mobile #newsContent h4,  
454 -html[dark-mode] body .gx-mobile #newsContent h5,  
455 -html[dark-mode] body .gx-mobile #newsContent h6,  
456 -html[dark-mode] body .gx-mobile #newsContent ul,  
457 -html[dark-mode] body .gx-mobile #newsContent li,  
458 -html[dark-mode] body .gx-mobile #newsContent ol {  
459 - background-color: #12131e !important;  
460 - color: #ccc !important;  
461 -}  
462 -html[dark-mode] body .gx-mobile #newsContent .preview-video div,  
463 -html[dark-mode] body .gx-mobile #newsContent .preview-video p {  
464 - background-color: rgba(255, 255, 255, 0) !important;  
465 -}  
466 -html[dark-mode] body .footer {  
467 - background-color: #12131e;  
468 - border-top: #252630;  
469 -}  
470 -.anticon-spin {  
471 - animation: loadingCircle 1s infinite linear;  
472 -}  
473 -@keyframes fadeIn {  
474 - 0% {  
475 - opacity: 0;  
476 - }  
477 - 100% {  
478 - opacity: 1;  
479 - }  
480 -}  
481 -@keyframes loadingCircle {  
482 - 100% {  
483 - -webkit-transform: rotate(360deg);  
484 - transform: rotate(360deg);  
485 - }  
486 -}  
487 -@-webkit-keyframes loadingCircle {  
488 - 100% {  
489 - -webkit-transform: rotate(360deg);  
490 - transform: rotate(360deg);  
491 - }  
492 -}  
493 -@keyframes loadingCircle {  
494 - 100% {  
495 - -webkit-transform: rotate(360deg);  
496 - transform: rotate(360deg);  
497 - }  
498 -}  
499 -/*# sourceMappingURL=global.css.map */  
1 -{"version":3,"sources":["global.less"],"names":[],"mappings":";AACA;AAAM;AAAK;AAAO;AAAI;AAAI;AAAI;AAAI;AAAI;AAAI;AAAI;AAAI;AAAI;AAAM;AAAO;AAAQ;AAAO;AAAQ;AAAU;AAAG;AAAG;AAAG;AAAI;AAAI;AAAI;AAAI;AAAI;AAAI;AAAI;AAAK;AAAS;AAAO;AAAS;AAAY;AAAQ;AAAQ;AAAQ;AAAM;AAAK;EACpN,sBAAA;EACA,SAAA;EACA,UAAA;EACA,eAAA;EACA,wBAAA;EACA,SAAA;EACA,UAAA;;AAGF;EACE,gBAAA;;AAGF;AAAI;AAAI;AAAI;AAAI;AAAI;EAClB,eAAA;;AAGF;EACE,yBAAA;EACA,iBAAA;EACA,WAAA;;AAGF;AAAG;AAAO;AAAQ;AAAU;AAAM;EAChC,aAAA;EACA,oBAAA;EACA,kBAAA;EACA,YAAA;EACA,gBAAA;EACA,cAAA;;AAGF;EACE,qBAAA;;AAGF,CAAC;EACC,qBAAA;;AAGF;EACE,cAAA;EACA,YAAA;;AAGF,KAAK;AAAiB,KAAK;AAAiB,KAAK;EAC/C,eAAA;EACA,wBAAA;;AAGF;AAAM;EACJ,kBAAA;EACA,WAAA;EACA,YAAA;EACA,mBAAA;;AAGF;EACE,iCAAA;;AAGF;EACE,wCAAA;;AAGF;EACE,gBAAA;;AADF,IAGE;EACE,YAAA;;AAEA,IAHF,KAGG;EACC,aAAA;;AAGF,IAPF,KAOG;EACC,aAAA;;AAGF,IAXF,KAWG;EACC,aAAA;;AAKN;EACE,WAAA;;AAGF;EACE,YAAA;;AAGF;EACE,OAAA;;AAEA,SAAC;AACD,SAAC;EACC,cAAA;EACA,SAAS,GAAT;;AAGF,SAAC;EACC,WAAA;EACA,SAAA;EACA,YAAA;EACA,kBAAA;;AAIJ;EACE,cAAA;EACA,WAAA;;AAGF,aAAc;EACZ,mBAAA;;AAGF,aAAa;EACX,aAAA;;AAGF;EACE,mBAAA;EACA,WAAA;EACA,sBAAA;EACA,mBAAA;;AAGF,qBAAsB;EACpB,WAAA;EACA,kBAAA;EACA,sBAAA;EACA,mBAAA;;AAGF,qBAAsB,oBAAoB;EACxC,mBAAA;;AAGF,qBAAsB;EACpB,UAAA;;AAGF,qBAAsB,wBAAwB;EAC5C,YAAA;EACA,eAAA;EACA,gBAAA;EACA,mBAAA;;AAGF,qBAAsB,wBAAwB,KAAK;EACjD,sBAAA;;AAGF,qBAAsB,wBAAwB,KAAI,WAAW,IAAI,cAAc,IAAI;EACjF,UAAA;;AAGF,aAAa,oBAAqB;AAAsB,aAAa,oBAAqB;AAAsB,aAAa,oBAAqB,sBAAsB,wBAAwB;AAAM,aAAa,oBAAqB,sBAAsB;AAAqB,aAAa,oBAAqB;AAAqB,aAAa,oBAAqB;EAC1W,YAAY,8CAA8C,0BAA0B,0BAA0B,yBAA9G;EACA,YAAY,6DAAZ;EACA,0BAAA;EACA,kDAAA;;AAGF;EACE;IACE,6BAAA;;EAEF;IACE,0BAAA;;;AAIJ;EACE;IACE,WAAW,cAAX;;;AAIJ;EACE,eAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,kBAAA;EACA,mBAAA;;AAEA,cAAC;EACC,aAAA;;AAGF,cAAC;EACC,aAAA;;AAjBJ,cAoBE;EACE,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,mBAAA;EACA,kBAAA;EACA,kBAAA;EACA,4BAAA;EACA,WAAA;EACA,uCAAA;EACA,eAAA;EACA,iBAAA;;AA/BJ,cAoBE,cAaE;EACE,SAAA;EACA,WAAA;EACA,YAAA;EACA,qBAAA;EACA,WAAA;EACA,YAAA;EACA,sBAAsB,uBAAtB;EACA,wBAAA;EACA,qBAAA;EACA,4BAAA;EACA,2CAAA;;AA5CN,cAoBE,cA2BE;EACE,qBAAA;EACA,kBAAA;EACA,QAAA;;AAKN;EACE,cAAA;EACA,0BAAA;EACA,sBAAA;EACA,gBAAA;;AAEA,iBAAC;EACC,eAAA;EACA,OAAA;EACA,MAAA;EACA,WAAA;EACA,UAAA;EACA,kBAAA;EACA,WAAA;;AAGF,iBAAC;EACC,aAAA;;AAIJ;EACE,aAAA;EACA,sBAAA;EACA,kBAAA;EACA,oBAAA;;AAEA,YAAC;EACC,cAAA;;AAPJ,YAUE;EACE,kBAAA;;AAXJ,YAUE,mBAGE;EACE,oBAAA;EACA,qBAAA;;AAfN,YAmBE;EACE,oBAAA;EACA,qBAAA;EACA,sBAAA;EACA,mCAAA;EACA,cAAA;EACA,yBAAA;EAEA,kBAAA;EACA,iBAAA;EACA,0BAAA;EACA,kBAAA;EACA,cAAA;;AA/BJ,YAqCE;EACE,kBAAA;EACA,cAAA;EACA,eAAA;EACA,4BAAA;;AAOJ;EACE,gBAAA;EACA,uBAAA;EACA,oBAAA;EACA,qBAAA;EACA,aAAA;EACA,4BAAA;EACA,qBAAA;;AAIA,IAAC;EACC,eAAA;EACA,OAAA;EACA,MAAA;EACA,WAAA;EACA,kBAAA;EACA,UAAA;EACA,WAAA;;AAKF,UAAC;EACC,eAAA;EACA,OAAA;EACA,MAAA;EACA,WAAA;EACA,kBAAA;EACA,UAAA;EACA,WAAA;EACA,sBAAA;;AAGF,UAAC;EACC,sBAAA;EACA,wBAAA;;AAIJ;EACE,YAAA;;AADF,gBAGE;EACE,YAAA;;AAIJ;EACE,+CAAA;;AAEF,IAEE;AAFF,IAEqB;EACjB,cAAA;;AAHJ,IAME;EACE,0BAAA;;AAPJ,IAUE,cAEE;AAZJ,IAUE,cAEoB;AAZtB,IAUE,cAEwC;AAZ1C,IAUE,cAEuD;AAZzD,IAUE,cAE+E;AAZjF,IAUE,cAEqG;AAZvG,IAUE,cAEwH;AAZ1H,IAUE,cAEuI;AAZzI,IAUE,cAEsJ;AAZxJ,IAUE,cAEsK;AAZxK,IAUE,cAE0L;AAZ5L,IAUE,cAE+M;AAZjN,IAUE,cAE+N;AAZjO,IAUE,cAEuP;AAZzP,IAUE,cAE+Q;AAZjR,IAUE,cAEsS;AAZxS,IAUE,cAE2T;AAZ7T,IAUE,cAE8U;AAZhV,IAUE,cAEmW;AAZrW,IAUE,cAEwX;AAZ1X,IAUE,cAEgZ;AAZlZ,IAUE,cAEqa;AAZva,IAUE,cAEmb;EAC/a,wBAAA;;AAKN;EAUE,iBAAA;;AAVF,WACE;EACE,iBAAA;;AAFJ,WAKE;EACE,4BAAA;EACA,wBAAA;;AAMJ;EACE,kBAAA;EACA,kBAAA;;AAFF,IAGE;EACE,kBAAA;;AAMJ,IAAI,WACF;EAEE,yBAAA;;AAHJ,IAAI,WACF,KAIE,WAAW;EACT,yBAAA;;AANN,IAAI,WACF,KAOE,WAAW,WAET;EACE,gBAAA;;AAXR,IAAI,WACF,KAOE,WAAW,WAKT;EACE,gBAAA;;AAdR,IAAI,WACF,KAOE,WAAW,WAQT;EACE,gBAAA;;AAjBR,IAAI,WACF,KAOE,WAAW,WAWT,MACE;EACE,gBAAA;;AArBV,IAAI,WACF,KAwBE,WAAW;EACT,gBAAA;;AA1BN,IAAI,WACF,KA2BE,WAAW;EACT,gBAAA;;AA7BN,IAAI,WACF,KA8BE,WAAW;EACT,yBAAA;;AAhCN,IAAI,WACF,KAiCE,WAAW;EACT,gBAAA;;AAnCN,IAAI,WACF,KAoCE,WAAW,IACT;EACE,YAAY,qDAAZ;;AAvCR,IAAI,WACF,KAoCE,WAAW,IAIT;EACE,yBAAA;;AA1CR,IAAI,WACF,KA4CE,WAAW;EACT,YAAY,qEAAZ;;AA9CN,IAAI,WACF,KA4CE,WAAW,MAET;EACE,iBAAA;EACA,kBAAA;;AAjDR,IAAI,WACF,KAoDE,WAAW;EAET,+BAAA;;AAvDN,IAAI,WACF,KAyDE,WAAW;EACT,yBAAA;EACA,WAAA;;AA5DN,IAAI,WACF,KAyDE,WAAW,aAIT;AA9DN,IAAI,WACF,KAyDE,WAAW,aAIL;AA9DV,IAAI,WACF,KAyDE,WAAW,aAID;AA9Dd,IAAI,WACF,KAyDE,WAAW,aAII;AA9DnB,IAAI,WACF,KAyDE,WAAW,aAIQ;AA9DvB,IAAI,WACF,KAyDE,WAAW,aAIW;AA9D1B,IAAI,WACF,KAyDE,WAAW,aAIe;AA9D9B,IAAI,WACF,KAyDE,WAAW,aAImB;AA9DlC,IAAI,WACF,KAyDE,WAAW,aAIuB;AA9DtC,IAAI,WACF,KAyDE,WAAW,aAI2B;AA9D1C,IAAI,WACF,KAyDE,WAAW,aAI+B;EACtC,yBAAA;EACA,WAAA;;AAhER,IAAI,WACF,KAyDE,WAAW,aAQT,eACE;AAnER,IAAI,WACF,KAyDE,WAAW,aAQT,eACQ;EACJ,wCAAA;;AApEV,IAAI,WACF,KAyEE;EACE,yBAAA;EACA,mBAAA;;AAKN;EACE,2CAAA;;AAGF;EACE;IACE,UAAA;;EAGF;IACE,UAAA;;;AAIJ;EACE;IACE,mBAAmB,cAAnB;IACA,WAAW,cAAX;;;AAIJ;EACE;IACE,mBAAmB,cAAnB;IACA,WAAW,cAAX;;;AAIJ;EACE;IACE,mBAAmB,cAAnB;IACA,WAAW,cAAX","file":"global.css"}  
1 -/****reset****/  
2 -body, div, table, tr, td, th, h1, h2, h3, h4, h5, h6, form, input, button, label, select, textarea, p, u, i, em, ul, ol, li, dl, dd, dt, img, article, aside, details, figcaption, figure, footer, header, menu, nav, section {  
3 - box-sizing: border-box;  
4 - margin: 0;  
5 - padding: 0;  
6 - font-size: 100%;  
7 - vertical-align: baseline;  
8 - border: 0;  
9 - outline: 0;  
10 -}  
11 -  
12 -li {  
13 - list-style: none;  
14 -}  
15 -  
16 -h1, h2, h3, h4, h5, h6 {  
17 - font-size: 100%;  
18 -}  
19 -  
20 -table {  
21 - border-collapse: collapse;  
22 - border-spacing: 0;  
23 - width: 100%;  
24 -}  
25 -  
26 -a, input, select, textarea, area, button {  
27 - outline: none;  
28 - font-family: inherit;  
29 - font-size: inherit;  
30 - border: none;  
31 - background: none;  
32 - color: inherit;  
33 -}  
34 -  
35 -a {  
36 - text-decoration: none;  
37 -}  
38 -  
39 -a:hover {  
40 - text-decoration: none;  
41 -}  
42 -  
43 -textarea {  
44 - overflow: auto;  
45 - resize: none;  
46 -}  
47 -  
48 -input[type="button"], input[type="submit"], input[type="reset"] {  
49 - cursor: pointer;  
50 - -webkit-appearance: none;  
51 -}  
52 -  
53 -html, body {  
54 - overflow-x: hidden;  
55 - width: 100%;  
56 - height: 100%;  
57 - background: #ffffff;  
58 -}  
59 -  
60 -* {  
61 - -webkit-overflow-scrolling: touch;  
62 -}  
63 -  
64 -html {  
65 - -webkit-tap-highlight-color: transparent;  
66 -}  
67 -  
68 -body {  
69 - text-align: left;  
70 -  
71 - #app {  
72 - height: 100%;  
73 -  
74 - &::-webkit-scrollbar {  
75 - display: none;  
76 - }  
77 -  
78 - &::-webkit-scrollbar-thumb {  
79 - display: none;  
80 - }  
81 -  
82 - &::-webkit-scrollbar-track {  
83 - display: none;  
84 - }  
85 - }  
86 -}  
87 -  
88 -.fl {  
89 - float: left;  
90 -}  
91 -  
92 -.fr {  
93 - float: right;  
94 -}  
95 -  
96 -.clearfix {  
97 - zoom: 1;  
98 -  
99 - &::before,  
100 - &::after {  
101 - display: table;  
102 - content: " ";  
103 - }  
104 -  
105 - &::after {  
106 - clear: both;  
107 - height: 0;  
108 - font-size: 0;  
109 - visibility: hidden;  
110 - }  
111 -}  
112 -  
113 -.ant-skeleton {  
114 - display: table;  
115 - width: 100%;  
116 -}  
117 -  
118 -.ant-skeleton + .ant-skeleton {  
119 - margin-top: 0.64rem;  
120 -}  
121 -  
122 -.ant-skeleton.active {  
123 - display: none;  
124 -}  
125 -  
126 -.ant-skeleton-content {  
127 - display: table-cell;  
128 - width: 100%;  
129 - margin-bottom: 0.64rem;  
130 - vertical-align: top;  
131 -}  
132 -  
133 -.ant-skeleton-content .ant-skeleton-title {  
134 - width: 100%;  
135 - height: 0.53333rem;  
136 - margin-top: 0.26667rem;  
137 - background: #f2f2f2;  
138 -}  
139 -  
140 -.ant-skeleton-content .ant-skeleton-title + .ant-skeleton-paragraph {  
141 - margin-top: 0.64rem;  
142 -}  
143 -  
144 -.ant-skeleton-content .ant-skeleton-paragraph {  
145 - padding: 0;  
146 -}  
147 -  
148 -.ant-skeleton-content .ant-skeleton-paragraph > li {  
149 - width: 23.3%;  
150 - height: 0.32rem;  
151 - list-style: none;  
152 - background: #f2f2f2;  
153 -}  
154 -  
155 -.ant-skeleton-content .ant-skeleton-paragraph > li + li {  
156 - margin-top: 0.26667rem;  
157 -}  
158 -  
159 -.ant-skeleton-content .ant-skeleton-paragraph > li:last-child:not(:first-child):not(:nth-child(2)) {  
160 - width: 61%;  
161 -}  
162 -  
163 -.ant-skeleton.ant-skeleton-active .ant-skeleton-avatar, .ant-skeleton.ant-skeleton-active .ant-skeleton-button, .ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-paragraph > li, .ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-title, .ant-skeleton.ant-skeleton-active .ant-skeleton-image, .ant-skeleton.ant-skeleton-active .ant-skeleton-input {  
164 - background: -webkit-gradient(linear, left top, right top, color-stop(25%, #f2f2f2), color-stop(37%, #e6e6e6), color-stop(63%, #f2f2f2));  
165 - background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);  
166 - background-size: 400% 100%;  
167 - animation: ant-skeleton-loading 1.4s ease infinite;  
168 -}  
169 -  
170 -@keyframes ant-skeleton-loading {  
171 - 0% {  
172 - background-position: 100% 50%;  
173 - }  
174 - 100% {  
175 - background-position: 0 50%;  
176 - }  
177 -}  
178 -  
179 -@keyframes spinner-anime {  
180 - 100% {  
181 - transform: rotate(360deg);  
182 - }  
183 -}  
184 -  
185 -.toast-loading {  
186 - position: fixed;  
187 - top: 0;  
188 - left: 0;  
189 - width: 100%;  
190 - height: 100%;  
191 - display: flex;  
192 - justify-content: center;  
193 - align-items: center;  
194 - text-align: center;  
195 - z-index: 9999999999;  
196 -  
197 - &.active {  
198 - display: none;  
199 - }  
200 -  
201 - &.none {  
202 - display: none;  
203 - }  
204 -  
205 - .loading-cont {  
206 - display: flex;  
207 - flex-direction: column;  
208 - justify-content: center;  
209 - align-items: center;  
210 - padding: 15px 15px;  
211 - border-radius: 7px;  
212 - background-clip: padding-box;  
213 - color: #fff;  
214 - background-color: rgba(58, 58, 58, 0.9);  
215 - font-size: 15px;  
216 - line-height: 20px;  
217 -  
218 - .svg {  
219 - margin: 0;  
220 - width: 32px;  
221 - height: 32px;  
222 - display: inline-block;  
223 - width: 20px;  
224 - height: 20px;  
225 - background-image: url("../image/loading.svg");  
226 - background-position: 50%;  
227 - background-size: 100%;  
228 - background-repeat: no-repeat;  
229 - animation: spinner-anime 1s linear infinite;  
230 - }  
231 -  
232 - .svg-text {  
233 - display: inline-block;  
234 - position: relative;  
235 - top: 4px;  
236 - }  
237 - }  
238 -}  
239 -  
240 -.skeleton-loading {  
241 - display: block;  
242 - padding: (12 / 37.5rem) (18 / 37.5rem) 0;  
243 - height: (659 / 37.5rem);  
244 - overflow: hidden;  
245 -  
246 - &.active {  
247 - position: fixed;  
248 - left: 0;  
249 - top: 0;  
250 - width: 100%;  
251 - opacity: 0;  
252 - visibility: hidden;  
253 - z-index: -1;  
254 - }  
255 -  
256 - &.none {  
257 - display: none;  
258 - }  
259 -}  
260 -  
261 -.error-block {  
262 - display: none;  
263 - box-sizing: border-box;  
264 - text-align: center;  
265 - padding-top: (141 / 37.5rem);  
266 -  
267 - &.active {  
268 - display: block;  
269 - }  
270 -  
271 - .error-block-image {  
272 - text-align: center;  
273 -  
274 - img {  
275 - width: (160 / 37.5rem);  
276 - height: (112 / 37.5rem);  
277 - }  
278 - }  
279 -  
280 - .error-block-retry-btn {  
281 - width: (80 / 37.5rem);  
282 - height: (28 / 37.5rem);  
283 - border-radius: (3 / 37.5rem);  
284 - border: (1 / 37.5rem) solid #EDEDED;  
285 - margin: 0 auto;  
286 - margin-top: (16 / 37.5rem);  
287 -  
288 - font-size: (12 / 37.5rem);  
289 - font-weight: bold;  
290 - line-height: (28 / 37.5rem);  
291 - text-align: center;  
292 - color: #666666;  
293 - }  
294 -  
295 - .error-block-description {  
296 - }  
297 -  
298 - .error-block-description-title {  
299 - text-align: center;  
300 - margin: 0 auto;  
301 - font-size: 14px;  
302 - color: rgba(51, 51, 51, 0.5);  
303 - }  
304 -  
305 - .error-block-description-subtitle {  
306 - }  
307 -}  
308 -  
309 -.ellipsis1 {  
310 - overflow: hidden;  
311 - text-overflow: ellipsis;  
312 - display: -webkit-box;  
313 - -webkit-line-clamp: 1;  
314 - line-clamp: 1;  
315 - -webkit-box-orient: vertical;  
316 - word-wrap: break-word;  
317 -}  
318 -  
319 -#app {  
320 - &.fixed {  
321 - position: fixed;  
322 - left: 0;  
323 - top: 0;  
324 - z-index: -1;  
325 - visibility: hidden;  
326 - opacity: 0;  
327 - width: 100%;  
328 - }  
329 -}  
330 -  
331 -.gx-mobile {  
332 - &.fixed {  
333 - position: fixed;  
334 - left: 0;  
335 - top: 0;  
336 - z-index: -1;  
337 - visibility: hidden;  
338 - opacity: 0;  
339 - width: 100%;  
340 - height: (659 / 37.5rem);  
341 - }  
342 -  
343 - &.active {  
344 - animation-name: fadeIn;  
345 - animation-duration: .2s;  
346 - }  
347 -}  
348 -  
349 -.refresh-content {  
350 - height: 100%;  
351 -  
352 - .van-pull-refresh {  
353 - height: 100%;  
354 - }  
355 -}  
356 -  
357 -html {  
358 - transition: color 300ms, background-color 300ms;  
359 -}  
360 -body {  
361 -  
362 - .van-image__error, .van-image__loading {  
363 - display: block;  
364 - }  
365 -  
366 - .prism-fullscreen {  
367 - z-index: 999999 !important;  
368 - }  
369 -  
370 - .prism-player {  
371 -  
372 - .prism-animation, .prism-detect-info, .prism-button, .prism-setting-quality, .prism-setting-audio, .prism-setting-cc, .prism-cc-btn, .prism-volume, .prism-tooltip, .prism-setting-btn, .prism-button-retry, .dplayer-thumb, .prism-progress-played, .prism-progress-cursor, .prism-progress-hover, .prism-big-play-btn, .prism-controlbar, .prism-info-display, .prism-text-overlay, .prism-error-operation, .prism-ErrorMessage, .prism-cover, .prism-loading {  
373 - display: none !important;  
374 - }  
375 - }  
376 -}  
377 -  
378 -#__vconsole {  
379 - .vc-switch {  
380 - z-index: 10000000;  
381 - }  
382 -  
383 - .vc-panel {  
384 - min-height: unset !important;  
385 - height: 500px !important;  
386 - }  
387 -  
388 - z-index: 10000000;  
389 -}  
390 -  
391 -#app {  
392 - overflow-y: hidden;  
393 - overflow-x: hidden;  
394 - .van-loading {  
395 - text-align: center;  
396 - }  
397 -}  
398 -  
399 -  
400 -  
401 -html[dark-mode] {  
402 - body {  
403 - // background-color: #12131e;  
404 - background-color: #161827;  
405 -  
406 - .gx-mobile .vote {  
407 - background-color: #1D1F2F;  
408 - }  
409 - .gx-mobile .suggested {  
410 - // background-color: #1D1F2F;  
411 - .suggested-title {  
412 - color: #d9d9d9ff;  
413 - }  
414 - .suggested-item_title {  
415 - color: #d9d9d9ff !important;  
416 - }  
417 - .subtitle {  
418 - color: #d9d9d9ff !important;  
419 - }  
420 - .left {  
421 - span {  
422 - color: #ffffff5c !important;  
423 - }  
424 - }  
425 - }  
426 - .gx-mobile .title {  
427 - color: #d9d9d9ff;  
428 - }  
429 - .gx-mobile .ptxt {  
430 - color: #ffffffab;  
431 - }  
432 - .gx-mobile .btsIem {  
433 - background-color: #161828;  
434 - }  
435 - .gx-mobile .stx {  
436 - color: #ffffffab !important ;  
437 - }  
438 - .gx-mobile .jd {  
439 - .s1 {  
440 - background: linear-gradient(270deg, #e5111eff 0%, #ffb5b9ff 100%);  
441 - }  
442 - .s2 {  
443 - background-color: #393A47 !important;  
444 - }  
445 - }  
446 - .gx-mobile .open {  
447 - background: linear-gradient(179.9deg, #1d1f2e00 0%, #1d1f2eff 48%, #1d1f2eff 99%);  
448 - img {  
449 - width: 0.42667rem;  
450 - height: 0.42667rem;  
451 - }  
452 - }  
453 -  
454 - .gx-mobile .time {  
455 - // color: #7a7a7a;  
456 - color: rgba(255, 255, 255, 0.4);  
457 - }  
458 -  
459 - .gx-mobile #newsContent {  
460 - background-color: #12131e !important;  
461 - color: #ccc;  
462 -  
463 - h1, h2, div, h3, p, h4, h5, h6, ul, li, ol {  
464 - background-color: #12131e !important;  
465 - color: #ccc !important;  
466 - }  
467 - .preview-video {  
468 - div , p {  
469 - background-color: rgba(255,255 , 255, 0) !important;  
470 - }  
471 - }  
472 -  
473 - }  
474 -  
475 - .footer {  
476 - background-color: #12131e;  
477 - border-top: #252630;  
478 - }  
479 - }  
480 -}  
481 -  
482 -.anticon-spin {  
483 - animation: loadingCircle 1s infinite linear;  
484 -}  
485 -  
486 -@keyframes fadeIn {  
487 - 0% {  
488 - opacity: 0;  
489 - }  
490 -  
491 - 100% {  
492 - opacity: 1;  
493 - }  
494 -}  
495 -  
496 -@keyframes loadingCircle {  
497 - 100% {  
498 - -webkit-transform: rotate(360deg);  
499 - transform: rotate(360deg);  
500 - }  
501 -}  
502 -  
503 -@-webkit-keyframes loadingCircle {  
504 - 100% {  
505 - -webkit-transform: rotate(360deg);  
506 - transform: rotate(360deg);  
507 - }  
508 -}  
509 -  
510 -@keyframes loadingCircle {  
511 - 100% {  
512 - -webkit-transform: rotate(360deg);  
513 - transform: rotate(360deg);  
514 - }  
515 -}