@@ -4,11 +4,7 @@
} from "@/common";
export default {
onLaunch(options) {
- if (uni.getStorageSync('token')) {
- uni.redirectTo({
- url: '/pages/index/index'
- })
- }
+
// init(options);
// // #ifndef MP-TOUTIAO
@@ -220,6 +220,12 @@
}
},
async onLoad(option) {
+ if (uni.getStorageSync('token')) {
+ uni.redirectTo({
+ url: '/pages/index/index'
+ })
+ }
if (navigator.userAgent.indexOf('Mobile') > -1) {
// alert('移动端')
this.isPc = false