37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
|
export default {
|
||
|
onShareTimeline() {
|
||
|
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
|
||
|
let curRoute = routes[routes.length - 1].route // 获取当前页面路由,也就是最后一个打开的页面路由
|
||
|
|
||
|
return {
|
||
|
path: '/pages/timeEnvironment/timeEnvironment',
|
||
|
// path:"/pages/index/index", //不设置默认当前页面
|
||
|
title: "温室智慧云",
|
||
|
}
|
||
|
},
|
||
|
onShareAppMessage(res) {
|
||
|
// console.log(res)
|
||
|
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
|
||
|
let curRoute = routes[routes.length - 1].route // 获取当前页面路由,也就是最后一个打开的页面路由
|
||
|
// console.log(curRoute+'?u_id='+uni.getStorageSync('u_id'))
|
||
|
return {
|
||
|
path: '/pages/timeEnvironment/timeEnvironment',
|
||
|
|
||
|
title: "温室智慧云",
|
||
|
|
||
|
// imageUrl: '',
|
||
|
// query:'u_id='+uni.getStorageSync('u_id'),
|
||
|
success(res) {
|
||
|
uni.showToast({
|
||
|
title: '分享成功'
|
||
|
})
|
||
|
},
|
||
|
fail(res) {
|
||
|
uni.showToast({
|
||
|
title: '分享失败',
|
||
|
icon: 'none'
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|