12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- import App from './App'
- import store from './store'
- import common from './pages/utils/common.js'
- import constant from './pages/utils/constant.js'
- Vue.prototype.$gaodeKey = 'OJ7BZ-ULH6V-XBLPV-ULIMK-APS3H-QHFIP'; //高德地图key
- import {
- showToast,
- transDate
- } from './js_sdk/common.js'
- // #ifndef VUE3
- import Vue from 'vue'
- import auth from './js_sdk/auth'
- Vue.prototype.$auth = auth
- // import "./vite.config"
- Vue.prototype.$constant = constant
- Vue.prototype.$common = common
- Vue.config.productionTip = false
- Vue.prototype.$store = store
- Vue.prototype.$transDate = transDate
- Vue.prototype.$showToast = showToast
- import $http from './js_sdk/request/requestConfig';
- Vue.prototype.$http = $http;
- // 全局mixin引入 是否登录判断
- // import {isLoginMixin} from "./common/mixins";
- // Vue.mixin(isLoginMixin);
- uni.getStorage({
- key: 'laocui_user_token',
- success: function (res) {
- uni.switchTab({
- url: "/pages/index/index"
- })
- },
- fail(res) {
- uni.showToast({
- title: "请重新登陆",
- mask: true,
- icon: "none"
- });
- uni.redirectTo({
- url: "/pages/login/login"
- })
- }
- });
- App.mpType = 'app'
- const app = new Vue({
- store,
- ...App
- })
- app.$mount()
- // #endif
- // #ifdef VUE3
- import {
- createSSRApp
- } from 'vue'
- export function createApp() {
- const app = createSSRApp(App)
- app.use(store)
- app.config.globalProperties.$adpid = "1111111111"
- app.config.globalProperties.$backgroundAudioData = {
- playing: false,
- playTime: 0,
- formatedPlayTime: '00:00:00'
- }
- return {
- app
- }
- }
- // #endif
|