Browse Source

Merge remote-tracking branch 'origin/dev' into dev

yanqiliang 2 months ago
parent
commit
d1570c229f

+ 21 - 18
src/assets/scss/style.scss

@@ -15,17 +15,17 @@ body {
 #root > div,
 .page-body {
   width: 100%;
-  background: #1E50A1;
+  background: #1e50a1;
   color: #333;
   height: 100%;
   box-sizing: border-box;
-  &.big{
-    .room-name{
-      font-size: 1.8rem!important;
+  &.big {
+    .room-name {
+      font-size: 1.8rem !important;
     }
     .table-content,
-    .table-header{
-      font-size: 1.6rem!important;
+    .table-header {
+      font-size: 1.6rem !important;
     }
   }
 }
@@ -59,7 +59,7 @@ body {
       top: -1rem;
       left: 50%;
       transform: translate(-50%, 0);
-      background: #21469B;
+      background: #21469b;
       border-radius: 0 0 0.5rem 0.5rem;
       border: 0.14rem solid #cce774;
       box-sizing: border-box;
@@ -80,7 +80,7 @@ body {
       border-radius: 0.5rem;
       display: inline-block;
       padding: 0.4em 1.5rem;
-      background: #6FBA2C;
+      background: #6fba2c;
       line-height: 1.2rem;
       font-size: 0.8rem;
       color: #fff;
@@ -103,8 +103,8 @@ body {
       white-space: nowrap;
       overflow: hidden;
       text-overflow: ellipsis;
-      &.big{
-         font-size: 2.4rem;
+      &.big {
+        font-size: 2.4rem;
       }
     }
   }
@@ -134,12 +134,15 @@ body {
     flex: 1;
     margin-top: 0.8rem;
     overflow: hidden;
+    &.section {
+      padding-top: 0.3rem;
+    }
     .table-content,
     .table-header {
       box-sizing: border-box;
-      background: #21469B;
+      background: #21469b;
       border-radius: 0.5rem;
-      border: 0.14rem solid #21469B;
+      border: 0.14rem solid #21469b;
       padding: 0 1rem;
       font-size: 1.4rem;
       white-space: nowrap;
@@ -149,13 +152,13 @@ body {
       line-height: 3.8rem;
       text-align: center;
       color: #fff;
+      margin-top: 0.5rem;
     }
     .table-content {
       background-color: #f0f0f0;
       border-color: #f0f0f0;
       color: #333;
       font-size: 1.5rem;
-      margin-top: 0.5rem;
       &.patOpeName {
         color: #f39a06;
         padding: 0 0.4rem;
@@ -214,19 +217,19 @@ body {
       color: #333;
     }
   }
-  .footer{
+  .footer {
     color: #333;
   }
 }
-.dark-bg{
+.dark-bg {
   .page-body {
     background: #0d1943;
     color: #fff;
   }
   .header {
     .room-name {
-      background: #21469B;
-      border-color: #21469B;
+      background: #21469b;
+      border-color: #21469b;
       color: #fff;
     }
     .heaer-btn {
@@ -248,7 +251,7 @@ body {
       color: #fff;
     }
   }
-  .footer{
+  .footer {
     color: #fff;
   }
 }

+ 1 - 1
src/pages/bigScreen/Index.jsx

@@ -72,7 +72,7 @@ class BigScreen extends React.Component {
   initScroll = () => {
     const parentDom = document.getElementById('patWrap');
     const style = window.getComputedStyle(parentDom);
-    const parentH = parentDom.offsetHeight - parseInt(style.paddingTop) - parseInt(style.paddingBottom) - 50;
+    const parentH = parentDom.offsetHeight - parseInt(style.paddingTop) - parseInt(style.paddingBottom);
     const childH = parentDom.children[0].offsetHeight;
     const pageSize = Math.floor(parentH / childH) - 1;
     this.setState({

+ 12 - 3
src/pages/home/Index.jsx

@@ -3,7 +3,7 @@ import Login from '@components/login/Index.jsx';
 import DoctorScreen from '@pages/doctorScreen/Index.jsx';
 import BigScreen from '@pages/bigScreen/Index.jsx';
 import OperateScreen from '@pages/operateScreen/Index.jsx';
-// import FingerprintJS from '@fingerprintjs/fingerprintjs';
+import FingerprintJS from '@fingerprintjs/fingerprintjs';
 import { initSocket } from '@api/index.js';
 import { AntOutline, SetOutline } from 'antd-mobile-icons';
 import { Toast } from 'antd-mobile';
@@ -48,8 +48,17 @@ class Home extends React.Component {
     if (/android/.test(ua)) {
       window.JavaClientCall && window.JavaClientCall.getDeviceID();
     }
-    // const fp = await FingerprintJS.load();
-    // const AndroidInfo = await fp.get();
+    // 测试环境无法从安卓获取数据
+    const isDev = import.meta.env.MODE == 'development';
+    if (isDev) {
+      const fp = await FingerprintJS.load();
+      const AndroidInfo = await fp.get();
+      this.setState({
+        deviceID: AndroidInfo.visitorId,
+      }, () => {
+        this.loginInit();
+      });
+    }
   };
   // 改变颜色
   changeSwitch = () => {

+ 1 - 1
src/pages/operateScreen/Index.jsx

@@ -72,7 +72,7 @@ class OperateScreen extends React.Component {
   initScroll = () => {
     const parentDom = document.getElementById('patWrap');
     const style = window.getComputedStyle(parentDom);
-    const parentH = parentDom.offsetHeight - parseInt(style.paddingTop) - parseInt(style.paddingBottom) - 50;
+    const parentH = parentDom.offsetHeight - parseInt(style.paddingTop) - parseInt(style.paddingBottom);
     const childH = parentDom.children[0].offsetHeight;
     const pageSize = Math.floor(parentH / childH) - 1;
     this.setState({