QuizMenu.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <div class="quiz-menu">
  3. <div
  4. v-if="!isMobile"
  5. class="pc-wrapper"
  6. >
  7. <button @click="$router.push({name: 'Login'})">
  8. <div class="text-wrapper">
  9. 请先登录再答题
  10. </div>
  11. </button>
  12. <button @click="onClickRuleDesc">
  13. <div class="text-wrapper">
  14. 规则说明
  15. </div>
  16. </button>
  17. </div>
  18. <div
  19. v-if="isMobile"
  20. class="mobile-wrapper"
  21. >
  22. <button>
  23. <img
  24. class=""
  25. src="@/assets/images/login.png"
  26. alt=""
  27. draggable="false"
  28. >
  29. </button>
  30. <button>
  31. <img
  32. class=""
  33. src="@/assets/images/rule-desc.png"
  34. alt=""
  35. draggable="false"
  36. >
  37. </button>
  38. </div>
  39. </div>
  40. </template>
  41. <script>
  42. export default {
  43. methods: {
  44. onClickRuleDesc() {
  45. this.$router.push({ name: 'RuleDesc' })
  46. }
  47. }
  48. }
  49. </script>
  50. <style lang="less" scoped>
  51. .quiz-menu {
  52. > .pc-wrapper {
  53. position: fixed;
  54. top: 200px;
  55. right: 45px;
  56. width: 166px;
  57. height: 162px;
  58. background-image: url(@/assets/images/quiz-menu-bg-visitor-pc.png);
  59. background-size: cover;
  60. background-repeat: no-repeat;
  61. background-position: center center;
  62. padding-top: 25px;
  63. display: flex;
  64. flex-direction: column;
  65. justify-content: center;
  66. align-items: center;
  67. > button {
  68. background-image: url(@/assets/images/button-border-small.png);
  69. background-size: contain;
  70. background-repeat: no-repeat;
  71. background-position: center center;
  72. width: 119px;
  73. height: 33px;
  74. padding: 3px;
  75. &:first-of-type {
  76. margin-bottom: 10px;
  77. > .text-wrapper {
  78. height: 100%;
  79. width: 100%;
  80. background: rgba(154, 45, 10, 0.8);
  81. display: flex;
  82. justify-content: center;
  83. align-items: center;
  84. font-size: 16px;
  85. font-family: LiSu-Regular, LiSu;
  86. color: #FFFFFF;
  87. }
  88. }
  89. &:last-of-type {
  90. > .text-wrapper {
  91. height: 100%;
  92. width: 100%;
  93. background: rgba(143, 72, 49, 0.8);
  94. display: flex;
  95. justify-content: center;
  96. align-items: center;
  97. font-size: 16px;
  98. font-family: LiSu-Regular, LiSu;
  99. color: #FFFFFF;
  100. }
  101. }
  102. }
  103. }
  104. > .mobile-wrapper {
  105. position: fixed;
  106. top: 126px;
  107. right: 15px;
  108. display: flex;
  109. flex-direction: column;
  110. > button {
  111. margin-bottom: 11px;
  112. width: 40px;
  113. height: 40px;
  114. > img {
  115. width: 100%;
  116. height: 100%;
  117. }
  118. }
  119. }
  120. }
  121. </style>