- movable-view 动态设值失败
如题 wechatLib 1.9.91 模拟器正常,真机movable-view动态设值失败 <block wx:for="{{cropperMovableItems}}" wx:key="moveItem"> <movable-view class="move_item" style="width:{{data.itemLength}}px; height:{{data.itemLength}}px;" direction="all" x="{{item.x-data.itemLength/2}}" y="{{item.y-data.itemLength/2}}" bindtouchmove="moveEvent" bindtouchend="endEvent" data-key="{{index}}"></movable-view> </block>实际渲染的时候,跟设值有差异,请问是api有什么变动吗?
2018-02-09 - setData image 加载问题
setData image url数组的时候,安卓机器图片加载失败 bindError 报404错误,ios 暂未发现 <image mode="scaleToFill" binderror="errorImg" data-index="0" src="{{!showImage[0] || showImage[0] === null ?'http://7xl2r0.com1.z0.glb.clouddn.com/passport/idcard.png' : showImage[0] }}" class="front"></image>
2018-02-07 - ios upuploadFile load失败
如题 在选择图片后,调用 loading后 upuploadFile 结果 ios中load状态很快结束 用showToast测试后 同样如此 开始加载页面时单独showLoading没问题 wx.showToast({ title: '图片解析中', icon: 'loading', mask:true, duration: 5000 }); wx.uploadFile({ url: app.globalData.huoLiBase+'upLoadJpg', filePath: that.data.image_photo[0], header: {"Content-Type": "multipart/form-data"}, name: 'passport', // formData: { // // }, success: function (res) { console.log(res); if(res.statusCode !== 200) { // wx.hideLoading(); wx.showModal({ title:'解析出错,请上传符合规格的图片', showCancel:false }); return; } var data = JSON.parse(res.data); if(data.code === 200){ // wx.hideLoading(); data.object.huIssueplace=that.parsePlace(data.object.huIssueplace); wx.redirectTo({ url:'../addpassport/addpassport?isScanning=true&passport='+JSON.stringify(data.object) }); }else{ // wx.hideLoading(); wx.showModal({ title:'解析出错,请上传符合规格的图片', showCancel:false }) } }, fail:function(err){ // wx.hideLoading(); } })
2017-09-20 - wx.chooseImage fail cancle 问题
之前选择图片上传一直没问题,突然发现安卓调出现 fail cancle //图片选择 showAction:function(){ var that=this; wx.showActionSheet({ itemList: ['拍照', '从手机相册选择'], success: function(res) { console.log(res); if(res.tapIndex == 0){ that.setData({ sourceType:['camera'] }) }else if(res.tapIndex == 1){ that.setData({ sourceType:['album'] }) } that.choice(); }, fail: function(res) { } }) }, choice: function () { var that = this; var sourceType=this.data.sourceType; wx.showModal({ content:'3' }); wx.chooseImage({ count: 1, // 默认9 sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 sourceType:sourceType, // 可以指定来源是相册还是相机,默认二者都有 success: function (res) { // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 var tempFilePaths = res.tempFilePaths; wx.showModal({ content:JSON.stringify(res) }); that.setData({ image_photo: tempFilePaths }); wx.showModal({ content:tempFilePaths[0] }); that.uploadPhoto(); }, fail:function(res){ wx.showModal({ content:JSON.stringify(res) }); }, complete:function(res){ wx.showModal({ content:JSON.stringify(res) }); } }) },
2017-09-20