12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- import 'babel-polyfill'
- import Vue from 'vue'
- import App from './App'
- import router from './router'
- import vuex from 'vuex'
- import axios from './util/http.js'
- Vue.prototype.$http = axios
- Vue.prototype.$cdn = 'https://4dscene.4dage.com/new4dkk/'
- Vue.use(vuex)
- Vue.prototype.$bus = new Vue()
- Vue.config.productionTip = false
- function dateFtt (fmt) {
- let date = this
- let o = {
- 'M+': date.getMonth() + 1,
- 'd+': date.getDate(),
- 'h+': date.getHours(),
- 'm+': date.getMinutes(),
- 's+': date.getSeconds(),
- 'q+': Math.floor((date.getMonth() + 3) / 3),
- 'S': date.getMilliseconds()
- }
- if (/(y+)/.test(fmt)) {
- fmt = fmt.replace(
- RegExp.$1,
- (date.getFullYear() + '').substr(4 - RegExp.$1.length)
- )
- }
- for (let k in o) {
- if (new RegExp('(' + k + ')').test(fmt)) {
- fmt = fmt.replace(
- RegExp.$1,
- RegExp.$1.length === 1
- ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)
- )
- }
- }
- return fmt
- }
- /* eslint-disable */
- Date.prototype.format = dateFtt
- /* eslint-enable */
- /* eslint-disable no-new */
- new Vue({
- el: '#app',
- router,
- store: require('./store').default,
- components: { App },
- template: '<App/>'
- })
|