index.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <view>
  3. <!-- 头部 -->
  4. <headContent>
  5. <template #left>
  6. <view class="head-revers-back iconfont" @click.stop="reversBackBtn()">&#xe604;</view>
  7. </template>
  8. </headContent>
  9. <view class="page-content">
  10. <text class="login-title">登录</text>
  11. <text class="login-content">Hi, 欢迎来到币王</text>
  12. <view class="tab-box">
  13. <view class="tab">
  14. <view v-for="(item , index) in marketTab"
  15. :class="['tab-item' , index === marketTabIndex ? 'active-tab-item' : '' ]"
  16. @click.stop="marketTabIndex = index">
  17. {{ item }}
  18. </view>
  19. </view>
  20. <!-- <component :is="phoneLogin"/> -->
  21. </view>
  22. <phoneLogin />
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import {
  28. reverseBack
  29. } from "@/utils/common.js"
  30. import phoneLogin from "./modules/phone.vue"
  31. import mailboxLogin from "./modules/mailbox.vue"
  32. export default {
  33. name: 'login',
  34. components: {
  35. phoneLogin,
  36. mailboxLogin
  37. },
  38. data() {
  39. return {
  40. marketTabIndex: 0,
  41. marketTab: [
  42. '手机号',
  43. '邮箱'
  44. ]
  45. };
  46. },
  47. methods: {
  48. reversBackBtn() {
  49. reverseBack()
  50. }
  51. }
  52. }
  53. </script>
  54. <style>
  55. page {
  56. background-color: #fff;
  57. }
  58. </style>
  59. <style lang="scss" scoped>
  60. @import "~./common.scss"
  61. </style>