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.
36 lines
861 B
36 lines
861 B
var version = '1.0.0-beta.1227';
|
|
var isDebug = isDebug || false;
|
|
var useSignalR = useSignalR || false;
|
|
var userAgent = navigator.userAgent;
|
|
var isApp = userAgent.indexOf('isapp') !== -1 || location.href.indexOf('file://') !== -1;
|
|
var isAndroid = userAgent.indexOf('isandroid') !== -1;
|
|
var isIos = userAgent.indexOf('isiphone') !== -1;
|
|
|
|
const routes = [
|
|
{ path: '/', component: home },
|
|
{ path: '/config', component: config },
|
|
]
|
|
|
|
const router = new VueRouter({
|
|
routes
|
|
})
|
|
|
|
const app = new Vue({
|
|
router,
|
|
data() {
|
|
},
|
|
mounted: function () {
|
|
$('#loadingToast').fadeOut(100);
|
|
if (isApp) {
|
|
if (!server) {
|
|
this.$router.go('/config');
|
|
}
|
|
else if (!token) {
|
|
this.$router.go('/login');
|
|
}
|
|
}
|
|
else {
|
|
|
|
}
|
|
}
|
|
}).$mount('#app'); |