|
@@ -285,7 +285,8 @@ export default {
|
|
|
role: this.$route.query.role,
|
|
|
cid: "",
|
|
|
tx: require("../../../assets/avatar.png"),
|
|
|
- userSuffix: ""
|
|
|
+ userSuffix: "",
|
|
|
+ schoolChar: "",
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -405,7 +406,12 @@ export default {
|
|
|
if(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.sMail)){
|
|
|
mail = this.sMail;
|
|
|
}else{
|
|
|
- mail = this.sMail + "@" + this.userSuffix
|
|
|
+ if(this.org != "" && this.org != "null" && this.org != undefined && this.org && this.schoolChar){
|
|
|
+ mail = this.sMail + "@" + this.schoolChar + '.' + this.userSuffix
|
|
|
+ }else {
|
|
|
+ mail = this.sMail + "@" + this.userSuffix
|
|
|
+ }
|
|
|
+ // mail = this.sMail + "@" + this.userSuffix
|
|
|
}
|
|
|
if (this.time()) {
|
|
|
// let params = { un: this.sPhone };
|
|
@@ -452,7 +458,11 @@ export default {
|
|
|
if(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.sMail)){
|
|
|
mail = this.sMail;
|
|
|
}else{
|
|
|
- mail = this.sMail + "@" + this.userSuffix
|
|
|
+ if(this.org != "" && this.org != "null" && this.org != undefined && this.org && this.schoolChar){
|
|
|
+ mail = this.sMail + "@" + this.schoolChar + '.' + this.userSuffix
|
|
|
+ }else {
|
|
|
+ mail = this.sMail + "@" + this.userSuffix
|
|
|
+ }
|
|
|
}
|
|
|
let params = [
|
|
|
{
|
|
@@ -705,7 +715,12 @@ export default {
|
|
|
if(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(v["学生账号"])){
|
|
|
obj.mail = v["学生账号"];
|
|
|
}else{
|
|
|
- obj.mail = v["学生账号"] + "@" + _this.userSuffix
|
|
|
+ if(_this.org != "" && _this.org != "null" && _this.org != undefined && _this.org && _this.schoolChar){
|
|
|
+ obj.mail = v["学生账号"] + "@" + _this.schoolChar + '.' + _this.userSuffix
|
|
|
+ }else {
|
|
|
+ obj.mail = v["学生账号"] + "@" + _this.userSuffix
|
|
|
+ }
|
|
|
+ // obj.mail = v["学生账号"] + "@" + _this.userSuffix
|
|
|
}
|
|
|
|
|
|
}else{
|
|
@@ -1048,6 +1063,11 @@ export default {
|
|
|
.get(this.$store.state.api + "selectSchoolName2", params)
|
|
|
.then((res) => {
|
|
|
this.schoolName = res.data[0][0].name;
|
|
|
+ const cleanedSchoolName = res.data[0][0].name.replace(/[,。;:!“”‘’()()]/g, ''); // 去掉标点符号
|
|
|
+ console.log(pinyin);
|
|
|
+ console.log(pinyin.getFullChars(cleanedSchoolName));
|
|
|
+ console.log(pinyin.getCamelChars(cleanedSchoolName));
|
|
|
+ this.schoolChar = pinyin.getCamelChars(cleanedSchoolName).toLowerCase()
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.error(err);
|