You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
497 B
35 lines
497 B
|
2 years ago
|
const showModal = (title, content, cb) => {
|
||
|
|
uni.showModal({
|
||
|
|
title,
|
||
|
|
content,
|
||
|
|
showCancel: false,
|
||
|
|
complete: () => {
|
||
|
|
if (cb) cb();
|
||
|
|
}
|
||
|
|
});
|
||
|
|
};
|
||
|
|
const showLoading = (title) => {
|
||
|
|
uni.showLoading({
|
||
|
|
title,
|
||
|
|
mask:true,
|
||
|
|
});
|
||
|
|
};
|
||
|
|
const hideLoading = () => {
|
||
|
|
uni.hideLoading();
|
||
|
|
};
|
||
|
|
|
||
|
|
// #ifdef APP
|
||
|
|
export default {
|
||
|
|
showModal,
|
||
|
|
showLoading,
|
||
|
|
hideLoading
|
||
|
|
};
|
||
|
|
// #endif
|
||
|
|
// #ifdef MP
|
||
|
|
module.exports = {
|
||
|
|
showModal,
|
||
|
|
showLoading,
|
||
|
|
hideLoading
|
||
|
|
};
|
||
|
|
// #endif
|