12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- template.helper("isAsk", function(a){
- if(a){
- return "已经";
- }
- return "立即";
- })
- function openFqzx(doctor, docName, $li){
- openWebviewExtras("faqizixun.html",{
- openId: self.opener().id,
- aa: self.aa,
- type: 2,
- doctor: doctor,
- doctorName: docName,
- doctorPhoto: $li.attr('data-photo'),
- doctorSex: $li.attr('data-sex'),
- doctorType: $li.attr('data-level'),
- consultInfo: self.consultInfo
- });
- }
- function openP2p(extras){
- var wv = mui.openWindow({
- url:"../../message/html/p2p.html",
- id: "p2p",
- extras: extras
- })
- }
- $(document).on('click',"li .div-lijizixun-btn", function(){
- if($(this).hasClass("disabled"))
- return;
-
- var $li = $(this).parent();
- var doctor = $li.attr('data-code');
- var docName = $li.attr('data-name');
- var extras = {
- otherCode: doctor,
- otherName: docName,
- otherSex: $li.attr('data-sex'),
- otherPhoto: $li.attr('data-photo')
- }
- service.hasUnfinishedConsult(doctor, function(res){
- extras.consultData = res.data;
- if(res.data.isCommonTeam){
- //同一团队
- openP2p(extras);
- return;
- }
-
- if(res.data.consult){
- mui.confirm("您与"+ docName +"医生当前有进行中咨询,不可发起求助,您可直接进入咨询提问",
- "提示", ["查看咨询", "我知道了"], function(e){
- if(e.index==0){
- openP2p(extras);
- }
- })
- } else if(isConsulted){
- mui.confirm("针对本次咨询,您已求助过。是否继续向其他人求助?",
- "提示", ["不了,谢谢", "继续求助"], function(e){
- if(e.index==1){
- openFqzx(doctor, docName, $li);
- }
- })
- } else
- openFqzx(doctor, docName, $li);
- })
- return;
- });
- template.helper("setPhoto", function(p) {
- return getImgUrl(p);
- });
|