App.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. </style>