const assert = require("assert"); const fs = require("fs"); const path = require("path"); const readView = (...parts) => fs.readFileSync(path.join(__dirname, "..", "src", "views", ...parts), "utf8"); const teacherStudentView = readView("teacherEnd", "student", "index.vue"); const schoolAdminStudentView = readView("schoolAdmin", "student", "index.vue"); for (const [name, source] of [ ["教师端学生管理", teacherStudentView], ["学校管理员端学生管理", schoolAdminStudentView], ]) { assert(!/\b(phone|email)\b/.test(source), `${name}不应再展示、录入或导出电话和邮箱字段`); } console.log("student contact fields static checks passed");