main.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import Vue from 'vue'
  2. import './plugins/axios'
  3. import App from './App.vue'
  4. import './plugins/element.js'
  5. import router from './router'
  6. import './assets/common.scss'
  7. import querystring from 'querystring';
  8. import store from './store'
  9. import './assets/font/index.scss'
  10. Date.prototype.Format = function(fmt) {
  11. let o = {
  12. 'M+': this.getMonth() + 1, // 月份
  13. 'd+': this.getDate(), // 日
  14. 'h+': this.getHours(), // 小时
  15. 'm+': this.getMinutes(), // 分
  16. 's+': this.getSeconds(), // 秒
  17. 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
  18. 'S': this.getMilliseconds() // 毫秒
  19. };
  20. if (/(y+)/.test(fmt)) { fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)); }
  21. for (let k in o) {
  22. if (new RegExp('(' + k + ')').test(fmt)) { fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length))); }
  23. }
  24. return fmt;
  25. };
  26. Vue.config.productionTip = false
  27. Vue.prototype.$qs = querystring
  28. Vue.use(require('vue-wechat-title')) //实例化标题
  29. new Vue({
  30. router,
  31. store,
  32. render: h => h(App)
  33. }).$mount('#app')