2.23 更新
This commit is contained in:
@@ -99,84 +99,194 @@ Component({
|
||||
|
||||
console.log("myprofile attached")
|
||||
let _this = this;
|
||||
|
||||
//获得医师身份认证
|
||||
api.getDoctorAuthIden({source: this.data.indentity?1:2}).then(response => {
|
||||
console.log("getDoctorAuthIden: ",response);
|
||||
this.setData({
|
||||
doctorauthiden_data_ready: true,
|
||||
textarea_jianjie: response.data.brief_introduction,
|
||||
textarea_shanchang: response.data.be_good_at,
|
||||
custom_keshi: response.data.department_custom_name,
|
||||
office_phone: response.data.department_custom_mobile,
|
||||
select_keshi_id: response.data.department_custom_id,
|
||||
select_zhicheng_id: response.data.doctor_title,
|
||||
select_province_id: response.data.hospital.province_id,
|
||||
select_city_id: response.data.hospital.city_id,
|
||||
select_county_id: response.data.hospital.county_id,
|
||||
select_yiyuan_id: response.data.hospital.hospital_id,
|
||||
hospital: response.data.hospital,
|
||||
iden_auth_status: response.data.iden_auth_status,
|
||||
avatar_reason: response.data.avatar_reason,
|
||||
department_custom_mobile_reason: response.data.department_custom_mobile_reason,
|
||||
brief_introduction_reason: response.data.brief_introduction_reason,
|
||||
be_good_at_reason: response.data.be_good_at_reason,
|
||||
license_cert_reason: response.data.license_cert_reason,
|
||||
qualification_cert_reason: response.data.qualification_cert_reason,
|
||||
work_cert_reason: response.data.work_cert_reason,
|
||||
department_custom_name_reason: response.data.department_custom_name_reason,
|
||||
});
|
||||
let iden_auth_status = response.data.iden_auth_status;
|
||||
console.log("iden_auth_status: ",iden_auth_status)
|
||||
let iden_auth_status_txt = iden_auth_status == 0?'请完善资料后提交':iden_auth_status == 1?'认证通过': iden_auth_status==2?'资料已提交,审核中':iden_auth_status==3?'认证失败,修改后重新提交':'未认证';
|
||||
|
||||
let iden_auth_disabled = iden_auth_status == 0?false:iden_auth_status == 1?true: iden_auth_status==2?true:iden_auth_status==3?false:true;
|
||||
console.log("iden_auth_disabled: ",iden_auth_disabled)
|
||||
this.setData({
|
||||
iden_auth_status_txt: iden_auth_status_txt,
|
||||
iden_auth_disabled: iden_auth_disabled
|
||||
})
|
||||
if(response.data.license_cert){
|
||||
let img_list = response.data.license_cert.map(item => {
|
||||
let img = {};
|
||||
img.url = item;
|
||||
img.isImg = true;
|
||||
return img;
|
||||
if(!this.data.indentity){
|
||||
api.getIntroduction().then(response => {
|
||||
console.log("getDoctorAuthIden: ",response);
|
||||
this.setData({
|
||||
doctorauthiden_data_ready: true,
|
||||
textarea_jianjie: response.data.brief_introduction,
|
||||
textarea_shanchang: response.data.be_good_at,
|
||||
custom_keshi: response.data.department_custom_name,
|
||||
office_phone: response.data.department_custom_mobile,
|
||||
select_keshi_id: response.data.department_custom_id,
|
||||
select_zhicheng_id: response.data.doctor_title,
|
||||
select_province_id: response.data.hospital.province_id,
|
||||
select_city_id: response.data.hospital.city_id,
|
||||
select_county_id: response.data.hospital.county_id,
|
||||
select_yiyuan_id: response.data.hospital.hospital_id,
|
||||
hospital: response.data.hospital,
|
||||
iden_auth_status: response.data.iden_auth_status,
|
||||
introduction_status: response.data.introduction_status,
|
||||
avatar_reason: response.data.avatar_reason,
|
||||
department_custom_mobile_reason: response.data.department_custom_mobile_reason,
|
||||
brief_introduction_reason: response.data.brief_introduction_reason,
|
||||
be_good_at_reason: response.data.be_good_at_reason,
|
||||
license_cert_reason: response.data.license_cert_reason,
|
||||
qualification_cert_reason: response.data.qualification_cert_reason,
|
||||
work_cert_reason: response.data.work_cert_reason,
|
||||
department_custom_name_reason: response.data.department_custom_name_reason,
|
||||
});
|
||||
let iden_auth_status = response.data.introduction_status;
|
||||
console.log("iden_auth_status: ",iden_auth_status)
|
||||
let iden_auth_status_txt = iden_auth_status == 0?'请完善资料后提交':iden_auth_status == 1?'认证通过': iden_auth_status==2?'资料已提交,审核中':iden_auth_status==3?'认证失败,修改后重新提交':'未认证';
|
||||
|
||||
let iden_auth_disabled = iden_auth_status == 0?false:iden_auth_status == 1?true: iden_auth_status==2?true:iden_auth_status==3?false:true;
|
||||
console.log("iden_auth_disabled: ",iden_auth_disabled)
|
||||
this.setData({
|
||||
iden_auth_status_txt: iden_auth_status_txt,
|
||||
iden_auth_disabled: iden_auth_disabled
|
||||
})
|
||||
if(response.data.license_cert){
|
||||
let img_list = response.data.license_cert.map(item => {
|
||||
let img = {};
|
||||
img.url = item;
|
||||
img.isImg = true;
|
||||
return img;
|
||||
})
|
||||
this.setData({
|
||||
zhiye_file_list: img_list
|
||||
})
|
||||
}
|
||||
if(response.data.qualification_cert){
|
||||
let img_list = response.data.qualification_cert.map(item => {
|
||||
let img = {};
|
||||
img.url = item;
|
||||
img.isImg = true;
|
||||
return img;
|
||||
})
|
||||
this.setData({
|
||||
zige_file_list: img_list
|
||||
})
|
||||
}
|
||||
if(response.data.work_cert){
|
||||
let img_list = response.data.work_cert.map(item => {
|
||||
let img = {};
|
||||
img.url = item;
|
||||
img.isImg = true;
|
||||
return img;
|
||||
})
|
||||
this.setData({
|
||||
zhicheng_file_list: img_list
|
||||
})
|
||||
}
|
||||
let avatar = response.data.avatar;
|
||||
if(avatar){
|
||||
this.setData({
|
||||
"avatar": avatar,
|
||||
is_avatar: true,
|
||||
})
|
||||
}
|
||||
}).catch(errors => {console.error(errors);})
|
||||
api.getIntroReason().then(response=>{
|
||||
//console.log(response.data);
|
||||
if(response.data){
|
||||
this.setData({
|
||||
avatar_reason: response.data.avatar,
|
||||
brief_introduction_reason: response.data.brief_introduction,
|
||||
be_good_at_reason: response.data.be_good_at,
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
this.setData({
|
||||
zhiye_file_list: img_list
|
||||
}else{
|
||||
api.getDoctorAuthIden({source: this.data.indentity?1:2}).then(response => {
|
||||
console.log("getDoctorAuthIden: ",response);
|
||||
this.setData({
|
||||
doctorauthiden_data_ready: true,
|
||||
textarea_jianjie: response.data.brief_introduction,
|
||||
textarea_shanchang: response.data.be_good_at,
|
||||
custom_keshi: response.data.department_custom_name,
|
||||
office_phone: response.data.department_custom_mobile,
|
||||
select_keshi_id: response.data.department_custom_id,
|
||||
select_zhicheng_id: response.data.doctor_title,
|
||||
select_province_id: response.data.hospital.province_id,
|
||||
select_city_id: response.data.hospital.city_id,
|
||||
select_county_id: response.data.hospital.county_id,
|
||||
select_yiyuan_id: response.data.hospital.hospital_id,
|
||||
hospital: response.data.hospital,
|
||||
iden_auth_status: response.data.iden_auth_status,
|
||||
avatar_reason: response.data.avatar_reason,
|
||||
department_custom_mobile_reason: response.data.department_custom_mobile_reason,
|
||||
brief_introduction_reason: response.data.brief_introduction_reason,
|
||||
be_good_at_reason: response.data.be_good_at_reason,
|
||||
license_cert_reason: response.data.license_cert_reason,
|
||||
qualification_cert_reason: response.data.qualification_cert_reason,
|
||||
work_cert_reason: response.data.work_cert_reason,
|
||||
department_custom_name_reason: response.data.department_custom_name_reason,
|
||||
});
|
||||
let iden_auth_status = response.data.iden_auth_status;
|
||||
console.log("iden_auth_status: ",iden_auth_status)
|
||||
let iden_auth_status_txt = iden_auth_status == 0?'请完善资料后提交':iden_auth_status == 1?'认证通过': iden_auth_status==2?'资料已提交,审核中':iden_auth_status==3?'认证失败,修改后重新提交':'未认证';
|
||||
|
||||
let iden_auth_disabled = iden_auth_status == 0?false:iden_auth_status == 1?true: iden_auth_status==2?true:iden_auth_status==3?false:true;
|
||||
console.log("iden_auth_disabled: ",iden_auth_disabled)
|
||||
this.setData({
|
||||
iden_auth_status_txt: iden_auth_status_txt,
|
||||
iden_auth_disabled: iden_auth_disabled
|
||||
})
|
||||
if(response.data.license_cert){
|
||||
let img_list = response.data.license_cert.map(item => {
|
||||
let img = {};
|
||||
img.url = item;
|
||||
img.isImg = true;
|
||||
return img;
|
||||
})
|
||||
this.setData({
|
||||
zhiye_file_list: img_list
|
||||
})
|
||||
}
|
||||
if(response.data.qualification_cert){
|
||||
let img_list = response.data.qualification_cert.map(item => {
|
||||
let img = {};
|
||||
img.url = item;
|
||||
img.isImg = true;
|
||||
return img;
|
||||
})
|
||||
this.setData({
|
||||
zige_file_list: img_list
|
||||
})
|
||||
}
|
||||
if(response.data.work_cert){
|
||||
let img_list = response.data.work_cert.map(item => {
|
||||
let img = {};
|
||||
img.url = item;
|
||||
img.isImg = true;
|
||||
return img;
|
||||
})
|
||||
this.setData({
|
||||
zhicheng_file_list: img_list
|
||||
})
|
||||
}
|
||||
let avatar = response.data.avatar;
|
||||
if(avatar){
|
||||
this.setData({
|
||||
"avatar": avatar,
|
||||
is_avatar: true,
|
||||
})
|
||||
}
|
||||
}).catch(errors => {console.error(errors);})
|
||||
api.getIdenReason().then(response=>{
|
||||
//console.log(response.data);
|
||||
if(response.data){
|
||||
this.setData({
|
||||
avatar_reason: response.data.avatar,
|
||||
department_custom_mobile_reason: response.data.department_custom_mobile,
|
||||
brief_introduction_reason: response.data.brief_introduction,
|
||||
be_good_at_reason: response.data.be_good_at,
|
||||
license_cert_reason: response.data.license_cert,
|
||||
qualification_cert_reason: response.data.qualification_cert,
|
||||
work_cert_reason: response.data.work_cert,
|
||||
department_custom_name_reason: response.data.department_custom_name,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
if(response.data.qualification_cert){
|
||||
let img_list = response.data.qualification_cert.map(item => {
|
||||
let img = {};
|
||||
img.url = item;
|
||||
img.isImg = true;
|
||||
return img;
|
||||
})
|
||||
this.setData({
|
||||
zige_file_list: img_list
|
||||
})
|
||||
}
|
||||
if(response.data.work_cert){
|
||||
let img_list = response.data.work_cert.map(item => {
|
||||
let img = {};
|
||||
img.url = item;
|
||||
img.isImg = true;
|
||||
return img;
|
||||
})
|
||||
this.setData({
|
||||
zhicheng_file_list: img_list
|
||||
})
|
||||
}
|
||||
let avatar = response.data.avatar;
|
||||
if(avatar){
|
||||
this.setData({
|
||||
"avatar": avatar,
|
||||
is_avatar: true,
|
||||
})
|
||||
}
|
||||
}).catch(errors => {console.error(errors);})
|
||||
}
|
||||
//获得医师身份认证getDoctorAuthIden({source: this.data.indentity?1:2})
|
||||
|
||||
|
||||
//加载省份列表
|
||||
api.getAreaProvince().then(response => {
|
||||
@@ -770,6 +880,30 @@ Component({
|
||||
this.setData({ zhuanchang_show: false });
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
handleUpdateIntroduction(){
|
||||
let {avatar,textarea_jianjie,textarea_shanchang}=this.data;
|
||||
let doctor_expertise= this.data.zhuanchang_columns.filter(e => e.is_selected == 1 ).map(e => e.expertise_id);
|
||||
if(!avatar){wx.showToast({title: '请上传头像',icon: "error"});return}
|
||||
if(doctor_expertise.length == 0){wx.showToast({title: '请选择专长',icon: "error"});return}
|
||||
if(!textarea_jianjie){wx.showToast({title: '请输入简介',icon: "error"});return}
|
||||
if(!textarea_shanchang){wx.showToast({title: '请输入擅长',icon: "error"});return}
|
||||
|
||||
api.updateIntroduction({
|
||||
avatar,
|
||||
brief_introduction:textarea_jianjie,
|
||||
be_good_at:textarea_shanchang,
|
||||
doctor_expertise
|
||||
}).then(response=>{
|
||||
wx.showToast({
|
||||
title: '提交成功',
|
||||
icon: "success"
|
||||
})
|
||||
this.setData({
|
||||
introduction_status:2,
|
||||
iden_auth_status_txt: "资料已提交,审核中"
|
||||
})
|
||||
})
|
||||
},
|
||||
addDoctorAuthIden(e){
|
||||
console.log("addDoctorAuthIden addDoctorAuthIden")
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
</view>
|
||||
|
||||
<!-- <t-cell title="头像" hover required arrow note="真人正脸" /> -->
|
||||
<t-cell title="城市" hover required arrow="{{ !(indentity && iden_auth_disabled) }}" note="{{ city_note }}" bindtap="{{(indentity && iden_auth_disabled)?'':'onCityShow'}}"/>
|
||||
<!-- {{!indentity && introduction_status==3}} -->
|
||||
<t-cell title="城市" hover required arrow="{{ !((indentity && iden_auth_disabled) || (!indentity && introduction_status==3)) }}" note="{{ city_note }}" bindtap="{{((indentity && iden_auth_disabled) || (!indentity && introduction_status==3))?'':'onCityShow'}}"/>
|
||||
|
||||
<t-cascader
|
||||
visible="{{ city_show }}"
|
||||
@@ -33,7 +34,7 @@
|
||||
bind:close="onCloseCity"
|
||||
></t-cascader>
|
||||
|
||||
<t-cell title="医院" hover required arrow="{{ !(indentity && iden_auth_disabled) }}" note="{{ yiyuan_note }}" bindtap="{{(indentity && iden_auth_disabled)?'':'onYiYuanShow'}}"/>
|
||||
<t-cell title="医院" hover required arrow="{{ !((indentity && iden_auth_disabled) || (!indentity && introduction_status==3)) }}" note="{{ yiyuan_note }}" bindtap="{{((indentity && iden_auth_disabled) || (!indentity && introduction_status==3))?'':'onYiYuanShow'}}"/>
|
||||
<van-popup
|
||||
show="{{ yiyuan_show }}"
|
||||
position="bottom"
|
||||
@@ -63,8 +64,8 @@
|
||||
<van-empty description="暂无医院" wx:if="{{yiyuan_columns.length == 0}}"/>
|
||||
|
||||
</van-popup>
|
||||
<t-cell title="科室" hover required arrow="{{ !(indentity && iden_auth_disabled) }}" note="{{keshi_note}}"
|
||||
bindtap="{{(indentity && iden_auth_disabled)?'':'onKeshiShow'}}" bordered="{{ select_keshi_id == '' }}"/>
|
||||
<t-cell title="科室" hover required arrow="{{ !((indentity && iden_auth_disabled) || (!indentity && introduction_status==3)) }}" note="{{keshi_note}}"
|
||||
bindtap="{{((indentity && iden_auth_disabled) || (!indentity && introduction_status==3))?'':'onKeshiShow'}}" bordered="{{ select_keshi_id == '' }}"/>
|
||||
|
||||
<view class="custom_keshi" wx:if="{{ select_keshi_id != ''}}">
|
||||
<van-field bind:change="onCustomKeshiChange"
|
||||
@@ -219,8 +220,8 @@
|
||||
</view>
|
||||
</t-popup>
|
||||
|
||||
<t-cell title="职称" hover required arrow="{{ !(indentity && iden_auth_disabled) }}" note="{{zhicheng_note}}"
|
||||
bindtap="{{(indentity && iden_auth_disabled)?'':'onZhiChengShow'}}" />
|
||||
<t-cell title="职称" hover required arrow="{{ !((indentity && iden_auth_disabled) || (!indentity && introduction_status==3)) }}" note="{{zhicheng_note}}"
|
||||
bindtap="{{((indentity && iden_auth_disabled) || (!indentity && introduction_status==3))?'':'onZhiChengShow'}}" />
|
||||
<!-- <t-input
|
||||
label="科室电话"
|
||||
placeholder="请输入科室电话"
|
||||
@@ -238,7 +239,7 @@
|
||||
input-align="right"
|
||||
type="number"
|
||||
clearable
|
||||
disabled="{{(indentity && iden_auth_disabled)}}"
|
||||
disabled="{{(indentity && iden_auth_disabled) || (!indentity && introduction_status==3) }}"
|
||||
border="{{ department_custom_mobile_reason == '' }}"
|
||||
custom-style="font-size:30rpx;"
|
||||
>
|
||||
@@ -361,7 +362,7 @@
|
||||
<van-button data-from="doctorauthiden" disabled="{{iden_auth_disabled}}" color="#3CC7C0" custom-style="border-radius: 20rpx;" type="primary" block bind:click="addDoctorAuthIden">{{iden_auth_status_txt}}</van-button>
|
||||
</view>
|
||||
<view class="sub_button" wx:else>
|
||||
<van-button color="#3CC7C0" data-from="myinfo" disabled custom-style="border-radius: 20rpx;" type="primary" block bind:click="addDoctorAuthIden">{{iden_auth_status_txt}}</van-button>
|
||||
<van-button color="#3CC7C0" data-from="myinfo" disabled="{{!(introduction_status==0 || introduction_status==3)}}" custom-style="border-radius: 20rpx;" type="primary" block bind:click="{{introduction_status==0?'addDoctorAuthIden':'handleUpdateIntroduction'}}">{{iden_auth_status_txt}}</van-button>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user