From c6367822dc38a5e40b49d28ea12ed2ea226f91ea Mon Sep 17 00:00:00 2001 From: jing <1683105490@qq.com> Date: Tue, 27 Oct 2026 16:49:27 +0800 Subject: [PATCH] =?UTF-8?q?chore=EF=BC=9A=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages_tool/card/detail.vue | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/pages_tool/card/detail.vue b/pages_tool/card/detail.vue index cee353a..2694430 100644 --- a/pages_tool/card/detail.vue +++ b/pages_tool/card/detail.vue @@ -235,7 +235,9 @@ export default { designEnabled: true, // 旧入口显隐开关(2026-10-21 需求: 隐藏「编辑资料/名片样式/切换名片」「潜在客户/我的人脉」, // 隐藏非删除——改回 true 即全部恢复; 对应方法 goEdit/onStyleTap/goLeads/goContacts 均保留) - showLegacyActions: false + showLegacyActions: false, + + loadOptions: '' }; }, computed: { @@ -369,6 +371,21 @@ export default { } }, onLoad(options) { + this.loadOptions =JSON.stringify(options); + // ===== 调试转储(2026-10-27): 定位「缺少名片编号」——看本页到底收到了什么入参 ===== + // 小程序/扫码/转发进入时, 平台传给 onLoad 的所有参数都打出来(含 scene 解码后) + try { + console.log('[detail] onLoad 原始 options:', JSON.stringify(options || {})); + Object.keys(options || {}).forEach(k => { + let v = options[k]; + try { v = decodeURIComponent(v); } catch (e) {} + console.log('[detail] options.' + k, '=', v); + }); + } catch (e) { + console.warn('[detail] options 转储失败:', e); + } + + // ===== 调试转储结束 ===== this.applyPageTitle(); // 2.21 小程序码入口: scene 里只有名片**主键 id**(微信 scene 仅 32 字符, // 装不下 30 字符的业务 card_id), 需先换成 card_id 才能查详情。 @@ -383,7 +400,7 @@ export default { this.resolveCardIdByRelId(sceneId); } else { this.isLoading = false; - this.errorMsg = '缺少名片编号'; + this.errorMsg = `缺少名片编号 ${this.loadOptions}`; } }, // H5 直接刷新/深链进入时, uni-page-head 可能在路由 meta 就绪前就挂载, @@ -529,7 +546,7 @@ export default { loadDetail(retry) { if (!this.cardId) { this.isLoading = false; - this.errorMsg = '缺少名片编号'; + this.errorMsg = `缺少名片编号 ${this.loadOptions}`; return; } this.isLoading = true; @@ -537,6 +554,13 @@ export default { data: { card_id: this.cardId }, success: res => { const data = res.data || {}; + // ===== 调试转储(2026-10-27): 把 card/detail 后台数据打到控制台 ===== + // 完整响应可在控制台展开查看; 关键字段单独打出, 便于快速核对二维码/公开页地址 + console.log('[detail] card/detail 返回(code=' + res.code + '):', JSON.parse(JSON.stringify(res))); + console.log('[detail] 关键字段 -> card_id:', this.cardId, + '| wap_url:', data.wap_url || '(空)', + '| qr_url:', data.qr_url || '(空)'); + // ===== 调试转储结束 ===== if (res.code == 0) { this.isLoading = false; this.relation = data.relation || null;