| | |
| | | import { getToken } from "@/utils/auth"; |
| | | // 时间转换 |
| | | import Moment from "moment"; |
| | | |
| | | import Big from 'big.js' |
| | | // 全局方法挂载 |
| | | Vue.prototype.$Big = Big; |
| | | Vue.prototype.getDicts = getDicts; |
| | | Vue.prototype.getConfigKey = getConfigKey; |
| | | Vue.prototype.parseTime = parseTime; |
| | |
| | | Vue.prototype.HaveJson = (val) => { |
| | | return JSON.parse(JSON.stringify(val)); |
| | | }; |
| | | Vue.prototype.javaApi = "http://192.168.21.53:8001/lims"; |
| | | const apiBase = process.env.VUE_APP_BASE_URL || process.env.VUE_APP_BASE_API; |
| | | Vue.prototype.javaApi = /^https?:\/\//i.test(apiBase) |
| | | ? apiBase.replace(/\/$/, "") |
| | | : window.location.origin + "/" + apiBase.replace(/^\/+|\/+$/g, ""); |
| | | Vue.prototype.checkPermi = checkPermi; |
| | | Vue.prototype.uploadHeader = { |
| | | Authorization: "Bearer " + getToken(), |