getPhoneEnv

This commit is contained in:
harrietjia 2020-02-05 11:35:32 +08:00 committed by GitHub
parent 2545b049e0
commit 6049c8a88e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -493,7 +493,7 @@ export default {
} }
const {width, height, viewIndex} = this; const {width, height, viewIndex} = this;
if (this.fun.getPhoneEnv() == 3) { if (getPhoneEnv() == 3) {
x = e.clientX - (window.innerWidth - width) / 2; x = e.clientX - (window.innerWidth - width) / 2;
y = e.clientY - (window.innerHeight - height) / 2; y = e.clientY - (window.innerHeight - height) / 2;
} else { } else {
@ -529,7 +529,7 @@ export default {
let y = ""; let y = "";
if (this.isStart) { if (this.isStart) {
const {width, height} = this; const {width, height} = this;
if (this.fun.getPhoneEnv() == 3) { if (getPhoneEnv() == 3) {
x = e.clientX - (window.innerWidth - width) / 2; x = e.clientX - (window.innerWidth - width) / 2;
y = e.clientY - (window.innerHeight - height) / 2; y = e.clientY - (window.innerHeight - height) / 2;
} else { } else {