passwordLogin.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <template>
  2. <view class="wrap">
  3. <my-common :login="false" mytitle="密码登录" ref="common"></my-common>
  4. <u-navbar title="密码登录" ></u-navbar>
  5. <view class="wxLogin-logo">
  6. <u-image width="150" height="150" src="/static/img/logo.png"></u-image>
  7. <p>荆开就业在线</p>
  8. </view>
  9. <view class="content">
  10. <view class="login-input">
  11. <input type="number" v-model="tel" placeholder="请输入手机号" />
  12. </view>
  13. <view class="login-input">
  14. <input type="number" v-model="tel" placeholder="请输入密码" />
  15. </view>
  16. <button @tap="submit" :style="[inputStyle]" class="getCaptcha">登录</button>
  17. </view>
  18. <view class="wxLogin-foot">
  19. <view class="wxLogin-foot-btn">
  20. <u-button shape="circle">微信登录</u-button>
  21. <u-button shape="circle">密码登录</u-button>
  22. </view>
  23. <view class="wxLogin-foot-text">
  24. <u-checkbox-group>
  25. <u-checkbox><view class="u-flex"><p>我已阅读并同意</p><span>《用户协议》《隐私政策》</span></view></u-checkbox>
  26. </u-checkbox-group>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import api from '@/pages/login/index.js'
  33. export default api;
  34. </script>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. tel: ''
  40. }
  41. },
  42. computed: {
  43. inputStyle() {
  44. let style = {};
  45. if(this.tel) {
  46. style.color = "#fff";
  47. style.backgroundColor = this.$u.color['primary'];
  48. }
  49. return style;
  50. }
  51. },
  52. methods: {
  53. submit() {
  54. if(this.$u.test.mobile(this.tel)) {
  55. this.$u.route({
  56. url: 'pages/template/login/code'
  57. })
  58. }
  59. }
  60. }
  61. };
  62. </script>
  63. <style lang="scss" scoped>
  64. .wxLogin-logo{
  65. margin: 100rpx auto 100rpx;
  66. display: flex;
  67. flex-direction: column;
  68. align-items: center;
  69. p{
  70. font-size: 40rpx;
  71. margin-top: 20rpx;
  72. }
  73. }
  74. .login-input{
  75. margin: 40rpx 0;
  76. border-bottom: 1px solid #F7F7F7;
  77. }
  78. .wrap {
  79. font-size: 28rpx;
  80. .content {
  81. width: 600rpx;
  82. margin: 80rpx auto 0;
  83. .title {
  84. text-align: left;
  85. font-size: 60rpx;
  86. font-weight: 500;
  87. margin-bottom: 100rpx;
  88. }
  89. input {
  90. text-align: left;
  91. margin-bottom: 10rpx;
  92. padding-bottom: 6rpx;
  93. }
  94. .tips {
  95. color: $u-type-info;
  96. margin-bottom: 60rpx;
  97. margin-top: 8rpx;
  98. text-align: center;
  99. }
  100. .getCaptcha {
  101. background-color: rgb(231, 243, 254);
  102. color: $u-tips-color;
  103. border: none;
  104. font-size: 30rpx;
  105. padding: 12rpx 0;
  106. margin: 30rpx 0;
  107. &::after {
  108. border: none;
  109. }
  110. }
  111. .alternative {
  112. color: $u-tips-color;
  113. display: flex;
  114. justify-content: space-between;
  115. margin-top: 30rpx;
  116. }
  117. }
  118. .buttom {
  119. .loginType {
  120. display: flex;
  121. padding: 350rpx 150rpx 150rpx 150rpx;
  122. justify-content:space-between;
  123. .item {
  124. display: flex;
  125. flex-direction: column;
  126. align-items: center;
  127. color: $u-content-color;
  128. font-size: 28rpx;
  129. }
  130. }
  131. .hint {
  132. padding: 20rpx 40rpx;
  133. font-size: 20rpx;
  134. color: $u-tips-color;
  135. .link {
  136. color: $u-type-warning;
  137. }
  138. }
  139. }
  140. }
  141. .wxLogin-foot{
  142. position: fixed;
  143. left: 0;
  144. right: 0;
  145. bottom: 0;
  146. .wxLogin-foot-btn{
  147. display: flex;
  148. justify-content: space-between;
  149. padding: 0 40rpx;
  150. *{
  151. margin: 0;
  152. width:280rpx;
  153. }
  154. }
  155. .wxLogin-foot-text{
  156. margin-top: 40rpx;
  157. padding: 20rpx 40rpx;
  158. span{
  159. color:#2295FF;
  160. }
  161. }
  162. }
  163. </style>