index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <view class="wrap">
  3. <view class="top"></view>
  4. <view class="content">
  5. <view class="title">欢迎登录美团</view>
  6. <input class="u-border-bottom" type="number" v-model="tel" placeholder="请输入手机号" />
  7. <view class="tips">未注册的手机号验证后自动创建美团账号</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">美团点评用户协议、隐私政策,</text>
  28. 并授权使用您的美团点评账号信息(如昵称、头像、收获地址)以便您统一管理
  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/template/login/code'
  55. })
  56. }
  57. }
  58. }
  59. };
  60. </script>
  61. <style lang="scss" scoped>
  62. .wrap {
  63. font-size: 28rpx;
  64. .content {
  65. width: 600rpx;
  66. margin: 80rpx auto 0;
  67. .title {
  68. text-align: left;
  69. font-size: 60rpx;
  70. font-weight: 500;
  71. margin-bottom: 100rpx;
  72. }
  73. input {
  74. text-align: left;
  75. margin-bottom: 10rpx;
  76. padding-bottom: 6rpx;
  77. }
  78. .tips {
  79. color: $u-type-info;
  80. margin-bottom: 60rpx;
  81. margin-top: 8rpx;
  82. }
  83. .getCaptcha {
  84. background-color: rgb(253, 243, 208);
  85. color: $u-tips-color;
  86. border: none;
  87. font-size: 30rpx;
  88. padding: 12rpx 0;
  89. &::after {
  90. border: none;
  91. }
  92. }
  93. .alternative {
  94. color: $u-tips-color;
  95. display: flex;
  96. justify-content: space-between;
  97. margin-top: 30rpx;
  98. }
  99. }
  100. .buttom {
  101. .loginType {
  102. display: flex;
  103. padding: 350rpx 150rpx 150rpx 150rpx;
  104. justify-content:space-between;
  105. .item {
  106. display: flex;
  107. flex-direction: column;
  108. align-items: center;
  109. color: $u-content-color;
  110. font-size: 28rpx;
  111. }
  112. }
  113. .hint {
  114. padding: 20rpx 40rpx;
  115. font-size: 20rpx;
  116. color: $u-tips-color;
  117. .link {
  118. color: $u-type-warning;
  119. }
  120. }
  121. }
  122. }
  123. </style>