import request from '../utils/request.js' class uploadImg extends request { static async uploadCommentImgs(tempFilePaths) { wx.showLoading({ title: '上传图片中...', mask: true }); const res = await request.upload(`${this.BASE_URL}Common/upload`, 'image', tempFilePaths) wx.hideLoading() return res.data.url } static async uploadAvatar(tempFilePaths) { wx.showLoading({ title: '上传图片中...', mask: true }); const res = await request.upload(`${this.BASE_URL}Common/upload`, 'image', tempFilePaths) wx.hideLoading() return res.data.url } } export default uploadImg