Переглянути джерело

全部量表等高度对齐2465,免责申明容错

zhouna 5 роки тому
батько
коміт
41d07a0639

+ 4 - 4
src/components/MedicalInfo/index.jsx

@@ -25,7 +25,7 @@ class MedicalInfo extends Component {
         const that = this;
         if(searchResult&&searchResult.length>0){
           setTimeout(function(){
-            that.$ul.current.style.height = getWindowInnerHeight()-270+'px';
+            that.$ul.current.style.height = getWindowInnerHeight()-248+'px';
           },100);
         }
         return searchResult && searchResult.map((item) => {
@@ -83,15 +83,15 @@ class MedicalInfo extends Component {
       clearResult&&clearResult();
   }
   componentDidMount(){
-    const height = getWindowInnerHeight()-170;
+    const height = getWindowInnerHeight()-148;
     this.$cont.current.style.height = height+"px";
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight()-170;
+        const height = getWindowInnerHeight()-148;
         this.$cont.current.style.height = height+"px";
       }
       if(this.$ul.current){
-        const height = getWindowInnerHeight()-270;
+        const height = getWindowInnerHeight()-248;
         this.$ul.current.style.height = height+"px";
       }
     });

+ 5 - 5
src/components/ScaleSearch/index.jsx

@@ -38,10 +38,10 @@ class ScaleSearch extends Component {
   }
   getSearchList() {
     const { searchResult } = this.props;
-    const that = this;console.log(getWindowInnerHeight()-270);
+    const that = this;
     if(searchResult&&searchResult.length>0){
       setTimeout(function(){
-        that.$ul.current.style.height = getWindowInnerHeight()-270+'px';
+        that.$ul.current.style.height = getWindowInnerHeight()-248+'px';
       },100);
     }
     return searchResult && searchResult.map((item) => {
@@ -97,15 +97,15 @@ class ScaleSearch extends Component {
     clearResult&&clearResult();
   }
   componentDidMount(){
-    const height = getWindowInnerHeight()-170;
+    const height = getWindowInnerHeight()-148;
     this.$cont.current.style.height = height+"px";
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight()-170;
+        const height = getWindowInnerHeight()-148;
         this.$cont.current.style.height = height+"px";
       }
       if(this.$ul.current){
-        const height = getWindowInnerHeight()-270;
+        const height = getWindowInnerHeight()-248;
         this.$ul.current.style.height = height+"px";
       }
     });

+ 2 - 2
src/components/TemplateItems/index.jsx

@@ -25,11 +25,11 @@ class TemplateItems extends React.Component {
         this.clear = this.clear.bind(this);
     }  
     componentDidMount(){
-        const height = getWindowInnerHeight()-216;
+        const height = getWindowInnerHeight()-195;
         this.$cont.current.style.height = height+"px";
         windowEventHandler('resize', ()=>{
             if(this.$cont.current){
-                const height = getWindowInnerHeight()-216;
+                const height = getWindowInnerHeight()-195;
                 this.$cont.current.style.height = height+"px";
             }
         });

+ 7 - 3
src/store/actions/copyRight.js

@@ -24,9 +24,13 @@ export const closeDisclatmerModal=(state,action)=>{
   
 export const getMessage=(state,action)=>{
   const res=Object.assign({},state);
-  res.number = action.data.data.data.name;
-  res.date = action.data.data.data.refreshTime;
-  res.content = action.data.data.data.detail;
+  const data = action.data.data;
+  if(!data) {
+    return res;
+  }
+  res.number = data.data.name;
+  res.date = data.data.refreshTime;
+  res.content = data.data.detail;
   return res;
 };
 

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
src/store/async-actions/copyRight.js