import App from './App' import store from './store' import './router/my_router.js'; //引入拦截 import VueClipboard from 'vue-clipboard2' // 引入 uView UI import uView from './uni_modules/vk-uview-ui'; // import utils from '@/common/utils.js'; // import uShowModal from "./mycomponents/show-modal/uShowModal.vue" // // 如此配置即可 // uni.$u.config.unit = 'rpx' // #ifndef VUE3 import Vue from 'vue' console.log("Vuew2222"); Vue.config.productionTip = false Vue.prototype.$store = store Vue.prototype.$adpid = "1111111111" Vue.prototype.$backgroundAudioData = { playing: false, playTime: 0, formatedPlayTime: '00:00:00' } 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) // 使用 uView UI app.use(store) app.use(uView) app.use(VueClipboard) app.config.globalProperties.$adpid = "1111111111" app.config.globalProperties.$pageSize = 100 // app.config.globalProperties.$utils = utils; app.config.globalProperties.$backgroundAudioData = { playing: false, playTime: 0, formatedPlayTime: '00:00:00' } startApp(app); // app.component('u-show-modal', uShowModal); return { app } } export function startApp(app) { uni.request({ url: `./static/config.json?t=${new Date().getTime()}`, method: 'get', data: {}, success: (res) => { if (res.data != "") { //在配置中读url,company等信息 app.config.globalProperties.$baseInfo = res.data.baseInfo; getApp().globalData.dev_url = res.data.baseInfo.dev.value; getApp().globalData.request_url = res.data.baseInfo.request_url.value; getApp().globalData.tenantId = res.data.baseInfo.tenantId.value; app.config.globalProperties.$recepit_configList = res.data.recepit_configList; getApp().globalData.recepit_configList = res.data.recepit_configList; getApp().globalData.feed_configList = res.data.feed_configList; getApp().globalData.isDevelopment = res.data.baseInfo.isDevelopment.value } }, fail: (error) => { } }) return { startApp }; } // #endif