From 27231d63256b8fedb71bd1f851acca0ef47b8f55 Mon Sep 17 00:00:00 2001 From: linfeng <2445465217@qq.com> Date: Tue, 16 May 2023 09:40:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E4=BA=AB=E5=9B=BE=E7=89=87=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/user/user.vue | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/pages/user/user.vue b/src/main/resources/static/linfeng-community-uniapp-ky/pages/user/user.vue index e07be03..cedfce8 100644 --- a/src/main/resources/static/linfeng-community-uniapp-ky/pages/user/user.vue +++ b/src/main/resources/static/linfeng-community-uniapp-ky/pages/user/user.vue @@ -92,7 +92,8 @@ data() { return { userInfo: '', - hasLogin: false + hasLogin: false, + shareCover: 'http://pic.linfeng.tech/logo.png' }; }, onLoad() { @@ -102,6 +103,7 @@ menus: ['shareAppMessage', 'shareTimeline'] }); //#endif + this.getSysInfo() }, onShow() { if (uni.getStorageSync('hasLogin')) { @@ -112,11 +114,10 @@ } }, onShareAppMessage(res) { - let imgURL = 'http://pic.linfeng.tech/logo.png'; return { title: this.$c.miniappName, path: '/pages/index/index', - imageUrl: imgURL + imageUrl: this.shareCover }; }, methods: { @@ -145,20 +146,25 @@ url: url }); }, - commercialLink(){ + getSysInfo() { + this.$H.get('system/miniConfig').then(res => { + this.shareCover = res.result.intro; + }); + }, + commercialLink() { // #ifdef H5 window.open("https://www.linfeng.tech") // #endif // #ifdef MP-WEIXIN uni.navigateToMiniProgram({ - appId:'wx1d4a8967c92bda9b', - path:'pages/index/index', - success: res => { - console.log("打开成功", res); - }, - fail: err => { - console.log(err); - } + appId: 'wx1d4a8967c92bda9b', + path: 'pages/index/index', + success: res => { + console.log("打开成功", res); + }, + fail: err => { + console.log(err); + } }) // #endif } @@ -269,4 +275,4 @@ padding: 20rpx; } } - + \ No newline at end of file