sunchengjie 8 months ago
parent
commit
74fa22c2fe
2 changed files with 6 additions and 2 deletions
  1. 2 2
      src/main.js
  2. 4 0
      src/pages/login.vue

+ 2 - 2
src/main.js

@@ -15,12 +15,12 @@ import Vant from 'vant'
 import clipboard from 'clipboard'
 import 'vant/lib/index.less'
 import wx from 'weixin-js-sdk'
-import VConsole from 'vconsole';
+// import VConsole from 'vconsole';
 import request from "@/utils/request"
 import { getWxOpenId } from './script/wxGetOpenId.js'
 import common from './script/common.js'
 Vue.use(VueJsonp)
-new VConsole()
+// new VConsole()
 Vue.prototype.$axios = request
 Vue.prototype.$wx = wx
 Vue.component('tabbar', tabbar)

+ 4 - 0
src/pages/login.vue

@@ -62,6 +62,10 @@ export default {
 				Toast('请输入登录名');
 				return;
 			}
+			const regex = /[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B-\u200F\u202A-\u202E\u2028\u2029\uFEFF]/g;
+			this.password =	this.password.replaceAll(regex,'')
+			this.name = this.name.replaceAll(regex,'')
+              
 			// this.$http.post(this.$store.state.host + "/appSysUser/employee_login", { account: this.name, password: this.password }, { emulateJSON: true })
 			const res = await employee_login({ account: this.name, password: this.password }, { emulateJSON: true })
 			console.log("=====", res)