followDetails.js 3.7 KB

1
  1. "use strict";var o=require("../common/vendor.js"),e=require("../store/index.js"),t=require("../api/follow.js");require("../store/modules.js"),require("../store/modules/timStore.js"),require("../common/request.js");const l={data:()=>({followId:null,follow:null,doctor:null,form:null}),onLoad(o){this.followId=o.followId},onShow(){this.getFollowById()},methods:{toIM(){var t="C2CD-"+this.follow.doctorId;console.log(o.index.$TUIKit.TUIConversationServer),e.store.commit("timStore/setType","startFollow"),e.store.commit("timStore/setOrderId",this.follow.orderId),e.store.commit("timStore/setFollowId",this.follow.followId),e.store.commit("timStore/setImType",2),e.store.commit("timStore/setConversationID",t),o.index.$TUIKit.TUIConversationServer.setMessageRead(t),o.index.$TUIKit.TUIConversationServer.getConversationProfile(t).then((t=>{var l;console.log(t);const{conversation:s}=t.data;e.store.commit("timStore/setConversation",s);let r="/pages/TUIKit/TUIPages/TUIChat/index";s.userProfile,r=`${r}?conversationName=${(null==(l=s.userProfile.nick)?void 0:l.nick)||s.userProfile.userID}`,o.index.redirectTo({url:r})})).catch((o=>{console.warn("获取 group profile 异常 = ",o)}))},doFollow(){o.index.showModal({title:"提示",content:"确认提交吗吗?",showCancel:!0,cancelText:"取消",confirmText:"确定",success:e=>{if(e.confirm){var l={followId:this.followId,formJson:JSON.stringify(this.form)};t.doFollow(l).then((e=>{200==e.code?(o.index.showToast({icon:"success",title:"操作成功"}),setTimeout((function(){o.index.$emit("refreshFollowList"),o.index.navigateBack({delta:1})}),500)):o.index.showToast({icon:"none",title:e.msg})}),(o=>{}))}}})},getFollowById(){var o={followId:this.followId};t.getFollowById(o).then((o=>{200==o.code&&(this.follow=o.follow,this.doctor=o.doctor,this.form=JSON.parse(this.follow.formJson))}),(o=>{}))}}};if(!Array){(o.resolveComponent("u-alert")+o.resolveComponent("u-radio")+o.resolveComponent("u-radio-group")+o.resolveComponent("u-checkbox")+o.resolveComponent("u-checkbox-group")+o.resolveComponent("u--textarea"))()}Math||((()=>"../uni_modules/uview-plus/components/u-alert/u-alert.js")+(()=>"../uni_modules/uview-plus/components/u-radio/u-radio.js")+(()=>"../uni_modules/uview-plus/components/u-radio-group/u-radio-group.js")+(()=>"../uni_modules/uview-plus/components/u-checkbox/u-checkbox.js")+(()=>"../uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.js")+(()=>"../uni_modules/uview-plus/components/u--textarea/u--textarea.js"))();var s=o._export_sfc(l,[["render",function(e,t,l,s,r,n){return o.e({a:o.p({fontSize:"13",type:"info",description:"为了给您提供更好的服务,希望您能用几分钟时间,将您的感受和建议告诉我们,我们非常重视您的宝贵意见!"}),b:o.t(null!=e.dortor?r.doctor.doctorName:""),c:null!=r.follow},null!=r.follow?{d:o.t(r.follow.num),e:o.t(r.follow.totalNum)}:{},{f:o.t(r.follow.planTime),g:o.f(r.form,((e,t,l)=>o.e({a:o.t(e.question),b:1==e.type},1==e.type?{c:o.f(e.options,((e,t,s)=>({a:t,b:"66a54ded-2-"+l+"-"+s+",66a54ded-1-"+l,c:o.p({customStyle:{marginBottom:"8px"},label:e,name:e})}))),d:"66a54ded-1-"+l,e:o.o((o=>e.answers=o)),f:o.p({disabled:!0,placement:"column",modelValue:e.answers})}:{},{g:2==e.type},2==e.type?{h:o.f(e.options,((e,t,s)=>({a:t,b:"66a54ded-4-"+l+"-"+s+",66a54ded-3-"+l,c:o.p({customStyle:{marginBottom:"8px"},label:e,name:e})}))),i:"66a54ded-3-"+l,j:o.o((o=>e.answers=o)),k:o.p({disabled:!0,placement:"column",modelValue:e.answers})}:{},{l:3==e.type},3==e.type?{m:"66a54ded-5-"+l,n:o.o((o=>e.answers=o)),o:o.p({disabled:!0,count:!0,maxlength:"200",placeholder:"请输入内容",modelValue:e.answers})}:{}))),h:o.o((o=>n.toIM()))})}],["__scopeId","data-v-66a54ded"]]);wx.createPage(s);