init
zhusiyu 3 years ago
parent ce12f4edfd
commit 2a582e7f2b

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

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

Loading…
Cancel
Save