account.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <view class="wrap">
  3. <view class="content">
  4. <view class="title">欢迎登录</view>
  5. <input v-model="loginName" class="u-border-bottom" placeholder="请输入手机号" type="number"/>
  6. <view class="tips">未注册的手机号验证后自动创建账号</view>
  7. <u-button :style="[inputStyle]" class="getCaptcha" @tap="submit">获取短信验证码</u-button>
  8. <view class="alternative">
  9. <view class="account" @click="accountLogin">密码登录</view>
  10. <view class="issue" @click="problem">遇到问题</view>
  11. </view>
  12. </view>
  13. <view class="buttom">
  14. <view class="loginType">
  15. <view class="wechat item">
  16. <view class="icon">
  17. <u-icon color="#999" name="server-man" size="60" @click="server"></u-icon>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. loginName: ''
  29. }
  30. },
  31. computed: {
  32. inputStyle() {
  33. let style = {};
  34. if (this.loginName && this.$u.test.mobile(this.loginName)) {
  35. style.color = "#fff";
  36. style.backgroundColor = this.$u.color['primary'];
  37. }
  38. return style;
  39. }
  40. },
  41. methods: {
  42. submit() {
  43. if (this.$u.test.mobile(this.loginName)) {
  44. this.$u.route({
  45. url: 'pages/login/code',
  46. params: {
  47. loginName: this.loginName
  48. }
  49. })
  50. }
  51. },
  52. accountLogin() {
  53. this.$u.route({
  54. url: 'pages/login/login'
  55. })
  56. },
  57. problem() {
  58. this.$u.route({
  59. url: 'pages/login/problem'
  60. })
  61. },
  62. server() {
  63. window.open('https://sourcebyte.cn')
  64. }
  65. }
  66. };
  67. </script>
  68. <style>
  69. page {
  70. overflow: hidden;
  71. background-color: #ffffff;
  72. }
  73. </style>
  74. <style lang="scss" scoped>
  75. .wrap {
  76. font-size: 28 rpx;
  77. .content {
  78. width: 600 rpx;
  79. margin: 80 rpx auto 0;
  80. .title {
  81. text-align: left;
  82. font-size: 60 rpx;
  83. font-weight: 500;
  84. margin-bottom: 100 rpx;
  85. }
  86. input {
  87. text-align: left;
  88. margin-bottom: 10 rpx;
  89. padding-bottom: 6 rpx;
  90. }
  91. .tips {
  92. color: $u-type-info;
  93. margin-bottom: 60 rpx;
  94. margin-top: 8 rpx;
  95. }
  96. .getCaptcha {
  97. background-color: rgba(0, 0, 0, .1);
  98. color: $u-tips-color;
  99. border: none;
  100. font-size: 30 rpx;
  101. padding: 12 rpx 0;
  102. &::after {
  103. border: none;
  104. }
  105. }
  106. .alternative {
  107. color: $u-tips-color;
  108. display: flex;
  109. justify-content: space-between;
  110. margin-top: 30 rpx;
  111. .account {
  112. &:active {
  113. background-color: #ededed;
  114. }
  115. }
  116. }
  117. }
  118. .buttom {
  119. .loginType {
  120. font-size: 14px;
  121. position: fixed;
  122. right: 50 rpx;
  123. bottom: 50 rpx;
  124. width: 60px;
  125. height: 60px;
  126. padding: 4px;
  127. cursor: pointer;
  128. background: #FFF;
  129. text-align: center;
  130. line-height: 60px;
  131. border-radius: 100%;
  132. -webkit-box-shadow: 0px 1px 20px 0px rgba(0, 0, 0, 0.1), inset 0px -1px 0px 0px rgba(0, 0, 0, 0.1);
  133. box-shadow: 0px 1px 20px 0px rgba(0, 0, 0, 0.1), inset 0px -1px 0px 0px rgba(0, 0, 0, 0.1);
  134. }
  135. }
  136. }
  137. </style>