|
|
@@ -30,6 +30,7 @@ const _sfc_main = {
|
|
|
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")
|
|
|
@@ -84,6 +85,8 @@ const _sfc_main = {
|
|
|
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";
|
|
|
@@ -110,10 +113,10 @@ const _sfc_main = {
|
|
|
if (res.code === 200 && res.data) {
|
|
|
pushOrderCardMsg(res.data);
|
|
|
} else {
|
|
|
- common_vendor.index.__f__("error", "at pages/chat/chat.vue:416", "自动创建结算单失败:", res);
|
|
|
+ common_vendor.index.__f__("error", "at pages/chat/chat.vue:418", "自动创建结算单失败:", res);
|
|
|
}
|
|
|
} catch (err) {
|
|
|
- common_vendor.index.__f__("error", "at pages/chat/chat.vue:419", "自动创建结算单异常:", err);
|
|
|
+ common_vendor.index.__f__("error", "at pages/chat/chat.vue:421", "自动创建结算单异常:", err);
|
|
|
}
|
|
|
}, 800);
|
|
|
} else if (chatType.value === "job" && positionId.value) {
|
|
|
@@ -124,7 +127,7 @@ const _sfc_main = {
|
|
|
const firstEval = evalRes.rows[0];
|
|
|
if (!assessmentId.value) {
|
|
|
assessmentId.value = String(firstEval.id);
|
|
|
- common_vendor.index.__f__("log", "at pages/chat/chat.vue:433", "[Chat] 岗位关联测评ID:", assessmentId.value);
|
|
|
+ common_vendor.index.__f__("log", "at pages/chat/chat.vue:435", "[Chat] 岗位关联测评ID:", assessmentId.value);
|
|
|
}
|
|
|
setTimeout(async () => {
|
|
|
try {
|
|
|
@@ -140,14 +143,14 @@ const _sfc_main = {
|
|
|
pushOrderCardMsg(res.data);
|
|
|
}
|
|
|
} catch (err) {
|
|
|
- common_vendor.index.__f__("error", "at pages/chat/chat.vue:448", "岗位结算单异常:", 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:451", "[Chat] 该岗位无关联测评,不发送结算单");
|
|
|
+ common_vendor.index.__f__("log", "at pages/chat/chat.vue:453", "[Chat] 该岗位无关联测评,不发送结算单");
|
|
|
}
|
|
|
} catch (e) {
|
|
|
- common_vendor.index.__f__("error", "at pages/chat/chat.vue:454", "[Chat] 查询关联测评失败:", e);
|
|
|
+ common_vendor.index.__f__("error", "at pages/chat/chat.vue:456", "[Chat] 查询关联测评失败:", e);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -193,7 +196,7 @@ const _sfc_main = {
|
|
|
}
|
|
|
}
|
|
|
} catch (e) {
|
|
|
- common_vendor.index.__f__("error", "at pages/chat/chat.vue:506", "[Chat] 加载历史消息失败:", e);
|
|
|
+ common_vendor.index.__f__("error", "at pages/chat/chat.vue:508", "[Chat] 加载历史消息失败:", e);
|
|
|
} finally {
|
|
|
loading.value = false;
|
|
|
}
|
|
|
@@ -208,7 +211,7 @@ const _sfc_main = {
|
|
|
}
|
|
|
}
|
|
|
} catch (e) {
|
|
|
- common_vendor.index.__f__("warn", "at pages/chat/chat.vue:524", "[Chat] 获取学员头像失败:", e);
|
|
|
+ common_vendor.index.__f__("warn", "at pages/chat/chat.vue:526", "[Chat] 获取学员头像失败:", e);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -217,16 +220,16 @@ const _sfc_main = {
|
|
|
utils_chatSocket.connectChat({
|
|
|
token,
|
|
|
onConnect: () => {
|
|
|
- common_vendor.index.__f__("log", "at pages/chat/chat.vue:535", "[Chat] WebSocket 已连接,订阅会话消息");
|
|
|
+ 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:539", "[Chat] 收到 WebSocket 消息:", 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:545", "[Chat] WebSocket 已断开");
|
|
|
+ common_vendor.index.__f__("log", "at pages/chat/chat.vue:547", "[Chat] WebSocket 已断开");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -360,7 +363,7 @@ const _sfc_main = {
|
|
|
(m) => m.msgType === "order_card" && m.payload && m.payload.orderCardId === card.orderCardId
|
|
|
);
|
|
|
if (hasOrderCard) {
|
|
|
- common_vendor.index.__f__("log", "at pages/chat/chat.vue:696", "[Chat] 已存在相同结算单消息,跳过推送");
|
|
|
+ common_vendor.index.__f__("log", "at pages/chat/chat.vue:698", "[Chat] 已存在相同结算单消息,跳过推送");
|
|
|
return;
|
|
|
}
|
|
|
messages.value.push({
|
|
|
@@ -397,24 +400,24 @@ const _sfc_main = {
|
|
|
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:738", "🔥 开始支付流程");
|
|
|
- common_vendor.index.__f__("log", "at pages/chat/chat.vue:739", "🔥 orderCardId:", orderCardId, "类型:", typeof orderCardId);
|
|
|
- common_vendor.index.__f__("log", "at pages/chat/chat.vue:740", "🔥 fromUserId:", fromUserId.value, "类型:", typeof fromUserId.value);
|
|
|
- common_vendor.index.__f__("log", "at pages/chat/chat.vue:741", "🔥 userInfo:", JSON.stringify(userInfo));
|
|
|
- common_vendor.index.__f__("log", "at pages/chat/chat.vue:742", "🔥 msg.payload:", JSON.stringify(msg.payload));
|
|
|
+ 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:772", "🔥 调用支付接口,参数:", { orderCardId, userId: fromUserId.value });
|
|
|
+ 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:774", "🔥 支付接口响应:", payRes);
|
|
|
+ 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:779", "🔥 支付接口调用失败:", payRes);
|
|
|
+ common_vendor.index.__f__("log", "at pages/chat/chat.vue:781", "🔥 支付接口调用失败:", payRes);
|
|
|
return;
|
|
|
}
|
|
|
if (payRes.data && payRes.data.wechatPayParams) {
|
|
|
@@ -430,18 +433,18 @@ const _sfc_main = {
|
|
|
paySign: wxPayParams.paySign,
|
|
|
success: (res) => {
|
|
|
common_vendor.index.hideLoading();
|
|
|
- common_vendor.index.__f__("log", "at pages/chat/chat.vue:800", "微信支付成功:", res);
|
|
|
+ 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:811", "[Chat] 支付成功,写入 key:", paidKey);
|
|
|
+ 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:817", "[Chat] 兜底写入 key:", fallbackKey);
|
|
|
+ common_vendor.index.__f__("log", "at pages/chat/chat.vue:819", "[Chat] 兜底写入 key:", fallbackKey);
|
|
|
}
|
|
|
msg.payload = {
|
|
|
...msg.payload || {},
|
|
|
@@ -465,7 +468,7 @@ const _sfc_main = {
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
common_vendor.index.hideLoading();
|
|
|
- common_vendor.index.__f__("error", "at pages/chat/chat.vue:846", "微信支付失败:", err);
|
|
|
+ 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 {
|
|
|
@@ -484,7 +487,7 @@ const _sfc_main = {
|
|
|
}
|
|
|
} catch (e) {
|
|
|
common_vendor.index.hideLoading();
|
|
|
- common_vendor.index.__f__("error", "at pages/chat/chat.vue:869", "支付失败:", e);
|
|
|
+ common_vendor.index.__f__("error", "at pages/chat/chat.vue:871", "支付失败:", e);
|
|
|
common_vendor.index.showToast({ title: "支付失败:" + (e.message || "网络错误"), icon: "none" });
|
|
|
}
|
|
|
}
|
|
|
@@ -592,7 +595,7 @@ const _sfc_main = {
|
|
|
w: common_assets._imports_2$3,
|
|
|
x: common_vendor.t(companyName.value || "华财仁合"),
|
|
|
y: common_assets._imports_2$1,
|
|
|
- z: common_vendor.t(workCity.value ? "上海市·" + workCity.value : "上海市·黄浦区")
|
|
|
+ z: common_vendor.t((workCity.value || "上海市") + "·" + (workDistrict.value || "黄浦区"))
|
|
|
}, {
|
|
|
m: chatType.value === "training"
|
|
|
}) : {}, {
|