main.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import Vue from 'vue';
  2. import App from './App';
  3. // 弹出框
  4. import pubc from '@/common/public.js'
  5. // 多语言本地化
  6. import VueI18n from 'vue-i18n'
  7. import messages from './locale/index'
  8. import filters from '@/common/filters.js';
  9. // 引入 Vuex store
  10. import store from './store'
  11. let i18nConfig = {
  12. locale: uni.getLocale(),
  13. messages
  14. }
  15. Vue.use(VueI18n)
  16. const i18n = new VueI18n(i18nConfig)
  17. Vue.config.productionTip = false
  18. Vue.prototype.$apiHost = 'https://e.zhichao.art/Gapi';
  19. Vue.prototype.$apiHost2 = 'https://e.zhichao.art/Gapi2';
  20. Vue.prototype.$isWeb3 = 0;
  21. // 分享链接
  22. Vue.prototype.$shareUrl = 'https://e.zhichao.art/share/#/';
  23. // 分享图标 默认为logo
  24. Vue.prototype.$icon = 'https://e.zhichao.art/static/logo.png';
  25. // Vue.prototype.now = Date.now || function () {
  26. // return new Date().getTime();
  27. // };
  28. Vue.prototype.isArray = Array.isArray || function(obj) {
  29. return obj instanceof Array;
  30. };
  31. App.mpType = 'app'
  32. // 注册全局过滤器
  33. Object.keys(filters).forEach(key => {
  34. Vue.filter(key, filters[key]);
  35. });
  36. const app = new Vue({
  37. i18n,
  38. store,
  39. ...App
  40. })
  41. app.$mount()