App.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. },
  13. onShow: function() {
  14. // console.log("App Show");
  15. },
  16. onHide: function() {
  17. // console.log("App Hide");
  18. },
  19. methods: {
  20. // 监测是否传参数
  21. checkArguments() {
  22. try {
  23. if (uni.getSystemInfoSync().platform === 'android') {
  24. // 接收第三方app传递的参数 extra;
  25. if (plus.runtime.arguments) {
  26. // patParams: 院区,病区, 床号
  27. const { patParams } = JSON.parse(plus.runtime.arguments);
  28. uni.setStorageSync('patParams', patParams);
  29. }
  30. }
  31. } catch (e) {}
  32. }
  33. }
  34. };
  35. </script>
  36. <style lang="less">
  37. /*每个页面公共css */
  38. body,
  39. uni-app,
  40. uni-page,
  41. uni-page-wrapper,
  42. uni-page-body {
  43. height: 100%;
  44. font-size: 20rpx;
  45. line-height: 30rpx;
  46. background-color: #F5F6FA;
  47. }
  48. view,
  49. label,
  50. scroll-view {
  51. box-sizing: border-box;
  52. }
  53. // 底部固定的按钮
  54. .fixed-buttom-btn {
  55. position: fixed;
  56. left: 0;
  57. bottom: 0;
  58. display: flex;
  59. justify-content: center;
  60. align-items: center;
  61. margin-top: 12.5rpx;
  62. width: 100%;
  63. height: 75rpx;
  64. background-color: #3377FF;
  65. .btn-text {
  66. flex: 1;
  67. font-size: 22.5rpx;
  68. color: #fff;
  69. text-align: center;
  70. }
  71. .btn-text.cancle {
  72. line-height: 76.25rpx;
  73. background-color: #FFFFFF;
  74. color: #3377FF;
  75. }
  76. }
  77. // 新建情境样式start
  78. .creatingSituations {
  79. .title {
  80. padding-bottom: 35rpx;
  81. padding-left: 25rpx;
  82. font-size: 30rpx;
  83. line-height: 45rpx;
  84. color: #292C33;
  85. }
  86. }
  87. // 新建情境样式end
  88. // 查核地图列表样式start
  89. .check-map-list {
  90. overflow: hidden;
  91. padding: 0 25rpx;
  92. .item {
  93. position: relative;
  94. overflow: hidden;
  95. margin-bottom: 25rpx;
  96. border-radius: 5rpx;
  97. padding-top: 16.25rpx;
  98. padding-bottom: 0;
  99. width: 100%;
  100. background-color: #fff;
  101. box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
  102. }
  103. }
  104. // 查核地图列表样式end
  105. </style>