const asyncReady = async function (vm, name) {
  // 获取配置信息
  try {
    const res = await vm.$resetget('/rs/vue/' + name + '.json', { resolveMsg: null, rejectMsg: null })
    Object.assign(vm.config, res)
  } catch (error) {
    // 忽略704,文件找不到异常
    if (error.status !== 704) {
      throw error
    }
  }
}
export default {
  install (Vue) {
    Vue.getConfig = Vue.prototype.$getConfig = function (vm, name) {
      return asyncReady(vm, name)
    }
  }
}
