yxk_h5_master/main.js

37 lines
820 B
JavaScript
Raw Permalink Normal View History

2025-08-28 15:21:09 +08:00
import Vue from "vue";
import App from "./App";
import store from "./store";
import Request from "./request/js/index";
Vue.prototype.$eventHub = new Vue();
Vue.config.productionTip = false;
Vue.prototype.$store = store;
Vue.prototype.$http = Request();
App.mpType = "app";
// Vue.prototype.checkLogin = function(){
// var userInfo = uni.getStorageSync('userInfo');
// if(userInfo == ''){
// uni.redirectTo({url:'login/login'});
// return false;
// }
// return [userInfo];
// }
Vue.prototype.goMain = function (sessionName) {
if (sessionName) {
uni.removeStorageSync(sessionName);
}
// uni.switchTab({url: "../main/main"}); url: '/pages/index/index'
uni.switchTab({ url: "/pages/main/main" });
};
const app = new Vue({
store,
...App,
});
app.$mount();