"use strict"; const common_vendor = require("../../common/vendor.js"); const common_assets = require("../../common/assets.js"); const api_message = require("../../api/message.js"); const api_student = require("../../api/student.js"); const utils_chatSocket = require("../../utils/chatSocket.js"); const utils_request = require("../../utils/request.js"); const _sfc_main = { __name: "chat", setup(__props) { const loading = common_vendor.ref(true); const messages = common_vendor.ref([]); const inputValue = common_vendor.ref(""); const inputMode = common_vendor.ref("text"); const activePanel = common_vendor.ref("none"); const lastMessageId = common_vendor.ref("bottom-anchor"); const statusBarHeight = common_vendor.ref(20); const sessionId = common_vendor.ref(null); const fromUserId = common_vendor.ref(null); const sessionUserName = common_vendor.ref(""); const jobName = common_vendor.ref(""); const chatType = common_vendor.ref("job"); const trainingTitle = common_vendor.ref(""); const assessmentTitle = common_vendor.ref(""); const assessmentCover = common_vendor.ref(""); const assessmentLevel = common_vendor.ref(""); const assessmentId = common_vendor.ref(""); const assessmentPrice = common_vendor.ref(""); const positionId = common_vendor.ref(null); const salaryRange = common_vendor.ref(""); const companyName = common_vendor.ref(""); const workCity = common_vendor.ref(""); const workDistrict = common_vendor.ref(""); const waiterAvatar = common_vendor.ref("/static/images/hr_avatar.svg"); function resolveAvatarUrl(url) { if (!url || url === "" || url === "undefined") return ""; const str = String(url).trim(); if (str.startsWith("http://") || str.startsWith("https://")) return str; if (/^\d+$/.test(str)) { return `${utils_request.BASE_URL}/resource/oss/file/${str}`; } if (str.startsWith("/static/")) return ""; return str; } const userAvatarUrl = common_vendor.ref("/static/images/user_avatar.png"); const emojiList = ["😀", "😃", "😄", "😁", "😆", "😅", "😂", "🤣", "😊", "😇", "🙂", "🙃", "😉", "😌", "😍", "🥰", "😘", "😗", "😙", "😚", "😋", "😛", "😝", "😜", "🤪", "🤨", "🧐", "🤓", "😎", "🤩", "🥳"]; let wsSubId = null; common_vendor.onLoad(async (options) => { try { const sysInfo = common_vendor.index.getSystemInfoSync(); statusBarHeight.value = sysInfo.statusBarHeight || 20; } catch (e) { } if (options.sessionId) sessionId.value = options.sessionId; if (options.fromUserId) fromUserId.value = options.fromUserId; if (options.userName) sessionUserName.value = decodeURIComponent(options.userName); if (options.jobName) jobName.value = decodeURIComponent(options.jobName); if (options.type) chatType.value = options.type; if (options.title) trainingTitle.value = decodeURIComponent(options.title || ""); if (options.title && options.type === "assessment") { assessmentTitle.value = decodeURIComponent(options.title || ""); } if (options.cover) assessmentCover.value = decodeURIComponent(options.cover || ""); if (options.level) assessmentLevel.value = decodeURIComponent(options.level || ""); if (options.assessmentId) assessmentId.value = options.assessmentId; if (options.price) assessmentPrice.value = options.price; if (options.positionId) positionId.value = options.positionId; if (options.salaryRange) salaryRange.value = decodeURIComponent(options.salaryRange); if (options.companyName) companyName.value = decodeURIComponent(options.companyName); if (options.workCity) workCity.value = decodeURIComponent(options.workCity); if (options.workDistrict) workDistrict.value = decodeURIComponent(options.workDistrict); const storedInfo = common_vendor.index.getStorageSync("userInfo") || {}; const rawUserAvatar = storedInfo.avatarUrl || storedInfo.avatar || "/static/images/user_avatar.png"; userAvatarUrl.value = resolveAvatarUrl(rawUserAvatar) || "/static/images/user_avatar.png"; if (!fromUserId.value && storedInfo.studentId) fromUserId.value = storedInfo.studentId; if (!sessionId.value) { loading.value = false; common_vendor.index.showToast({ title: "会话参数缺失", icon: "none" }); return; } await loadHistory(); connectWebSocket(); if (chatType.value === "assessment") { setTimeout(async () => { try { const userInfo = common_vendor.index.getStorageSync("userInfo") || {}; const res = await api_message.autoCreateOrderCard({ sessionId: sessionId.value, studentId: userInfo.studentId || fromUserId.value, orderName: assessmentTitle.value || jobName.value + "-测评服务费", orderPrice: assessmentPrice.value || "0", orderType: "测评咨询" }); if (res.code === 200 && res.data) { pushOrderCardMsg(res.data); } else { common_vendor.index.__f__("error", "at pages/chat/chat.vue:418", "自动创建结算单失败:", res); } } catch (err) { common_vendor.index.__f__("error", "at pages/chat/chat.vue:421", "自动创建结算单异常:", err); } }, 800); } else if (chatType.value === "job" && positionId.value) { try { const { getAssessmentList } = require("../../api/assessment.js"); const evalRes = await getAssessmentList({ positionId: positionId.value, pageNum: 1, pageSize: 1 }); if (evalRes.code === 200 && evalRes.rows && evalRes.rows.length > 0) { const firstEval = evalRes.rows[0]; if (!assessmentId.value) { assessmentId.value = String(firstEval.id); common_vendor.index.__f__("log", "at pages/chat/chat.vue:435", "[Chat] 岗位关联测评ID:", assessmentId.value); } setTimeout(async () => { try { const userInfo = common_vendor.index.getStorageSync("userInfo") || {}; const res = await api_message.autoCreateOrderCard({ sessionId: sessionId.value, studentId: userInfo.studentId || fromUserId.value, orderName: (firstEval.evaluationName || jobName.value) + "-测评服务费", orderPrice: firstEval.price || assessmentPrice.value || "0", orderType: "岗位测评" }); if (res.code === 200 && res.data) { pushOrderCardMsg(res.data); } } catch (err) { common_vendor.index.__f__("error", "at pages/chat/chat.vue:450", "岗位结算单异常:", err); } }, 800); } else { common_vendor.index.__f__("log", "at pages/chat/chat.vue:453", "[Chat] 该岗位无关联测评,不发送结算单"); } } catch (e) { common_vendor.index.__f__("error", "at pages/chat/chat.vue:456", "[Chat] 查询关联测评失败:", e); } } }); let orderTimer = null; function startOrderTimer() { if (orderTimer) return; orderTimer = setInterval(() => { messages.value.forEach((m) => { if (m.msgType === "order_card" && !m.isPaid && m.countdown > 0) { m.countdown--; } }); }, 1e3); } common_vendor.onUnload(() => { if (wsSubId) { utils_chatSocket.unsubscribe(wsSubId); wsSubId = null; } utils_chatSocket.disconnectChat(); if (orderTimer) clearInterval(orderTimer); }); async function loadHistory() { try { const res = await api_message.getChatHistory({ sessionId: sessionId.value, pageNum: 1, pageSize: 50 }); if (res.rows) { messages.value = res.rows.slice().reverse().map(normalizeMsg); scrollToBottom(); const firstWaiterMsg = res.rows.find((m) => m.senderType === 2); if (firstWaiterMsg && firstWaiterMsg.senderAvatar) { const resolvedWaiterAvatar = resolveAvatarUrl(firstWaiterMsg.senderAvatar); if (resolvedWaiterAvatar) { waiterAvatar.value = resolvedWaiterAvatar; } } if (messages.value.length > 0) { const lastMsg = messages.value[messages.value.length - 1]; if (lastMsg.id && !lastMsg.id.toString().startsWith("temp")) { api_message.markChatRead({ sessionId: sessionId.value, lastReadMsgId: lastMsg.id }); } } } } catch (e) { common_vendor.index.__f__("error", "at pages/chat/chat.vue:508", "[Chat] 加载历史消息失败:", e); } finally { loading.value = false; } if (fromUserId.value) { try { const stuRes = await api_student.getStudent(fromUserId.value); if (stuRes.code === 200 && stuRes.data) { const stu = stuRes.data; const resolvedUrl = resolveAvatarUrl(stu.avatarUrl || stu.avatar); if (resolvedUrl) { userAvatarUrl.value = resolvedUrl; } } } catch (e) { common_vendor.index.__f__("warn", "at pages/chat/chat.vue:526", "[Chat] 获取学员头像失败:", e); } } } function connectWebSocket() { const token = common_vendor.index.getStorageSync("token"); utils_chatSocket.connectChat({ token, onConnect: () => { common_vendor.index.__f__("log", "at pages/chat/chat.vue:537", "[Chat] WebSocket 已连接,订阅会话消息"); if (sessionId.value) { wsSubId = utils_chatSocket.subscribe(`/topic/session/${sessionId.value}`, (data) => { common_vendor.index.__f__("log", "at pages/chat/chat.vue:541", "[Chat] 收到 WebSocket 消息:", data); onWsMessage(data); }); } }, onDisconnect: () => { common_vendor.index.__f__("log", "at pages/chat/chat.vue:547", "[Chat] WebSocket 已断开"); } }); } function onWsMessage(data) { if (!data) return; const msgList = Array.isArray(data) ? data : [data]; msgList.forEach((msgData) => { const normalized = normalizeMsg(msgData); const existIdx = messages.value.findIndex( (m) => m.id && normalized.id && m.id === normalized.id || m.msgNo && normalized.msgNo && m.msgNo === normalized.msgNo ); if (existIdx >= 0) { messages.value[existIdx] = { ...messages.value[existIdx], ...normalized }; } else { messages.value.push(normalized); } }); scrollToBottom(); const lastMsg = messages.value[messages.value.length - 1]; if (lastMsg && lastMsg.id && !String(lastMsg.id).startsWith("temp")) { api_message.markChatRead({ sessionId: sessionId.value, lastReadMsgId: lastMsg.id }); } } function normalizeMsg(msg) { let payload = null; if (msg.payload) { try { payload = typeof msg.payload === "string" ? JSON.parse(msg.payload) : msg.payload; } catch (e) { } } return { id: msg.msgId, msgNo: msg.msgNo, senderType: msg.senderType, // 1=用户 2=客服 3=系统 senderName: msg.senderName, senderAvatar: msg.senderAvatar, msgType: msg.msgType || "text", content: msg.content, fileUrl: msg.fileUrl, fileName: msg.fileName, fileSize: msg.fileSize, payload, sendTime: msg.sendTime, isPaid: payload && (payload.status === "paid" || payload.status === "已支付" || payload.paid === true) }; } async function sendMessage() { const content = inputValue.value.trim(); if (!content || !sessionId.value) return; const msgNo = utils_chatSocket.generateMsgNo(); const tempId = "temp_" + Date.now(); messages.value.push({ id: tempId, msgNo, senderType: 1, msgType: "text", content, sendTime: (/* @__PURE__ */ new Date()).toISOString(), payload: null }); inputValue.value = ""; scrollToBottom(); try { if (utils_chatSocket.isSocketConnected()) { const sent = utils_chatSocket.sendTextByWs(sessionId.value, content, "text", msgNo, fromUserId.value); if (sent) return; } await api_message.sendTextMessage({ sessionId: sessionId.value, msgNo, content, msgType: "text", senderId: fromUserId.value || void 0 }); } catch (e) { messages.value = messages.value.filter((m) => m.id !== tempId); common_vendor.index.showToast({ title: "发送失败,请重试", icon: "none" }); } } async function chooseImage() { activePanel.value = "none"; common_vendor.index.chooseImage({ count: 1, success: async (res) => { const filePath = res.tempFilePaths[0]; const tempId = "temp_img_" + Date.now(); messages.value.push({ id: tempId, senderType: 1, msgType: "image", fileUrl: filePath, sendTime: (/* @__PURE__ */ new Date()).toISOString(), payload: null }); scrollToBottom(); try { const msgNo = "MSG_" + Date.now() + "_" + Math.random().toString(36).slice(2, 6); await api_message.sendImageMessage({ sessionId: sessionId.value, msgNo, filePath, senderId: fromUserId.value }); } catch (e) { messages.value = messages.value.filter((m) => m.id !== tempId); common_vendor.index.showToast({ title: "图片发送失败", icon: "none" }); } } }); } function sendMockOrderCard() { activePanel.value = "none"; messages.value.push({ id: "manual_order_" + Date.now(), msgNo: "ORDER_" + Date.now(), senderType: 2, msgType: "order_card", content: "为您推送测评费用结算单", payload: { id: 1, name: assessmentTitle.value || "测评费用", amount: assessmentPrice.value || "680.00" }, sendTime: (/* @__PURE__ */ new Date()).toISOString(), isPaid: false }); scrollToBottom(); } function pushOrderCardMsg(card) { const hasOrderCard = messages.value.some( (m) => m.msgType === "order_card" && m.payload && m.payload.orderCardId === card.orderCardId ); if (hasOrderCard) { common_vendor.index.__f__("log", "at pages/chat/chat.vue:698", "[Chat] 已存在相同结算单消息,跳过推送"); return; } messages.value.push({ id: "order_" + card.orderCardId, msgNo: "ORDER_" + Date.now(), senderType: card.senderType || 3, msgType: "order_card", content: "项目费用结算单", countdown: Math.floor(card.countdownSeconds || 1800), payload: { orderCardId: card.orderCardId, id: card.orderCardId, name: card.orderName || assessmentTitle.value || jobName.value, // 同时写入amount和price,兼容后端payload字段 amount: card.orderPrice || assessmentPrice.value || "0", price: card.orderPrice || assessmentPrice.value || "0", status: "pending" }, sendTime: (/* @__PURE__ */ new Date()).toISOString(), isPaid: false }); scrollToBottom(); startOrderTimer(); } function confirmReg() { common_vendor.index.showLoading({ title: "预约中..." }); setTimeout(() => { common_vendor.index.hideLoading(); common_vendor.index.showToast({ title: "预约成功", icon: "success" }); }, 1200); } async function handlePay(msg) { if (msg.isPaid) return; const orderCardId = msg.payload ? msg.payload.orderCardId || msg.payload.id : null; const userInfo = common_vendor.index.getStorageSync("userInfo") || {}; common_vendor.index.__f__("log", "at pages/chat/chat.vue:740", "🔥 开始支付流程"); common_vendor.index.__f__("log", "at pages/chat/chat.vue:741", "🔥 orderCardId:", orderCardId, "类型:", typeof orderCardId); common_vendor.index.__f__("log", "at pages/chat/chat.vue:742", "🔥 fromUserId:", fromUserId.value, "类型:", typeof fromUserId.value); common_vendor.index.__f__("log", "at pages/chat/chat.vue:743", "🔥 userInfo:", JSON.stringify(userInfo)); common_vendor.index.__f__("log", "at pages/chat/chat.vue:744", "🔥 msg.payload:", JSON.stringify(msg.payload)); if (!orderCardId) { common_vendor.index.showToast({ title: "无效的结算单", icon: "none" }); return; } try { common_vendor.index.showLoading({ title: "创建支付订单..." }); common_vendor.index.__f__("log", "at pages/chat/chat.vue:774", "🔥 调用支付接口,参数:", { orderCardId, userId: fromUserId.value }); const payRes = await api_message.createWxPayOrder(orderCardId, fromUserId.value); common_vendor.index.__f__("log", "at pages/chat/chat.vue:776", "🔥 支付接口响应:", payRes); if (!(payRes.code === 200 || payRes.code === 0)) { common_vendor.index.hideLoading(); common_vendor.index.showToast({ title: payRes.msg || "创建支付订单失败", icon: "none" }); common_vendor.index.__f__("log", "at pages/chat/chat.vue:781", "🔥 支付接口调用失败:", payRes); return; } if (payRes.data && payRes.data.wechatPayParams) { const wxPayParams = payRes.data.wechatPayParams; common_vendor.index.hideLoading(); common_vendor.index.showLoading({ title: "发起微信支付..." }); common_vendor.index.requestPayment({ provider: "wxpay", timeStamp: wxPayParams.timeStamp, nonceStr: wxPayParams.nonceStr, package: wxPayParams.package, signType: wxPayParams.signType || "RSA", paySign: wxPayParams.paySign, success: (res) => { common_vendor.index.hideLoading(); common_vendor.index.__f__("log", "at pages/chat/chat.vue:802", "微信支付成功:", res); msg.isPaid = true; common_vendor.index.showToast({ title: "支付成功", icon: "success" }); if (assessmentId.value) { const paidKey = `audit_paid_${assessmentId.value}`; common_vendor.index.setStorageSync(paidKey, true); common_vendor.index.__f__("log", "at pages/chat/chat.vue:813", "[Chat] 支付成功,写入 key:", paidKey); } if (chatType.value === "job" && positionId.value) { const fallbackKey = `audit_paid_pos_${positionId.value}`; common_vendor.index.setStorageSync(fallbackKey, true); common_vendor.index.__f__("log", "at pages/chat/chat.vue:819", "[Chat] 兜底写入 key:", fallbackKey); } msg.payload = { ...msg.payload || {}, orderCardId, orderId: payRes.data.orderId, orderNo: payRes.data.orderNo || "", status: "paid" }; common_vendor.index.$emit("payment_done", { orderCardId, orderId: payRes.data.orderId, assessmentId: assessmentId.value, positionId: positionId.value, paid: true }); if (chatType.value === "assessment") { setTimeout(() => { common_vendor.index.navigateTo({ url: `/pages/assessment/training?title=${encodeURIComponent(assessmentTitle.value)}&assessmentId=${assessmentId.value}` }); }, 1200); } }, fail: (err) => { common_vendor.index.hideLoading(); common_vendor.index.__f__("error", "at pages/chat/chat.vue:848", "微信支付失败:", err); if (err.errMsg && err.errMsg.includes("cancel")) { common_vendor.index.showToast({ title: "支付已取消", icon: "none" }); } else { common_vendor.index.showToast({ title: "支付失败,请重试", icon: "none" }); } } }); } else { common_vendor.index.hideLoading(); if (payRes.data && payRes.data.success) { msg.isPaid = true; common_vendor.index.showToast({ title: payRes.data.message || "支付成功", icon: "success" }); } else { common_vendor.index.showToast({ title: "支付处理异常", icon: "none" }); } } } catch (e) { common_vendor.index.hideLoading(); common_vendor.index.__f__("error", "at pages/chat/chat.vue:871", "支付失败:", e); common_vendor.index.showToast({ title: "支付失败:" + (e.message || "网络错误"), icon: "none" }); } } const chatBodyHeight = common_vendor.computed(() => { const navH = 100; const footerH = activePanel.value === "none" ? 120 : 520; return `calc(100vh - ${navH}rpx - ${footerH}rpx - env(safe-area-inset-top) - env(safe-area-inset-bottom))`; }); function scrollToBottom() { common_vendor.nextTick$1(() => { lastMessageId.value = ""; common_vendor.nextTick$1(() => { lastMessageId.value = "bottom-anchor"; }); }); } function goBack() { common_vendor.index.navigateBack(); } function toggleInputMode() { inputMode.value = inputMode.value === "text" ? "voice" : "text"; activePanel.value = "none"; } function togglePanel(panel) { activePanel.value = activePanel.value === panel ? "none" : panel; if (activePanel.value !== "none") inputMode.value = "text"; scrollToBottom(); } function onInputFocus() { activePanel.value = "none"; scrollToBottom(); } function addEmoji(e) { inputValue.value += e; } function previewImg(url) { common_vendor.index.previewImage({ urls: [url], current: url }); } function formatFileSize(size) { if (!size) return ""; if (size < 1024) return size + "B"; if (size < 1024 * 1024) return (size / 1024).toFixed(1) + "KB"; return (size / 1024 / 1024).toFixed(1) + "MB"; } function formatTime(timeStr) { if (!timeStr) return ""; const d = new Date(timeStr); if (isNaN(d)) return timeStr; const pad = (n) => n.toString().padStart(2, "0"); return `${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}`; } function shouldShowTime(msg, index) { if (index === 0) return true; const prev = messages.value[index - 1]; if (!prev.sendTime || !msg.sendTime) return false; return new Date(msg.sendTime) - new Date(prev.sendTime) > 5 * 60 * 1e3; } function formatAmount(amount) { if (!amount && amount !== 0) return "—"; const num = typeof amount === "string" ? parseFloat(amount) : amount; if (isNaN(num)) return "—"; return num.toFixed(2).replace(/\.?0+$/, ""); } const onVoiceStart = () => common_vendor.index.showToast({ title: "录音中...", icon: "none" }); const onVoiceEnd = () => common_vendor.index.showToast({ title: "语音功能暂未开放", icon: "none" }); return (_ctx, _cache) => { return common_vendor.e({ a: statusBarHeight.value + "px", b: common_vendor.o(goBack), c: common_vendor.t(sessionUserName.value || "在线咨询"), d: loading.value }, loading.value ? {} : {}, { e: !loading.value }, !loading.value ? common_vendor.e({ f: chatType.value === "assessment" }, chatType.value === "assessment" ? common_vendor.e({ g: waiterAvatar.value, h: assessmentCover.value || "/static/images/assess_cover.svg", i: common_vendor.t(assessmentTitle.value || "测评咨询"), j: assessmentLevel.value }, assessmentLevel.value ? { k: common_vendor.t(assessmentLevel.value) } : {}, { l: common_vendor.t(assessmentPrice.value ? "¥" + assessmentPrice.value : "咨询获取") }) : chatType.value === "training" ? { n: waiterAvatar.value, o: common_vendor.t(trainingTitle.value || "审计员线下培训"), p: common_vendor.o(confirmReg) } : { q: waiterAvatar.value, r: common_vendor.t(jobName.value || "审计员"), s: common_vendor.t(salaryRange.value || "13K-23K"), t: common_assets._imports_0$2, v: common_assets._imports_1$1, w: common_assets._imports_2$3, x: common_vendor.t(companyName.value || "华财仁合"), y: common_assets._imports_2$1, z: common_vendor.t((workCity.value || "上海市") + "·" + (workDistrict.value || "黄浦区")) }, { m: chatType.value === "training" }) : {}, { A: !loading.value && messages.value.length === 0 }, !loading.value && messages.value.length === 0 ? {} : {}, { B: common_vendor.f(messages.value, (msg, index, i0) => { return common_vendor.e({ a: shouldShowTime(msg, index) }, shouldShowTime(msg, index) ? { b: common_vendor.t(formatTime(msg.sendTime)) } : {}, { c: msg.senderType !== 1 }, msg.senderType !== 1 ? { d: resolveAvatarUrl(msg.senderAvatar) || waiterAvatar.value } : {}, { e: msg.msgType === "text" }, msg.msgType === "text" ? { f: common_vendor.t(msg.content), g: common_vendor.n(msg.senderType === 1 ? "user-bubble" : "shadow") } : msg.msgType === "image" ? { i: msg.fileUrl, j: common_vendor.o(($event) => previewImg(msg.fileUrl), msg.id || index) } : msg.msgType === "file" ? { l: common_vendor.t(msg.fileName || "文件"), m: common_vendor.t(formatFileSize(msg.fileSize)) } : msg.msgType === "order_card" ? common_vendor.e({ o: !msg.isPaid && msg.countdown > 0 }, !msg.isPaid && msg.countdown > 0 ? { p: common_vendor.t(msg.countdown) } : {}, { q: msg.isPaid }, msg.isPaid ? {} : {}, { r: common_vendor.t(msg.payload && msg.payload.name || "—"), s: common_vendor.t(formatAmount(msg.payload && msg.payload.amount)), t: common_vendor.t(msg.isPaid ? "已支付" : "立即支付"), v: msg.isPaid ? 1 : "", w: common_vendor.o(($event) => handlePay(msg), msg.id || index) }) : msg.msgType === "job_card" ? common_vendor.e({ y: common_vendor.t(msg.payload && msg.payload.title || "岗位推荐"), z: common_vendor.t(msg.payload && msg.payload.salaryRange || ""), A: msg.payload && msg.payload.workCity }, msg.payload && msg.payload.workCity ? { B: common_vendor.t(msg.payload.workCity) } : {}) : msg.senderType === 3 ? { D: common_vendor.t(msg.content) } : { E: common_vendor.t(msg.content || "[消息]") }, { h: msg.msgType === "image", k: msg.msgType === "file", n: msg.msgType === "order_card", x: msg.msgType === "job_card", C: msg.senderType === 3, F: msg.senderType === 1 }, msg.senderType === 1 ? { G: resolveAvatarUrl(msg.senderAvatar) || userAvatarUrl.value } : {}, { H: "msg-" + (msg.id || index), I: common_vendor.n(msg.senderType === 1 ? "right" : "left"), J: msg.id || index }); }), C: lastMessageId.value, D: chatBodyHeight.value, E: inputMode.value === "text" ? "/static/icons/audio_thin.svg" : "/static/icons/keyboard.svg", F: common_vendor.o(toggleInputMode), G: inputMode.value === "text" }, inputMode.value === "text" ? { H: common_vendor.o(sendMessage), I: common_vendor.o(onInputFocus), J: inputValue.value, K: common_vendor.o(($event) => inputValue.value = $event.detail.value) } : { L: common_vendor.o(onVoiceStart), M: common_vendor.o(onVoiceEnd) }, { N: common_assets._imports_4, O: activePanel.value === "emoji" ? 1 : "", P: common_vendor.o(($event) => togglePanel("emoji")), Q: activePanel.value === "plus" ? "/static/icons/plus_active.svg" : "/static/icons/plus_thin.svg", R: common_vendor.o(($event) => togglePanel("plus")), S: activePanel.value === "emoji" }, activePanel.value === "emoji" ? { T: common_vendor.f(emojiList, (e, k0, i0) => { return { a: common_vendor.t(e), b: e, c: common_vendor.o(($event) => addEmoji(e), e) }; }) } : {}, { U: activePanel.value === "plus" }, activePanel.value === "plus" ? { V: common_assets._imports_5, W: common_vendor.o(chooseImage), X: common_assets._imports_6, Y: common_vendor.o(sendMockOrderCard) } : {}, { Z: activePanel.value !== "none" ? 1 : "", aa: activePanel.value !== "none" ? 1 : "" }); }; } }; const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-0a633310"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/chat/chat.js.map