分享图片自定义

This commit is contained in:
linfeng 2023-05-16 09:40:33 +08:00
parent 6dfb588983
commit 27231d6325

View File

@ -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,6 +146,11 @@
url: url
});
},
getSysInfo() {
this.$H.get('system/miniConfig').then(res => {
this.shareCover = res.result.intro;
});
},
commercialLink() {
// #ifdef H5
window.open("https://www.linfeng.tech")