"use strict";var o=require("../common/vendor.js"),a=require("../store/index.js"),_=require("../api/follow.js");require("../store/modules.js");require("../store/modules/timStore.js");require("../common/request.js");const f={data(){return{followId:null,follow:null,doctor:null,form:null}},onLoad(u){this.followId=u.followId},onShow(){this.getFollowById()},methods:{toIM(){var u="C2CD-"+this.follow.doctorId;console.log(o.index.$TUIKit.TUIConversationServer),a.store.commit("timStore/setType","startFollow"),a.store.commit("timStore/setOrderId",this.follow.orderId),a.store.commit("timStore/setFollowId",this.follow.followId),a.store.commit("timStore/setImType",2),a.store.commit("timStore/setConversationID",u),o.index.$TUIKit.TUIConversationServer.setMessageRead(u),o.index.$TUIKit.TUIConversationServer.getConversationProfile(u).then(t=>{var r;console.log(t);const{conversation:s}=t.data;a.store.commit("timStore/setConversation",s);let c="/pages/TUIKit/TUIPages/TUIChat/index";s.userProfile,c=`${c}?conversationName=${((r=s.userProfile.nick)==null?void 0:r.nick)||s.userProfile.userID}`,o.index.redirectTo({url:c})}).catch(t=>{console.warn("\u83B7\u53D6 group profile \u5F02\u5E38 = ",t)})},doFollow(){o.index.showModal({title:"\u63D0\u793A",content:"\u786E\u8BA4\u63D0\u4EA4\u5417\u5417?",showCancel:!0,cancelText:"\u53D6\u6D88",confirmText:"\u786E\u5B9A",success:u=>{if(u.confirm){var t={followId:this.followId,formJson:JSON.stringify(this.form)};_.doFollow(t).then(s=>{s.code==200?(o.index.showToast({icon:"success",title:"\u64CD\u4F5C\u6210\u529F"}),setTimeout(function(){o.index.$emit("refreshFollowList"),o.index.navigateBack({delta:1})},500)):o.index.showToast({icon:"none",title:s.msg})},s=>{})}}})},getFollowById(){var u={followId:this.followId};_.getFollowById(u).then(t=>{t.code==200&&(this.follow=t.follow,this.doctor=t.doctor,this.form=JSON.parse(this.follow.formJson))},t=>{})}}};if(!Array){const u=o.resolveComponent("u-alert"),t=o.resolveComponent("u-radio"),s=o.resolveComponent("u-radio-group"),c=o.resolveComponent("u-checkbox"),r=o.resolveComponent("u-checkbox-group"),i=o.resolveComponent("u--textarea");(u+t+s+c+r+i)()}const p=()=>"../uni_modules/uview-plus/components/u-alert/u-alert.js",w=()=>"../uni_modules/uview-plus/components/u-radio/u-radio.js",h=()=>"../uni_modules/uview-plus/components/u-radio-group/u-radio-group.js",v=()=>"../uni_modules/uview-plus/components/u-checkbox/u-checkbox.js",x=()=>"../uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.js",g=()=>"../uni_modules/uview-plus/components/u--textarea/u--textarea.js";Math||(p+w+h+v+x+g)();function I(u,t,s,c,r,i){return o.e({a:o.p({fontSize:"13",type:"info",description:"\u4E3A\u4E86\u7ED9\u60A8\u63D0\u4F9B\u66F4\u597D\u7684\u670D\u52A1\uFF0C\u5E0C\u671B\u60A8\u80FD\u7528\u51E0\u5206\u949F\u65F6\u95F4\uFF0C\u5C06\u60A8\u7684\u611F\u53D7\u548C\u5EFA\u8BAE\u544A\u8BC9\u6211\u4EEC\uFF0C\u6211\u4EEC\u975E\u5E38\u91CD\u89C6\u60A8\u7684\u5B9D\u8D35\u610F\u89C1!"}),b:o.t(u.dortor!=null?r.doctor.doctorName:""),c:r.follow!=null},r.follow!=null?{d:o.t(r.follow.num),e:o.t(r.follow.totalNum)}:{},{f:o.t(r.follow.planTime),g:o.f(r.form,(e,C,n)=>o.e({a:o.t(e.question),b:e.type==1},e.type==1?{c:o.f(e.options,(l,d,m)=>({a:d,b:"703ddbf6-2-"+n+"-"+m+","+("703ddbf6-1-"+n),c:o.p({customStyle:{marginBottom:"8px"},label:l,name:l})})),d:"703ddbf6-1-"+n,e:o.o(l=>e.answers=l),f:o.p({disabled:!0,placement:"column",modelValue:e.answers})}:{},{g:e.type==2},e.type==2?{h:o.f(e.options,(l,d,m)=>({a:d,b:"703ddbf6-4-"+n+"-"+m+","+("703ddbf6-3-"+n),c:o.p({customStyle:{marginBottom:"8px"},label:l,name:l})})),i:"703ddbf6-3-"+n,j:o.o(l=>e.answers=l),k:o.p({disabled:!0,placement:"column",modelValue:e.answers})}:{},{l:e.type==3},e.type==3?{m:"703ddbf6-5-"+n,n:o.o(l=>e.answers=l),o:o.p({disabled:!0,count:!0,maxlength:"200",placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9",modelValue:e.answers})}:{})),h:o.o(e=>i.toIM())})}var y=o._export_sfc(f,[["render",I],["__scopeId","data-v-703ddbf6"],["__file","E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_user/followDetails.vue"]]);wx.createPage(y);