import { showLoading, closeLoading } from '@/utils/pop' export function injectGlobalApi (Vue) { Vue.config.productionTip = false Vue.config.errorHandler = err => { closeLoading() throw err } Vue.prototype.__PLACEHOLDER__ = __PLACEHOLDER__ Vue.prototype.__WECHAT__ = __WECHAT__ Vue.prototype.$showLoading = showLoading Vue.prototype.$closeLoading = closeLoading Vue.prototype.$designProgram = function (id) { window.open(this.$router.resolve({ name: 'program', params: { id } }).href, '_blank') } }