yaozc2021
2025-01-17 38d97370dd055d9df79d56d43b692e62bd018ff6
1
2
3
4
5
6
7
8
9
10
11
import axios from 'axios'
import { getToken } from '@/utils/auth'
 
export function upload(api, file) {
  var data = new FormData()
  data.append('file', file)
  const config = {
    headers: { 'Authorization': getToken() }
  }
  return axios.post(api, data, config)
}