2021-05-13 11:03:32 +08:00
|
|
|
|
import Vue from "vue";
|
|
|
|
|
import App from "./App";
|
|
|
|
|
import * as filters from "./utils/filters.js"; // global filter
|
|
|
|
|
import uView from "uview-ui";
|
|
|
|
|
import store from "./store";
|
2022-10-10 18:53:14 +08:00
|
|
|
|
import config from '@/config/config';
|
|
|
|
|
import airBtn from "@/components/m-airbtn/index.vue";
|
2023-01-13 10:52:12 +08:00
|
|
|
|
import socketIO from './pages/mine/im/socket';
|
2021-08-19 16:20:21 +08:00
|
|
|
|
/**
|
|
|
|
|
* 仅在h5中显示唤醒app功能
|
|
|
|
|
* 在h5页面手动挂载
|
|
|
|
|
*
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
// #ifdef H5
|
2023-01-13 10:52:12 +08:00
|
|
|
|
if (config.enableMiniBarStartUpApp) {
|
2022-10-10 18:53:14 +08:00
|
|
|
|
let btn = Vue.component("airBtn", airBtn); //全局注册
|
|
|
|
|
document.body.appendChild(new btn().$mount().$el);
|
|
|
|
|
}
|
2021-05-13 11:03:32 +08:00
|
|
|
|
// #endif
|
|
|
|
|
|
2022-08-25 18:25:45 +08:00
|
|
|
|
// 引入uView对小程序分享的mixin封装
|
|
|
|
|
let mpShare = require('uview-ui/libs/mixin/mpShare.js');
|
|
|
|
|
Vue.mixin(mpShare)
|
2021-08-19 16:20:21 +08:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 全局filters
|
|
|
|
|
*/
|
|
|
|
|
|
2021-05-13 11:03:32 +08:00
|
|
|
|
Object.keys(filters).forEach((key) => {
|
|
|
|
|
Vue.filter(key, filters[key]);
|
|
|
|
|
});
|
|
|
|
|
|
2021-08-17 11:53:56 +08:00
|
|
|
|
// 引入Vuex
|
2021-06-04 18:11:34 +08:00
|
|
|
|
Vue.prototype.$store = store;
|
2023-01-13 10:52:12 +08:00
|
|
|
|
// Vue.prototype.socketIo = new socketIO();
|
2021-05-13 11:03:32 +08:00
|
|
|
|
Vue.use(uView);
|
2021-06-04 18:11:34 +08:00
|
|
|
|
Vue.config.productionTip = false;
|
2021-08-19 16:20:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 注意!
|
|
|
|
|
* 此处将常用的颜色嵌入到原型链上面
|
|
|
|
|
* 颜色使用驼峰命名对应 uni.scss中全局颜色变量名
|
|
|
|
|
* 如需更换主题请修改此处以及uni.scss中的全局颜色
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
// 主题色
|
2022-10-10 18:53:14 +08:00
|
|
|
|
Vue.prototype.$mainColor = config.mainColor;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
// 高亮主题色
|
2022-10-10 18:53:14 +08:00
|
|
|
|
Vue.prototype.$lightColor = config.lightColor;
|
2021-08-19 16:20:21 +08:00
|
|
|
|
// 辅助高亮颜色
|
2022-10-10 18:53:14 +08:00
|
|
|
|
Vue.prototype.$aiderLightColor = config.aiderLightColor;
|
2021-08-17 11:53:56 +08:00
|
|
|
|
|
2021-05-13 11:03:32 +08:00
|
|
|
|
|
|
|
|
|
App.mpType = "app";
|
|
|
|
|
|
|
|
|
|
const app = new Vue({
|
|
|
|
|
...App,
|
|
|
|
|
});
|
|
|
|
|
app.$mount();
|