login.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. {extend name="public/base"/}
  2. {block name="css"}
  3. <style>
  4. .content {
  5. height: 100vh;
  6. background-color: aquamarine;
  7. background: url("__MIMAGES__/bg_login.jpg") no-repeat;
  8. background-size: cover;
  9. }
  10. .topBox {
  11. font-size: 17px;
  12. color: #fff;
  13. padding: 10px 25px;
  14. }
  15. h3 {
  16. margin-bottom: 5px;
  17. }
  18. .inputBox {
  19. position: fixed;
  20. bottom: 0;
  21. left: 0;
  22. width: 100%;
  23. height: 85vh;
  24. background-color: #fff;
  25. border-top-left-radius: 20px;
  26. border-top-right-radius: 20px;
  27. padding: 30px;
  28. box-sizing: border-box;
  29. }
  30. .ipt {
  31. margin-bottom: 25px;
  32. }
  33. .ipt h4 {
  34. margin-bottom: 10px;
  35. font-size: 18px;
  36. color: #333;
  37. }
  38. .ipt input {
  39. border:none;
  40. border-bottom:1px solid #dedede;
  41. width:100%;
  42. padding-bottom: 10px;
  43. font-size: 14px;
  44. }
  45. .loginBtn {
  46. line-height: 43px;
  47. text-align: center;
  48. background: linear-gradient(to right, rgb(86, 104, 214), rgb(86, 104, 214));
  49. border-radius: 20px;
  50. color: #fff;
  51. margin-top: 25px;
  52. width:100%;
  53. border:none;
  54. display:block;
  55. }
  56. </style>
  57. {/block}
  58. {block name="body"}
  59. <div class="content">
  60. <div class="topBox">
  61. <h3>WELCOME</h3>
  62. <h3>欢迎使用</h3>
  63. </div>
  64. <div class="inputBox">
  65. <div class="ipt">
  66. <h4>手机号</h4>
  67. <input type="mobile" v-model="form.mobile" placeholder="请输入手机号码" />
  68. </div>
  69. <div class="ipt">
  70. <h4>密码</h4>
  71. <input type="password" v-model="form.password" placeholder="请输入密码" />
  72. </div>
  73. <button class="loginBtn" @click="onLogin">登录</button>
  74. </div>
  75. </div>
  76. {/block}
  77. {block name="script"}
  78. <script>
  79. function v_setup() {
  80. let base = {};
  81. base.form = Vue.reactive({});
  82. base.onLogin = () => {
  83. postJson('/soldier/doLogin', base.form).then(({data, code}) => {
  84. location.href = "{:url('soldier/index')}";
  85. })
  86. };
  87. return base;
  88. }
  89. </script>
  90. {/block}