From b7f74f92e7a82c20759e6dbf895b3a68ada4132e Mon Sep 17 00:00:00 2001 From: yinjiacheng Date: Fri, 10 May 2024 20:04:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0media=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 48 +++++++ pages/API/compress-image/compress-image.uvue | 134 ++++++++++++++++++ pages/API/get-image-info/get-image-info.uvue | 85 +++++++++++ pages/API/get-video-info/get-video-info.uvue | 57 ++++++++ .../save-image-to-photos-album.uvue | 17 ++- .../save-video-to-photos-album.uvue | 67 +++++++++ pages/tabBar/API.uvue | 32 ++++- 7 files changed, 437 insertions(+), 3 deletions(-) create mode 100644 pages/API/compress-image/compress-image.uvue create mode 100644 pages/API/get-image-info/get-image-info.uvue create mode 100644 pages/API/get-video-info/get-video-info.uvue create mode 100644 pages/API/save-video-to-photos-album/save-video-to-photos-album.uvue diff --git a/pages.json b/pages.json index 86d79ec9..ddaad60e 100644 --- a/pages.json +++ b/pages.json @@ -618,6 +618,54 @@ "navigationBarTitleText": "图片" } }, + // #ifdef APP-ANDROID + { + "path" : "pages/API/get-image-info/get-image-info", + "style" : + { + "navigationBarTitleText" : "获取图片信息" + } + }, + { + "path" : "pages/API/compress-image/compress-image", + "style" : + { + "navigationBarTitleText" : "压缩图片" + } + }, + // #endif + // #ifdef APP + // { + // "path" : "pages/API/choose-video/choose-video", + // "style" : + // { + // "navigationBarTitleText" : "拍摄视频或从相册中选择视频" + // } + // }, + { + "path" : "pages/API/save-video-to-photos-album/save-video-to-photos-album", + "style" : + { + "navigationBarTitleText" : "保存视频到相册" + } + }, + // #endif + // #ifdef APP-ANDROID + { + "path" : "pages/API/get-video-info/get-video-info", + "style" : + { + "navigationBarTitleText" : "获取视频信息" + } + }, + // { + // "path" : "pages/API/compress-video/compress-video", + // "style" : + // { + // "navigationBarTitleText" : "压缩视频" + // } + // }, + // #endif { "path": "pages/API/get-network-type/get-network-type", "style": { diff --git a/pages/API/compress-image/compress-image.uvue b/pages/API/compress-image/compress-image.uvue new file mode 100644 index 00000000..3092d688 --- /dev/null +++ b/pages/API/compress-image/compress-image.uvue @@ -0,0 +1,134 @@ + + + + + diff --git a/pages/API/get-image-info/get-image-info.uvue b/pages/API/get-image-info/get-image-info.uvue new file mode 100644 index 00000000..152bbd94 --- /dev/null +++ b/pages/API/get-image-info/get-image-info.uvue @@ -0,0 +1,85 @@ + + + + + diff --git a/pages/API/get-video-info/get-video-info.uvue b/pages/API/get-video-info/get-video-info.uvue new file mode 100644 index 00000000..18095fa9 --- /dev/null +++ b/pages/API/get-video-info/get-video-info.uvue @@ -0,0 +1,57 @@ + + + + + diff --git a/pages/API/save-image-to-photos-album/save-image-to-photos-album.uvue b/pages/API/save-image-to-photos-album/save-image-to-photos-album.uvue index da079fcc..69321ff1 100644 --- a/pages/API/save-image-to-photos-album/save-image-to-photos-album.uvue +++ b/pages/API/save-image-to-photos-album/save-image-to-photos-album.uvue @@ -2,8 +2,11 @@ - - + + + + + @@ -13,6 +16,7 @@ export default { data() { return { + title: "saveImageToPhotosAlbum" } }, methods: { @@ -39,4 +43,13 @@ diff --git a/pages/API/save-video-to-photos-album/save-video-to-photos-album.uvue b/pages/API/save-video-to-photos-album/save-video-to-photos-album.uvue new file mode 100644 index 00000000..8bc25ff5 --- /dev/null +++ b/pages/API/save-video-to-photos-album/save-video-to-photos-album.uvue @@ -0,0 +1,67 @@ + + + + + diff --git a/pages/tabBar/API.uvue b/pages/tabBar/API.uvue index cbe5010e..0178847e 100644 --- a/pages/tabBar/API.uvue +++ b/pages/tabBar/API.uvue @@ -334,7 +334,7 @@ name: '媒体', pages: [ { - name: "拍照和相册选择", + name: "拍摄图片或从相册中选择图片", url: 'choose-image' }, { @@ -348,6 +348,36 @@ url: 'save-image-to-photos-album' }, // #endif + // #ifdef APP-ANDROID + { + name: "获取图片信息", + url: 'get-image-info' + }, + { + name: "压缩图片", + url: 'compress-image' + }, + // #endif + // #ifdef APP + // { + // name: "拍摄视频或从相册中选择视频", + // url: 'choose-video' + // }, + { + name: "保存视频到相册", + url: 'save-video-to-photos-album' + }, + // #endif + // #ifdef APP-ANDROID + { + name: "获取视频信息", + url: 'get-video-info' + }, + // { + // name: "压缩视频", + // url: 'compress-video' + // }, + // #endif /* { name: "图片选择和拍照", url: "image", -- GitLab