修正版本号对比问题

This commit is contained in:
rucky 2021-12-24 19:30:19 +08:00
parent 56107508f9
commit ae033bd176

View File

@ -73,16 +73,16 @@ export default {
window.deviceInfo.app === "WX"
) {
let iosV = this.getIOSVersion();
console.log(
!this.versionStringCompare(iosV, 14.5),
this.versionStringCompare(iosV, 11)
);
// console.log(
// !this.versionStringCompare(iosV, "14.5"),
// this.versionStringCompare(iosV, "11.0")
// );
if (
!this.versionStringCompare(iosV, 14.5) &&
this.versionStringCompare(iosV, 11)
!this.versionStringCompare(iosV, "14.5") &&
this.versionStringCompare(iosV, "11.0")
) {
gsap.to(this.$refs.unsuit, { autoAlpha: 1 });
} else if (!this.versionStringCompare(iosV, 11)) {
} else if (!this.versionStringCompare(iosV, 11.0)) {
gsap.to(this.$refs.unsuit2, { autoAlpha: 1 });
}
}
@ -103,10 +103,10 @@ export default {
? lastValue.charCodeAt()
: Number(lastValue);
if (preNum < lastNum) {
result = -1;
result = false;
break;
} else if (preNum > lastNum) {
result = 1;
result = true;
break;
}
}