• This project
    • Loading...
  • Sign in

陈嘉濠 / lucky-uniapp · Files

Go to a project

GitLab

  • Go to dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Pipelines 0
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Members
  • Labels
  • Wiki
  • Forks
  • Network
  • Create a new issue
  • lucky-uniapp
  • luckyStart0812
  • libs
  • mixin
  • mpShare.js
  • 0812uniapp-幸运星球
    9b474a72
    by 陈嘉濠
    2022-08-12 20:39:20 +0800  
    Browse Files
mpShare.js 365 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
module.exports = {
	onLoad() {
		// 设置默认的转发参数
		this.$u.mpShare = {
			title: '', // 默认为小程序名称
			path: '', // 默认为当前页面路径
			imageUrl: '' // 默认为当前页面的截图
		}
	},
	onShareAppMessage() {
		return this.$u.mpShare
	},
	// #ifdef MP-WEIXIN
	onShareTimeline() {
		return this.$u.mpShare
	}
	// #endif
}