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