效果图
HTML代码
<view> <view> <view bindtap='okCutImg'>开始裁剪</view> <view bindtap='clickUpImg'>点击上传图片</view> <view bindtap='okBtn'>点击确认</view> </view> <!-- 选择裁剪模式 --> <view wx:if='{{alreay}}'> <view bindtap='etcType'> 等屏裁剪 </view> <view bindtap='areaType'> 区域裁剪 </view> </view> <view wx:if='{{!cutType && alreay}}'> <slider bindchange="areaChange" min="50" max="100" show-value value='{{propor}}'/> </view> <view wx:if='{{!prienFlag}}'> <view> <image src="http://www.likecs.com/{{cutImgUrl}}" mode='widthFix'></image> </view> <view bindtap='againBtn'>重新裁剪</view> </view> <view wx:if='{{prienFlag}}' > <canvas canvas-id='cutImg' disable-scroll='true' bindtouchmove='canvasMove'></canvas> <view></view> </view> </view>