ktianc ff56a184ca 版本升级:
1. 修复(kinit-admin):页面缓存问题修复
2. 更新(kinit-api,kinit-admin):菜单管理新增是否缓存字段
3. 更新(kinit-admin):将缓存默认存储在localStorage中
4. 更新(kinit-api):将python-jose库更换为pyjwt库
5. 优化(kinit-admin,kinit-uni):退出登录方法优化
6. 优化(kinit-admin,kinit-uni):response拦截优化
7. 新增(kinit-api,kinit-admin,kinit-uni):jwt到期时间缩短,加入刷新token功能
8. (kinit-uni)切换到 vscode 开发 uniapp 项目
2023-03-13 14:34:26 +08:00

47 lines
1018 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

export const wxShareMixins = {
data() {
return {
share: {
title: '',
path: '',
imageUrl: ''
}
}
},
onLoad: function () {
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
})
},
onShareAppMessage(res) {
let that = this
let imageUrl = that.share.imageUrl || ''
if (res.from === 'button') {
//这块需要传参不然链接地址进去获取不到数据
let path = '/' + that.$scope.route + '?item=' + that.$scope.options.item
return {
title: '商品分享~',
path: path,
imageUrl: imageUrl
}
}
if (res.from === 'menu') {
return {
title: that.share.title,
path: that.share.path,
imageUrl: that.share.imageUrl
}
}
},
// 分享到朋友圈
onShareTimeline() {
return {
title: this.share.title,
path: this.share.path,
imageUrl: this.share.imageUrl
}
},
methods: {}
}