Commit dea97a36 authored by zhangyanni's avatar zhangyanni

个人认证掉两次接口

parent f49a419e
......@@ -95,6 +95,7 @@
components: {
sliderCmpt
},
props:['ruleFormInfo'],
data() {
return {
ruleForm: {
......@@ -142,7 +143,6 @@
isShowErrorText4: false,
isShowErrorText5: false,
uploadDisabled: false,//是否禁用上传图片
detailInfo: "",
disabledFlag:0,
isSendPcCode:false
}
......@@ -365,39 +365,24 @@
//获取用户信息
getUserInfoFunc() {
this.userInfo = window.sessionStorage.getItem("userInfo") ? JSON.parse(this.Base64.decode(window.sessionStorage.getItem("userInfo"))) : "";
},
//初始化获取个人认证信息
getInitData() {
var that = this;
api.getAuthInfoAxios().then((res) => {
if (res.code == 0) {
that.detailInfo = res.result;
// if(res.result.empName!=null&&res.result.companyName!=null&&res.result.companyEmail!=null&&res.result.empDeptName!=null&&res.result.empPosition!=null&&res.result.empCardUrl!=null){
// window.sessionStorage.setItem("userInfo",that.Base64.encode(JSON.stringify(that.detailInfo)));
// }
that.ruleForm.empName = publicFunc.isNull(res.result.empName);
that.ruleForm.companyName = publicFunc.isNull(res.result.companyName);
that.ruleForm.companyEmail = publicFunc.isNull(res.result.companyEmail);
that.ruleForm.empDeptName = publicFunc.isNull(res.result.empDeptName);
that.ruleForm.empPosition = publicFunc.isNull(res.result.empPosition);
that.ruleForm.empCardUrl = publicFunc.isNull(res.result.empCardUrl);
that.isTrueEmail(that.ruleForm.companyEmail);
if (res.result.empCardUrl) {
that.fileList.push({url: res.result.empCardUrl});
that.flag = 2;
}
} else {
that.$message.error(res.msg);
}
})
},
var data = this.ruleFormInfo;
this.ruleForm.empName = publicFunc.isNull(data.empName);
this.ruleForm.companyName = publicFunc.isNull(data.companyName);
this.ruleForm.companyEmail = publicFunc.isNull(data.companyEmail);
this.ruleForm.empDeptName = publicFunc.isNull(data.empDeptName);
this.ruleForm.empPosition = publicFunc.isNull(data.empPosition);
this.ruleForm.empCardUrl = publicFunc.isNull(data.empCardUrl);
this.isTrueEmail(this.ruleForm.companyEmail);
if (data.empCardUrl) {
this.fileList.push({url: data.empCardUrl});
this.flag = 2;
}
}
},
mounted() {
this.getUserInfoFunc();
this.getInitData();
globalMsg.$on("isSendCode",(data,which)=>{
if(data&&which==10){
this.isSendPcCode = true;
......
......@@ -65,9 +65,9 @@
dialogImageUrl: "",
dialogVisible: false,
userInfo:"",
detailInfo:""
}
},
props:["detailInfo"],
methods:{
//获取用户信息
getUserInfoFunc() {
......@@ -81,19 +81,6 @@
this.$emit("edit");
},
//初始化获取个人认证信息
getInitData(){
var that = this;
api.getAuthInfoAxios().then((res)=>{
if(res.code==0){
that.detailInfo = res.result;
that.$emit("sendDetailInfo",res.result);
}else{
that.$message.error(res.msg);
}
})
},
//查看图片
handleImg(){
this.dialogVisible = true;
......@@ -102,7 +89,6 @@
},
mounted(){
this.getUserInfoFunc();
this.getInitData();
}
}
</script>
......
......@@ -22,8 +22,8 @@ white-space:nowrap;" v-if="detailInfo.auditState=='AS04'" :title="$t('commonTit
<el-tag type="warning" style="width: 100%;" v-if="detailInfo.auditState=='AS02'">{{$t('commonTitle.auditingAuth')}}<span
class="tag-btn" @click="handleIndex">{{userInfo.empType==0?$t('commonTitle.sendProject'):$t('commonTitle.sendRequire')}}</span></el-tag>
<el-tag type="warning" style="width: 100%;" v-if="detailInfo.auditState=='AS01'">{{$t('personalAuth.notAuthTitle')}}</el-tag>
<personalAuthCmpt @authSuccess="authSuccess" v-if="isEdit"></personalAuthCmpt>
<personalAuthDetailCmpt v-if="!isEdit" @sendDetailInfo="sendDetailInfo" @edit="handleEdit"></personalAuthDetailCmpt>
<personalAuthCmpt :ruleFormInfo="detailInfo" @authSuccess="authSuccess" v-if="isEdit&&detailInfo"></personalAuthCmpt>
<personalAuthDetailCmpt :detailInfo="detailInfo" v-if="!isEdit" @sendDetailInfo="sendDetailInfo" @edit="handleEdit"></personalAuthDetailCmpt>
</div>
</el-tab-pane>
<el-tab-pane :label="$t('personalAuth.modifyPwd')" name="second">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment