dwh 2 år sedan
förälder
incheckning
7f4e9e8aa3
2 ändrade filer med 15 tillägg och 15 borttagningar
  1. 1 14
      src/views/login/login.vue
  2. 14 1
      src/views/main/main.vue

+ 1 - 14
src/views/login/login.vue

@@ -43,7 +43,6 @@
 				this.$refs.myvideo.play();
 			},
 			toPhoneLogin(){
-				this.getStatusBarHeight();
 				this.$router.push('loginByPhone');
 			},
 			toUserService(){
@@ -52,19 +51,7 @@
 			toPrivate(){
 				window.location.href=protocal.privacy;
 			},
-			getStatusBarHeight(){//获取状态栏和底部安全距离
-				window.webkit.messageHandlers.call.postMessage({
-					api:"com.js.getStatusBarHeight",
-					data:{},
-					callback:'getStatusBarHeightInvoke'
-				}) 
-			},
-			getStatusBarHeightInvoke(data){
-				this.$dialog.confirm({
-					title: '标题',
-					message:JSON.stringify(data),
-				})
-			}
+			
 		}
 	}
 </script>

+ 14 - 1
src/views/main/main.vue

@@ -30,9 +30,22 @@
 			this.$TUIKit.registerPlugin({ 'tim-upload-plugin':TIMUploadPlugin });
 		},
 		mounted() {
-			
+			this.getStatusBarHeight();
 		},
 		methods:{
+			getStatusBarHeight(){//获取状态栏和底部安全距离
+				window.webkit.messageHandlers.call.postMessage({
+					api:"com.js.getStatusBarHeight",
+					data:{},
+					callback:'getStatusBarHeightInvoke'
+				}) 
+			},
+			getStatusBarHeightInvoke(data){
+				this.$dialog.confirm({
+					title: '标题',
+					message:JSON.stringify(data),
+				})
+			},
 			resetLoginData() {
 				let user=JSON.parse(localStorage.getItem('userInfo'));	
 				this.$api.IM.loadSig({}).then(res=>{