11wqe1 vor 1 Tag
Ursprung
Commit
fb44559405
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      src/components/pages/studentManageNew/component/addstu.vue

+ 2 - 2
src/components/pages/studentManageNew/component/addstu.vue

@@ -473,7 +473,7 @@ export default {
                 _this.org &&
                 _this.org &&
                 _this.schoolChar
                 _this.schoolChar
               ) {
               ) {
-                if (accountVal) {
+                if (accountVal && /^[a-zA-Z0-9]+$/.test(accountVal)) {
                   obj.account = accountVal + '@' + _this.schoolChar + '.' + _this.userSuffix;
                   obj.account = accountVal + '@' + _this.schoolChar + '.' + _this.userSuffix;
                 } else {
                 } else {
                   obj.account = '';
                   obj.account = '';
@@ -482,7 +482,7 @@ export default {
                 obj.mail =
                 obj.mail =
                   uuidv4() + "@" + _this.schoolChar + "." + _this.userSuffix;
                   uuidv4() + "@" + _this.schoolChar + "." + _this.userSuffix;
               } else {
               } else {
-                if (accountVal) {
+                if (accountVal && /^[a-zA-Z0-9]+$/.test(accountVal)) {
                   obj.account = accountVal + '@' + _this.userSuffix;
                   obj.account = accountVal + '@' + _this.userSuffix;
                 } else {
                 } else {
                   obj.account = '';
                   obj.account = '';