liudan преди 1 година
родител
ревизия
1be402acd8
променени са 2 файла, в които са добавени 13 реда и са изтрити 4 реда
  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 { AntOutline, SetOutline } from 'antd-mobile-icons';
 import { Toast } from 'antd-mobile';
+import src from '../../assets/images/test.jpeg';
 
 window.webGetDeviceId = function (callback) {
   window.callback = callback;
@@ -15,6 +16,7 @@ class Home extends React.Component {
   constructor(props) {
     super(props);
     this.state = {
+      showImage: false,
       visibleLogin: false,
       userData: {}, // 用户及房间数据
       patList: [], // 就诊等待数据
@@ -355,6 +357,7 @@ class Home extends React.Component {
     }
     this.setState({
       colorName,
+      showImage: !this.state.showImage,
     });
     localStorage.setItem('ZZJ-color', colorName);
   };
@@ -485,9 +488,11 @@ class Home extends React.Component {
           hideLogin={this.hideLogin}
           loginInit={this.loginInit}
           deviceID={this.state.deviceID}
-        />
-        {/* 医生诊室呼叫 */}
-        {this.state.showType == 'doctor'
+          />
+          {this.state.showImage
+            ? <img src={src} width={'100%'} />
+            : <>
+                 {this.state.showType == 'doctor'
           ? <DoctorScreen
               userData={this.state.userData}
               patList={this.state.patList}
@@ -508,7 +513,7 @@ class Home extends React.Component {
               />
 
         }
-        </div>
+       
       <span
         className='bottom-set'
       >
@@ -524,6 +529,10 @@ class Home extends React.Component {
         <audio controls id="audio"
           style={{ position: 'fixed', left: '-1000px', top: '100px' }}
         ></audio>
+            </>
+          }
+          {/* 医生诊室呼叫 */}
+          </div>
     </>
     );
   }