优化
This commit is contained in:
+184
-56
@@ -96,6 +96,7 @@ Component({
|
||||
license_cert_reason: "",
|
||||
qualification_cert_reason: "",
|
||||
work_cert_reason: "",
|
||||
department_custom_name_reason: ''
|
||||
},
|
||||
|
||||
options: {
|
||||
@@ -108,15 +109,14 @@ Component({
|
||||
console.log("myprofile attached")
|
||||
let _this = this;
|
||||
console.log(_this.data.zhicheng_columns);
|
||||
_this.setData({
|
||||
"zhicheng_columns[0].text": "AAA"
|
||||
})
|
||||
console.log(_this.data.zhicheng_columns);
|
||||
|
||||
|
||||
//获得医师身份认证
|
||||
api.getDoctorAuthIden().then(response => {
|
||||
api.getDoctorAuthIden({source: this.data.indentity?1:2}).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,
|
||||
@@ -137,12 +137,13 @@ Component({
|
||||
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?false: iden_auth_status==2?true:iden_auth_status==3?false:true;
|
||||
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,
|
||||
@@ -182,12 +183,12 @@ Component({
|
||||
})
|
||||
}
|
||||
let avatar = response.data.avatar;
|
||||
if(avatar && (avatar.indexOf("http") == -1)){
|
||||
avatar = api.getStaticHost() + avatar;
|
||||
if(avatar){
|
||||
this.setData({
|
||||
"avatar": avatar,
|
||||
is_avatar: true,
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
"avatar": avatar
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
|
||||
//加载省份列表
|
||||
@@ -471,7 +472,18 @@ Component({
|
||||
},
|
||||
onYiYuanShow(e) {
|
||||
console.log("onYiYuanShow");
|
||||
this.setData({ yiyuan_show: true });
|
||||
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;
|
||||
if(select_province_id && select_city_id && select_county_id){
|
||||
this.setData({ yiyuan_show: true });
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: '请先选择省市',
|
||||
icon: "error"
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
onYiYuanClose(e) {
|
||||
console.log("onYiYuanClose");
|
||||
@@ -490,11 +502,19 @@ Component({
|
||||
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}`
|
||||
});
|
||||
if(value.value){
|
||||
this.setData({
|
||||
yiyuan_show: false,
|
||||
select_yiyuan_id: `${value.value}`,
|
||||
yiyuan_note: `${value.text}`
|
||||
});
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: '请先选择医院',
|
||||
icon: "error"
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
onYiYuanChange(event) {
|
||||
console.log("onYiYuanChange");
|
||||
@@ -598,29 +618,48 @@ Component({
|
||||
console.log("onZhiChengClose");
|
||||
this.setData({ zhicheng_img_show: false });
|
||||
},
|
||||
getTextAreaVal(e){
|
||||
console.log("myindex: ", e);
|
||||
let textarea_name = e.currentTarget.dataset.textarea_name;
|
||||
onCustomKeshiChange(){
|
||||
this.setData({
|
||||
[textarea_name]: e.detail.value
|
||||
department_custom_name_reason: ""
|
||||
})
|
||||
},
|
||||
getTextAreaVal(e){
|
||||
console.log("myindex: ", e);//textarea_jianjie
|
||||
let textarea_name = e.currentTarget.dataset.textarea_name;
|
||||
if(textarea_name == "textarea_jianjie"){
|
||||
this.setData({
|
||||
brief_introduction_reason: ""
|
||||
})
|
||||
}
|
||||
if(textarea_name == "textarea_shanchang"){
|
||||
this.setData({
|
||||
be_good_at_reason: ""
|
||||
})
|
||||
}
|
||||
let reason_name = textarea_name+"_reason";
|
||||
this.setData({
|
||||
[textarea_name]: e.detail.value,
|
||||
})
|
||||
},
|
||||
select_zhuanchang(e){
|
||||
console.log(e);
|
||||
let count = 0
|
||||
this.data.zhuanchang_columns.forEach(item => {
|
||||
count = count + 1;
|
||||
if(item.is_selected == 1){
|
||||
count = count + 1;
|
||||
}
|
||||
})
|
||||
if(count < 10){
|
||||
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})
|
||||
}else{
|
||||
|
||||
if(count >= 10 && e.currentTarget.dataset.is_selected==0){
|
||||
wx.showToast({
|
||||
title: '最多10个专长',
|
||||
icon: "error"
|
||||
})
|
||||
}else{
|
||||
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){
|
||||
@@ -629,9 +668,14 @@ Component({
|
||||
zhuanchangConcle(e){
|
||||
this.setData({ zhuanchang_show: false });
|
||||
},
|
||||
addDoctorAuthIden(){
|
||||
let params = {};
|
||||
addDoctorAuthIden(e){
|
||||
console.log("addDoctorAuthIden addDoctorAuthIden")
|
||||
|
||||
let from = e.currentTarget.dataset.from;
|
||||
console.log("from: ", from);
|
||||
let params = {};
|
||||
|
||||
params.source = from=="myinfo"?2:1;
|
||||
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}
|
||||
@@ -639,7 +683,7 @@ Component({
|
||||
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}
|
||||
// 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;//科室电话
|
||||
@@ -652,34 +696,112 @@ Component({
|
||||
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);//工作证,职称证
|
||||
if(from == "doctorauthiden"){//只有在医师身份认证模块才去修改证件
|
||||
if(this.data.zhiye_file_list.length == 0){wx.showToast({title: '请上传医师执业证',icon: "error"});return}
|
||||
if(this.data.zhiye_file_list.length < 2){wx.showToast({title: '医师执业证至少2张',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);
|
||||
|
||||
let _this = this;
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['kUy70xHlr7ADo4aIHiictM4Te7MSec3E5kHsYvFQu40'],
|
||||
success (res) {
|
||||
console.log(res);
|
||||
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);})
|
||||
}
|
||||
api.postDoctorAuthIden(params).then(response => {
|
||||
console.log(response);
|
||||
wx.showToast({
|
||||
title: '提交成功',
|
||||
icon: "success"
|
||||
})
|
||||
_this.setData({
|
||||
iden_auth_status_txt: "资料已提交,审核中",
|
||||
iden_auth_disabled: true,
|
||||
iden_auth_status: 2,
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
onOfficePhoneChange(){
|
||||
this.setData({
|
||||
department_custom_mobile_reason: ""
|
||||
})
|
||||
},
|
||||
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;
|
||||
|
||||
file.forEach(item => {
|
||||
console.log("file: ", item);
|
||||
const filename = FileUtil.getFileName(item);
|
||||
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 = item.url; // 待上传文件的文件路径。
|
||||
wx.uploadFile({
|
||||
url: host, // 开发者服务器的URL。
|
||||
filePath: filePath,
|
||||
name: 'file', // 必须填file。
|
||||
formData: {
|
||||
key,
|
||||
policy,
|
||||
OSSAccessKeyId: ossAccessKeyId,
|
||||
signature,
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("upload: ", res);
|
||||
let reason_name = field_name + "_reason";//错误原因置空
|
||||
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);
|
||||
|
||||
reason_name = field_name=='zhiye_file_list'?'license_cert_reason':field_name=='zige_file_list'?'qualification_cert_reason':'work_cert_reason';
|
||||
this.setData({
|
||||
[field_name]: img_list,
|
||||
[reason_name]: ""
|
||||
});
|
||||
}else{
|
||||
this.setData({
|
||||
[field_name]: host+"/"+key,
|
||||
[reason_name]: ""
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
doUploadPhoto(event) {
|
||||
console.log("index douploadFIle: ", event);
|
||||
const scene = event.currentTarget.dataset.scene;
|
||||
const field_name = event.currentTarget.dataset.field_name;
|
||||
@@ -711,6 +833,7 @@ Component({
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("upload: ", res);
|
||||
let reason_name = field_name + "_reason";//错误原因置空
|
||||
if (res.statusCode === 204) {
|
||||
if(scene == 1){
|
||||
this.setData({
|
||||
@@ -727,12 +850,17 @@ Component({
|
||||
console.log("img_list: ", img_list);
|
||||
img_list.push(img);
|
||||
console.log("img_list: ", img_list);
|
||||
|
||||
|
||||
reason_name = field_name=='zhiye_file_list'?'license_cert_reason':field_name=='zige_file_list'?'qualification_cert_reason':'work_cert_reason';
|
||||
this.setData({
|
||||
[field_name]: img_list
|
||||
[field_name]: img_list,
|
||||
[reason_name]: ""
|
||||
});
|
||||
}else{
|
||||
this.setData({[field_name]: host+"/"+key});
|
||||
this.setData({
|
||||
[field_name]: host+"/"+key,
|
||||
[reason_name]: ""
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<view class="photo" style="border-bottom: {{avatar_reason==''?'1px solid var(--td-cell-border-color, var(--td-gray-color-3, #e7e7e7));':'unset'}}">
|
||||
<view class="title">头像 <text class="required"> *</text></view>
|
||||
<van-uploader bind:after-read="doUploadFile" data-scene="1" data-field_name="avatar" data-file_multiple="false">
|
||||
<van-uploader bind:after-read="doUploadPhoto" data-scene="1" data-field_name="avatar" data-file_multiple="false">
|
||||
<view class="right">
|
||||
<view class="note">真人正脸</view>
|
||||
<t-avatar image="{{ avatar }}" />
|
||||
@@ -39,7 +39,6 @@
|
||||
round
|
||||
>
|
||||
|
||||
|
||||
<van-picker
|
||||
show-toolbar
|
||||
title="请选择医院"
|
||||
@@ -52,7 +51,7 @@
|
||||
<van-search
|
||||
value="{{ hospital_search_val }}"
|
||||
shape="round"
|
||||
placeholder="请输入搜索关键词"
|
||||
placeholder="搜索医院"
|
||||
clearable
|
||||
bind:change="hospitalSearchChange"
|
||||
bind:search="hospitalSearch"
|
||||
@@ -61,7 +60,14 @@
|
||||
<t-cell title="科室" hover required arrow note="{{keshi_note}}" bindtap="onKeshiShow" bordered="{{ select_keshi_id == '' }}"/>
|
||||
|
||||
<view class="custom_keshi" wx:if="{{ select_keshi_id != ''}}">
|
||||
<van-field model:value="{{custom_keshi}}" label="" placeholder="请输入科室"/>
|
||||
<van-field bind:change="onCustomKeshiChange" model:value="{{custom_keshi}}" label="" placeholder="请输入科室" border="{{department_custom_name_reason == ''}}" />
|
||||
</view>
|
||||
|
||||
<view class="has_error" wx:if="{{ department_custom_name_reason != '' }}" >
|
||||
<view class="error_box">
|
||||
<t-icon color="red" name="close-circle-filled" size="48rpx" data-name="close-circle-filled" />
|
||||
<text class="error_msg">{{ department_custom_name_reason }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-popup
|
||||
@@ -156,6 +162,9 @@
|
||||
{{data.expertise_name}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view style="height: 60rpx;">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</t-popup>
|
||||
@@ -172,15 +181,16 @@
|
||||
|
||||
<van-field
|
||||
model:value="{{ office_phone }}"
|
||||
label="科室电话"
|
||||
bind:change="onOfficePhoneChange"
|
||||
placeholder="请输入科室电话"
|
||||
placeholder-style="font-size:25rpx;letter-spacing: 2rpx;color:rgba(0, 0, 0, 0.4);"
|
||||
input-align="right"
|
||||
required
|
||||
clearable
|
||||
border="{{ department_custom_mobile_reason == '' }}"
|
||||
custom-style="font-size:30rpx;"
|
||||
/>
|
||||
>
|
||||
<text slot="label">科室电话 <text style="color: #e34d59;">*</text> </text>
|
||||
</van-field>
|
||||
|
||||
<view class="has_error" wx:if="{{ department_custom_mobile_reason != '' }}" >
|
||||
<view class="error_box">
|
||||
@@ -238,6 +248,7 @@
|
||||
upload_cell_note="查看示例"
|
||||
has_error_content="{{ license_cert_reason }}"
|
||||
wx:if="{{indentity}}"
|
||||
is_multiple="true"
|
||||
/>
|
||||
|
||||
<m-upload-cell
|
||||
@@ -255,6 +266,7 @@
|
||||
upload_cell_note="查看示例"
|
||||
has_error_content="{{ qualification_cert_reason }}"
|
||||
wx:if="{{indentity}}"
|
||||
is_multiple="true"
|
||||
/>
|
||||
|
||||
<m-upload-cell
|
||||
@@ -272,9 +284,15 @@
|
||||
upload_cell_note="查看示例"
|
||||
has_error_content="{{ work_cert_reason }}"
|
||||
wx:if="{{indentity}}"
|
||||
is_multiple="true"
|
||||
/>
|
||||
|
||||
<view class="sub_button" wx:if="{{indentity}}">
|
||||
<!-- <van-button color="#D3D3D3" disabled custom-style="border-radius: 20rpx;" type="primary" block>资料未填写完</van-button> -->
|
||||
<van-button disabled="{{iden_auth_disabled}}" color="#3CC7C0" custom-style="border-radius: 20rpx;" type="primary" block bind:click="addDoctorAuthIden">{{iden_auth_status_txt}}</van-button>
|
||||
</view>
|
||||
<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="{{iden_auth_status == 2}}" custom-style="border-radius: 20rpx;" type="primary" block bind:click="addDoctorAuthIden">{{iden_auth_status_txt}}</van-button>
|
||||
</view>
|
||||
|
||||
|
||||
<van-toast id="van-toast" />
|
||||
@@ -1,6 +1,4 @@
|
||||
.required{
|
||||
color: #e34d59;
|
||||
}
|
||||
|
||||
.photo{
|
||||
position: relative;
|
||||
padding: 32rpx 32rpx 32rpx 0;
|
||||
@@ -67,6 +65,9 @@
|
||||
margin: 20rpx 10rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.t-radio__icon--checked {
|
||||
color: #49B9AD !important;
|
||||
}
|
||||
.t-tabs__item--active{
|
||||
color: #49B9AD !important;
|
||||
}
|
||||
@@ -119,10 +120,6 @@
|
||||
height: 300rpx;
|
||||
background-color: cadetblue;
|
||||
}
|
||||
/* 自定义 vant required 小红点位置 */
|
||||
.van-cell--required::before {
|
||||
left: 4.7rem !important;
|
||||
}
|
||||
.zhuanchang_box{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -142,7 +139,6 @@
|
||||
}
|
||||
.zhuanchang_block {
|
||||
width: 100vw;
|
||||
height: 240px;
|
||||
background: #fff;
|
||||
border-top-left-radius: 16rpx;
|
||||
border-top-right-radius: 16rpx;
|
||||
@@ -220,4 +216,7 @@
|
||||
.van-search {
|
||||
top: -270px !important;
|
||||
position: relative !important;
|
||||
}
|
||||
.custom_keshi_error{
|
||||
display: none;
|
||||
}
|
||||
@@ -12,6 +12,10 @@ Component({
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
upload_cell_note: {
|
||||
type: String,
|
||||
value: '示例备注',
|
||||
@@ -39,6 +43,10 @@ Component({
|
||||
max_count:{
|
||||
type: Number,
|
||||
value: 1
|
||||
},
|
||||
is_multiple:{
|
||||
type: Boolean,
|
||||
value: false,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<view class="upload-cell">
|
||||
<view class="upload-cell-top">
|
||||
<view class="upload-cell-name">{{ upload_cell_name }}<text wx:if="{{ required }}" class="required"> *</text></view>
|
||||
<view class="upload-cell-note t-cell__note" bindtap="onshowNote">
|
||||
<view class="upload-cell-note t-cell__note" bindtap="onshowNote" wx:if="{{upload_cell_note != ''}}">
|
||||
<view><t-icon name="{{ t_icon_name }}" size="{{ t_icon_size}}" data-name="{{ t_icon_name }}" /></view>
|
||||
<text>{{ upload_cell_note }}</text>
|
||||
</view>
|
||||
@@ -10,7 +10,7 @@
|
||||
<text>{{ upload_cell_desc }}</text>
|
||||
</view>
|
||||
<view class="upload-cell-input">
|
||||
<van-uploader preview-full-image="{{false}}" file-list="{{ fileList }}" max-count="{{max_count}}" deletable="{{ true }}" bind:after-read="afterRead" bind:delete="delete" >
|
||||
<van-uploader disabled="{{disabled}}" multiple="{{is_multiple}}" preview-full-image="{{false}}" file-list="{{ fileList }}" max-count="{{max_count}}" deletable="{{ true }}" bind:after-read="afterRead" bind:delete="delete" >
|
||||
<van-image width="100" height="100" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/upload_button.png" />
|
||||
</van-uploader>
|
||||
</view>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { API } from "../../utils/network/api";
|
||||
const api = new API()
|
||||
// commpents/wenzhen_data/index.js
|
||||
Component({
|
||||
/**
|
||||
@@ -87,6 +89,8 @@ Component({
|
||||
this.setData({
|
||||
show: false
|
||||
})
|
||||
|
||||
console.log("开始订阅消息");
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM'],
|
||||
success (res) {
|
||||
@@ -100,6 +104,24 @@ Component({
|
||||
}
|
||||
})
|
||||
},
|
||||
postDoctorInquiry(e){
|
||||
this.setData({
|
||||
show: false
|
||||
})
|
||||
console.log("order_inquiry_id: ", e.currentTarget.dataset.order_inquiry_id);
|
||||
let params = {};
|
||||
params.order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
|
||||
console.log("params: ",params)
|
||||
api.postDoctorInquiry(params).then(response => {
|
||||
console.log("开始接诊");
|
||||
console.log(response);
|
||||
}).then(() => {
|
||||
this.goChat(e);
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
|
||||
},
|
||||
tabShow(){
|
||||
this.setData({
|
||||
show: true
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<van-button type="default" bindtap="tabShow" custom-style="width:200rpx; border-radius: 10rpx;margin-left:20rpx;" color="#3CC7C0">去接诊</van-button>
|
||||
</view>
|
||||
<view class="btn" wx:if="{{ status >= 4 }}">
|
||||
<van-button bind:click="goChat" data-from_account="{{from_account}}" data-url="/Pages/yishi/chat/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
|
||||
<van-button bind:click="goChat" data-from_account="{{from_account}}" data-inquiry_type="{{inquiry_type}}" data-order_inquiry_id="{{order_inquiry_id}}" data-url="/Pages/yishi/chat/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
|
||||
<!-- <van-button bind:click="go" data-url="/Pages/yishi/chat_session/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">会话列表</van-button> -->
|
||||
</view>
|
||||
</view>
|
||||
@@ -27,7 +27,7 @@
|
||||
<view class="pop_note">为保障服务质量,请您查看患者病历信息在选择是否接诊。</view>
|
||||
<view class="pop_btn">
|
||||
<view class="pop_btn_left" bindtap="go" data-from_account="{{from_account}}" data-url="/Pages/yishi/case/index?order_inquiry_id={{order_inquiry_id}}" >去查看</view>
|
||||
<view class="pop_btn_right" bindtap="goChat" data-from_account="{{from_account}}" data-inquiry_type="{{inquiry_type}}" data-order_inquiry_id="{{order_inquiry_id}}" data-url="/Pages/yishi/chat/index" >去接诊</view>
|
||||
<view class="pop_btn_right" bindtap="postDoctorInquiry" data-from_account="{{from_account}}" data-inquiry_type="{{inquiry_type}}" data-order_inquiry_id="{{order_inquiry_id}}" data-url="/Pages/yishi/chat/index" >去接诊</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
Reference in New Issue
Block a user