123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>修改密码</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <!-- 所有的 css & js 资源 -->
- <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
- <link rel="stylesheet" href="../../static/sa.css">
- <script src="../../static/kj/vue.min.js"></script>
- <script src="../../static/kj/element-ui/index.js"></script>
- <script src="../../static/kj/jquery.min.js"></script>
- <script src="../../static/kj/layer/layer.js"></script>
- <script src="../../static/sa.js"></script>
- <style>
- /* body,.sbot.vue-box{background-color: #EEE !important;} */
- .c-item .c-label{width: 10em;}
- .c-item .el-input__inner{width: 300px;}
- </style>
- </head>
- <body>
- <div class="vue-box sbot" style="display: none;" :style="'display: block;'">
- <!-- ------- 内容部分 ------- -->
- <div class="s-body">
- <div class="c-panel">
- <div class="c-title">数据添加</div>
- <el-form v-if="m">
- <sa-item type="password" name="旧密码" v-model="m.oldPwd" br></sa-item>
- <sa-item type="password" name="再次输入旧密码" v-model="m.oldPwd2" br></sa-item>
- <sa-item type="password" name="新密码" v-model="m.newPwd" br></sa-item>
- <sa-item type="password" name="再次输入新密码" v-model="m.newPwd2" br></sa-item>
- </el-form>
- </div>
- </div>
- <!-- ------- 底部按钮 ------- -->
- <div class="s-foot">
- <el-button type="primary" @click="ok()">确定</el-button>
- <el-button @click="sa.closeCurrIframe()">取消</el-button>
- </div>
- </div>
- <script>
- var app = new Vue({
- components: {
- "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue')
- },
- el: '.vue-box',
- data: {
- sa: sa,
- m: {
- oldPwd: '',
- oldPwd2: '',
- newPwd: '',
- newPwd2: ''
- },
- },
- methods: {
- // 提交
- ok: function() {
- // 表单校验
- let m = this.m;
- sa.checkNull(m.oldPwd && m.oldPwd2 && m.newPwd && m.newPwd2, '请填写');
- sa.check(m.oldPwd != m.oldPwd2, '旧密码两次输入不一致');
- sa.check(m.newPwd != m.newPwd2, '新密码两次输入不一致');
- sa.check(m.newPwd.length < 4, '新密码请不要低于六位数');
- // 开始修改
- sa.ajax('/AdminPassword/update', this.m, function(res) {
- if(parent != window) {
- sa.closeCurrIframe();
- parent.sa.ok2('修改成功');
- }
- })
- //sa.$fast.fastUpdate2('/SysUser/updatePassword', this.m);
- },
- },
- mounted: function() {
-
- }
- })
- </script>
- </body>
- </html>
|