|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="clearfix">
|
|
|
<a-upload
|
|
|
- action="action"
|
|
|
+ :action="action"
|
|
|
listType="picture-card"
|
|
|
:fileList="fileList"
|
|
|
@change="handleChange"
|
|
@@ -21,13 +21,13 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { uploadFile } from '@/api/upms/file'
|
|
|
+import { uploadFileSpare } from '@/api/upms/file'
|
|
|
export default {
|
|
|
name: 'UploadSpareImg',
|
|
|
data () {
|
|
|
return {
|
|
|
previewVisible: false,
|
|
|
- action: process.env.VUE_APP_API_BASE_URL + '/upms/files/upload',
|
|
|
+ action: '/upms/files/upload/spare',
|
|
|
maxSize: 1,
|
|
|
previewImage: '',
|
|
|
fileList: []
|
|
@@ -54,7 +54,7 @@ export default {
|
|
|
formData.append('file', data.file)
|
|
|
data.onProgress()
|
|
|
const that = this
|
|
|
- uploadFile(formData).then(res => {
|
|
|
+ uploadFileSpare(formData).then(res => {
|
|
|
data.onSuccess()
|
|
|
that.fileList.push({
|
|
|
uid: '-1',
|