ecUI.js 467 B

12345678910111213141516171819202122232425262728293031323334
  1. const showModal = (title, content, cb) => {
  2. uni.showModal({
  3. title,
  4. content,
  5. showCancel: false,
  6. complete: () => {
  7. if (cb) cb();
  8. }
  9. });
  10. };
  11. const showLoading = (title) => {
  12. uni.showLoading({
  13. title,
  14. mask:true,
  15. });
  16. };
  17. const hideLoading = () => {
  18. uni.hideLoading();
  19. };
  20. // #ifdef APP
  21. export default {
  22. showModal,
  23. showLoading,
  24. hideLoading
  25. };
  26. // #endif
  27. // #ifdef MP
  28. module.exports = {
  29. showModal,
  30. showLoading,
  31. hideLoading
  32. };
  33. // #endif