Commit 6114c4a8 by 陈玉桐

fix

parent 82f1b0b4
......@@ -468,27 +468,25 @@ export default {
var u = navigator.userAgent, app = navigator.appVersion;
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
// if (isiOS) {
me.option.img = res.localIds[0]
me.cropperShow = true
// me.uploadPic = res.localIds[0] // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
// }else{
// wx.getLocalImgData({
// localId: res.localIds[0], // 图片的localID
// success: function (res) {
// console.log(res.localData)
// if (res.localData.substr(0, 5) != 'data:') {
// // me.uploadPic = 'data:image;base64,' + res.localData
wx.getLocalImgData({
localId: res.localIds[0], // 图片的localID
success: function (res) {
console.log(res.localData)
if (res.localData.substr(0, 5) != 'data:') {
// me.uploadPic = 'data:image;base64,' + res.localData
// me.option.img = 'data:image;base64,' + res.localData
// me.cropperShow = true
// }else{
// // me.uploadPic = res.localData // localData是图片的base64数据,可以用img标签显示
me.option.img = 'data:image;base64,' + res.localData
me.cropperShow = true
}else{
// me.uploadPic = res.localData // localData是图片的base64数据,可以用img标签显示
// me.option.img = res.localData
// me.cropperShow = true
// }
// }
// })
me.option.img = res.localData
me.cropperShow = true
}
}
})
// }
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment