jhbigscreen/src/pages/init.js

21 lines
457 B
JavaScript

import Vue from 'vue'
import Api from '../api/index'
import dayjs from 'dayjs'
import './style/index.less'
import dayfilter from '@/utils/dayfilter'
dayfilter(Vue);
Vue.prototype.$api=Api;
Vue.prototype.$bus=new Vue();
Vue.prototype.$apiPath="/jhapi"
Vue.prototype.$dt=dayjs;
Vue.prototype.$tryToJson=(str,def=null)=>{
if(!str){
return def;
}
try{
return JSON.parse(str);
}catch(e){
return def;
}
}
window.jhcaches={};