passLogin.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view class="pass-box">
  3. <en-nav :right-show="true" right-text="忘记密码?" @rightClick="goToEditPass"></en-nav>
  4. <view class="login-box" >
  5. <view class="login-top">
  6. <view class="login-title">
  7. <text class="title-item sys-color-black sys-weight-600">账号登录</text>
  8. </view>
  9. <view class="login-from">
  10. <view class="from-text">
  11. <input type="tel" class="from-input sys-color-gray-3" max="11" v-model="phone" placeholder="请输入手机号"></input>
  12. </view>
  13. <view class="from-text from-item">
  14. <input type="password" class="from-input sys-color-gray-3" v-model="password" placeholder="请输入密码"></input>
  15. </view>
  16. </view>
  17. <view class="login-but sys-color-white sys-background-black sys-selected-but" :class="{'sys-unselected-but':!isLogin}">登录</view>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import EnNav from "@/components/en-utils/en-nav/en-nav";
  24. export default {
  25. components: {EnNav},
  26. data() {
  27. return {
  28. isLogin:false,
  29. phone:'',
  30. password:'',
  31. }
  32. },
  33. watch:{
  34. 'phone':function (){
  35. this.verifyIsLogin()
  36. },
  37. 'password':function (){
  38. this.verifyIsLogin()
  39. },
  40. },
  41. methods: {
  42. verifyIsLogin(){
  43. this.isLogin = this.phone.length === 11 && this.password.length>=6;
  44. },
  45. goToEditPass(){
  46. uni.navigateTo({
  47. 'url':'/pages/login/forgetPass'
  48. })
  49. }
  50. }
  51. }
  52. </script>
  53. <style scoped lang="scss">
  54. .pass-box{
  55. padding: 82rpx 80rpx 0 80rpx;
  56. box-sizing: border-box;
  57. position: relative;
  58. .login-top{
  59. .login-title{
  60. padding-bottom: 60rpx;
  61. .title-item{
  62. font-size: 48rpx;
  63. }
  64. }
  65. .login-from{
  66. .from-text{
  67. width: 100%;
  68. padding-bottom: 40rpx;
  69. border-bottom: 1rpx solid #E0E0E0;
  70. .from-input{
  71. font-size: 32rpx;
  72. height: 44rpx;
  73. line-height: 44rpx;
  74. }
  75. .from-input::placeholder{
  76. color: #999999;
  77. }
  78. }
  79. .from-item{
  80. margin-top: 60rpx;
  81. }
  82. }
  83. .login-but{
  84. margin-top: 120rpx;
  85. }
  86. .local-txt{
  87. padding-top: 32rpx;
  88. font-size: 24rpx;
  89. text-align: center;
  90. }
  91. }
  92. .login-bottom{
  93. padding-bottom: calc(186rpx + env(safe-area-inset-bottom));
  94. position: absolute;
  95. bottom: 0;
  96. left: 80rpx;
  97. width:calc(100vw - 160rpx);
  98. }
  99. }
  100. </style>