From 8635f9795fb786a9d9965296228a5dd0c6996f9e Mon Sep 17 00:00:00 2001 From: jing <1683105490@qq.com> Date: Mon, 19 Oct 2026 16:44:02 +0800 Subject: [PATCH] =?UTF-8?q?chore=EF=BC=9Atitle=E6=94=B9=E6=88=90=E5=90=8D?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 24 ++++++++++++------------ pages_tool/card/admin/contacts.vue | 7 +++++++ pages_tool/card/admin/leads.vue | 7 +++++++ pages_tool/card/admin/manage.vue | 7 +++++++ pages_tool/card/apply.vue | 9 ++++++++- pages_tool/card/contact-edit.vue | 7 +++++++ pages_tool/card/contacts.vue | 7 +++++++ pages_tool/card/edit.vue | 9 ++++++++- pages_tool/card/exchange.vue | 7 +++++++ pages_tool/card/leads.vue | 7 +++++++ pages_tool/card/list.vue | 7 +++++++ pages_tool/card/style.vue | 7 +++++++ pages_tool/card/views.vue | 7 +++++++ 13 files changed, 98 insertions(+), 14 deletions(-) diff --git a/pages.json b/pages.json index 51dc13b..e4ffdba 100644 --- a/pages.json +++ b/pages.json @@ -1470,7 +1470,7 @@ { "path": "card/list", "style": { - "navigationBarTitleText": "我的名片夹", + "navigationBarTitleText": "名片", "enablePullDownRefresh": true } }, @@ -1485,52 +1485,52 @@ { "path": "card/exchange", "style": { - "navigationBarTitleText": "名片交换请求" + "navigationBarTitleText": "名片" } }, { "path": "card/style", "style": { - "navigationBarTitleText": "名片样式" + "navigationBarTitleText": "名片" } }, { "path": "card/edit", "style": { - "navigationBarTitleText": "编辑名片" + "navigationBarTitleText": "名片" } }, { "path": "card/apply", "style": { - "navigationBarTitleText": "申请名片" + "navigationBarTitleText": "名片" } }, { "path": "card/leads", "style": { - "navigationBarTitleText": "潜在客户", + "navigationBarTitleText": "名片", "enablePullDownRefresh": true } }, { "path": "card/contacts", "style": { - "navigationBarTitleText": "我的人脉", + "navigationBarTitleText": "名片", "enablePullDownRefresh": true } }, { "path": "card/views", "style": { - "navigationBarTitleText": "谁看了我", + "navigationBarTitleText": "名片", "enablePullDownRefresh": true } }, { "path": "card/contact-edit", "style": { - "navigationBarTitleText": "编辑人脉" + "navigationBarTitleText": "名片" } }, { @@ -1548,21 +1548,21 @@ { "path": "card/admin/manage", "style": { - "navigationBarTitleText": "名片管理", + "navigationBarTitleText": "名片", "enablePullDownRefresh": true } }, { "path": "card/admin/contacts", "style": { - "navigationBarTitleText": "人脉管理", + "navigationBarTitleText": "名片", "enablePullDownRefresh": true } }, { "path": "card/admin/leads", "style": { - "navigationBarTitleText": "潜在客户", + "navigationBarTitleText": "名片", "enablePullDownRefresh": true } }, diff --git a/pages_tool/card/admin/contacts.vue b/pages_tool/card/admin/contacts.vue index 0c51afb..7f2b39f 100644 --- a/pages_tool/card/admin/contacts.vue +++ b/pages_tool/card/admin/contacts.vue @@ -93,6 +93,13 @@ export default { onLoad() { this.refresh(); }, + onReady() { + // H5 uni-page-head 挂载早于路由 meta 就绪会回落默认标题 "title", onReady 再兜底一次 + uni.setNavigationBarTitle({ title: '名片' }); + // #ifdef H5 + document.title = '名片'; + // #endif + }, onShow() { // 从编辑页保存返回(redirectTo 回本页)时刷新 if (this._loadedOnce) this.refresh(); diff --git a/pages_tool/card/admin/leads.vue b/pages_tool/card/admin/leads.vue index 96d6900..c35b63e 100644 --- a/pages_tool/card/admin/leads.vue +++ b/pages_tool/card/admin/leads.vue @@ -82,6 +82,13 @@ export default { onLoad() { this.refresh(); }, + onReady() { + // H5 uni-page-head 挂载早于路由 meta 就绪会回落默认标题 "title", onReady 再兜底一次 + uni.setNavigationBarTitle({ title: '名片' }); + // #ifdef H5 + document.title = '名片'; + // #endif + }, onPullDownRefresh() { this.refresh(() => uni.stopPullDownRefresh()); }, diff --git a/pages_tool/card/admin/manage.vue b/pages_tool/card/admin/manage.vue index 4ef1c4c..6655ec4 100644 --- a/pages_tool/card/admin/manage.vue +++ b/pages_tool/card/admin/manage.vue @@ -88,6 +88,13 @@ export default { onLoad() { this.refresh(); }, + onReady() { + // H5 uni-page-head 挂载早于路由 meta 就绪会回落默认标题 "title", onReady 再兜底一次 + uni.setNavigationBarTitle({ title: '名片' }); + // #ifdef H5 + document.title = '名片'; + // #endif + }, onShow() { // 从编辑页返回时刷新(编辑成功后数据已变) if (this._loadedOnce) this.refresh(); diff --git a/pages_tool/card/apply.vue b/pages_tool/card/apply.vue index f3f5764..285e067 100644 --- a/pages_tool/card/apply.vue +++ b/pages_tool/card/apply.vue @@ -68,9 +68,16 @@ export default { } }, onLoad() { - uni.setNavigationBarTitle({ title: '申请名片' }); + uni.setNavigationBarTitle({ title: '名片' }); this.loadStatus(); }, + onReady() { + // H5 uni-page-head 挂载早于路由 meta 就绪会回落默认标题 "title", onReady 再兜底一次 + uni.setNavigationBarTitle({ title: '名片' }); + // #ifdef H5 + document.title = '名片'; + // #endif + }, methods: { loadStatus() { this.$api.sendRequest({ diff --git a/pages_tool/card/contact-edit.vue b/pages_tool/card/contact-edit.vue index 0c5a472..79bf1b1 100644 --- a/pages_tool/card/contact-edit.vue +++ b/pages_tool/card/contact-edit.vue @@ -82,6 +82,13 @@ export default { this.loadDetail(); } }, + onReady() { + // H5 uni-page-head 挂载早于路由 meta 就绪会回落默认标题 "title", onReady 再兜底一次 + uni.setNavigationBarTitle({ title: '名片' }); + // #ifdef H5 + document.title = '名片'; + // #endif + }, methods: { loadDetail() { this.$cardApi.contactInfo({ diff --git a/pages_tool/card/contacts.vue b/pages_tool/card/contacts.vue index 6ce953c..770e12b 100644 --- a/pages_tool/card/contacts.vue +++ b/pages_tool/card/contacts.vue @@ -83,6 +83,13 @@ export default { onLoad() { this.refresh(); }, + onReady() { + // H5 uni-page-head 挂载早于路由 meta 就绪会回落默认标题 "title", onReady 再兜底一次 + uni.setNavigationBarTitle({ title: '名片' }); + // #ifdef H5 + document.title = '名片'; + // #endif + }, onShow() { // 从编辑页保存后 redirectTo 回来会重走 onLoad; 从其它页返回时兜底刷新 if (this.list.length > 0) { diff --git a/pages_tool/card/edit.vue b/pages_tool/card/edit.vue index 543d4e2..56eb1e2 100644 --- a/pages_tool/card/edit.vue +++ b/pages_tool/card/edit.vue @@ -197,11 +197,18 @@ export default { this.cardId = decodeURIComponent(options.card_id || ''); this.isCreate = this.cardId === ''; if (this.isCreate) { - uni.setNavigationBarTitle({ title: '新建名片' }); + uni.setNavigationBarTitle({ title: '名片' }); } else { this.loadDetail(); } }, + onReady() { + // H5 uni-page-head 挂载早于路由 meta 就绪会回落默认标题 "title", onReady 再兜底一次 + uni.setNavigationBarTitle({ title: '名片' }); + // #ifdef H5 + document.title = '名片'; + // #endif + }, methods: { loadDetail() { if (!this.cardId) { diff --git a/pages_tool/card/exchange.vue b/pages_tool/card/exchange.vue index b4a61a4..92fa5ca 100644 --- a/pages_tool/card/exchange.vue +++ b/pages_tool/card/exchange.vue @@ -60,6 +60,13 @@ export default { this.cardId = decodeURIComponent(options.card_id || ''); this.loadList(); }, + onReady() { + // H5 uni-page-head 挂载早于路由 meta 就绪会回落默认标题 "title", onReady 再兜底一次 + uni.setNavigationBarTitle({ title: '名片' }); + // #ifdef H5 + document.title = '名片'; + // #endif + }, computed: { tabs() { const pending = this.list.filter(i => i.status === 'pending').length; diff --git a/pages_tool/card/leads.vue b/pages_tool/card/leads.vue index 8d3fee6..7e75347 100644 --- a/pages_tool/card/leads.vue +++ b/pages_tool/card/leads.vue @@ -76,6 +76,13 @@ export default { onLoad() { this.refresh(); }, + onReady() { + // H5 uni-page-head 挂载早于路由 meta 就绪会回落默认标题 "title", onReady 再兜底一次 + uni.setNavigationBarTitle({ title: '名片' }); + // #ifdef H5 + document.title = '名片'; + // #endif + }, onPullDownRefresh() { this.refresh(() => uni.stopPullDownRefresh()); }, diff --git a/pages_tool/card/list.vue b/pages_tool/card/list.vue index 6b4ad64..0667514 100644 --- a/pages_tool/card/list.vue +++ b/pages_tool/card/list.vue @@ -204,6 +204,13 @@ export default { } this.bootstrap(); }, + onReady() { + // H5 uni-page-head 挂载早于路由 meta 就绪会回落默认标题 "title", onReady 再兜底一次 + uni.setNavigationBarTitle({ title: '名片' }); + // #ifdef H5 + document.title = '名片'; + // #endif + }, onShow() { // 首次 onShow 紧跟 onLoad(由 bootstrap 负责首屏加载), 这里只处理"返回本页"的刷新 if (this._entered) this.refresh(); diff --git a/pages_tool/card/style.vue b/pages_tool/card/style.vue index b695ee5..72acd72 100644 --- a/pages_tool/card/style.vue +++ b/pages_tool/card/style.vue @@ -363,6 +363,13 @@ export default { this.loadDetail(); this.loadPresets(); }, + onReady() { + // H5 uni-page-head 挂载早于路由 meta 就绪会回落默认标题 "title", onReady 再兜底一次 + uni.setNavigationBarTitle({ title: '名片' }); + // #ifdef H5 + document.title = '名片'; + // #endif + }, loadDetail() { if (!this.cardId) { this.isLoading = false; diff --git a/pages_tool/card/views.vue b/pages_tool/card/views.vue index 1a07109..b91c7b6 100644 --- a/pages_tool/card/views.vue +++ b/pages_tool/card/views.vue @@ -71,6 +71,13 @@ export default { this.cardId = (options && options.card_id) ? String(options.card_id) : ''; this.refresh(); }, + onReady() { + // H5 uni-page-head 挂载早于路由 meta 就绪会回落默认标题 "title", onReady 再兜底一次 + uni.setNavigationBarTitle({ title: '名片' }); + // #ifdef H5 + document.title = '名片'; + // #endif + }, onPullDownRefresh() { this.refresh(() => uni.stopPullDownRefresh()); },