"use strict"; var common_vendor = require("../common/vendor.js"); var store_index = require("../store/index.js"); var api_follow = require("../api/follow.js"); require("../store/modules.js"); require("../store/modules/timStore.js"); require("../common/request.js"); const _sfc_main = { data() { return { followId: null, follow: null, doctor: null, form: null }; }, onLoad(options) { this.followId = options.followId; }, onShow() { this.getFollowById(); }, methods: { toIM() { var id = "C2CD-" + this.follow.doctorId; console.log(common_vendor.index.$TUIKit.TUIConversationServer); store_index.store.commit("timStore/setType", "startFollow"); store_index.store.commit("timStore/setOrderId", this.follow.orderId); store_index.store.commit("timStore/setFollowId", this.follow.followId); store_index.store.commit("timStore/setImType", 2); store_index.store.commit("timStore/setConversationID", id); common_vendor.index.$TUIKit.TUIConversationServer.setMessageRead(id); common_vendor.index.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => { var _a; console.log(res); const { conversation } = res.data; store_index.store.commit("timStore/setConversation", conversation); let url = "/pages/TUIKit/TUIPages/TUIChat/index"; conversation.userProfile; url = `${url}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}`; common_vendor.index.redirectTo({ url }); }).catch((err) => { console.warn("\u83B7\u53D6 group profile \u5F02\u5E38 = ", err); }); }, doFollow() { common_vendor.index.showModal({ title: "\u63D0\u793A", content: "\u786E\u8BA4\u63D0\u4EA4\u5417\u5417?", showCancel: true, cancelText: "\u53D6\u6D88", confirmText: "\u786E\u5B9A", success: (res) => { if (res.confirm) { var data = { followId: this.followId, formJson: JSON.stringify(this.form) }; api_follow.doFollow(data).then((res2) => { if (res2.code == 200) { common_vendor.index.showToast({ icon: "success", title: "\u64CD\u4F5C\u6210\u529F" }); setTimeout(function() { common_vendor.index.$emit("refreshFollowList"); common_vendor.index.navigateBack({ delta: 1 }); }, 500); } else { common_vendor.index.showToast({ icon: "none", title: res2.msg }); } }, (rej) => { }); } } }); }, getFollowById() { var data = { followId: this.followId }; api_follow.getFollowById(data).then((res) => { if (res.code == 200) { this.follow = res.follow; this.doctor = res.doctor; this.form = JSON.parse(this.follow.formJson); } }, (err) => { }); } } }; if (!Array) { const _easycom_u_alert2 = common_vendor.resolveComponent("u-alert"); const _easycom_u_radio2 = common_vendor.resolveComponent("u-radio"); const _easycom_u_radio_group2 = common_vendor.resolveComponent("u-radio-group"); const _easycom_u_checkbox2 = common_vendor.resolveComponent("u-checkbox"); const _easycom_u_checkbox_group2 = common_vendor.resolveComponent("u-checkbox-group"); const _easycom_u__textarea2 = common_vendor.resolveComponent("u--textarea"); (_easycom_u_alert2 + _easycom_u_radio2 + _easycom_u_radio_group2 + _easycom_u_checkbox2 + _easycom_u_checkbox_group2 + _easycom_u__textarea2)(); } const _easycom_u_alert = () => "../uni_modules/uview-plus/components/u-alert/u-alert.js"; const _easycom_u_radio = () => "../uni_modules/uview-plus/components/u-radio/u-radio.js"; const _easycom_u_radio_group = () => "../uni_modules/uview-plus/components/u-radio-group/u-radio-group.js"; const _easycom_u_checkbox = () => "../uni_modules/uview-plus/components/u-checkbox/u-checkbox.js"; const _easycom_u_checkbox_group = () => "../uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.js"; const _easycom_u__textarea = () => "../uni_modules/uview-plus/components/u--textarea/u--textarea.js"; if (!Math) { (_easycom_u_alert + _easycom_u_radio + _easycom_u_radio_group + _easycom_u_checkbox + _easycom_u_checkbox_group + _easycom_u__textarea)(); } function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return common_vendor.e({ a: common_vendor.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: common_vendor.t(_ctx.dortor != null ? $data.doctor.doctorName : ""), c: $data.follow != null }, $data.follow != null ? { d: common_vendor.t($data.follow.num), e: common_vendor.t($data.follow.totalNum) } : {}, { f: common_vendor.t($data.follow.planTime), g: common_vendor.f($data.form, (item, index, i0) => { return common_vendor.e({ a: common_vendor.t(item.question), b: item.type == 1 }, item.type == 1 ? { c: common_vendor.f(item.options, (option, subIndex, i1) => { return { a: subIndex, b: "703ddbf6-2-" + i0 + "-" + i1 + "," + ("703ddbf6-1-" + i0), c: common_vendor.p({ customStyle: { marginBottom: "8px" }, label: option, name: option }) }; }), d: "703ddbf6-1-" + i0, e: common_vendor.o(($event) => item.answers = $event), f: common_vendor.p({ disabled: true, placement: "column", modelValue: item.answers }) } : {}, { g: item.type == 2 }, item.type == 2 ? { h: common_vendor.f(item.options, (option, subIndex, i1) => { return { a: subIndex, b: "703ddbf6-4-" + i0 + "-" + i1 + "," + ("703ddbf6-3-" + i0), c: common_vendor.p({ customStyle: { marginBottom: "8px" }, label: option, name: option }) }; }), i: "703ddbf6-3-" + i0, j: common_vendor.o(($event) => item.answers = $event), k: common_vendor.p({ disabled: true, placement: "column", modelValue: item.answers }) } : {}, { l: item.type == 3 }, item.type == 3 ? { m: "703ddbf6-5-" + i0, n: common_vendor.o(($event) => item.answers = $event), o: common_vendor.p({ disabled: true, count: true, maxlength: "200", placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9", modelValue: item.answers }) } : {}); }), h: common_vendor.o(($event) => $options.toIM()) }); } var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-703ddbf6"], ["__file", "E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_user/followDetails.vue"]]); wx.createPage(MiniProgramPage);