login.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <!--
  2. * @Descripttion: 登录
  3. * @version: 1.0.0
  4. * @Author: dream
  5. * @Date: 2021-03-26 13:47:30
  6. * @LastEditors: dream
  7. * @LastEditTime: 2021-03-26 18:42:59
  8. -->
  9. <template>
  10. <view class="login-main">
  11. <image class="logo-img" src="~@/static/common/icon_logo.png" mode="aspectFit" />
  12. <view class="form">
  13. <view class="u-flex u-p-t-32 u-p-b-32 u-border-bottom">
  14. <view class="u-m-r-32 u-font-28 u-line-40 bold">手机号</view>
  15. <input class="form-input u-line-40" placeholder="请输入手机号" />
  16. </view>
  17. <view class="u-flex u-p-t-32 u-p-b-32 u-border-bottom">
  18. <view class="u-m-r-32 u-font-28 u-line-40 bold">验证码</view>
  19. <input class="form-input u-line-40" placeholder="请输入手机验证码" />
  20. <u-verification-code
  21. ref="loginCode"
  22. :seconds="60"
  23. unique-key="login-code"
  24. @change="changeCode"
  25. ></u-verification-code>
  26. <u-button class="send-code-btn u-flex-1" @click="sendCode">{{tips}}</u-button>
  27. </view>
  28. </view>
  29. <button class="u-m-t-56 btn login-btn">登录</button>
  30. <button class="u-m-t-24 btn wx-login-btn">微信一键登录</button>
  31. <view class="u-m-t-12">
  32. <u-checkbox v-model="checked" size="28" shape="circle">
  33. <text class="u-font-24">阅读并同意以下协议</text>
  34. <text class="u-font-24 primary-color">《用户协议》</text>
  35. <text class="u-font-24 primary-color">《数据信息授权书》</text>
  36. </u-checkbox>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. export default {
  42. name: 'login',
  43. data () {
  44. return {
  45. tips: '',
  46. checked: false
  47. }
  48. },
  49. onLoad () {
  50. },
  51. methods: {
  52. changeCode (text) {
  53. this.tips = text
  54. },
  55. sendCode () {
  56. this.$refs.loginCode.start()
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="scss" scoped>
  62. .login-main {
  63. display: flex;
  64. flex-direction: column;
  65. align-items: center;
  66. padding-top: 20%;
  67. height: 100%;
  68. background-color: $iph-standby-bg;
  69. .logo-img {
  70. width: 132px;
  71. height: 132px;
  72. }
  73. .form {
  74. box-sizing: border-box;
  75. margin-top: 112px;
  76. padding: 0 32px;
  77. width: 100%;
  78. .form-input {
  79. width: 390px;
  80. height: 44px !important;
  81. min-height: 44px !important;
  82. }
  83. .send-code-btn {
  84. /deep/ .u-btn {
  85. padding: 0;
  86. height: 40px;
  87. line-height: 40px !important;
  88. color: $u-type-primary;
  89. font-size: 28px;
  90. font-weight: 500;
  91. &::after {
  92. border-left: 2px solid $iph-border-base;
  93. border-top: 0;
  94. border-right: 0;
  95. border-bottom: 0;
  96. border-radius: 0;
  97. }
  98. }
  99. }
  100. }
  101. .btn {
  102. width: 686px;
  103. height: 88px;
  104. line-height: 88px;
  105. font-size: 32px;
  106. font-weight: 500;
  107. }
  108. .login-btn {
  109. color: $iph-standby-text;
  110. background-color: $u-type-primary;
  111. border-radius: 8px;
  112. }
  113. .wx-login-btn {
  114. color: $u-type-primary;
  115. background-color: $iph-standby-bg;
  116. border-radius: 8px;
  117. &::after {
  118. border-radius: 16px;
  119. border-color: $u-type-primary;
  120. }
  121. }
  122. }
  123. </style>