diff --git a/pages/API/get-video-info/get-video-info.test.js b/pages/API/get-video-info/get-video-info.test.js index d0b3d657e4704bd0e109d07be3cb17d88a6148e2..b74fcfa54d81a053d5ee2fcf2da563f3e359e001 100644 --- a/pages/API/get-video-info/get-video-info.test.js +++ b/pages/API/get-video-info/get-video-info.test.js @@ -1,6 +1,10 @@ // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ describe('API-getVideoInfo', () => { - if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) { + if ( + process.env.uniTestPlatformInfo.startsWith('web') || + process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios') || + process.env.uniTestPlatformInfo.toLowerCase().startsWith('mp') + ) { // web平台在自动化测试场景下API调用失败 it('pass', async () => { expect(1).toBe(1); diff --git a/pages/API/get-video-info/get-video-info.uvue b/pages/API/get-video-info/get-video-info.uvue index 431c9a739d1d136dedae74d2fe113939f5f5ed3a..d368b031ea9cadfb7626b33a32f065eabbba81dc 100644 --- a/pages/API/get-video-info/get-video-info.uvue +++ b/pages/API/get-video-info/get-video-info.uvue @@ -3,13 +3,6 @@ - - - 获取本地相对路径视频信息 - - - {{relativeVideoInfo}} - 获取本地绝对路径视频信息 @@ -19,7 +12,16 @@ - + + + + + 获取本地相对路径视频信息 + + + {{relativeVideoInfo}} + + @@ -38,7 +40,8 @@ videoInfoForTest: null as UTSJSONObject | null } }, - onReady() { + onReady() { + // #ifndef MP uni.getVideoInfo({ src: this.relativeVideoPath, success: (res) => { @@ -52,7 +55,8 @@ showCancel: false }); } - }); + }); + // #endif }, methods: { chooseVideo() {