<NME> normal.js
<BEF> import WeCropper from '../we-cropper/we-cropper.js'
const device = wx.getSystemInfoSync()

Page({
  data: {
    cropperOpt: {
      id: 'cropper',
      targetId: 'targetCropper',
      pixelRatio: device.pixelRatio,
      width: device.windowWidth,
      height: device.windowWidth,
      scale: 2.5,
      zoom: 8
    }
  },
  removeImage () {
    this.cropper.removeImage()
  },
  touchStart (e) {
    this.cropper.touchStart(e)
  },
  },
  getCropperImage () {
    this.wecropper.getCropperImage(src => {
      wx.previewImage({
        current: '', // 当前显示图片的http链接
        urls: [src] // 需要预览的图片http链接列表
      })
    })
  },
  uploadTap () {
        wx.previewImage({
          current: '', // 当前显示图片的http链接
          urls: [path] // 需要预览的图片http链接列表
        })
      }
    })
  },
  uploadTap () {
    const self = this

    wx.chooseImage({
      count: 1, // 默认9
      sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
      sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
      success (res) {
        const src = res.tempFilePaths[0]

        self.cropper.pushOrign(src)
      }
    })
  },
  onLoad (option) {
    const { cropperOpt } = this.data

    this.cropper = new WeCropper(cropperOpt)
      .on('ready', function (ctx) {
        console.log(`wecropper is ready for work!`)
      })
      .on('beforeImageLoad', (ctx) => {
        console.log(`before picture loaded, i can do something`)
        console.log(`current canvas context:`, ctx)
        wx.showToast({
          title: '上传中',
          icon: 'loading',
          duration: 20000
        })
      })
      .on('imageLoad', (ctx) => {
        console.log(`picture loaded`)
        console.log(`current canvas context:`, ctx)
        wx.hideToast()
      })
  }
})

<MSG> update

<DFF> @@ -22,10 +22,14 @@ Page({
   },
   getCropperImage () {
     this.wecropper.getCropperImage(src => {
-      wx.previewImage({
-        current: '', // 当前显示图片的http链接
-        urls: [src] // 需要预览的图片http链接列表
-      })
+      if (src) {
+        wx.previewImage({
+          current: '', // 当前显示图片的http链接
+          urls: [src] // 需要预览的图片http链接列表
+        })
+      } else {
+        console.log('获取图片地址失败，请稍后重试')
+      }
     })
   },
   uploadTap () {

update