Browse Source

6系列bug

luolei 5 years ago
parent
commit
6efcdce1d2
3 changed files with 24 additions and 8 deletions
  1. 3 0
      src/common/RadioSelect.vue
  2. 5 0
      src/common/SymptomLis.vue
  3. 16 8
      src/components/Login.vue

+ 3 - 0
src/common/RadioSelect.vue

@@ -25,6 +25,7 @@ import checkIcon from '../images/radio-check.png'
 import {patt,imageUrlPrefix,concatVal} from '@utils/tools.js'
 import SymptomLis from '../common/SymptomLis.vue';
 import Submit from "../common/Submit";
+import $ from 'jquery';
   export default{
     name:'RadioSelect',
     props:{
@@ -131,6 +132,8 @@ import Submit from "../common/Submit";
           return
         }else {
           this.show = true
+          $(".btscroll").css({'position':'fixed','top':'1rem'})
+          $(".foot").css({'position':'fixed','bottom':'0'})
         }
       },
       showSubmit(flg) {

+ 5 - 0
src/common/SymptomLis.vue

@@ -19,6 +19,7 @@
 <script type="text/javascript">
 import BScroll from 'better-scroll';
 import {setScroll} from '@utils/tools.js';
+import $ from 'jquery';
 
 /**
   提示性弹窗组件
@@ -50,9 +51,13 @@ import {setScroll} from '@utils/tools.js';
     },
     methods:{
       handleClose(){
+        $(".btscroll").css({'position':'absolute','top':'0'})
+        $(".foot").css({'position':'absolute','bottom':'0'})
         this.$emit("close")
       },
       makeSure(){
+        $(".btscroll").css({'position':'absolute','top':'0'})
+        $(".foot").css({'position':'absolute','bottom':'0'})
         this.$emit("makeSure",this.selectLis)
       },
       select(idx){

+ 16 - 8
src/components/Login.vue

@@ -23,6 +23,7 @@
       </div>
       <div class="iptWrap number numberIpt">
         <input
+          @focus="focus"
           @blur="blur"
           :maxlength="type==103?11:type==101?18:type==102?7:type==104?9:30"
           v-model="value"
@@ -36,6 +37,7 @@
       <div class="iptWrap number">
         <input
           @blur="blur"
+          @focus="focus"
           :maxlength="30"
           v-model="patName"
           @input="changeName"
@@ -78,7 +80,8 @@ export default {
         text: ""
       },
       code:'',
-      allow:true
+      allow:true,
+      he:''
     };
   },
   created(){
@@ -102,14 +105,19 @@ export default {
       const { show } = this;
       this.show = !show;
     },
+    focus(){
+      console.log(window.innerHeight,'focus')      
+      this.he = (window.innerHeight,'focus')      
+    },
     blur() {
-      // if(MobileDevice.getModels().join(' or ').indexOf('6') == -1){
-      //   document.activeElement.scrollIntoViewIfNeeded(true);      
-      //   setTimeout(() => {
-          document.activeElement.scrollIntoView({behavior: "smooth",block:'end'})
-      //     document.activeElement.scrollIntoViewIfNeeded(true);
-      //   }, 300);
-      // }
+      if(MobileDevice.getModels().join(' or ').indexOf('6') == -1){
+        document.activeElement.scrollIntoView({behavior: "smooth",block:'end'})
+        // document.activeElement.scrollIntoViewIfNeeded(true);
+        // setTimeout(() => {
+        //   document.activeElement.scrollIntoView({behavior: "smooth",block:'center'})
+        //   // document.activeElement.scrollIntoViewIfNeeded(true);
+        // }, 300);
+      }
     },
     changeName() {
       // document.activeElement.scrollIntoViewIfNeeded(true);