新增首页分享
This commit is contained in:
parent
1a4f46faff
commit
5d0841525a
@ -32,7 +32,8 @@ Page({
|
||||
],
|
||||
docCount: 0,
|
||||
cerCount: 0,
|
||||
recommendDesc: ''
|
||||
recommendDesc: '',
|
||||
shareTitle: '欢迎体验喵著'
|
||||
},
|
||||
|
||||
/**
|
||||
@ -41,6 +42,29 @@ Page({
|
||||
onLoad(options) {
|
||||
this.getMainProCount()
|
||||
},
|
||||
onShareAppMessage() {
|
||||
const promise = new Promise(resolve => {
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
title: '欢迎体验喵著'
|
||||
})
|
||||
}, 2000)
|
||||
})
|
||||
return {
|
||||
title: '欢迎体验喵著',
|
||||
path: '/pages/mainPage/mainPage',
|
||||
imageUrl: this.data.imgAssets + '/wx_share_img.png',
|
||||
promise
|
||||
}
|
||||
},
|
||||
//分享朋友圈
|
||||
onShareTimeline() {
|
||||
return {
|
||||
title: this.data.shareTitle,
|
||||
query: 'from=timeline',
|
||||
imageUrl: this.data.imgAssets + '/wx_share_img.png'
|
||||
}
|
||||
},
|
||||
getMainProCount() {
|
||||
ProApi.doGetMainProCount()
|
||||
.then(res => {
|
||||
|
Loading…
Reference in New Issue
Block a user