Pārlūkot izejas kodu

fix:修改黑胶获取相册的报错问题

zeng.chen 7 mēneši atpakaļ
vecāks
revīzija
4351397073

+ 1 - 1
pages/components/image-cropper/image-cropper.js

@@ -290,7 +290,7 @@ Component({
                 sourceType: ['album'],
                 // camera: 'back',
                 success(res) {
-                    const tempFilePaths = res.tempFilePaths[0];
+                    const tempFilePaths = res.tempFiles[0].tempFilePath;
                     that.pushImg(tempFilePaths);
                     wx.showLoading({
                         title: '加载中...'

+ 1 - 1
pages/piano/cropper/cropper.js

@@ -249,7 +249,7 @@ Page({
     });
   },
   async startImage(imageBuffer) {
-    this.sliceDataIntoChunks(imageBuffer, 16);
+    this.sliceDataIntoChunks(imageBuffer, 32);
 
     BtHelper.sendCallBack(BtCmd.wallPaper(1), function (res) {
       if (!res) {