import Vue from 'vue'; import App from './App'; // 弹出框 import pubc from '@/common/public.js' // 多语言本地化 import VueI18n from 'vue-i18n' import messages from './locale/index' import filters from '@/common/filters.js'; // 引入 Vuex store import store from './store' let i18nConfig = { locale: uni.getLocale(), messages } Vue.use(VueI18n) const i18n = new VueI18n(i18nConfig) Vue.config.productionTip = false Vue.prototype.$apiHost = 'https://e.zhichao.art/Gapi'; Vue.prototype.$apiHost2 = 'https://e.zhichao.art/Gapi2'; Vue.prototype.$isWeb3 = 0; // 分享链接 Vue.prototype.$shareUrl = 'https://e.zhichao.art/share/#/'; // 分享图标 默认为logo Vue.prototype.$icon = 'https://e.zhichao.art/static/logo.png'; // Vue.prototype.now = Date.now || function () { // return new Date().getTime(); // }; Vue.prototype.isArray = Array.isArray || function(obj) { return obj instanceof Array; }; App.mpType = 'app' // 注册全局过滤器 Object.keys(filters).forEach(key => { Vue.filter(key, filters[key]); }); const app = new Vue({ i18n, store, ...App }) app.$mount()