takePhoto function var that = this; wxchooseMedia count 3 sizeType original mediaType image sourceType camera success functionres
您遇到的问题是因为that.data.images
未定义,导致无法进行push
操作。您可以在data
中定义一个空数组images
,然后再进行操作。修改后的代码如下所示:
takePhoto: function() {
var that = this;
wx.chooseMedia({
count: 3,