3,154
社区成员




addphoto: function(){
console.log('addphoto');
var that = this;
wx.chooseImage({
count: 9,
sizeType: ['original', 'compressed'],
success: function (res) {
console.log(res);
var tempFilePaths = res.tempFilePaths;
console.log(res.tempFilePaths);
// for (var i = 0; i <= tempFilePaths.length; i++){
// that.setData({ imageList: tempFilePaths[i] });
// }
that.setData({ imageList: tempFilePaths[0] });
}\
<view class='separator'></view>
<view class='floortitle'>
<view class='floortitlecolor'></view>
<view class='floortitleinformation'>相册</view>
<button class='addphoto' bindtap='addphoto' size='mini' type='primary'>添加图片</button>
</view>
<view class='photo'><image class='images' src='{{imageList}}'></image></view>