12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- 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);
- //uTop(logo+menu)
- import uTop from '@/components/common/uTop'
- Vue.component('uTop',uTop);
- //uDesc
- import uDesc from '@/components/common/uDesc'
- Vue.component('uDesc',uDesc);
- //uFunction
- import uFunction from '@/components/common/uFunction'
- Vue.component('uFunction',uFunction);
- //uForm
- import uForm from '@/components/common/uForm'
- Vue.component('uForm',uForm);
- /* 引入aos动画库相关文件 */
- import AOS from 'aos'
- import 'aos/dist/aos.css'
- /* aos动画初始化 */
- AOS.init({
- duration: 300,
- easing:"linear"
- });
- // #endif
- // #ifdef VUE3
- import { createSSRApp } from 'vue'
- export function createApp() {
- const app = createSSRApp(App)
- return {
- app
- }
- }
- // #endif
|