Browse Source

患者端微信小程序分享相关

master
kuaileWu 3 months ago
parent
commit
afffd87720
  1. 14
      pages/index/index.vue
  2. 35
      pages/prebook/prebook.vue
  3. 9
      pages/visitors/visitors.vue

14
pages/index/index.vue

@ -122,14 +122,6 @@
preBookList,
},
onLoad(option) {
// define('DEPART_TYPE_FULL', 0); //
// define('DEPART_TYPE_COUNT', 1); //
// define('DEPART_TYPE_CARD', 2); //
// $GLOBALS['depart_type_list'] = array(
// DEPART_TYPE_FULL => '',
// DEPART_TYPE_COUNT => '',
// DEPART_TYPE_CARD => ''
// );
if(option.code && option.state) {
this.code = option.code
this.state = option.state
@ -301,6 +293,12 @@
lat: lats
}
}
},
onShareAppMessage() {
return {
title: this.doctorInfo.doctor_info.doctor_name + '的预约挂号',
path: '/pages/index/index?did='+this.doctor_id
}
}
}
</script>

35
pages/prebook/prebook.vue

@ -27,7 +27,7 @@
</view>
<view class="item" >
<view class="left">医生姓名</view>
<view class="right">{{doctorInfo.doctor_info.doctor_name}}</view>
<view class="right">{{doctor_name}}</view>
</view>
<view class="item">
<view class="left">就诊医院</view>
@ -64,30 +64,41 @@
departId:false,
depart:false,
visitor_ids:false,
checkin:false,
doctor_name:''
}
},
components:{
Book,
SliderBox
},
onLoad(option) {
if(option.checkin) this.checkin = true
},
onShow() {
var activeVisitors = uni.getStorageSync('active_visitors')
if(!activeVisitors){
this.$func.toPage('/pages/index/index')
return
}
this.activeVisitors = JSON.parse(activeVisitors)
this.departId = uni.getStorageSync('depart_id')
this.depart = uni.getStorageSync('depart')
var doctorInfo = uni.getStorageSync('doctor_info')
var redi_path = '/pages/index/index'
if(this.departId && this.checkin) redi_path = "/pages/visitors/visitors?type=3&depart_id="+this.departId
if(!doctorInfo){
this.$pop.modelShow('请先选择要预约的医生', '/pages/index/index')
this.$pop.modelShow('请先选择要预约的医生', redi_path)
return
}
var activeVisitors = uni.getStorageSync('active_visitors')
if(!activeVisitors){
this.$func.toPage(redi_path)
return
}
this.activeVisitors = JSON.parse(activeVisitors)
this.doctorInfo = JSON.parse(doctorInfo)
this.doctor_name = this.doctorInfo.doctor_info.doctor_name
if(!this.departId && this.depart) {
this.$pop.modelShow('请先选择要预约的医院科室', '/pages/index/index')
this.$pop.modelShow('请先选择要预约的医院科室', redi_path)
return
}
this.depart = JSON.parse(this.depart)
@ -120,7 +131,11 @@
times:false,
success() {
setTimeout(function(){
if(that.checkin) {
that.$nav.navToPath("/pages/visitors/visitors?type=3&depart_id="+that.departId)
}else{
that.$nav.navToPath("/pages/prebook_list/prebook_list")
}
}, 1500)
}
})

9
pages/visitors/visitors.vue

@ -112,6 +112,7 @@
is_preview:false,
doctorInfo:false,
hospitals:false,
checkin:false,
}
},
components:{
@ -131,6 +132,8 @@
if(type) this.type = type
}
if(option.checkin) this.checkin = true
uni.setStorageSync('visitor_type', this.type)
this.depart_id = uni.getStorageSync('depart_id')
@ -207,7 +210,7 @@
});
},
appointTime(){
this.$nav.navToPath("/pages/visitors/visitors?type=1&is_preview=1")
this.$nav.navToPath("/pages/visitors/visitors?type=1&is_preview=1&checkin=1")
},
modifyVistor(visitor){
uni.setStorageSync('visitor_info_'+visitor.id, JSON.stringify(visitor))
@ -325,7 +328,9 @@
return
}
//
this.$nav.navToPath("/pages/prebook/prebook")
var prebook = "/pages/prebook/prebook"
if(this.checkin) prebook = prebook+'?checkin=1'
this.$nav.navToPath(prebook)
}
}

Loading…
Cancel
Save