Fetch the repository succeeded.
// 不含icon提示框
const toast = str => {
return new Promise((resolve, reject) => {
uni.showToast({
title: str,
icon: "none",
duration: 2000,
success: () => {
setTimeout(() => {
resolve
}, 2000)
}
})
})
};
// 成功提示框
const successToast = str => {
return new Promise((resolve, reject) => {
uni.showToast({
title: str,
icon: "success",
duration: 2000,
success: () => {
setTimeout(() => {
resolve()
}, 2000)
}
})
})
};
// loading
const showLoading = () => {
return new Promise((resolve, reject) => {
uni.showLoading({
success: () => {
resolve()
}
})
})
};
// tipLoading ==>提示loading
const tipLoading = str => {
return new Promise((resolve, reject) => {
uni.showLoading({
title: str,
success: () => {
resolve()
}
})
})
};
// 隐藏loading
const hideLoading = () => {
return new Promise((resolve, reject) => {
uni.hideLoading({
success: () => {
resolve()
}
})
})
};
export default {
toast: toast,
successToast: successToast,
showLoading: showLoading,
tipLoading: tipLoading,
hideLoading: hideLoading,
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。