main.js 788 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import Vue from 'vue'
  2. import App from './App'
  3. import uView from "uview-ui";
  4. import store from '@/store';
  5. import * as filters from '@/filter/index.js'
  6. const vuexStore = require("@/store/$u.mixin.js");
  7. Vue.mixin(vuexStore);
  8. Vue.use(uView);
  9. Object.keys(filters).forEach(name=>{
  10. Vue.filter(name,filters[name])
  11. })
  12. Vue.config.productionTip = false
  13. App.mpType = 'app'
  14. Promise.prototype.finally = function(callback) {
  15. let constructor = this.constructor;
  16. return this.then(function(value) {
  17. return constructor.resolve(callback()).then(function() {
  18. return value
  19. })
  20. }, function(issue) {
  21. return constructor.resolve(callback()).then(function() {
  22. throw issue
  23. })
  24. })
  25. }
  26. const app = new Vue({
  27. store,
  28. ...App
  29. })
  30. app.$mount()