support share in wechat and timeline
This commit is contained in:
parent
f354db835f
commit
19f68c8c41
32
main.js
32
main.js
@ -10,6 +10,22 @@ Vue.config.productionTip = false
|
|||||||
import uView from 'uni_modules/uview-ui';
|
import uView from 'uni_modules/uview-ui';
|
||||||
Vue.use(uView);
|
Vue.use(uView);
|
||||||
|
|
||||||
|
// 全局分享 mixin - 所有页面默认开启分享到微信好友和朋友圈
|
||||||
|
Vue.mixin({
|
||||||
|
onShareAppMessage() {
|
||||||
|
return {
|
||||||
|
title: '汇商生活家',
|
||||||
|
path: '/pages/index/index'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShareTimeline() {
|
||||||
|
return {
|
||||||
|
title: '汇商生活家',
|
||||||
|
query: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// 导入工具函数
|
// 导入工具函数
|
||||||
import { processImageUrl } from './utils/index.js'
|
import { processImageUrl } from './utils/index.js'
|
||||||
|
|
||||||
@ -39,6 +55,22 @@ const app = createApp(App)
|
|||||||
// 安装 uView
|
// 安装 uView
|
||||||
app.use(uView)
|
app.use(uView)
|
||||||
|
|
||||||
|
// 全局分享 mixin - 所有页面默认开启分享到微信好友和朋友圈
|
||||||
|
app.mixin({
|
||||||
|
onShareAppMessage() {
|
||||||
|
return {
|
||||||
|
title: '汇商生活家',
|
||||||
|
path: '/pages/index/index'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShareTimeline() {
|
||||||
|
return {
|
||||||
|
title: '汇商生活家',
|
||||||
|
query: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// 导入工具函数
|
// 导入工具函数
|
||||||
import { processImageUrl } from './utils/index.js'
|
import { processImageUrl } from './utils/index.js'
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user