兼兼街租房小程序
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.

47 lines
782 B

  1. function showLoading(title= '加载中...'){
  2. uni.showLoading({
  3. title: title,
  4. duration: 10000,
  5. mask: true
  6. })
  7. }
  8. function hideLoading(){
  9. uni.hideLoading();
  10. }
  11. function showToast (title) {
  12. uni.showToast({
  13. title:title,
  14. icon:"none",
  15. duration: 2000,
  16. mask: false
  17. })
  18. }
  19. function showToastSuccess(title){
  20. uni.showToast({
  21. title: title,
  22. icon: "success",
  23. duration: 2000,
  24. mask:false
  25. })
  26. }
  27. function isExist(value) {
  28. if (value !== null && value !== undefined && value !== "undefined" && value !== "null" && value.length > 0) {
  29. return true;
  30. } else {
  31. return false;
  32. }
  33. }
  34. export default {
  35. showToast: showToast,
  36. showLoading: showLoading,
  37. hideLoading: hideLoading,
  38. showToastSuccess: showToastSuccess,
  39. isExist: isExist
  40. }