|
@@ -34,11 +34,11 @@ class SchoolService extends CrudService {
|
|
|
// 将数据存入数据库中
|
|
|
for (const stu of studatas) {
|
|
|
const res = await this.smodel.create(stu);
|
|
|
- if (res) {
|
|
|
- const newdata = { name: stu.name, mobile: stu.phone, type: '4', uid: res.id };
|
|
|
- newdata.passwd = { secret: '12345678' };
|
|
|
- await this.umodel.create(newdata);
|
|
|
- }
|
|
|
+ // if (res) {
|
|
|
+ // const newdata = { name: stu.name, mobile: stu.phone, type: '4', uid: res.id };
|
|
|
+ // newdata.passwd = { secret: '12345678' };
|
|
|
+ // await this.umodel.create(newdata);
|
|
|
+ // }
|
|
|
}
|
|
|
return datacheck;
|
|
|
}
|
|
@@ -73,11 +73,11 @@ class SchoolService extends CrudService {
|
|
|
entry_year: data[theadRule[8]],
|
|
|
finish_year: data[theadRule[9]],
|
|
|
school_job: data[theadRule[10]],
|
|
|
- phone: data[theadRule[10]],
|
|
|
- qq: data[theadRule[11]],
|
|
|
- family_place: data[theadRule[12]],
|
|
|
- family_is_hard: data[theadRule[13]],
|
|
|
- have_grant: data[theadRule[14]],
|
|
|
+ phone: data[theadRule[11]],
|
|
|
+ qq: data[theadRule[12]],
|
|
|
+ family_place: data[theadRule[13]],
|
|
|
+ family_is_hard: data[theadRule[14]],
|
|
|
+ have_grant: data[theadRule[15]],
|
|
|
termid,
|
|
|
schid,
|
|
|
});
|
|
@@ -112,7 +112,7 @@ class SchoolService extends CrudService {
|
|
|
errorcode = '1';
|
|
|
data.msg = data.msg + '手机号不允许为空,';
|
|
|
}
|
|
|
- if (/^\d{11}$/i.test(data.phone)) {
|
|
|
+ if (!/^\d{11}$/i.test(data.phone)) {
|
|
|
errorcode = '1';
|
|
|
data.msg = data.msg + '手机号不正确,';
|
|
|
|