password_index.blade.php 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. @extends('layouts.admin.app_iframe')
  2. @section('plug-css')
  3. {{-- bootstrap-table --}}
  4. <link href="{{ asset('js/bootstrap-table/dist/bootstrap-table.css') }}" rel="stylesheet">
  5. <link href="https://jqueryvalidation.org/files/demo/site-demos.css" rel="stylesheet">
  6. @endsection
  7. @section('content')
  8. <div style="margin-top: 10px;" id="headlines-app">
  9. <div style="text-align: center;margin-top: 5px;margin-bottom: 10px;font-size: 20px;">
  10. 密码修改
  11. </div>
  12. <el-form action="{{route('admin.auth.password.save')}}" method="post" id="form-create">
  13. <!-- title -->
  14. <ui-input-text label="邮箱:" name="email" @if($user->email != 'admin@admin.com') disabled="disabled" @endif value="{{$user->email}}" placeholder="邮箱" maxlength="250" tips="第一次允许修改默认邮箱"></ui-input-text>
  15. <!-- f_title -->
  16. <ui-input-text label="登录密码" name="password" value="" placeholder="登录密码" minlength="6" maxlength="12" tips="登录密码"></ui-input-text>
  17. <ui-submit></ui-submit>
  18. </el-form>
  19. </div>
  20. @endsection
  21. {{-- 插件引入js --}}
  22. @section('plug-js')
  23. {{-- jv 验证 --}}
  24. <script src="{{ asset('js/jquery-validation1.16/dist/jquery.validate.min.js') }}"></script>
  25. <script src="{{ asset('js/jquery-validation1.16/dist/additional-methods.min.js') }}"></script>
  26. <script src="{{ asset('js/jquery-validation1.16/src/localization/messages_zh.js') }}"></script>
  27. @endsection
  28. {{-- javaScript --}}
  29. @section('scripts')
  30. <script type="application/javascript">
  31. $(function () {
  32. // 注意:Vue组件一定放在jQuery.validator前面验证
  33. new Vue({
  34. el: '#headlines-app',
  35. data :function () {
  36. return {
  37. };
  38. }
  39. });
  40. jQuery.validator.setDefaults({
  41. debug: false, // 调试模式true不会提交,false允许提交
  42. success: "success", // 匹配成功的class样式名称
  43. errorElement: 'div' // 兼容el标签时使用(兼容el Vue组件label.error标签问题)
  44. });
  45. //> 前台数据验证 验证需要设置window.form全局变量
  46. window.form = $('#form-create').validate({
  47. rules: {
  48. title: {
  49. required: true,
  50. maxlength: 250,
  51. normalizer: function ( value ) {
  52. return $.trim(value);
  53. }
  54. },
  55. f_title: {
  56. required: true,
  57. maxlength: 250,
  58. normalizer: function ( value ) {
  59. return $.trim(value);
  60. }
  61. },
  62. link: {
  63. required: true,
  64. maxlength: 255,
  65. normalizer: function ( value ) {
  66. return $.trim(value);
  67. }
  68. },
  69. show: {
  70. required: true
  71. },
  72. sort: {
  73. required: true,
  74. normalizer: function ( value ) {
  75. return $.trim(value);
  76. }
  77. }
  78. }
  79. });
  80. // 编辑保存变量
  81. window.formDatum = $('form').serialize();
  82. });
  83. </script>
  84. @include('layouts.admin.form_script')
  85. @endsection