diff --git a/src/views/screenAdaptation/pages/homePages/menuTop/personInfo.vue b/src/views/screenAdaptation/pages/homePages/menuTop/personInfo.vue index 2c44b98..6ccce56 100644 --- a/src/views/screenAdaptation/pages/homePages/menuTop/personInfo.vue +++ b/src/views/screenAdaptation/pages/homePages/menuTop/personInfo.vue @@ -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 diff --git a/src/views/screenAdaptation/pages/homePages/menuTop/personMsgModal.vue b/src/views/screenAdaptation/pages/homePages/menuTop/personMsgModal.vue index a76d076..af800a6 100644 --- a/src/views/screenAdaptation/pages/homePages/menuTop/personMsgModal.vue +++ b/src/views/screenAdaptation/pages/homePages/menuTop/personMsgModal.vue @@ -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