function InitDog() {
  const dog = {};
  dog.error = ({msg = '服务器错误', time = 2000, onClose}) => {
    return layui.layer.msg(
      '<i class="fa-solid fa-circle-exclamation"></i>' + msg, {
      offset: '15px',
      anim: 'slideDown',
      time: time,
      skin: 'dog error',
      end: onClose
    })
  };
  dog.success = ({msg = '操作成功', time = 2000, onClose}) => {
    return layui.layer.msg(
      '<i class="fa-solid fa-circle-check"></i>' + msg, {
      offset: '15px',
      anim: 'slideDown',
      time: time,
      skin: 'dog success',
      end: onClose
    })
  }
  
  return dog;
}
const Dog = window.Dog = InitDog();