flat: 修改传说中的Attachment
This commit is contained in:
@@ -25,7 +25,7 @@ export async function uploadFile(file) {
|
|||||||
}
|
}
|
||||||
header[website.tokenName] = "bearer " + token
|
header[website.tokenName] = "bearer " + token
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: `${baseUrl}/api/jobslink-api/resource/file/save?bussinessType=5`,
|
url: `${baseUrl}/api/jobslink-api/resource/file/upload/file?bussinessType=5`,
|
||||||
header,
|
header,
|
||||||
filePath: file.url,
|
filePath: file.url,
|
||||||
// formData: formdata,
|
// formData: formdata,
|
||||||
@@ -36,7 +36,7 @@ export async function uploadFile(file) {
|
|||||||
}) => {
|
}) => {
|
||||||
const resp = JSON.parse(data)
|
const resp = JSON.parse(data)
|
||||||
if (statusCode === 200 && resp.code === 200) {
|
if (statusCode === 200 && resp.code === 200) {
|
||||||
resolve(resp.msg)
|
resolve(resp)
|
||||||
} else {
|
} else {
|
||||||
reject(new Error('数据异常'))
|
reject(new Error('数据异常'))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ module.exports = {
|
|||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
return {
|
return {
|
||||||
'{oss_file_url}': 'https://dy12333.org.cn/api',
|
'{oss_file_url}': 'https://dy12333.org.cn/api',
|
||||||
'http://10.165.0.173:8000/jobslink-api/front/file': 'https://dy12333.org.cn/api/jobslink-api/front/file'
|
"http://10.165.0.173:8000": "https://dy12333.org.cn/api"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
'{oss_file_url}': 'https://dy12333.org.cn/api',
|
'{oss_file_url}': 'https://dy12333.org.cn/api',
|
||||||
'http://10.165.0.173:8000/jobslink-api/front/file': 'https://dy12333.org.cn/api/jobslink-api/front/file'
|
"http://10.165.0.173:8000": "https://dy12333.org.cn/api"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})()
|
})()
|
||||||
|
|||||||
@@ -103,7 +103,8 @@
|
|||||||
companyTid: {
|
companyTid: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入统一信用代码',
|
max: 18,
|
||||||
|
message: '请输入18位统一信用代码',
|
||||||
trigger: ['change']
|
trigger: ['change']
|
||||||
},
|
},
|
||||||
masterName: {
|
masterName: {
|
||||||
@@ -251,6 +252,7 @@
|
|||||||
}
|
}
|
||||||
let resData = await getInviteCompanyAuthInfo(params)
|
let resData = await getInviteCompanyAuthInfo(params)
|
||||||
if (resData.data.code === 200) {
|
if (resData.data.code === 200) {
|
||||||
|
console.log(resData.data.data)
|
||||||
this.formData = {
|
this.formData = {
|
||||||
...resData.data.data,
|
...resData.data.data,
|
||||||
nature: String(resData.data.data.nature),
|
nature: String(resData.data.data.nature),
|
||||||
|
|||||||
@@ -39,7 +39,15 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
ImgUrl(val) {
|
ImgUrl(val) {
|
||||||
return this.value ? [this.value] : []
|
if (this.value) {
|
||||||
|
const url = this.value.split('|')
|
||||||
|
return [{
|
||||||
|
name: 'img',
|
||||||
|
url: url[url.length - 1]
|
||||||
|
}]
|
||||||
|
} else {
|
||||||
|
return []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -49,7 +57,13 @@
|
|||||||
name
|
name
|
||||||
}) {
|
}) {
|
||||||
// this.$emit("input", file);
|
// this.$emit("input", file);
|
||||||
uploadFile(file).then((url) => {
|
uploadFile(file).then((fileObj) => {
|
||||||
|
const {
|
||||||
|
id,
|
||||||
|
path
|
||||||
|
} = fileObj.data
|
||||||
|
const url = `${id}|${path}$`
|
||||||
|
console.log(url)
|
||||||
this.$emit("input", url);
|
this.$emit("input", url);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user