main.js 925 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import Vue from 'vue'
  2. import App from './App'
  3. Vue.config.productionTip = false
  4. // import uView from "uview-ui";
  5. // Vue.use(uView);
  6. import md5 from 'js-md5';
  7. Vue.prototype.$md5 = md5;
  8. import dayjs from 'dayjs';
  9. Vue.prototype.$day = dayjs;
  10. import cof from '@/static/config/in';
  11. Vue.prototype.$cof = cof;
  12. import hosts from "@/request/config";
  13. Vue.prototype.$hosts = hosts;
  14. import { goto } from '@/utils/myfun.js';
  15. Vue.prototype.goto = goto;
  16. //注册为全局组件 - 通告
  17. import noticeBar from "@/components/noticeBar";
  18. Vue.component('noticeBar', noticeBar);
  19. App.mpType = 'app'
  20. const app = new Vue({
  21. ...App
  22. })
  23. app.$mount()
  24. Array.prototype.indexOf = function (val) {
  25. for (var i = 0; i < this.length; i++) {
  26. if (this[i] == val) return i;
  27. }
  28. return -1;
  29. };
  30. Array.prototype.remove = function (val) {
  31. var index = this.indexOf(val);
  32. if (index > -1) {
  33. this.splice(index, 1);
  34. }
  35. };