完成大作业服务端代码,新建管理端,管理端不可用
This commit is contained in:
31
Project/Service/static/js/modify.js
Normal file
31
Project/Service/static/js/modify.js
Normal file
@@ -0,0 +1,31 @@
|
||||
var modify = {};
|
||||
|
||||
modify.showModifyPassword = function() {
|
||||
let modifyType = document.querySelector('.tablinks.active').textContent;
|
||||
let info = {
|
||||
modifyPasswordLis: document.getElementsByClassName('modifyPassword'),
|
||||
modifymobileNoLis: document.getElementsByClassName('modifymobileNo'),
|
||||
modifyUsernameLis: document.getElementsByClassName('modifyUsername'),
|
||||
}
|
||||
|
||||
for (let key in info) {
|
||||
let elements = info[key];
|
||||
for (let item of elements) {
|
||||
item.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
if (modifyType === "修改密码") {
|
||||
for (let item of info.modifyPasswordLis) {
|
||||
item.style.display = 'block';
|
||||
}
|
||||
} else if (modifyType === "修改手机号") {
|
||||
for (let item of info.modifymobileNoLis) {
|
||||
item.style.display = 'block';
|
||||
}
|
||||
} else if (modifyType === "修改用户名") {
|
||||
for (let item of info.modifyUsernameLis) {
|
||||
item.style.display = 'block';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user