|
@@ -62,6 +62,7 @@ import Submit from "../common/Submit";
|
|
|
import Tiptoast from "../common/Tiptoast";
|
|
|
import api from "@utils/api.js";
|
|
|
import $ from "jquery";
|
|
|
+// let iscanscrollpage = false
|
|
|
export default {
|
|
|
name: "Login",
|
|
|
data() {
|
|
@@ -81,13 +82,28 @@ export default {
|
|
|
},
|
|
|
code:'',
|
|
|
allow:true,
|
|
|
- he:''
|
|
|
+ he:'',
|
|
|
};
|
|
|
},
|
|
|
created(){
|
|
|
this.code = this.$route.query.hospitalCode||''
|
|
|
},
|
|
|
-
|
|
|
+ // mounted(){
|
|
|
+
|
|
|
+ // (/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', (e) => {
|
|
|
+ // // 这里加了个类型判断,因为a等元素也会触发blur事件
|
|
|
+ // if(['input', 'textarea'].includes(e.target.localName)) {
|
|
|
+ // iscanscrollpage = true;
|
|
|
+ // setTimeout(function() {
|
|
|
+ // if(iscanscrollpage) {
|
|
|
+ // // alert(document.scrollingElement.scrollTop)
|
|
|
+ // document.scrollingElement.scrollTo(0, document.scrollingElement.scrollTop);
|
|
|
+ // document.body && (document.body.scrollTop = document.body.scrollTop);
|
|
|
+ // }
|
|
|
+ // }, 200);
|
|
|
+ // }
|
|
|
+ // }, true)
|
|
|
+ // },
|
|
|
methods: {
|
|
|
close() {
|
|
|
this.showTip = false;
|
|
@@ -105,17 +121,13 @@ export default {
|
|
|
const { show } = this;
|
|
|
this.show = !show;
|
|
|
},
|
|
|
- focus(){
|
|
|
- console.log(window.innerHeight,'focus')
|
|
|
- this.he = (window.innerHeight,'focus')
|
|
|
+ focus(){
|
|
|
+ // iscanscrollpage = false;
|
|
|
},
|
|
|
blur() {
|
|
|
+ // iscanscrollpage = true;
|
|
|
if(MobileDevice.getModels().join(' or ').indexOf('6') == -1){
|
|
|
document.activeElement.scrollIntoView({behavior: "smooth",block:'end'})
|
|
|
- // setTimeout(() => {
|
|
|
- // document.activeElement.scrollIntoView({behavior: "smooth",block:'center'})
|
|
|
- // // document.activeElement.scrollIntoViewIfNeeded(true);
|
|
|
- // }, 300);
|
|
|
}
|
|
|
},
|
|
|
changeName() {
|