修改密码去vue

This commit is contained in:
wintel 2024-07-20 21:26:45 +08:00
parent b3592d108b
commit 838eb134e5
2 changed files with 10 additions and 26 deletions

View File

@ -4,19 +4,19 @@
<link rel="stylesheet" href="/js/dtree/dtree.css" />
<link rel="stylesheet" href="/js/dtree/font/dtreefont.css" />
}
<form class="layui-form layui-form-pane" action="" id="formEdit">
<form class="layui-form layui-form-pane" action="" id="formEdit" lay-filter="formEdit">
<div class="layui-form-item">
<label class="layui-form-label">账号</label>
<div class="layui-input-block">
<input type="text" name="Account" v-model="tmp.Account" required lay-verify="required"
<input type="text" name="Account" required lay-verify="required"
readonly="readonly" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">密码</label>
<div class="layui-input-block">
<input type="text" name="Password" v-model="tmp.Password" required lay-verify="required"
<input type="text" name="Password" required lay-verify="required"
placeholder="请输入密码" autocomplete="off" class="layui-input">
</div>
</div>
@ -24,7 +24,7 @@
<div class="layui-form-item">
<label class="layui-form-label">确认密码</label>
<div class="layui-input-block">
<input type="text" name="ConfirmPassword" v-model="tmp.ConfirmPassword" required lay-verify="required"
<input type="text" name="ConfirmPassword" required lay-verify="required"
placeholder="请再次输入密码" autocomplete="off" class="layui-input">
</div>
</div>
@ -39,4 +39,4 @@
<script type="text/javascript" src="/layui/layui.js"></script>
<script type="text/javascript" src="/userJs/changePwd.js"></script>
<script type="text/javascript" src="/userJs/changePwd.js?v3"></script>

View File

@ -1,6 +1,6 @@
layui.config({
base: "/js/"
}).use(['form','vue', 'ztree', 'layer', 'jquery', 'table','droptree','openauth','utils'], function () {
}).use(['form','ztree', 'layer', 'jquery', 'table','droptree','openauth','utils'], function () {
var form = layui.form,
layer = layui.layer,
$ = layui.jquery;
@ -8,26 +8,10 @@ layui.config({
var openauth = layui.openauth;
var toplayer = (top == undefined || top.layer === undefined) ? layer : top.layer; //顶层的LAYER
var vm = new Vue({
el: "#formEdit",
data() {
return {
tmp: {
Account: '',
Password: '',
ConfirmPassword: '',
}
}
},
mounted() {
var _this = this;
$.get('/UserSession/GetUserName',
function (data) {
_this.tmp.Account = data;
});
form.render();
}
});
$.get('/UserSession/GetUserName',
function (data) {
form.val("formEdit", {Account:data});
});
var url = "/UserManager/ChangePassword";
//提交数据