From 1737d735733734cc615145c3b307ee5650a99fee Mon Sep 17 00:00:00 2001 From: chenhao Date: Mon, 1 Jun 2026 10:16:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=93=E5=AD=98=E7=BB=93=E6=9E=84=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 21 ++++++++++++--------- src/router.js | 5 +++++ src/views/Index.vue | 22 ++++++++++++++-------- src/views/Tabbars/Mall.vue | 32 ++------------------------------ src/views/Trade/TradeConfirm.vue | 3 ++- src/views/Trade/Tradelist.vue | 4 ++++ 6 files changed, 39 insertions(+), 48 deletions(-) diff --git a/src/App.vue b/src/App.vue index d054c50..4b065d5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,7 +1,7 @@ @@ -10,10 +10,7 @@ export default { name: 'App', computed: { - cacheList() { - const routes = this.$router.getRoutes() - return routes.filter(r => r.meta.cache).map(r => r.name) - } + }, data() { return { @@ -51,6 +48,7 @@ export default { } }, mounted() { + this.init() }, methods: { updateTitle(title) { @@ -67,6 +65,11 @@ export default { document.body.appendChild(iframe) } }, + init() { + this.$get('/v1/client/HWxinfoClient/share').then(res => { + this.wechatShareInfo = res.data || {} + }) + }, updateShare(title, desc, imgUrl) { if (wx && this.$isWechat()) { const url = location.href; @@ -84,9 +87,9 @@ export default { const data = res.data || {}; // alert(JSON.stringify(data)) let shareinfo = { - title: title || data.title || '泰古润', - desc: data.contents || '汇聚平凡梦想,共创美好未来', - imgUrl: imgUrl || data.img, + title: title || this.wechatShareInfo.title || '泰古润', + desc: desc || this.wechatShareInfo.contents || '汇聚平凡梦想,共创美好未来', + imgUrl: imgUrl || this.wechatShareInfo.img || data.img, link: this.$getShareLink(), }; // alert(JSON.stringify(shareinfo)) diff --git a/src/router.js b/src/router.js index e8e9750..b444b82 100644 --- a/src/router.js +++ b/src/router.js @@ -8,30 +8,35 @@ const routes = [ { path: '/Home', name: 'Home', + parentName: 'Index', component: () => import('./views/Tabbars/Home.vue'), meta: { title: '主页', cache: true } }, { path: '/Gift', name: 'Gift', + parentName: 'Index', component: () => import('./views/Tabbars/Gift.vue'), meta: { title: '礼包区', cache: true } }, { path: '/Mall', name: 'Mall', + parentName: 'Index', component: () => import('./views/Tabbars/Mall.vue'), meta: { title: '商城', cache: true } }, { path: '/PointMall', name: 'PointMall', + parentName: 'Index', component: () => import('./views/Tabbars/PointMall.vue'), meta: { title: '积分区', cache: true } }, { path: '/My', name: 'My', + parentName: 'Index', component: () => import('./views/User/My.vue'), meta: { title: '我的' } }, diff --git a/src/views/Index.vue b/src/views/Index.vue index 7e0bf62..135a75e 100644 --- a/src/views/Index.vue +++ b/src/views/Index.vue @@ -1,5 +1,9 @@