| @@ -45,6 +45,14 @@ export function base64Upload(data) { | |||||
| data: data | data: data | ||||
| }) | }) | ||||
| } | } | ||||
| //注册 | |||||
| export function attachmentUpload(data) { | |||||
| return request({ | |||||
| url: '/open/attachment/upload', | |||||
| method: 'post', | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| //检索 | //检索 | ||||
| export function realtimeBackList(data) { | export function realtimeBackList(data) { | ||||
| return request({ | return request({ | ||||
| @@ -146,7 +146,7 @@ | |||||
| <script> | <script> | ||||
| import { getCodeImg } from "@/api/login"; | import { getCodeImg } from "@/api/login"; | ||||
| import {base64Upload, realtimeBackList, userRegister,depositList} from "@/api/register/index"; | |||||
| import {attachmentUpload, realtimeBackList, userRegister,depositList} from "@/api/register/index"; | |||||
| import {options} from "@/api/user"; | import {options} from "@/api/user"; | ||||
| export default { | export default { | ||||
| name: "companyRegister", | name: "companyRegister", | ||||
| @@ -285,10 +285,9 @@ export default { | |||||
| forbidClick: true, | forbidClick: true, | ||||
| duration: 0, | duration: 0, | ||||
| }); | }); | ||||
| let params1 = { | |||||
| file:file.content | |||||
| } | |||||
| base64Upload(params1).then((r1) => { | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| attachmentUpload(params1).then((r1) => { | |||||
| this.form.idCardPic = r1.fileName; | this.form.idCardPic = r1.fileName; | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -305,11 +304,9 @@ export default { | |||||
| forbidClick: true, | forbidClick: true, | ||||
| duration: 0, | duration: 0, | ||||
| }); | }); | ||||
| // 此时可以自行将文件上传至服务器 | |||||
| let params1 = { | |||||
| file:file.content | |||||
| } | |||||
| base64Upload(params1).then((r1) => { | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| attachmentUpload(params1).then((r1) => { | |||||
| this.form.accountOpenCert = r1.fileName; | this.form.accountOpenCert = r1.fileName; | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -327,10 +324,9 @@ export default { | |||||
| duration: 0, | duration: 0, | ||||
| }); | }); | ||||
| // 此时可以自行将文件上传至服务器 | // 此时可以自行将文件上传至服务器 | ||||
| let params1 = { | |||||
| file:file.content | |||||
| } | |||||
| base64Upload(params1).then((r1) => { | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| attachmentUpload(params1).then((r1) => { | |||||
| this.form.companyLicense = r1.fileName; | this.form.companyLicense = r1.fileName; | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -145,7 +145,7 @@ | |||||
| <script> | <script> | ||||
| import { getCodeImg } from "@/api/login"; | import { getCodeImg } from "@/api/login"; | ||||
| import {userRegister, base64Upload, realtimeBackList, depositList} from "@/api/register/index"; | |||||
| import {userRegister, attachmentUpload, realtimeBackList, depositList} from "@/api/register/index"; | |||||
| import {deleteUserImg, options, realtimeList} from "@/api/user"; | import {deleteUserImg, options, realtimeList} from "@/api/user"; | ||||
| export default { | export default { | ||||
| name: "userRegister", | name: "userRegister", | ||||
| @@ -270,10 +270,10 @@ export default { | |||||
| forbidClick: true, | forbidClick: true, | ||||
| duration: 0, | duration: 0, | ||||
| }); | }); | ||||
| let params1 = { | |||||
| file:file.content | |||||
| } | |||||
| base64Upload(params1).then((r1) => { | |||||
| console.log(file) | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| attachmentUpload(params1).then((r1) => { | |||||
| this.form.idCardPic = r1.fileName; | this.form.idCardPic = r1.fileName; | ||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -284,10 +284,9 @@ export default { | |||||
| forbidClick: true, | forbidClick: true, | ||||
| duration: 0, | duration: 0, | ||||
| }); | }); | ||||
| let params1 = { | |||||
| file:file.content | |||||
| } | |||||
| base64Upload(params1).then((r1) => { | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| attachmentUpload(params1).then((r1) => { | |||||
| this.form.accountOpenCert = r1.fileName; | this.form.accountOpenCert = r1.fileName; | ||||
| }) | }) | ||||
| }, | }, | ||||