1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import App from './App'
- import api from '@/apis/api.js'
- import common from '@/common/js/common.js'
- import uView from "uview-ui";
- import verify from './common/graceChecker.js' //数据校验证
- import http from './common/http.js'
- Vue.use(uView);
- // #ifndef VUE3
- import Vue from 'vue'
- Vue.config.productionTip = false
- App.mpType = 'app'
- Vue.prototype.$api = api
- Vue.prototype.$common = common
- Vue.prototype.verify = verify;
- Vue.prototype.http = http;
- Vue.prototype.getUser = function() {
- return uni.getStorageSync('info');
- }
- Vue.prototype.hasLogin = () => {
- if (uni.getStorageSync('info') === '' || uni.getStorageSync('info') === null) {
- return false
- } else {
- return true
- }
- }
- const app = new Vue({
- ...App
- })
- app.$mount()
- // #endif
- // #ifdef VUE3
- import { createSSRApp } from 'vue'
- export function createApp() {
- const app = createSSRApp(App)
- return {
- app
- }
- }
- // #endif
|