小说小程序前端代码仓库(小程序)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
2.2 KiB

  1. <template>
  2. <div class="login-page">
  3. <div class="logo-box">
  4. <img class="logo" src="/static/auth/headImage.png" alt="logo" />
  5. </div>
  6. <div class="title">瀚涵中文网</div>
  7. <LoginButton type="primary" @click="onLogin">登录</LoginButton>
  8. <div class="cancel-row">
  9. <LoginButton type="secondary" @click="onCancel">取消登录</LoginButton>
  10. <span class="arrow-icon"></span>
  11. <span class="dashed-line"></span>
  12. </div>
  13. <AgreementCheck v-model:checked="checked">
  14. 我已阅读并同意<a href="#">服务协议</a><a href="#">隐私政策</a>
  15. </AgreementCheck>
  16. <div class="book-bg"></div>
  17. </div>
  18. </template>
  19. <script>
  20. import LoginButton from './components/LoginButton.vue';
  21. import AgreementCheck from './components/AgreementCheck.vue';
  22. export default {
  23. name: 'NovelLogin',
  24. components: { LoginButton, AgreementCheck },
  25. data() {
  26. return {
  27. checked: false
  28. };
  29. },
  30. methods: {
  31. onLogin() {
  32. if (!this.checked) {
  33. this.$toast && this.$toast('请先同意协议');
  34. return;
  35. }
  36. // 登录逻辑
  37. },
  38. onCancel() {
  39. // 取消登录逻辑
  40. }
  41. }
  42. };
  43. </script>
  44. <style scoped>
  45. .login-page {
  46. min-height: 100vh;
  47. background: #eef2fc;
  48. display: flex;
  49. flex-direction: column;
  50. align-items: center;
  51. position: relative;
  52. padding-top: 60px;
  53. }
  54. .logo-box {
  55. width: 120px;
  56. height: 120px;
  57. background: #fff;
  58. border-radius: 16px;
  59. display: flex;
  60. align-items: center;
  61. justify-content: center;
  62. margin-bottom: 16px;
  63. box-shadow: 0 2px 8px #e0e6f6;
  64. }
  65. .logo {
  66. width: 80px;
  67. height: 80px;
  68. object-fit: contain;
  69. }
  70. .title {
  71. font-size: 22px;
  72. font-weight: bold;
  73. color: #222;
  74. margin-bottom: 32px;
  75. }
  76. .cancel-row {
  77. width: 80%;
  78. display: flex;
  79. align-items: center;
  80. position: relative;
  81. margin-bottom: 8px;
  82. }
  83. .arrow-icon {
  84. color: #fd7e14;
  85. font-size: 18px;
  86. margin: 0 6px;
  87. z-index: 2;
  88. }
  89. .dashed-line {
  90. flex: 1;
  91. border-bottom: 2px dashed #fd7e14;
  92. height: 0;
  93. margin-left: -8px;
  94. }
  95. .book-bg {
  96. position: absolute;
  97. left: 50%;
  98. bottom: 0;
  99. transform: translateX(-50%);
  100. width: 220px;
  101. height: 180px;
  102. background: url('/static/auth/headImage.png') no-repeat center/contain;
  103. opacity: 0.08;
  104. z-index: 0;
  105. }
  106. </style>