2023-08-10 01:16:23 +08:00
|
|
|
import Vue from 'vue'
|
|
|
|
import Api from '../api/index'
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
import './style/index.less'
|
|
|
|
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;
|
|
|
|
}
|
2023-08-10 23:36:55 +08:00
|
|
|
}
|
|
|
|
window.jhcaches={};
|