全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug

This commit is contained in:
337031187
2021-06-11 17:41:16 +08:00
parent 37995ed9e6
commit 34bf68c7ed
582 changed files with 35633 additions and 28276 deletions

View File

@@ -92,6 +92,7 @@
<script>
import { validUsername } from '@/utils/validate'
import "@/assets/js/canvas-nest.min.js";
import { getLoginPicApi, captchaApi, codeCheckApi } from '@/api/user'
import { getStoreStaff } from '@/libs/public'
import { getWXCodeByUrl, loginByWxCode } from "@/libs/wechat";
@@ -191,6 +192,15 @@ export default {
},
mounted() {
this.getInfo()
this.$nextTick(() => {
if (this.screenWidth < 768) {
document
.getElementsByTagName("canvas")[0]
.removeAttribute("class", "index_bg");
} else {
document.getElementsByTagName("canvas")[0].className = "index_bg";
}
});
if (this.loginForm.account === '') {
this.$refs.account.focus()
} else if (this.loginForm.pwd === '') {
@@ -199,11 +209,23 @@ export default {
this.getCaptcha()
this.agentWeiXinLogin()
},
beforeCreate() {
if (this.fullWidth < 768) {
document
.getElementsByTagName("canvas")[0]
.removeAttribute("class", "index_bg");
} else {
document.getElementsByTagName("canvas")[0].className = "index_bg";
}
},
destroyed() {
// window.removeEventListener('storage', this.afterQRScan)
},
beforeDestroy: function() {
window.removeEventListener('resize', this.handleResize)
document
.getElementsByTagName("canvas")[0]
.removeAttribute("class", "index_bg");
},
methods: {
agentWeiXinLogin(){ // 判断是否需要微信公众号登陆
@@ -237,6 +259,13 @@ export default {
},
handleResize(event) {
this.fullWidth = document.body.clientWidth
if (this.fullWidth < 768) {
document
.getElementsByTagName("canvas")[0]
.removeAttribute("class", "index_bg");
} else {
document.getElementsByTagName("canvas")[0].className = "index_bg";
}
},
getInfo() {
getLoginPicApi().then(res => {