@ -37,6 +37,19 @@ Page({
actived:e.target.dataset.index
})
},
handleUpdateImage(){
wx.chooseMedia({
count: 1,
mediaType: ['image'],
sourceType: ['album', 'camera'],
maxDuration: 30,
camera: 'back',
success(res) {
console.log('获取上传数据:',res)
// 调用上传接口
}
@ -10,7 +10,9 @@
<view class="" style="margin-top: 16px;">
<image src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/my_uploadphotos.svg"
mode="widthFix"
style="width: 72px;height: 72px;" />
style="width: 72px;height: 72px;"
bind:tap="handleUpdateImage"
/>
</view>
<view style="margin-top: 8px;font-size: 12px;color: #999999;">
上传照片截图,最多传4张(选填)