1234567891011121314151617181920212223242526 |
- import { defineMixin } from '../vue'
- import { queryParams } from '../function/index'
- export const mpShare = defineMixin({
- data() {
- return {
- mpShare: {
- title: '',
- path: '',
- imageUrl: ''
- }
- }
- },
- async onLoad(options) {
- var pages = getCurrentPages();
- var page = pages[pages.length - 1];
- this.mpShare.path = page.route + queryParams(options);
- },
- onShareAppMessage(res) {
- if (res.from === 'button') {
- console.log(res.target)
- }
- return this.mpShare;
- }
- })
- export default mpShare
|