Sfoglia il codice sorgente

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta

SanHQin 18 ore fa
parent
commit
2bad344429

+ 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 = '';