自主产品,供应链食堂系统。将两个端拆开了。
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.

98 lines
3.9 KiB

  1. <script>
  2. export default {
  3. globalData: {
  4. screenWidth: 0, // 屏幕宽度
  5. statusBarH: 0, // 状态栏的高度
  6. screenHeight: 0, // 屏幕高度
  7. customBarH: 0, // 标题导航栏高度
  8. windowHeight: 0 // 窗口可用高度,窗口总高度 - 状态栏的高度
  9. },
  10. onLaunch: function() {
  11. this.disableConsole();
  12. this.getSystemInfo();
  13. },
  14. methods: {
  15. // 获取手机设备信息
  16. getSystemInfo(){
  17. let res = uni.getSystemInfoSync();
  18. this.globalData.screenWidth = res.screenWidth;
  19. this.globalData.statusBarH = res.statusBarHeight;
  20. this.globalData.screenHeight = res.screenHeight;
  21. this.globalData.customBarH = res.statusBarHeight + 45;
  22. this.globalData.windowHeight = res.windowHeight - (res.statusBarHeight - 20);
  23. // #ifdef MP
  24. setTimeout(() => {
  25. let custom = uni.getMenuButtonBoundingClientRect()
  26. this.globalData.customBarH = custom.bottom + custom.top - res.statusBarHeight;
  27. if (this.globalData.customBarH <= 0) {
  28. this.globalData.customBarH = 40 + this.globalData.statusBarH;
  29. }
  30. }, 30);
  31. // #endif
  32. // #ifdef MP-ALIPAY
  33. this.globalData.customBarH = res.statusBarHeight + res.titleBarHeight;
  34. // #endif
  35. },
  36. // 判断正式服屏蔽console输出
  37. disableConsole(){
  38. if(this.API.DEV == 'prod'){
  39. console.log = () => {};
  40. }
  41. }
  42. }
  43. }
  44. </script>
  45. <style lang="scss">
  46. @import "@/uview-ui/index.scss";
  47. @import '@/common/styles/theme.css';
  48. @import '@/common/styles/common.css';
  49. // 禁用的按钮
  50. .lf-btn-disabled{
  51. background-color: #cfd0d1 !important;
  52. color: #FFFFFF !important;
  53. border: none !important;
  54. opacity: 1 !important;
  55. }
  56. //底部按钮
  57. .btn-bottom {
  58. position: fixed;
  59. left: 0;
  60. bottom: 0;
  61. width: 100%;
  62. z-index: 1;
  63. }
  64. // loading加载
  65. .loading-more {
  66. align-items: center;
  67. justify-content: center;
  68. padding-top: 10px;
  69. padding-bottom: 10px;
  70. text-align: center;
  71. font-size: 28rpx;
  72. color: #999;
  73. }
  74. .loading-more-text::before {
  75. content: '';
  76. width: 20px;
  77. height: 20px;
  78. display: inline-block;
  79. vertical-align: middle;
  80. -webkit-animation: weuiLoading 1s steps(12, end) infinite;
  81. animation: weuiLoading 1s steps(12, end) infinite;
  82. background-repeat: no-repeat;
  83. background-image: url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E");
  84. background-size: 100%;
  85. }
  86. @keyframes weuiLoading {
  87. 0% {
  88. transform: rotate3d(0, 0, 1, 0deg);
  89. }
  90. 100% {
  91. transform: rotate3d(0, 0, 1, 360deg);
  92. }
  93. }
  94. </style>