index.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view>
  3. <!-- 头部 -->
  4. <headContent>
  5. <template #left>
  6. <view class="" @click.stop="reversBackBtn()">
  7. <—— </view>
  8. </template>
  9. </headContent>
  10. <view class="page-content">
  11. <text class="login-title">登录</text>
  12. <text class="login-content">立即注册属于您的BiKing账号</text>
  13. <view class="tab-box">
  14. <view class="tab">
  15. <view v-for="(item , index) in marketTab"
  16. :class="['tab-item' , index === marketTabIndex ? 'active-tab-item' : '' ]"
  17. @click.stop="marketTabIndex = index">
  18. {{ item }}
  19. </view>
  20. </view>
  21. <!-- <component :is="phoneLogin"/> -->
  22. </view>
  23. <phoneLogin />
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import { reverseBack } from "@/utils/common.js"
  29. import phoneLogin from "./modules/phone.vue"
  30. import mailboxLogin from "./modules/mailbox.vue"
  31. export default {
  32. name: 'login',
  33. components: {
  34. phoneLogin,
  35. mailboxLogin
  36. },
  37. data() {
  38. return {
  39. marketTabIndex: 0,
  40. marketTab: [
  41. '手机号',
  42. '邮箱'
  43. ]
  44. };
  45. },
  46. methods: {
  47. reversBackBtn() {
  48. reverseBack()
  49. }
  50. }
  51. }
  52. </script>
  53. <style>
  54. page {
  55. background-color: #fff;
  56. }
  57. </style>
  58. <style lang="scss" scoped>
  59. .page-content {
  60. width: 100%;
  61. padding: 110rpx 60rpx 0;
  62. .login-title {
  63. display: block;
  64. font-size: 48rpx;
  65. font-family: PingFang SC, PingFang SC-Bold;
  66. font-weight: 700;
  67. color: #333333;
  68. line-height: 67rpx;
  69. letter-spacing: 0.96rpx;
  70. }
  71. .login-content {
  72. display: block;
  73. font-size: 28rpx;
  74. font-family: PingFang SC, PingFang SC-Regular;
  75. font-weight: 400;
  76. color: #808080;
  77. line-height: 40rpx;
  78. letter-spacing: 0.56rpx;
  79. }
  80. }
  81. .tab-box{
  82. padding-bottom: 44rpx;
  83. }
  84. .tab {
  85. width: 100%;
  86. display: flex;
  87. align-items: center;
  88. padding-top: 46rpx;
  89. .tab-item {
  90. font-size: 30rpx;
  91. font-family: PingFang SC, PingFang SC-Bold;
  92. font-weight: 700;
  93. color: #1a1a1a;
  94. line-height: 38rpx;
  95. letter-spacing: 0.6rpx;
  96. +.tab-item {
  97. margin-left: 50rpx;
  98. }
  99. }
  100. .active-tab-item {
  101. color: #20B482;
  102. position: relative;
  103. &::before {
  104. position: absolute;
  105. left: 0;
  106. bottom: -11rpx;
  107. content: '';
  108. width: 100%;
  109. height: 4rpx;
  110. border-radius: 2rpx;
  111. background-color: #20B482;
  112. }
  113. }
  114. }
  115. </style>