|
@@ -45,7 +45,8 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="测评机构资源" prop="name">
|
|
|
<span v-for="item in authentication.resource" :key="item.id">
|
|
|
- 资源类型: <el-select v-model="item.type" placeholder="请选择" style="width: 150px;margin-bottom: 10px" :value="item.type">
|
|
|
+ 资源类型: <el-select v-model="item.type" placeholder="请选择" style="width: 150px;margin-bottom: 10px"
|
|
|
+ :value="item.type">
|
|
|
<el-option
|
|
|
v-for="item in resourceTypes"
|
|
|
:key="item"
|
|
@@ -81,13 +82,14 @@
|
|
|
import Http from '@/js/http'
|
|
|
import Apis from '@/js/api'
|
|
|
import {notify} from '@/constants/index'
|
|
|
-import {getAllAgencyResourceTypes, getAllServiceTypes} from '@/js/index'
|
|
|
+import {getAllAgencyResourceTypes, getAllServiceTypes, storageGet} from '@/js/index'
|
|
|
|
|
|
export default {
|
|
|
name: 'AgencyAuthentication',
|
|
|
data () {
|
|
|
return {
|
|
|
userId: 0,
|
|
|
+ user: {},
|
|
|
isModifyMode: true,
|
|
|
resourceTypes: [],
|
|
|
serviceTypes: [],
|
|
@@ -132,6 +134,7 @@ export default {
|
|
|
init () {
|
|
|
this.setServiceTypes()
|
|
|
this.setResourceTypes()
|
|
|
+ this.setUserInfo()
|
|
|
},
|
|
|
//加载数据
|
|
|
loadData: function () {
|
|
@@ -152,7 +155,7 @@ export default {
|
|
|
resources: this.authentication.resource,
|
|
|
agencyPhoto: this.authentication.photoUrl,
|
|
|
}
|
|
|
- Http.post(Apis.USER.AGENCY_AUTHENTICATION.replace('{userId}', 3), newAuthentication).then((res) => {
|
|
|
+ Http.post(Apis.USER.SUBMIT_AGENCY_AUTHENTICATION_INFO.replace('{userId}', this.user.userVO.id), newAuthentication).then((res) => {
|
|
|
console.log(res)
|
|
|
notify('success', '认证信息上传成功')
|
|
|
}).catch(error => {
|
|
@@ -190,7 +193,7 @@ export default {
|
|
|
headers: {'Content-Type': 'multipart/form-data'},
|
|
|
}
|
|
|
formData.append('file', param.file)
|
|
|
- Http.upload(Apis.FILE.UPLOAD_IMAGE.replace('{userId}', 3), formData, config).then((res) => {
|
|
|
+ Http.upload(Apis.FILE.UPLOAD_IMAGE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
|
|
|
console.log('上传成功')
|
|
|
this.authentication.photoUrl = res.data
|
|
|
console.log(res.data)
|
|
@@ -246,6 +249,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return true
|
|
|
+ },
|
|
|
+ //
|
|
|
+ setUserInfo () {
|
|
|
+ this.user = storageGet('user')
|
|
|
}
|
|
|
},
|
|
|
created: function () {
|