init
zhusiyu 3 years ago
parent ce12f4edfd
commit 2a582e7f2b

@ -50,13 +50,18 @@
this.isPartyCenter = false this.isPartyCenter = false
} }
}, },
// visible(newVal) {
// if (newVal) {
// this.getPersonInfo()
// }
// },
}, },
created() { created() {
this.getHref() this.getHref()
}, },
methods: { methods: {
// //
getPersonInfo() { getPersonInfoFn() {
let params = { let params = {
person_id: this.$store.state.userStore.user.personId, person_id: this.$store.state.userStore.user.personId,
identity_id: this.BaseConfig.userInfo.identity_id, identity_id: this.BaseConfig.userInfo.identity_id,
@ -96,7 +101,7 @@
}, },
//modal //modal
showMessage() { showMessage() {
this.getPersonInfo() this.getPersonInfoFn()
this.visible = true this.visible = true
}, },
//modal //modal

@ -99,6 +99,13 @@
idPhotoJson: {}, idPhotoJson: {},
} }
}, },
watch: {
visible(newVal) {
if (newVal) {
this.getModifyPhoto()
}
},
},
components: { components: {
AModal: Modal, AModal: Modal,
ARow: Row, ARow: Row,
@ -115,7 +122,6 @@
}, },
mounted() { mounted() {
this.getPersonTx() this.getPersonTx()
this.getModifyPhoto()
}, },
methods: { methods: {
cancelModal() { cancelModal() {
@ -174,17 +180,10 @@
}, },
// //
savePersonIDPhoto(val) { savePersonIDPhoto(val) {
// console.log('val', val) // let targetUrl = val.file//List[val.fileList.length - 1]
// console.log('fileIDPhoto', this.fileIDPhoto) // this.$refs.modifyPhoto.src = targetUrl.thumbUrl
// let param = { console.log('val', val)
// name: this.name, // if (val.file.percent === 100 && val.event) {
// key: this.key,
// chunk: 0,
// chunks: 1,
// file: this.file,
// }
let targetUrl = val.fileList[val.fileList.length - 1]
this.$refs.modifyPhoto.src = targetUrl.thumbUrl
let param = { let param = {
person_id: this.BaseConfig.userInfo.person_id,//ID person_id: this.BaseConfig.userInfo.person_id,//ID
identity_id: this.BaseConfig.userInfo.identity_id,//"ID identity_id: this.BaseConfig.userInfo.identity_id,//"ID
@ -197,13 +196,22 @@
method: InterConfig.savePersonIDPhoto.method, method: InterConfig.savePersonIDPhoto.method,
isTestLogin: InterConfig.savePersonIDPhoto.isTestLogin, isTestLogin: InterConfig.savePersonIDPhoto.isTestLogin,
}], (result) => { }], (result) => {
// console.log('', result) console.log('修改证件照', param)
if (result[0].data.code === 2000 && val.file.percent === 100 && !val.event) { // if (result[0].data.code === 2000 && val.file.percent === 100 && !val.event) {
if (result[0].data.code === 2000) {
message.success('修改成功') message.success('修改成功')
} else if (result[0].data.code !== 2000) { } else if (result[0].data.code !== 2000) {
message.error('修改失败') message.error('修改失败')
} }
}) })
// }
// let param = {
// name: this.name,
// key: this.key,
// chunk: 0,
// chunks: 1,
// file: this.file,
// }
}, },
// //
getPersonTx() { getPersonTx() {
@ -228,6 +236,7 @@
}, },
// //
setPersonTx(val) { setPersonTx(val) {
console.log('huan', val)
this.txfull = true this.txfull = true
let targetUrl = val.fileList[val.fileList.length - 1] let targetUrl = val.fileList[val.fileList.length - 1]
this.$refs.imgChange.src = targetUrl.thumbUrl this.$refs.imgChange.src = targetUrl.thumbUrl

Loading…
Cancel
Save