From 673c1ec06aa4ac90369f325eee7bf26daa616845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=9A=E7=90=AA?= Date: Tue, 18 Jun 2024 14:23:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/get-image-info/get-image-info.uvue | 2 +- pages/API/get-video-info/get-video-info.uvue | 2 +- pages/component/image/image.uvue | 4 ++-- pages/component/video/video.uvue | 24 +++++++++---------- .../web-view-local/web-view-local.uvue | 10 ++++---- pages/component/web-view/web-view.uvue | 6 ++--- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pages/API/get-image-info/get-image-info.uvue b/pages/API/get-image-info/get-image-info.uvue index c8fac7b6..449c69ee 100644 --- a/pages/API/get-image-info/get-image-info.uvue +++ b/pages/API/get-image-info/get-image-info.uvue @@ -40,7 +40,7 @@ remoteImagePath: "https://qiniu-web-assets.dcloud.net.cn/uni-app-x/static/img/building.jpg", remoteImageInfo: "", // 自动化测试 - imageInfoForTest: null, + imageInfoForTest: null as UTSJSONObject | null, } }, methods: { diff --git a/pages/API/get-video-info/get-video-info.uvue b/pages/API/get-video-info/get-video-info.uvue index 2c8a4958..20053770 100644 --- a/pages/API/get-video-info/get-video-info.uvue +++ b/pages/API/get-video-info/get-video-info.uvue @@ -26,7 +26,7 @@ absoluteVideoPath: "", absoluteVideoInfo: "", // 自动化测试 - videoInfoForTest: null + videoInfoForTest: null as UTSJSONObject | null } }, methods: { diff --git a/pages/component/image/image.uvue b/pages/component/image/image.uvue index f28352c3..eb180f20 100644 --- a/pages/component/image/image.uvue +++ b/pages/component/image/image.uvue @@ -35,8 +35,8 @@ autoTest: false, setCookieImage: "", verifyCookieImage: "", - eventLoad: null, - eventError: null + eventLoad: null as UTSJSONObject | null, + eventError: null as UTSJSONObject | null } }, methods: { diff --git a/pages/component/video/video.uvue b/pages/component/video/video.uvue index 4d9eb247..103d266a 100644 --- a/pages/component/video/video.uvue +++ b/pages/component/video/video.uvue @@ -175,16 +175,16 @@ isPause: false, isError: false, localSrc: 'https://qiniu-web-assets.dcloud.net.cn/video/sample/2minute-demo.mp4', - eventPlay: null, - eventPause: null, - eventEnded: null, - eventTimeupdate: null, - eventFullscreenchange: null, - eventWaiting: null, - eventError: null, - eventProgress: null, - eventFullscreenclick: null, - eventControlstoggle: null + eventPlay: null as UTSJSONObject | null, + eventPause: null as UTSJSONObject | null, + eventEnded: null as UTSJSONObject | null, + eventTimeupdate: null as UTSJSONObject | null, + eventFullscreenchange: null as UTSJSONObject | null, + eventWaiting: null as UTSJSONObject | null, + eventError: null as UTSJSONObject | null, + eventProgress: null as UTSJSONObject | null, + eventFullscreenclick: null as UTSJSONObject | null, + eventControlstoggle: null as UTSJSONObject | null } }, onLoad() { @@ -257,13 +257,13 @@ }, onInitialTimeComfirm: function (event : UniInputConfirmEvent) { let value = parseInt(event.detail.value) - if (value == NaN) value = 0; + if (isNaN(value)) value = 0; this.initialTime = value; console.log("initialTime -> " + this.initialTime) }, onDurationComfirm: function (event : UniInputConfirmEvent) { let value = parseInt(event.detail.value) - if (value == NaN) value = 0; + if (isNaN(value)) value = 0; this.duration = value; console.log("duration -> " + this.duration) }, diff --git a/pages/component/web-view-local/web-view-local.uvue b/pages/component/web-view-local/web-view-local.uvue index 8dde3139..f7106aa2 100644 --- a/pages/component/web-view-local/web-view-local.uvue +++ b/pages/component/web-view-local/web-view-local.uvue @@ -12,17 +12,17 @@ loadFinish: false, // 自动化测试 autoTest: false, - eventMessage: null, - eventDownload: null + eventMessage: null as UTSJSONObject | null, + eventDownload: null as UTSJSONObject | null } }, methods: { message(event : UniWebViewMessageEvent) { console.log(JSON.stringify(event.detail)); let contentStr = JSON.stringify(event.detail); - - contentStr = JSON.stringify(event.detail.data[0]); - + // #ifdef APP-IOS + contentStr = JSON.stringify(event.detail.data[0]); + // #endif uni.showModal({ content: contentStr, showCancel: false diff --git a/pages/component/web-view/web-view.uvue b/pages/component/web-view/web-view.uvue index 0ab931f2..1478b13c 100644 --- a/pages/component/web-view/web-view.uvue +++ b/pages/component/web-view/web-view.uvue @@ -53,9 +53,9 @@ verticalScrollBarAccess: true, // 自动化测试 autoTest: false, - eventLoading: null, - eventLoad: null, - eventError: null + eventLoading: null as UTSJSONObject | null, + eventLoad: null as UTSJSONObject | null, + eventError: null as UTSJSONObject | null } }, onReady() { -- GitLab