You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
989 B
64 lines
989 B
import store from '@/store';
|
|
|
|
export default {
|
|
methods: {
|
|
onJump(url,type){
|
|
if(type=='tabbar'){
|
|
uni.switchTab({
|
|
url:url
|
|
})
|
|
}else if(type=='redirectTo'){
|
|
uni.redirectTo({
|
|
url:url
|
|
})
|
|
}else if(type=='reLaunch'){
|
|
uni.reLaunch({
|
|
url:url
|
|
})
|
|
}else{
|
|
uni.navigateTo({
|
|
url:url
|
|
})
|
|
}
|
|
},
|
|
// 跳转前判断登录
|
|
onTokenJump(url,type) {
|
|
this.judgeLogin(() => {
|
|
if(type=='tabbar'){
|
|
uni.switchTab({
|
|
url:url
|
|
})
|
|
}else if(type=='redirectTo'){
|
|
uni.redirectTo({
|
|
url:url
|
|
})
|
|
}else if(type=='reLaunch'){
|
|
uni.reLaunch({
|
|
url:url
|
|
})
|
|
}else{
|
|
uni.navigateTo({
|
|
url:url
|
|
})
|
|
}
|
|
});
|
|
},
|
|
},
|
|
onShareAppMessage(res) {
|
|
return {
|
|
title: '',
|
|
// #ifdef MP-TOUTIAO
|
|
desc: '',
|
|
// #endif
|
|
imageUrl: '',
|
|
path: '/pages/index/index'
|
|
}
|
|
},
|
|
onShareTimeline(res) {
|
|
return {
|
|
title: '',
|
|
imageUrl: '',
|
|
path: '/pages/index/index'
|
|
}
|
|
}
|
|
} |