增加other分包页面
我的页面里增加跳转other分包跳转(仅在ios不是浏览器审核时展示)
This commit is contained in:
30
tuniao-ui/libs/mixin/mpShare.js
Normal file
30
tuniao-ui/libs/mixin/mpShare.js
Normal file
@@ -0,0 +1,30 @@
|
||||
module.exports = {
|
||||
onLoad() {
|
||||
// 设置默认的转发参数
|
||||
this.$t.mpShare = {
|
||||
// 分享的标题,默认为小程序名称
|
||||
title: '',
|
||||
// 分享的路径,默认为当前页面
|
||||
path: '',
|
||||
// 分享时显示的图片,默认为当前页面截图
|
||||
imageUrl: '',
|
||||
// 当前页面是否可以分享
|
||||
share: true
|
||||
}
|
||||
if (!this.$t.mpShare.share) {
|
||||
uni.hideShareMenu()
|
||||
}
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return this.$t.mpShare
|
||||
},
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareTimeline() {
|
||||
return {
|
||||
title: this.$t.mpShare.title,
|
||||
query: this.$t.mpShare.path.substring(this.$t.mpShare.path.indexOf('?') + 1, this.$t.mpShare.path.length),
|
||||
imageUrl: this.$t.mpShare.imageUrl
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
Reference in New Issue
Block a user