wxml: <view bindtap=“cimng” class=“img”></view>
wxss:
.img{
width: 500rpx;
height: 500rpx;
background: red
}
js:
cimng: function () {
wx.chooseImage({
count: 0,
sizeType: [],
sourceType: [],
success: function (res) {
wx.showModal({
title: ‘’,
content: ‘ok’,
showCancel: true,
cancelText: ‘’,
cancelColor: ‘’,
confirmText: ‘’,
confirmColor: ‘’,
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
console.log(111)
},
fail: function (res) { },
complete: function (res) { },
})
},