1234567891011121314151617181920212223242526 |
- 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
|