enum FormatType { /** 年月日 */ YMD = 'YYYY-MM-DD', /** 年月日 无连接符 */ YMDNC = 'YYYYMMDD', /** 年月日 时分秒 */ YMDHMS = 'YYYY-MM-DD HH:mm:ss', /** 年月日 时分秒为0 */ YMD000 = 'YYYY-MM-DD 00:00:00', /** 年月日 时分秒今天最后一秒 */ YMDEnd = 'YYYY-MM-DD 23:59:59', } /** 页面跳转类型 */ enum GoPageType { /** 关闭所有页面,打开到应用内的某个页面 */ reLaunch = 'reLaunch', /** 关闭当前页面,跳转到应用内的某个页面 */ redirectTo = 'redirectTo', /** 保留当前页面,跳转到应用内的某个页面 */ navigateTo = 'navigateTo', } /** 页面类型 */ enum PageType { /** 首页 */ home = 'home', /** 底部tab页面 */ tabPage = 'tabPage', /** 普通页面 */ page = 'page', } enum Events {} // /** 通知容器数据加载完毕 */ // containerLoaded = 'container:loaded', // /** 容器通知页面加载数据 */ // containerRefresh = 'container:refresh', enum LoadType { /** 监听页面加载 */ onLoad, /** 监听页面显示 */ onShow, /** 监听页面初次渲染完成 */ onReady, /** 下拉、上拉更新数据 */ refresh, /** 页面返回时刷新数据 */ backReload, } enum ReqState { /** 未请求 */ unasked = undefined, /** * 请求中 */ ing = 0, /** * 请求成功 */ success = 1, /** * 请求失败 */ fail = 2, /** * 请求取消 */ cancel = 3, } enum ErrorType { /** 业务逻辑错误 */ business, /** 网络错误 */ net, } const enums = { FormatType, PageType, LoadType, ReqState, ErrorType, Events, GoPageType, } /** * 生命周期类型 */ export default enums /** * 接口请求状态 */