import App from './App' // #ifndef VUE3 import Vue from 'vue' import './uni.promisify.adaptor' Vue.config.productionTip = false App.mpType = 'app' const app = new Vue({ ...App }) app.$mount() import uView from 'uview-ui'; Vue.use(uView); uni.$u.config.unit = 'rpx'; //简化提示 Vue.prototype.$showToast = function(title, duration = 2000, icon = "none") { return uni.showToast({ title, duration, icon }); } //挂载api import apis from '@/apis/index.js'; Vue.prototype.$api = apis; //日期格式处理 import dateFormat from '@/utils/dateFormat.js'; Vue.use(dateFormat); //引入校验库 import reg from '@/utils/htc.js' Vue.prototype.$reg = reg; //全局属性 import pageCommon from '@/mixins/common.js' Vue.mixin(pageCommon); //全局注册组件 import uHeader from '@/components/common/uHeader' Vue.component('uHeader',uHeader); import cusEcharts from '@/components/cusEcharts/index' Vue.component('cusEcharts',cusEcharts); //tabbar import tabbar from '@/components/Tabbar/tabbar' Vue.component('tabbar',tabbar); // #endif // #ifdef VUE3 import { createSSRApp } from 'vue' export function createApp() { const app = createSSRApp(App) return { app } } // #endif