chore:测试
This commit is contained in:
@@ -235,7 +235,9 @@ export default {
|
|||||||
designEnabled: true,
|
designEnabled: true,
|
||||||
// 旧入口显隐开关(2026-10-21 需求: 隐藏「编辑资料/名片样式/切换名片」「潜在客户/我的人脉」,
|
// 旧入口显隐开关(2026-10-21 需求: 隐藏「编辑资料/名片样式/切换名片」「潜在客户/我的人脉」,
|
||||||
// 隐藏非删除——改回 true 即全部恢复; 对应方法 goEdit/onStyleTap/goLeads/goContacts 均保留)
|
// 隐藏非删除——改回 true 即全部恢复; 对应方法 goEdit/onStyleTap/goLeads/goContacts 均保留)
|
||||||
showLegacyActions: false
|
showLegacyActions: false,
|
||||||
|
|
||||||
|
loadOptions: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -369,6 +371,21 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
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();
|
this.applyPageTitle();
|
||||||
// 2.21 小程序码入口: scene 里只有名片**主键 id**(微信 scene 仅 32 字符,
|
// 2.21 小程序码入口: scene 里只有名片**主键 id**(微信 scene 仅 32 字符,
|
||||||
// 装不下 30 字符的业务 card_id), 需先换成 card_id 才能查详情。
|
// 装不下 30 字符的业务 card_id), 需先换成 card_id 才能查详情。
|
||||||
@@ -383,7 +400,7 @@ export default {
|
|||||||
this.resolveCardIdByRelId(sceneId);
|
this.resolveCardIdByRelId(sceneId);
|
||||||
} else {
|
} else {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.errorMsg = '缺少名片编号';
|
this.errorMsg = `缺少名片编号 ${this.loadOptions}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// H5 直接刷新/深链进入时, uni-page-head 可能在路由 meta 就绪前就挂载,
|
// H5 直接刷新/深链进入时, uni-page-head 可能在路由 meta 就绪前就挂载,
|
||||||
@@ -529,7 +546,7 @@ export default {
|
|||||||
loadDetail(retry) {
|
loadDetail(retry) {
|
||||||
if (!this.cardId) {
|
if (!this.cardId) {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.errorMsg = '缺少名片编号';
|
this.errorMsg = `缺少名片编号 ${this.loadOptions}`;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
@@ -537,6 +554,13 @@ export default {
|
|||||||
data: { card_id: this.cardId },
|
data: { card_id: this.cardId },
|
||||||
success: res => {
|
success: res => {
|
||||||
const data = res.data || {};
|
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) {
|
if (res.code == 0) {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.relation = data.relation || null;
|
this.relation = data.relation || null;
|
||||||
|
|||||||
Reference in New Issue
Block a user