liudan 1 year ago
parent
commit
1be402acd8
2 changed files with 13 additions and 4 deletions
  1. BIN
      src/assets/images/test.jpeg
  2. 13 4
      src/pages/home/Index.jsx

BIN
src/assets/images/test.jpeg


+ 13 - 4
src/pages/home/Index.jsx

@@ -7,6 +7,7 @@ import FingerprintJS from '@fingerprintjs/fingerprintjs';
 import { initSocket } from '@api/index.js';
 import { initSocket } from '@api/index.js';
 import { AntOutline, SetOutline } from 'antd-mobile-icons';
 import { AntOutline, SetOutline } from 'antd-mobile-icons';
 import { Toast } from 'antd-mobile';
 import { Toast } from 'antd-mobile';
+import src from '../../assets/images/test.jpeg';
 
 
 window.webGetDeviceId = function (callback) {
 window.webGetDeviceId = function (callback) {
   window.callback = callback;
   window.callback = callback;
@@ -15,6 +16,7 @@ class Home extends React.Component {
   constructor(props) {
   constructor(props) {
     super(props);
     super(props);
     this.state = {
     this.state = {
+      showImage: false,
       visibleLogin: false,
       visibleLogin: false,
       userData: {}, // 用户及房间数据
       userData: {}, // 用户及房间数据
       patList: [], // 就诊等待数据
       patList: [], // 就诊等待数据
@@ -355,6 +357,7 @@ class Home extends React.Component {
     }
     }
     this.setState({
     this.setState({
       colorName,
       colorName,
+      showImage: !this.state.showImage,
     });
     });
     localStorage.setItem('ZZJ-color', colorName);
     localStorage.setItem('ZZJ-color', colorName);
   };
   };
@@ -485,9 +488,11 @@ class Home extends React.Component {
           hideLogin={this.hideLogin}
           hideLogin={this.hideLogin}
           loginInit={this.loginInit}
           loginInit={this.loginInit}
           deviceID={this.state.deviceID}
           deviceID={this.state.deviceID}
-        />
-        {/* 医生诊室呼叫 */}
-        {this.state.showType == 'doctor'
+          />
+          {this.state.showImage
+            ? <img src={src} width={'100%'} />
+            : <>
+                 {this.state.showType == 'doctor'
           ? <DoctorScreen
           ? <DoctorScreen
               userData={this.state.userData}
               userData={this.state.userData}
               patList={this.state.patList}
               patList={this.state.patList}
@@ -508,7 +513,7 @@ class Home extends React.Component {
               />
               />
 
 
         }
         }
-        </div>
+       
       <span
       <span
         className='bottom-set'
         className='bottom-set'
       >
       >
@@ -524,6 +529,10 @@ class Home extends React.Component {
         <audio controls id="audio"
         <audio controls id="audio"
           style={{ position: 'fixed', left: '-1000px', top: '100px' }}
           style={{ position: 'fixed', left: '-1000px', top: '100px' }}
         ></audio>
         ></audio>
+            </>
+          }
+          {/* 医生诊室呼叫 */}
+          </div>
     </>
     </>
     );
     );
   }
   }