login.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <view class="wrap">
  3. <view class="top"></view>
  4. <view class="content">
  5. <view class="title">欢迎登录XX</view>
  6. <input class="u-border-bottom" type="number" v-model="tel" placeholder="请输入手机号" />
  7. <view class="tips">未注册的手机号验证后自动创建XX账号</view>
  8. <button @tap="submit" :style="[inputStyle]" class="getCaptcha">获取短信验证码</button>
  9. <view class="alternative">
  10. <view class="password">密码登录</view>
  11. <view class="issue">遇到问题</view>
  12. </view>
  13. </view>
  14. <view class="buttom">
  15. <view class="loginType">
  16. <view class="wechat item">
  17. <view class="icon"><u-icon size="70" name="weixin-fill" color="rgb(83,194,64)"></u-icon></view>
  18. 微信
  19. </view>
  20. <view class="QQ item">
  21. <view class="icon"><u-icon size="70" name="qq-fill" color="rgb(17,183,233)"></u-icon></view>
  22. QQ
  23. </view>
  24. </view>
  25. <view class="hint">
  26. 登录代表同意
  27. <text class="link">XXXX用户协议、隐私政策,</text>
  28. 并授权使用您的XXXX账号信息(如昵称、头像、收获地址)以便您统一管理
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. tel: ''
  38. }
  39. },
  40. computed: {
  41. inputStyle() {
  42. let style = {};
  43. if(this.tel) {
  44. style.color = "#fff";
  45. style.backgroundColor = this.$u.color['warning'];
  46. }
  47. return style;
  48. }
  49. },
  50. methods: {
  51. submit() {
  52. if(this.$u.test.mobile(this.tel)) {
  53. this.$u.route({
  54. url: 'pages/login/code',
  55. params: {
  56. tel: this.tel
  57. }
  58. })
  59. }
  60. }
  61. }
  62. };
  63. </script>
  64. <style lang="scss" scoped>
  65. .wrap {
  66. font-size: 28rpx;
  67. .content {
  68. width: 600rpx;
  69. margin: 80rpx auto 0;
  70. .title {
  71. text-align: left;
  72. font-size: 60rpx;
  73. font-weight: 500;
  74. margin-bottom: 100rpx;
  75. }
  76. input {
  77. text-align: left;
  78. margin-bottom: 10rpx;
  79. padding-bottom: 6rpx;
  80. }
  81. .tips {
  82. color: $u-type-info;
  83. margin-bottom: 60rpx;
  84. margin-top: 8rpx;
  85. }
  86. .getCaptcha {
  87. background-color: rgb(253, 243, 208);
  88. color: $u-tips-color;
  89. border: none;
  90. font-size: 30rpx;
  91. padding: 12rpx 0;
  92. &::after {
  93. border: none;
  94. }
  95. }
  96. .alternative {
  97. color: $u-tips-color;
  98. display: flex;
  99. justify-content: space-between;
  100. margin-top: 30rpx;
  101. }
  102. }
  103. .buttom {
  104. .loginType {
  105. display: flex;
  106. padding: 350rpx 150rpx 150rpx 150rpx;
  107. justify-content:space-between;
  108. .item {
  109. display: flex;
  110. flex-direction: column;
  111. align-items: center;
  112. color: $u-content-color;
  113. font-size: 28rpx;
  114. }
  115. }
  116. .hint {
  117. padding: 20rpx 40rpx;
  118. font-size: 20rpx;
  119. color: $u-tips-color;
  120. .link {
  121. color: $u-type-warning;
  122. }
  123. }
  124. }
  125. }
  126. </style>