module.exports = {
    selectPhotos: function(e, s, o) {
        getApp().globalData.no_clear=1;
        if (void 0 === e[s]) {
            var c = 5 - e.length;
            c > 0 && wx.chooseImage({
                count: c,
                sizeType: [ "compressed" ],
                sourceType: [ "camera", "album" ],
                success: function(s) {
                    e = e.concat(s.tempFilePaths), o(e);
                }
            });
        } else wx.chooseImage({
            count: 1,
            sizeType: [ "compressed" ],
            sourceType: [ "camera", "album" ],
            success: function(c) {
                e[s] = c.tempFilePaths[0], o(e);
            }
        });
    },
    removePhoto: function(e, s, o) {
        if (void 0 !== e[s]) {
            wx.showModal({
                title: "确定删除该图片？",
                success: function(c) {
                    c.confirm && (e.splice(s, 1), o(e));
                }
            });
        } else o(e);
    }
};