add file
This commit is contained in:
@@ -0,0 +1,741 @@
|
||||
// Pages/yishi/identity/index.js
|
||||
import Toast from '@vant/weapp/toast/toast';
|
||||
import { API } from './../../../utils/network/api'
|
||||
import { FileUtil } from './../../../utils/fileutil'
|
||||
|
||||
const api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '医师身份认证', //导航栏 中间的标题
|
||||
},
|
||||
height: app.globalData.height,
|
||||
//选项卡
|
||||
stickyProps: {
|
||||
zIndex: 2,
|
||||
},
|
||||
realname:"",
|
||||
idcard:"",
|
||||
avatar: "https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/default_photo.png",
|
||||
is_avatar: false,
|
||||
city_show: false,
|
||||
keshi_show: false,
|
||||
yiyuan_show: false,
|
||||
zhuanchang_show: false,
|
||||
zhiye_show: false,
|
||||
zige_show: false,
|
||||
zhicheng_show: false,
|
||||
zhicheng_img_show: false,
|
||||
next_btn_txt: "下一步",
|
||||
next_btn_disabled: false,
|
||||
office_phone: "",
|
||||
keshi_note: "请选择科室",
|
||||
keshi_columns: [],
|
||||
select_keshi_id: "",
|
||||
select_keshi_index: "",
|
||||
custom_keshi: "",
|
||||
zhicheng_note: "请选择职称",
|
||||
zhicheng_columns: [
|
||||
{
|
||||
text: "执业医师",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
text: "主治医师",
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
text: "副主任医师",
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
text: "主任医师",
|
||||
value: 4
|
||||
}
|
||||
],
|
||||
select_zhicheng_id: "",
|
||||
select_zhicheng_index: "",
|
||||
select_yiyuan_index: "",
|
||||
yiyuan_columns: [],
|
||||
zhuanchang_columns: [],
|
||||
zhuanchang_selected_columns: [],
|
||||
select_province_id: "",
|
||||
select_city_id: "",
|
||||
select_county_id: "",
|
||||
city_note: "请选择城市",
|
||||
yiyuan_note: "请选择医院",
|
||||
select_yiyuan_id: "",
|
||||
area_sub_titles: ["省份","市区","区县"],
|
||||
areaList: [],
|
||||
textarea_jianjie: "",
|
||||
textarea_shanchang: "",
|
||||
zhiye_file_list:[],
|
||||
zige_file_list:[],
|
||||
zhicheng_file_list:[],
|
||||
doctorauthiden_data_ready: false,
|
||||
basicdepartment_data_ready: false,
|
||||
areaprovince_data_ready: false,
|
||||
iden_auth_status: 0,
|
||||
iden_auth_disabled: 0,
|
||||
iden_auth_status_txt: "未认证",
|
||||
},
|
||||
onLoad(){
|
||||
let _this = this;
|
||||
//获取实名认证信息
|
||||
api.getDoctorAuthReal().then(response => {
|
||||
console.log(response);
|
||||
if(response.data){
|
||||
this.setData({
|
||||
realname:response.data.card_name,
|
||||
idcard:response.data.card_num,
|
||||
next_btn_txt: "已认证,不可修改",
|
||||
next_btn_disabled: true,
|
||||
});
|
||||
}
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
|
||||
//获得医师身份认证
|
||||
// api.getDoctorAuthIden().then(response => {
|
||||
// console.log("getDoctorAuthIden: ",response);
|
||||
// this.setData({
|
||||
// is_avatar: true,
|
||||
// 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,
|
||||
// });
|
||||
// let iden_auth_status = response.data.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?false: iden_auth_status==2?true:iden_auth_status==3?false:true;
|
||||
// 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 && (avatar.indexOf("http") == -1)){
|
||||
// avatar = api.getStaticHost() + avatar;
|
||||
// }
|
||||
// this.setData({
|
||||
// "avatar": avatar
|
||||
// })
|
||||
// }).catch(errors => {console.error(errors);})
|
||||
|
||||
// //加载省份列表
|
||||
// api.getAreaProvince().then(response => {
|
||||
// console.log(response);
|
||||
// const list = _this.formatArea(response, -1, true);
|
||||
// _this.setData({
|
||||
// areaprovince_data_ready: true,
|
||||
// areaList: list
|
||||
// })
|
||||
// }).catch(errors => {console.error(errors); })
|
||||
|
||||
// //加载科室列表
|
||||
// api.getBasicDepartment().then(response => {
|
||||
// console.log(response);
|
||||
// const list = _this.formatKeShi(response);
|
||||
// _this.setData({
|
||||
// basicdepartment_data_ready: true,
|
||||
// keshi_columns: list
|
||||
// })
|
||||
// }).catch(errors => {console.error(errors); })
|
||||
|
||||
// //加载专长列表
|
||||
// api.getDoctorExpertise().then(response => {
|
||||
// console.log(response);
|
||||
// _this.setData({
|
||||
// zhuanchang_columns: response.data
|
||||
// })
|
||||
// }).catch(errors => {console.error(errors); })
|
||||
|
||||
// let keshi_huixian = false;
|
||||
// let zhicheng_huixian = false;
|
||||
// let area_huixian = false;
|
||||
// //执行回显
|
||||
// let data_replay = setInterval(() => {
|
||||
// console.log("执行回显。。。")
|
||||
|
||||
// //回显科室
|
||||
// if(_this.data.doctorauthiden_data_ready && _this.data.basicdepartment_data_ready){
|
||||
// let index = _this.data.keshi_columns.findIndex(item => {
|
||||
// return item.value == _this.data.select_keshi_id
|
||||
// })
|
||||
// _this.setData({
|
||||
// select_keshi_index: index,
|
||||
// keshi_note: _this.data.keshi_columns[index].text
|
||||
// })
|
||||
// keshi_huixian = true;
|
||||
// }
|
||||
// //回显职称
|
||||
// if(_this.data.doctorauthiden_data_ready){
|
||||
// let index = _this.data.zhicheng_columns.findIndex(item => {
|
||||
// return item.value == _this.data.select_zhicheng_id
|
||||
// })
|
||||
// _this.setData({
|
||||
// select_zhicheng_index: index,
|
||||
// zhicheng_note: _this.data.zhicheng_columns[index].text
|
||||
// })
|
||||
// zhicheng_huixian = true;
|
||||
// }
|
||||
|
||||
// //回显省市区
|
||||
// if(_this.data.doctorauthiden_data_ready && _this.data.areaprovince_data_ready){
|
||||
|
||||
// let select_province_id = _this.data.select_province_id;
|
||||
// let select_city_id = _this.data.select_city_id;
|
||||
// let select_county_id = _this.data.select_county_id;
|
||||
// let select_yiyuan_id = _this.data.select_yiyuan_id;
|
||||
|
||||
// api.getAreaCity({area_id: select_province_id}).then(response => {// 请求市区列表
|
||||
// let _index = _this.data.areaList.findIndex(item => item.value == select_province_id);
|
||||
// const list = _this.formatArea(response, _index, true);
|
||||
// const _city = "areaList[" + _index + "].children";
|
||||
// console.log("_city: ", _city);
|
||||
// _this.setData({
|
||||
// [_city]: list,
|
||||
// })
|
||||
// }).then(e =>{
|
||||
// api.getAreaCounty({area_id: select_city_id}).then(response => {// 请求市区列表
|
||||
// let _index = _this.data.areaList.findIndex(item => item.value == select_province_id);
|
||||
// console.log("getAreaCounty: ", _index)
|
||||
// let c_index = _this.data.areaList[_index].children.findIndex(item => item.value == select_city_id);
|
||||
// console.log("children: ", _index)
|
||||
// let p_index = _this.data.areaList[_index].children[c_index].index;
|
||||
// const list = _this.formatArea(response, _index, false);
|
||||
// const _county = "areaList[" + _index + "].children[" +p_index+ "].children";
|
||||
// _this.setData({
|
||||
// [_county]: list,
|
||||
// })
|
||||
// }).then(e => {
|
||||
// let params = {
|
||||
// province_id: _this.data.select_province_id,
|
||||
// city_id: _this.data.select_city_id,
|
||||
// county_id: _this.data.select_county_id,
|
||||
// }
|
||||
// api.getBasicHospital(params).then(response => {// 请求医院列表
|
||||
// _this.setData({
|
||||
// yiyuan_columns: _this.formatYiYuan(response),
|
||||
// city_note: _this.data.hospital.province + "/" + _this.data.hospital.city + "/" + _this.data.hospital.county
|
||||
// })
|
||||
|
||||
// setTimeout(() => {
|
||||
// let index = _this.data.yiyuan_columns.findIndex(item => {
|
||||
// return item.value == _this.data.select_yiyuan_id
|
||||
// })
|
||||
// _this.setData({
|
||||
// select_yiyuan_index: index,
|
||||
// yiyuan_note: _this.data.yiyuan_columns[index].text
|
||||
// })
|
||||
// }, 100);
|
||||
|
||||
|
||||
// }).catch(errors => {console.error(errors); })
|
||||
// }).catch(errors => {console.error(errors); })
|
||||
// }).catch(errors => {console.error(errors); })
|
||||
|
||||
// area_huixian = true;
|
||||
// }
|
||||
|
||||
// //都回显成功后,清除计时器
|
||||
// if(keshi_huixian && zhicheng_huixian && area_huixian){
|
||||
// clearInterval(data_replay);
|
||||
// }
|
||||
// console.log("计时器")
|
||||
// }, 100);
|
||||
|
||||
},
|
||||
onShow(){
|
||||
console.log("onshow()....");
|
||||
|
||||
},
|
||||
doUploadFile(event) {
|
||||
console.log("index douploadFIle: ", event);
|
||||
const scene = event.currentTarget.dataset.scene;
|
||||
const field_name = event.currentTarget.dataset.field_name;
|
||||
const file_multiple = event.currentTarget.dataset.file_multiple;//是否为多张图
|
||||
console.log("scene: ", scene);
|
||||
console.log("field_name: ", field_name);
|
||||
console.log("file_multiple: ", file_multiple);
|
||||
let _this = this;
|
||||
api.getOssSign({user_type:2,scene:scene}).then(response => {
|
||||
console.log(response);
|
||||
const { file } = event.detail;
|
||||
console.log("file: ", file);
|
||||
const filename = FileUtil.getFileName(file);
|
||||
const host = response.data.host;
|
||||
const signature = response.data.signature;
|
||||
const ossAccessKeyId = response.data.accessid;
|
||||
const policy = response.data.policy;
|
||||
const key = response.data.dir+filename;
|
||||
const filePath = file.url; // 待上传文件的文件路径。
|
||||
wx.uploadFile({
|
||||
url: host, // 开发者服务器的URL。
|
||||
filePath: filePath,
|
||||
name: 'file', // 必须填file。
|
||||
formData: {
|
||||
key,
|
||||
policy,
|
||||
OSSAccessKeyId: ossAccessKeyId,
|
||||
signature,
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("upload: ", res);
|
||||
if (res.statusCode === 204) {
|
||||
if(scene == 1){
|
||||
this.setData({
|
||||
is_avatar: true
|
||||
})
|
||||
}
|
||||
wx.showToast({title: '上传成功'})
|
||||
if(file_multiple == "true"){//多张图
|
||||
let img = {}
|
||||
img.url = host+"/"+key;
|
||||
img.isImg = true;
|
||||
|
||||
let img_list = _this.data[field_name];
|
||||
console.log("img_list: ", img_list);
|
||||
img_list.push(img);
|
||||
console.log("img_list: ", img_list);
|
||||
|
||||
this.setData({
|
||||
[field_name]: img_list
|
||||
});
|
||||
}else{
|
||||
this.setData({[field_name]: host+"/"+key});
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
doDeleteFile(event){
|
||||
console.log(event);
|
||||
let url = event.detail.file.url;
|
||||
let file_name = event.currentTarget.dataset.field_name;
|
||||
let img_list = this.data[file_name].filter(item => item.url != url);
|
||||
this.setData({
|
||||
[file_name]: img_list
|
||||
})
|
||||
},
|
||||
//新增实名认证信息
|
||||
postDoctorAuthReal(){
|
||||
const realname = this.data.realname.trim();
|
||||
const idcard = this.data.idcard.trim();
|
||||
|
||||
console.log("realname: ",realname);
|
||||
console.log("idcard: ", idcard);
|
||||
|
||||
var realname_reg= /^(([a-zA-Z+\.?\·?a-zA-Z+]{2,30}$)|([\u4e00-\u9fa5+\·?\u4e00-\u9fa5+]{2,30}$))/;
|
||||
var idcard_reg=/^(^[1-9]\d{5}[1-9]\d{3}(((0[2])([0|1|2][0-8])|(([0-1][1|4|6|9])([0|1|2][0-9]|[3][0]))|(((0[1|3|5|7|8])|(1[0|2]))(([0|1|2]\d)|3[0-1]))))((\d{4})|\d{3}[Xx])$)$/;
|
||||
|
||||
//判断用户输入的真实姓名是否为空
|
||||
if(realname.length == 0){
|
||||
wx.showToast({title: '姓名不能为空', icon:'error'})
|
||||
return false;
|
||||
}else if(!realname_reg.test(realname)){//检测姓名的格式是否匹配
|
||||
wx.showToast({title: '姓名输入有误', icon:'error'})
|
||||
return false;
|
||||
}
|
||||
|
||||
//判断用户输入的身份证号是否为空
|
||||
if(idcard.length == 0){
|
||||
wx.showToast({title: '身份证不能为空', icon:'error'})
|
||||
return false;
|
||||
}else if(!idcard_reg.test(idcard)){//检测姓名的格式是否匹配
|
||||
wx.showToast({title: '身份证输入有误', icon:'error'})
|
||||
return false;
|
||||
}
|
||||
|
||||
var params = {
|
||||
card_name: realname,
|
||||
card_num: idcard,
|
||||
}
|
||||
api.postDoctorAuthReal(params).then(response => {
|
||||
console.log(response);
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
onTabsChange(event) {
|
||||
console.log(`Change tab, tab-panel value is ${event.detail.value}.`);
|
||||
},
|
||||
onTabsClick(event) {
|
||||
console.log(`Click tab, tab-panel value is ${event.detail.value}.`);
|
||||
},
|
||||
onStickyScroll(event) {
|
||||
// console.log(`Click tab, tab-panel value is ${event.detail.value}.`);
|
||||
},
|
||||
// onCityShow(e) {
|
||||
// console.log("onCityShow");
|
||||
// this.setData({ city_show: true });
|
||||
// },
|
||||
// onChangeCity(e) {
|
||||
// this.setData({
|
||||
// select_county_id: "",
|
||||
// select_yiyuan_id: ""
|
||||
// })
|
||||
// console.log("onChangeCity");
|
||||
// const { selectedOptions } = e.detail;
|
||||
// console.log(e.detail)
|
||||
// let area = selectedOptions[selectedOptions.length-1];
|
||||
// if(!area){
|
||||
// area = selectedOptions[selectedOptions.length-2];
|
||||
// }
|
||||
// const type = area.type;
|
||||
// const value = area.value;
|
||||
// const index = area.index;
|
||||
// const p_index = area.p_index;
|
||||
// if(type == 2){//省份
|
||||
// api.getAreaCity({area_id: value}).then(response => {// 请求市区列表
|
||||
// const list = this.formatArea(response, index, true);
|
||||
// const _city = "areaList[" + index + "].children";
|
||||
// this.setData({
|
||||
// [_city]: list,
|
||||
// select_province_id: value
|
||||
// })
|
||||
// }).catch(errors => {console.error(errors); })
|
||||
// }
|
||||
// if(type == 3){//市区
|
||||
// api.getAreaCounty({area_id: value}).then(response => {// 请求市区列表
|
||||
// const list = this.formatArea(response, index, false);
|
||||
// const _county = "areaList[" + p_index + "].children[" +index+ "].children";
|
||||
// this.setData({
|
||||
// [_county]: list,
|
||||
// select_city_id: value
|
||||
// })
|
||||
// }).catch(errors => {console.error(errors); })
|
||||
// }
|
||||
|
||||
// console.log("type: " + type);
|
||||
// if(type == 4){//区县
|
||||
// this.setData({
|
||||
// select_county_id: value,
|
||||
// });
|
||||
|
||||
// let params = {
|
||||
// province_id: this.data.select_province_id,
|
||||
// city_id: this.data.select_city_id,
|
||||
// county_id: this.data.select_county_id,
|
||||
// }
|
||||
// api.getBasicHospital(params).then(response => {// 请求医院列表】
|
||||
// this.setData({
|
||||
// yiyuan_columns: this.formatYiYuan(response),
|
||||
// city_show: false,
|
||||
// city_note: this.getCityNote(selectedOptions),
|
||||
// yiyuan_show: true
|
||||
// })
|
||||
// }).catch(errors => {console.error(errors); })
|
||||
|
||||
// }else{
|
||||
// this.setData({
|
||||
// city_show: true
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
// getCityNote(selectedOptions){
|
||||
// let txt = [];
|
||||
// selectedOptions.forEach(item => {
|
||||
// if(item){
|
||||
// txt.push(item.label);
|
||||
// }
|
||||
// })
|
||||
// return txt.join("/");
|
||||
// },
|
||||
// formatArea(response, p_index, has_children){
|
||||
// var list = []
|
||||
// let index = 0;
|
||||
// response.data.forEach(data => {
|
||||
// let area = {};
|
||||
// area.index = index++;
|
||||
// area.p_index = p_index;
|
||||
// area.type = data.area_type;
|
||||
// area.label = data.area_name;
|
||||
// area.value = data.area_id;
|
||||
// if(has_children){
|
||||
// area.children = [];
|
||||
// }
|
||||
// list.push(area)
|
||||
// });
|
||||
// return list;
|
||||
// },
|
||||
// formatYiYuan(response){
|
||||
// let list = [];
|
||||
// response.data.forEach(data => {
|
||||
// let hospital = {};
|
||||
// hospital.text = data.hospital_name;
|
||||
// hospital.value = data.hospital_id;
|
||||
// list.push(hospital)
|
||||
// });
|
||||
// return list;
|
||||
// },
|
||||
// formatKeShi(response){
|
||||
// let list = [];
|
||||
// response.data.forEach(item => {
|
||||
// let data = {};
|
||||
// data.text = item.department_custom_name;
|
||||
// data.value = item.department_custom_id;
|
||||
// list.push(data)
|
||||
// });
|
||||
// return list;
|
||||
// },
|
||||
// formatZhuanChang(response){
|
||||
// let list = [];
|
||||
// response.data.forEach(item => {
|
||||
// let data = {};
|
||||
// data.text = item.expertise_name;
|
||||
// data.value = item.expertise_id;
|
||||
// list.push(data)
|
||||
// });
|
||||
// return list;
|
||||
// },
|
||||
// onYiYuanShow(e) {
|
||||
// console.log("onYiYuanShow");
|
||||
// this.setData({ yiyuan_show: true });
|
||||
// },
|
||||
// onYiYuanClose(e) {
|
||||
// console.log("onYiYuanClose");
|
||||
// this.setData({ yiyuan_show: false });
|
||||
// },
|
||||
// onYiYuanCancel(event) {
|
||||
// console.log("onYiYuanCancel");
|
||||
// const { picker, value, index } = event.detail;
|
||||
// Toast(`当前值:${value}, 当前索引:${index}`);
|
||||
// this.setData({
|
||||
// yiyuan_show: false
|
||||
// });
|
||||
|
||||
// },
|
||||
// onYiYuanConfirm(event) {
|
||||
// console.log("onYiYuanConfirm");
|
||||
// const { picker, value, index } = event.detail;
|
||||
// console.log(event.detail);
|
||||
// this.setData({
|
||||
// yiyuan_show: false,
|
||||
// select_yiyuan_id: `${value.value}`,
|
||||
// yiyuan_note: `${value.text}`
|
||||
// });
|
||||
// },
|
||||
// onYiYuanChange(event) {
|
||||
// console.log("onYiYuanChange");
|
||||
// const { picker, value, index } = event.detail;
|
||||
// Toast(`当前值:${value}, 当前索引:${index}`);
|
||||
// },
|
||||
// onKeshiShow(e) {
|
||||
// console.log("onKeshiShow");
|
||||
// this.setData({ keshi_show: true });
|
||||
// },
|
||||
// onKeshiCancel(event) {
|
||||
// console.log("onKeshiCancel");
|
||||
// const { picker, value, index } = event.detail;
|
||||
// Toast(`当前值:${value}, 当前索引:${index}`);
|
||||
// this.setData({ keshi_show: false });
|
||||
// },
|
||||
// onKeshiConfirm(event) {
|
||||
// console.log("onKeshiConfirm");
|
||||
// const { picker, value, index } = event.detail;
|
||||
// Toast(`当前值:${value}, 当前索引:${index}`);
|
||||
// this.setData({
|
||||
// keshi_show: false,
|
||||
// select_keshi_id: `${value.value}`,
|
||||
// keshi_note: `${value.text}`,
|
||||
// });
|
||||
// },
|
||||
// onKeshiChange(event) {
|
||||
// console.log("onKeshiChange");
|
||||
// },
|
||||
// onKeshiClose(e) {
|
||||
// console.log("onKeshiClose");
|
||||
// this.setData({ keshi_show: false });
|
||||
// },
|
||||
// onZhiChengShow(e) {
|
||||
// console.log("onKeshiShow");
|
||||
// this.setData({ zhicheng_show: true });
|
||||
// },
|
||||
// onZhiChengCancel(event) {
|
||||
// console.log("onKeshiCancel");
|
||||
// const { picker, value, index } = event.detail;
|
||||
// Toast(`当前值:${value}, 当前索引:${index}`);
|
||||
// this.setData({ zhicheng_show: false });
|
||||
// },
|
||||
// onZhiChengConfirm(event) {
|
||||
// console.log("onZhiChengConfirm");
|
||||
// const { picker, value, index } = event.detail;
|
||||
// Toast(`当前值:${value}, 当前索引:${index}`);
|
||||
// this.setData({
|
||||
// zhicheng_show: false,
|
||||
// select_zhicheng_id: `${value.value}`,
|
||||
// zhicheng_note: `${value.text}`,
|
||||
// });
|
||||
// },
|
||||
// onZhiChengChange(event) {
|
||||
// console.log("onZhiChengChange");
|
||||
// },
|
||||
// onZhiChengClose(e) {
|
||||
// console.log("onZhiChengClose");
|
||||
// this.setData({ zhicheng_show: false });
|
||||
// },
|
||||
// onZhuanChangShow(){
|
||||
// this.setData({ zhuanchang_show: true });
|
||||
// },
|
||||
// onZhuanChangVisibleChange(e) {
|
||||
// this.setData({
|
||||
// zhuanchang_show: e.detail.visible,
|
||||
// });
|
||||
// },
|
||||
// onshowJianJieNote(e){
|
||||
// e.detail // 自定义组件触发事件时提供的 detail 对象
|
||||
// console.log("onshowJianJieNote");
|
||||
// },
|
||||
// onshowShanChangNote(e){
|
||||
// e.detail // 自定义组件触发事件时提供的 detail 对象
|
||||
// console.log("onshowShanChangNote");
|
||||
// },
|
||||
// onshowZhiYeNote(e){
|
||||
// e.detail // 自定义组件触发事件时提供的 detail 对象
|
||||
// console.log("onshowZhiYeNote");
|
||||
// this.setData({ zhiye_show: true });
|
||||
// },
|
||||
// onZhiYeClose(){
|
||||
// console.log("onZhiYeClose");
|
||||
// this.setData({ zhiye_show: false });
|
||||
// },
|
||||
// onshowZiGeNote(e){
|
||||
// e.detail // 自定义组件触发事件时提供的 detail 对象
|
||||
// console.log("onshowZiGeNote");
|
||||
// this.setData({ zige_show: true });
|
||||
// },
|
||||
// onZiGeClose(){
|
||||
// console.log("onZhiYeClose");
|
||||
// this.setData({ zige_show: false });
|
||||
// },
|
||||
// onshowZhiChengImgNote(e){
|
||||
// e.detail // 自定义组件触发事件时提供的 detail 对象
|
||||
// console.log("onshowZhiChengNote");
|
||||
// this.setData({ zhicheng_img_show: true });
|
||||
// },
|
||||
// onZhiChengImgClose(){
|
||||
// console.log("onZhiChengClose");
|
||||
// this.setData({ zhicheng_img_show: false });
|
||||
// },
|
||||
// getTextAreaVal(e){
|
||||
// console.log("myindex: ", e);
|
||||
// let textarea_name = e.currentTarget.dataset.textarea_name;
|
||||
// this.setData({
|
||||
// [textarea_name]: e.detail.value
|
||||
// })
|
||||
// },
|
||||
// select_zhuanchang(e){
|
||||
// console.log(e);
|
||||
// let expertise_name = e.currentTarget.dataset.expertise_name;
|
||||
// let expertise_id = e.currentTarget.dataset.expertise_id;
|
||||
// let is_selected = e.currentTarget.dataset.is_selected;
|
||||
// let index = e.currentTarget.dataset.index;
|
||||
// let data = "zhuanchang_columns["+index+"].is_selected";
|
||||
// this.setData({[data]: is_selected==1?0:1})
|
||||
// },
|
||||
// zhuanchangConfirm(e){
|
||||
// this.setData({ zhuanchang_show: false });
|
||||
// },
|
||||
// zhuanchangConcle(e){
|
||||
// this.setData({ zhuanchang_show: false });
|
||||
// },
|
||||
// addDoctorAuthIden(){
|
||||
// let params = {};
|
||||
|
||||
// if(!this.data.is_avatar){wx.showToast({title: '请上传头像',icon: "error"});return}
|
||||
// params.avatar = this.data.avatar;
|
||||
// if(!this.data.select_county_id){wx.showToast({title: '请选择城市',icon: "error"});return}
|
||||
// if(!this.data.select_yiyuan_id){wx.showToast({title: '请选择医院',icon: "error"});return}
|
||||
// params.hospital_id = this.data.select_yiyuan_id;//医院id
|
||||
// if(!this.data.select_keshi_id){wx.showToast({title: '请选择科室',icon: "error"});return}
|
||||
// params.department_custom_id = this.data.select_keshi_id;//科室id
|
||||
// if(!this.data.custom_keshi){wx.showToast({title: '请输入科室',icon: "error"});return}
|
||||
// params.department_custom_name = this.data.custom_keshi;//自定义科室名称
|
||||
// if(!this.data.office_phone){wx.showToast({title: '请输入科室电话',icon: "error"});return}
|
||||
// params.department_custom_mobile = this.data.office_phone;//科室电话
|
||||
// params.doctor_expertise = this.data.zhuanchang_columns.filter(e => e.is_selected == 1 ).map(e => e.expertise_id);//专长
|
||||
// if(params.doctor_expertise.length == 0){wx.showToast({title: '请选择专长',icon: "error"});return}
|
||||
// if(!this.data.select_zhicheng_id){wx.showToast({title: '请选择职称',icon: "error"});return}
|
||||
// params.doctor_title = this.data.select_zhicheng_id;//职称id
|
||||
// if(!this.data.textarea_jianjie){wx.showToast({title: '请输入简介',icon: "error"});return}
|
||||
// params.brief_introduction = this.data.textarea_jianjie;//简介
|
||||
// if(!this.data.textarea_shanchang){wx.showToast({title: '请输入擅长',icon: "error"});return}
|
||||
// params.be_good_at = this.data.textarea_shanchang;//擅长
|
||||
|
||||
// if(this.data.zhiye_file_list.length == 0){wx.showToast({title: '请上传医师执业证',icon: "error"});return}
|
||||
// params.license_cert = this.data.zhiye_file_list.map(e => e.url);//医师执业证
|
||||
// if(this.data.zige_file_list.length == 0){wx.showToast({title: '请上传医师资格证',icon: "error"});return}
|
||||
// params.qualification_cert = this.data.zige_file_list.map(e => e.url);//医生资格证
|
||||
// if(this.data.zhicheng_file_list.length == 0){wx.showToast({title: '请上传职称证',icon: "error"});return}
|
||||
// params.work_cert = this.data.zhicheng_file_list.map(e => e.url);//工作证,职称证
|
||||
|
||||
|
||||
// console.log(params);
|
||||
|
||||
// api.postDoctorAuthIden(params).then(response => {
|
||||
// console.log(response);
|
||||
// wx.showToast({
|
||||
// title: '提交成功',
|
||||
// icon: "success"
|
||||
// })
|
||||
|
||||
// this.setData({
|
||||
// iden_auth_status_txt: "审核中",
|
||||
// iden_auth_disabled: true
|
||||
// })
|
||||
|
||||
// }).catch(errors => {console.error(errors);})
|
||||
// }
|
||||
})
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "/commpents/te_navbar",
|
||||
"myprofile": "/commpents/myprofile/index",
|
||||
"t-tabs": "tdesign-miniprogram/tabs/tabs",
|
||||
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
|
||||
"t-cell": "tdesign-miniprogram/cell/cell",
|
||||
"t-icon": "tdesign-miniprogram/icon/icon",
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"van-field": "@vant/weapp/field/index",
|
||||
"van-button": "@vant/weapp/button/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<!-- <nav-bar navbar-data='{{navbarData}}' style="margin-bottom: {{height*2 + 20}}px;"></nav-bar> -->
|
||||
<te-nav-bar navbar-data='{{navbarData}}'></te-nav-bar>
|
||||
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
|
||||
<view class="tabs">
|
||||
<t-tabs
|
||||
defaultValue="{{0}}"
|
||||
sticky
|
||||
stickyProps="{{stickyProps}}"
|
||||
bind:change="onTabsChange"
|
||||
bind:click="onTabsClick"
|
||||
bind:scroll="onStickyScroll"
|
||||
t-class="custom-tabs"
|
||||
theme="line"
|
||||
custom-style="font-size: 32rpx"
|
||||
>
|
||||
<!-- 实名认证tab -->
|
||||
<t-tab-panel label="实名认证" value="0" style="{{tabPanelstyle}}">
|
||||
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
model:value="{{ realname }}"
|
||||
label="真实姓名"
|
||||
type="text"
|
||||
placeholder="请填写真实姓名,提交后不能修改"
|
||||
placeholder-style="font-size:28rpx; color: #C5C8CB;"
|
||||
input-align="right"
|
||||
required
|
||||
clearable
|
||||
custom-style="font-size:30rpx;"
|
||||
/>
|
||||
<van-field
|
||||
model:value="{{ idcard }}"
|
||||
type="idcard"
|
||||
label="身份证号"
|
||||
placeholder="请填写身份证号"
|
||||
placeholder-style="font-size:28rpx; color: #C5C8CB;"
|
||||
input-align="right"
|
||||
required
|
||||
clearable
|
||||
custom-style="font-size:30rpx;"
|
||||
border="{{ false }}"
|
||||
/>
|
||||
</van-cell-group>
|
||||
|
||||
<!-- <t-cell title="真实姓名" hover required arrow note="请填写真实姓名,提交后不能修改"/> -->
|
||||
<!-- <t-cell title="身份证号" hover required arrow note="请填写身份证号"/> -->
|
||||
|
||||
<view class="bottom_note">
|
||||
说明:因互联网医院实行实名制要求,需要您的身份信息,包括姓名,身份证号码。如您不能提供上述信息,将无法完成医师身份认证。
|
||||
</view>
|
||||
<view class="bottom_next">
|
||||
<van-button disabled="{{next_btn_disabled}}"
|
||||
color="#3CC7C0" bind:click="postDoctorAuthReal"
|
||||
custom-style="border-radius: 20rpx;font-size: 30rpx;"
|
||||
type="primary" block>{{next_btn_txt}}</van-button>
|
||||
</view>
|
||||
</t-tab-panel>
|
||||
|
||||
<!-- 医师身份认证 -->
|
||||
<t-tab-panel label="医师身份认证" value="1" style="{{tabPanelstyle}}">
|
||||
<myprofile />
|
||||
|
||||
</t-tab-panel>
|
||||
</t-tabs>
|
||||
</view>
|
||||
<van-toast id="van-toast" />
|
||||
</view>
|
||||
@@ -0,0 +1,190 @@
|
||||
.required{
|
||||
color: #e34d59;
|
||||
}
|
||||
.photo{
|
||||
position: relative;
|
||||
padding: 32rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
align-items: center;
|
||||
}
|
||||
.photo::after {
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
content: ' ';
|
||||
pointer-events: none;
|
||||
right: 0;
|
||||
left: 32rpx;
|
||||
bottom: 0;
|
||||
border-bottom: 1px solid var(--td-cell-border-color, var(--td-gray-color-3, #e7e7e7));
|
||||
transform: scaleY(0.5);
|
||||
left: 32rpx;
|
||||
}
|
||||
.title{
|
||||
font-size: 30rpx;
|
||||
color: #1C2023;
|
||||
}
|
||||
.right{
|
||||
display: flex;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
font-size: 25rpx;
|
||||
letter-spacing: 2rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.t-input__label{
|
||||
font-size: 30rpx !important;
|
||||
}
|
||||
.van-field__label{
|
||||
color: #000 !important;
|
||||
font-size: 30rpx !important;
|
||||
}
|
||||
.zhuanchang{
|
||||
position: relative;
|
||||
padding: 32rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
align-items: center;
|
||||
}
|
||||
.zhuanchang::after {
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
content: ' ';
|
||||
pointer-events: none;
|
||||
right: 0;
|
||||
left: 32rpx;
|
||||
bottom: 0;
|
||||
border-bottom: 1px solid var(--td-cell-border-color, var(--td-gray-color-3, #e7e7e7));
|
||||
transform: scaleY(0.5);
|
||||
left: 32rpx;
|
||||
}
|
||||
.zhuanchang .content{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.content_item{
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
padding: 0rpx 20rpx;
|
||||
background: #3CC7C0;
|
||||
border-radius: 29rpx;
|
||||
color: #fff;
|
||||
margin: 20rpx 10rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.t-tabs__item--active{
|
||||
color: #49B9AD !important;
|
||||
}
|
||||
.t-tabs__track{
|
||||
background-color: var(--td-tab-track-color, var(--td-primary-color, #49B9AD)) !important;
|
||||
}
|
||||
.t-cell__note {
|
||||
font-size: 25rpx !important;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
.t-cell__title-text{
|
||||
font-size: 30rpx !important;
|
||||
}
|
||||
.t-input__wrap--suffix-icon{
|
||||
padding-left: var(--td-spacer-1, 8rpx) !important;
|
||||
}
|
||||
.t-tabs__content {
|
||||
overflow: unset !important;
|
||||
}
|
||||
.bottom_note{
|
||||
color: #999999;
|
||||
font-size: 28rpx;
|
||||
width: 95vw;
|
||||
margin: 30rpx auto;
|
||||
letter-spacing: 3rpx;
|
||||
}
|
||||
.bottom_next{
|
||||
width: 95vw;
|
||||
margin: 530rpx auto;
|
||||
}
|
||||
.sub_button{
|
||||
width: 95vw;
|
||||
margin: 0 auto 30rpx auto;
|
||||
}
|
||||
.zhiye_popup{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 600rpx;
|
||||
}
|
||||
.zhiye_popup_title{
|
||||
margin-top: 16px;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
letter-spacing: 5rpx;
|
||||
}
|
||||
.zhiye_popup_img{
|
||||
margin-top: 30rpx;
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
background-color: cadetblue;
|
||||
}
|
||||
/* 自定义 vant required 小红点位置 */
|
||||
.van-cell--required::before {
|
||||
left: 4.7rem !important;
|
||||
}
|
||||
.zhuanchang_box{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
.zhuanchang_box_item{
|
||||
background-color: #f2f2f2;
|
||||
padding: 10rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
color: #000;
|
||||
font-size: 28rpx;
|
||||
margin: 20rpx 10rpx;
|
||||
}
|
||||
.zhuanchang_box_item_checked{
|
||||
background-color: #3cc7c0;
|
||||
color: #fff;
|
||||
}
|
||||
.zhuanchang_block {
|
||||
width: 100vw;
|
||||
height: 240px;
|
||||
background: #fff;
|
||||
border-top-left-radius: 16rpx;
|
||||
border-top-right-radius: 16rpx;
|
||||
}
|
||||
|
||||
.zhuanchang_wrapper {
|
||||
margin: 32rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.zhuanchang_header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #e7e7e7;
|
||||
}
|
||||
|
||||
.zhuanchang_title {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.zhuanchang_btn {
|
||||
font-size: 32rpx;
|
||||
padding: 32rpx;
|
||||
}
|
||||
|
||||
.zhuanchang_btn--cancel {
|
||||
color: rgba(0, 0, 0, .6);
|
||||
}
|
||||
|
||||
.zhuanchang_btn--confirm {
|
||||
color: #3cc7c0;
|
||||
}
|
||||
Reference in New Issue
Block a user