import Vue from 'vue' import App from './App' import http from 'http.js' import verified from 'verified.js' import store from './store' import Moment from './static/moment.js' // import VueQuillEditor from 'vue-quill-editor' // // require styles // import 'quill/dist/quill.core.css' // import 'quill/dist/quill.snow.css' // import 'quill/dist/quill.bubble.css' // Vue.use(VueQuillEditor) Vue.prototype.$http = http Vue.prototype.$verified = verified Vue.prototype.$store = store Vue.config.productionTip = false App.mpType = 'app' Vue.filter('imagesFilter', (images) => { let image = ''; if (images) { image = images.split(',')[0] } if (image.indexOf("http") !== 0) { image = http.baseUrl + image; } return image; }) Vue.filter('priceFilter', (price) => { return Number(price).toFixed(2); }) Vue.filter('datetimeFilter', (value,format) => { var datetimeFormat = 'YYYY-MM-DD HH:mm:ss' if(format){ datetimeFormat = format } if (isNaN(value)) { return value ? Moment(value).format(datetimeFormat) : ''; } else { return value ? Moment(parseInt(value) * 1000).format(datetimeFormat) :'None'; } }) const app = new Vue({ ...App, store }) app.$mount()