6 Star 0 Fork 0

陈建宏 / 教务系统

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
teapwd.html 2.08 KB
一键复制 编辑 原始数据 按行查看 历史
皮昶旭 提交于 2020-09-29 22:26 . 皮昶旭第二次作业提交
<div class="title">
当前位置>>修改密码
</div>
<div class="tab">
<div class="box">
<input type="password" placeholder="新密码" v-model="newpwd"><br>
<input type="password" placeholder="再次输入密码" v-model="pwdcheck"><br>
<button type="button"
style="margin-top:15px;background-color:rgb(236, 69, 69);border:none;padding: 5px 8px;border-radius: 5px;color: #fff;"
@click="pwdChange">确认修改</button>
</div>
</div><!-- 设置baseurl -->
<script src="js/baseUrl.js"></script>
<script>
var obj = new Vue({
el: '.box',
data: {
newpwd: '',
pwdcheck: ''
},
methods: {
pwdChange: function () {
if (this.newpwd == "" || this.pwdcheck == "") {
return false
} else if (this.newpwd != this.pwdcheck) {
toastr.warning("两次输入不一致")
} else {
var data = {
teaPwd: this.newpwd
}
// 发起请求位置
Ajaxrequest("tea", BaseUrl + '/teacherUpdatePwd', 'post', JSON.stringify(data),
function (
data) {
if (data.code === 0) {
toastr.success(data.msg + "即将注销");
localStorage.removeItem("teatoken");
localStorage.removeItem("teaname");
setTimeout(function () {
location.href = "login.html";
}, 1000);
} else {
toastr.warning(data.msg);
}
},
function (res) {
toastr.error("操作失败,请重试!")
})
}
}
}
})
</script>
1
https://gitee.com/deemo101/education-management-system.git
git@gitee.com:deemo101/education-management-system.git
deemo101
education-management-system
教务系统
master

搜索帮助