/** * 显示模态框 * @param {string} msg * @param {boolean} showCancel * @param {string} confirmText */ export const showModal = (msg, showCancel = false, confirmText = '知道了') => uni.showModal({ title: '提示', content: msg, showCancel, confirmText, confirmColor: '#1890ff', }); /** * 显示toast * @param {string} msg */ export const showToast = msg => uni.showToast({ title: msg, icon: 'none', duration: 3000, }); // 显示加载动画 export const showLoading = (msg = '努力加载中...') => uni.showLoading({ title: msg }); // 隐藏加载动画 export const hideLoading = () => uni.hideLoading();