import Vue from 'vue' import App from './App' // // 自定义插件 import MyHttp from './core/http/index.js' import MyStore from './core/store/index' import MyUtils from './core/untils/index' import MyCatch from './core/cache/index' import MyConfig from './core/config/index' import MyUserLogin from './core/login' import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue" import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue" App.mpType = 'app' //微信h5授权登录时使用此代码 import RouterMount from '@/core/http/useRouter.js' Vue.component('mescroll-body', MescrollBody) Vue.component('mescroll-uni', MescrollUni) Vue.prototype.$store = MyStore Vue.prototype.$myHttp = MyHttp // http Vue.prototype.$myUtils = MyUtils // utils, 包含表单验证、错误处理、页面跳转、消息提示 Vue.prototype.$myCatch = MyCatch // catch Vue.prototype.$myConfig = MyConfig // config Vue.prototype.$myUserLogin = MyUserLogin // MyUserLogin Vue.prototype.$openrul = function (_url) { MyUtils.$router.navigateTo({ url: _url }) } Vue.prototype.$navigateBack = function () { MyUtils.$router.navigateBack() } Vue.prototype.$redirectTo = function (_url) { MyUtils.$router.redirectTo({ url: _url }) } Vue.config.productionTip = false App.mpType = 'app' const app = new Vue({ MyStore, ...App }) // #ifdef H5 if(MyConfig.mode == 1){ //微信h5授权登录时使用此代码 RouterMount(app,'#app'); }else{ app.$mount(); } // #endif // #ifdef MP-WEIXIN //小程序授权登录时使用此代码 app.$mount(); // #endif // #ifdef APP-PLUS //app app.$mount(); // #endif