|
|
|
|
@ -76,6 +76,22 @@ Page({
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
chooseAnImage() {
|
|
|
|
|
const that = this;
|
|
|
|
|
wx.chooseMedia({
|
|
|
|
|
sizeType: ["original"], // 可以指定是原图还是压缩图,默认二者都有
|
|
|
|
|
sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有
|
|
|
|
|
success(res) {
|
|
|
|
|
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
|
|
|
|
console.log(res);
|
|
|
|
|
that.setData({
|
|
|
|
|
files: that.data.files.concat(res.tempFilePaths),
|
|
|
|
|
temporaryImg: res.tempFiles[0].tempFilePath,
|
|
|
|
|
isSure: true,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
changeUserImgsrc: function () {
|
|
|
|
|
var that = this;
|
|
|
|
|
|