App.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <script>
  2. export default {
  3. onLaunch: function() {
  4. /* 条件编译,仅在H5平台生效 */
  5. // #ifdef H5
  6. uni.getSystemInfo({
  7. success(e) {
  8. /* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */
  9. console.log(e, window.top.isPC, !/iOS|Android/i.test(e.system));
  10. if (e.windowWidth > 420 && !window.top.isPC && !/iOS|Android/i.test(e.system)) {
  11. const url = decodeURIComponent(`/TracerMethodology/static/html/template.html`);
  12. // console.log({hospSign,url});
  13. window.location.pathname = url;
  14. /* 若项目未设置根目录(默认为 / 时),则使用下方代码 */
  15. // window.location.pathname = '/static/html/pc.html';
  16. }
  17. }
  18. })
  19. // #endif
  20. },
  21. onShow: function() {
  22. // console.log("App Show");
  23. },
  24. onHide: function() {
  25. // console.log("App Hide");
  26. },
  27. methods: {
  28. // 监测是否传参数
  29. checkArguments() {
  30. try {
  31. if (uni.getSystemInfoSync().platform === 'android') {
  32. // 接收第三方app传递的参数 extra;
  33. // #ifdef APP-PLUS
  34. if (plus.runtime.arguments) {
  35. // patParams: 院区,病区, 床号
  36. const {
  37. patParams
  38. } = JSON.parse(plus.runtime.arguments);
  39. console.log({
  40. patParams
  41. });
  42. uni.setStorageSync('patParams', patParams);
  43. }
  44. // #endif
  45. }
  46. } catch (e) {}
  47. },
  48. }
  49. };
  50. </script>
  51. <style lang="scss">
  52. @import "uview-ui/index.scss";
  53. /*每个页面公共css */
  54. /* 条件编译,仅在H5平台生效 */
  55. // #ifdef H5
  56. body::-webkit-scrollbar,
  57. html::-webkit-scrollbar {
  58. display: none;
  59. }
  60. // #endif
  61. body,
  62. uni-app,
  63. uni-page,
  64. uni-page-wrapper,
  65. uni-page-body {
  66. height: 100%;
  67. font-size: 20rpx;
  68. line-height: 30rpx;
  69. color: #292C33;
  70. background-color: #F5F6FA;
  71. }
  72. view,
  73. label,
  74. scroll-view {
  75. box-sizing: border-box;
  76. }
  77. // 底部固定的按钮
  78. .fixed-buttom-btn {
  79. position: fixed;
  80. left: 0;
  81. bottom: 0;
  82. display: flex;
  83. justify-content: center;
  84. align-items: center;
  85. margin-top: 12.5rpx;
  86. width: 100%;
  87. height: 75rpx;
  88. background-color: #3377FF;
  89. .btn-text {
  90. flex: 1;
  91. font-size: 22.5rpx;
  92. color: #fff;
  93. text-align: center;
  94. }
  95. .btn-text.cancle {
  96. line-height: 76.25rpx;
  97. background-color: #FFFFFF;
  98. color: #3377FF;
  99. }
  100. }
  101. // 新建情境样式start
  102. .creatingSituations {
  103. .title {
  104. padding-bottom: 35rpx;
  105. padding-left: 25rpx;
  106. font-size: 30rpx;
  107. line-height: 45rpx;
  108. color: #292C33;
  109. }
  110. }
  111. // 新建情境样式end
  112. // 查核地图列表样式start
  113. .check-map-list {
  114. overflow: hidden;
  115. padding: 0 25rpx;
  116. .item {
  117. position: relative;
  118. overflow: hidden;
  119. margin-bottom: 25rpx;
  120. border-radius: 5rpx;
  121. padding-top: 16.25rpx;
  122. padding-bottom: 0;
  123. width: 100%;
  124. background-color: #fff;
  125. box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
  126. .title-wrap {
  127. display: flex;
  128. flex-direction: row;
  129. align-items: center;
  130. padding: 0 25rpx;
  131. >text {
  132. font-size: 35rpx;
  133. line-height: 52.5rpx;
  134. color: #292C33;
  135. }
  136. >view {
  137. display: flex;
  138. flex-direction: row;
  139. align-items: center;
  140. margin-left: 20rpx;
  141. border-radius: 17.5rpx;
  142. height: 35rpx;
  143. font-size: 17.5rpx;
  144. line-height: 35rpx;
  145. color: #8F9BB3;
  146. background-color: #EDF2FA;
  147. image {
  148. width: 35rpx;
  149. height: 35rpx;
  150. }
  151. text {
  152. padding-left: 10rpx;
  153. padding-right: 20rpx;
  154. }
  155. }
  156. }
  157. .content {
  158. display: flex;
  159. flex-direction: column;
  160. padding: 11.25rpx 25rpx 20rpx;
  161. >text {
  162. overflow: hidden;
  163. white-space: nowrap;
  164. text-overflow: ellipsis;
  165. font-size: 20rpx;
  166. line-height: 30rpx;
  167. color: #666F80;
  168. &:first-child {
  169. margin-bottom: 5rpx;
  170. font-weight: bold;
  171. color: #292C33;
  172. }
  173. }
  174. }
  175. }
  176. }
  177. // 查核地图列表样式end
  178. </style>