App.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <script>
  2. export default {
  3. onLaunch: function() {
  4. // console.log("App Launch");
  5. // this.checkArguments(); // 检测启动参数
  6. // if (uni.getSystemInfoSync().platform == 'android') {
  7. // // 重点是以下: 一定要监听后台恢复 !一定要
  8. // plus.globalEvent.addEventListener('newintent', e => {
  9. // this.checkArguments(); // 检测启动参数
  10. // });
  11. // }
  12. if (uni.getSystemInfoSync().platform === 'android'){
  13. //pad下锁死竖屏
  14. plus.screen.lockOrientation('portrait-primary');
  15. }
  16. },
  17. onShow: function() {
  18. // console.log("App Show");
  19. },
  20. onHide: function() {
  21. // console.log("App Hide");
  22. },
  23. methods: {
  24. // 监测是否传参数
  25. checkArguments() {
  26. try {
  27. if (uni.getSystemInfoSync().platform === 'android') {
  28. // 接收第三方app传递的参数 extra;
  29. if (plus.runtime.arguments) {
  30. // patParams: 院区,病区, 床号
  31. const {
  32. patParams
  33. } = JSON.parse(plus.runtime.arguments);
  34. console.log({
  35. patParams
  36. });
  37. uni.setStorageSync('patParams', patParams);
  38. }
  39. }
  40. } catch (e) {}
  41. }
  42. }
  43. };
  44. </script>
  45. <style lang="less">
  46. /*每个页面公共css */
  47. body,
  48. uni-app,
  49. uni-page,
  50. uni-page-wrapper,
  51. uni-page-body {
  52. height: 100%;
  53. font-size: 20rpx;
  54. line-height: 30rpx;
  55. color: #292C33;
  56. background-color: #F5F6FA;
  57. }
  58. view,
  59. label,
  60. scroll-view {
  61. box-sizing: border-box;
  62. }
  63. // 底部固定的按钮
  64. .fixed-buttom-btn {
  65. position: fixed;
  66. left: 0;
  67. bottom: 0;
  68. display: flex;
  69. justify-content: center;
  70. align-items: center;
  71. margin-top: 12.5rpx;
  72. width: 100%;
  73. height: 75rpx;
  74. background-color: #3377FF;
  75. .btn-text {
  76. flex: 1;
  77. font-size: 22.5rpx;
  78. color: #fff;
  79. text-align: center;
  80. }
  81. .btn-text.cancle {
  82. line-height: 76.25rpx;
  83. background-color: #FFFFFF;
  84. color: #3377FF;
  85. }
  86. }
  87. // 新建情境样式start
  88. .creatingSituations {
  89. .title {
  90. padding-bottom: 35rpx;
  91. padding-left: 25rpx;
  92. font-size: 30rpx;
  93. line-height: 45rpx;
  94. color: #292C33;
  95. }
  96. }
  97. // 新建情境样式end
  98. // 查核地图列表样式start
  99. .check-map-list {
  100. overflow: hidden;
  101. padding: 0 25rpx;
  102. .item {
  103. position: relative;
  104. overflow: hidden;
  105. margin-bottom: 25rpx;
  106. border-radius: 5rpx;
  107. padding-top: 16.25rpx;
  108. padding-bottom: 0;
  109. width: 100%;
  110. background-color: #fff;
  111. box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
  112. .title-wrap {
  113. display: flex;
  114. flex-direction: row;
  115. align-items: center;
  116. padding: 0 25rpx;
  117. >text {
  118. font-size: 35rpx;
  119. line-height: 52.5rpx;
  120. color: #292C33;
  121. }
  122. >view {
  123. display: flex;
  124. flex-direction: row;
  125. align-items: center;
  126. margin-left: 20rpx;
  127. border-radius: 17.5rpx;
  128. height: 35rpx;
  129. font-size: 17.5rpx;
  130. line-height: 35rpx;
  131. color: #8F9BB3;
  132. background-color: #EDF2FA;
  133. image {
  134. width: 35rpx;
  135. height: 35rpx;
  136. }
  137. text {
  138. padding-left: 10rpx;
  139. padding-right: 20rpx;
  140. }
  141. }
  142. }
  143. .content {
  144. display: flex;
  145. flex-direction: column;
  146. padding: 11.25rpx 25rpx 20rpx;
  147. >text {
  148. overflow: hidden;
  149. white-space: nowrap;
  150. text-overflow: ellipsis;
  151. font-size: 20rpx;
  152. line-height: 30rpx;
  153. color: #666F80;
  154. &:first-child {
  155. margin-bottom: 5rpx;
  156. font-weight: bold;
  157. color: #292C33;
  158. }
  159. }
  160. }
  161. }
  162. }
  163. // 查核地图列表样式end
  164. </style>