绿满眶商城微信小程序-uniapp
zhanghua
5 天以前 1113721c0e068c57adbc15149cce15563960a7f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import Vue from "vue";
import App from "./App";
import * as filters from "./utils/filters.js"; // global filter
import uView from '@/components/uview-components/uview-ui'
import store from "./store";
import config from '@/config/config';
import airBtn from "@/components/m-airbtn/index.vue";
import socketIO from './pages/mine/im/socket';
 
// 自定义tabbar
import CustomTabbar from '@/components/custom-tabbar.vue'
Vue.component('custom-tabbar', CustomTabbar)
 
/**
 * 仅在h5中显示唤醒app功能
 * 在h5页面手动挂载
 * 
 */
// #ifdef H5
if (config.enableMiniBarStartUpApp) {
  let btn = Vue.component("airBtn", airBtn); //全局注册
  document.body.appendChild(new btn().$mount().$el);
}
// #endif
 
// 引入uView对小程序分享的mixin封装
let mpShare = require('./components/uview-components/uview-ui/libs/mixin/mpShare.js');
Vue.mixin(mpShare)
 
/**
 * 全局filters
 */
 
Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key]);
});
 
console.log("有吗?",uView);
// 引入Vuex
Vue.prototype.$store = store;
// Vue.prototype.socketIo = new socketIO();
Vue.use(uView);
Vue.config.productionTip = false;
 
 
/**
 * 注意!
 * 此处将常用的颜色嵌入到原型链上面
 * 颜色使用驼峰命名对应 uni.scss中全局颜色变量名
 * 如需更换主题请修改此处以及uni.scss中的全局颜色
 */
// 主题色
Vue.prototype.$mainColor = config.mainColor;
// 高亮主题色
Vue.prototype.$lightColor = config.lightColor;
// 辅助高亮颜色
Vue.prototype.$aiderLightColor = config.aiderLightColor;
 
 
App.mpType = "app";
 
const app = new Vue({
  ...App,
});
app.$mount();