update-password.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>修改密码</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. <!-- 所有的 css & js 资源 -->
  7. <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
  8. <link rel="stylesheet" href="../../static/sa.css">
  9. <script src="../../static/kj/vue.min.js"></script>
  10. <script src="../../static/kj/element-ui/index.js"></script>
  11. <script src="https://unpkg.com/http-vue-loader@1.4.2/src/httpVueLoader.js"></script>
  12. <script src="../../static/kj/jquery.min.js"></script>
  13. <script src="../../static/kj/layer/layer.js"></script>
  14. <script src="../../static/sa.js"></script>
  15. <style>
  16. /* body,.sbot.vue-box{background-color: #EEE !important;} */
  17. .c-item .c-label {
  18. width: 10em;
  19. }
  20. .c-item .el-input__inner {
  21. width: 300px;
  22. }
  23. </style>
  24. </head>
  25. <body>
  26. <div class="vue-box sbot" style="display: none;" :style="'display: block;'">
  27. <!-- ------- 内容部分 ------- -->
  28. <div class="s-body">
  29. <div class="c-panel">
  30. <div class="c-title">数据添加</div>
  31. <el-form v-if="m">
  32. <sa-item type="password" name="旧密码" v-model="m.oldPwd" br></sa-item>
  33. <sa-item type="password" name="再次输入旧密码" v-model="m.oldPwd2" br></sa-item>
  34. <sa-item type="password" name="新密码" v-model="m.newPwd" br></sa-item>
  35. <sa-item type="password" name="再次输入新密码" v-model="m.newPwd2" br></sa-item>
  36. </el-form>
  37. </div>
  38. </div>
  39. <!-- ------- 底部按钮 ------- -->
  40. <div class="s-foot">
  41. <el-button type="primary" @click="ok()">确定</el-button>
  42. <el-button @click="sa.closeCurrIframe()">取消</el-button>
  43. </div>
  44. </div>
  45. <script>
  46. var app = new Vue({
  47. components: {
  48. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue')
  49. },
  50. el: '.vue-box',
  51. data: {
  52. sa: sa,
  53. m: {
  54. oldPwd: '',
  55. oldPwd2: '',
  56. newPwd: '',
  57. newPwd2: ''
  58. },
  59. },
  60. methods: {
  61. // 提交
  62. ok: function () {
  63. // 表单校验
  64. let m = this.m;
  65. sa.checkNull(m.oldPwd && m.oldPwd2 && m.newPwd && m.newPwd2, '请填写');
  66. sa.check(m.oldPwd != m.oldPwd2, '旧密码两次输入不一致');
  67. sa.check(m.newPwd != m.newPwd2, '新密码两次输入不一致');
  68. sa.check(m.newPwd.length < 4, '新密码请不要低于六位数');
  69. // 开始修改
  70. sa.ajax('/AdminPassword/update', this.m, function (res) {
  71. if (parent != window) {
  72. sa.closeCurrIframe();
  73. parent.sa.ok2('修改成功');
  74. }
  75. })
  76. //sa.$fast.fastUpdate2('/SysUser/updatePassword', this.m);
  77. },
  78. },
  79. mounted: function () {
  80. }
  81. })
  82. </script>
  83. </body>
  84. </html>