From b2002f3d9266f704c6ceaa4b63787574d1e63d3f Mon Sep 17 00:00:00 2001 From: ShenQiLun <97694732@qq.com> Date: Thu, 25 Jun 2026 18:09:45 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=E7=94=A8takePhoto=E5=85=A8?= =?UTF-8?q?=E5=88=86=E8=BE=A8=E7=8E=87+plus.zip=E8=A3=81=E5=89=AA=E7=BC=A9?= =?UTF-8?q?=E6=94=BE1080=C3=971080,=E6=B8=85=E6=99=B0=E5=BA=A6=E6=8F=90?= =?UTF-8?q?=E5=8D=87"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 8cc78be15dfc343977c5f37dea13ef9ebf608ffa. --- pages/upload/camera_capture.nvue | 41 ++------------------------------ 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/pages/upload/camera_capture.nvue b/pages/upload/camera_capture.nvue index 42b099f..2a64b78 100644 --- a/pages/upload/camera_capture.nvue +++ b/pages/upload/camera_capture.nvue @@ -130,7 +130,7 @@ uni.showToast({ title: '相机未就绪', icon: 'none' }) return } - this.$refs.cameraRef.takePhoto() + this.$refs.cameraRef.takePhotoSnapshot() }, onPictureTaken(e) { var path = '' @@ -138,46 +138,9 @@ path = e.detail.path || '' } if (path) { - this.resizeTo1080(path) + this.capturedList.push(path) } }, - // 居中裁剪为 1080×1080 - resizeTo1080(srcPath) { - var that = this - uni.getImageInfo({ - src: srcPath, - success: function(info) { - var w = info.width - var h = info.height - var size = Math.min(w, h) - var clipX = Math.floor((w - size) / 2) - var clipY = Math.floor((h - size) / 2) - plus.zip.compressImage({ - src: srcPath, - dst: '_doc/sq_' + Date.now() + '.jpg', - width: '1080', - height: '1080', - quality: 95, - overwrite: true, - clip: { - x: clipX, - y: clipY, - width: size, - height: size - } - }, - function(res) { - that.capturedList.push(res.target) - }, - function() { - that.capturedList.push(srcPath) - }) - }, - fail: function() { - that.capturedList.push(srcPath) - } - }) - }, flipCamera() { this.facing = this.facing === 'back' ? 'front' : 'back' this.$refs.cameraRef.changeFacing(this.facing)