daTi.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template>
  2. <view class="box">
  3. <u-navbar :autoBack="true" title="答题闯关" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#000000"></u-navbar>
  4. <!-- 菜单 -->
  5. <!-- <view class="menu_box">
  6. <view @click="menuBtn(index)" class="item" :class="{ active: index == menuIndex }" v-for="(item, index) in menuList" :key="item.index">{{ item.title }}</view>
  7. </view> -->
  8. <view class="ban_box">
  9. <view class="ban_item2">
  10. <image class="img" src="https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/dt_ban1.png"></image>
  11. </view>
  12. <view class="ban_item1">
  13. <image class="img" src="https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/dt_ban2.png"></image>
  14. </view>
  15. </view>
  16. <view class="map_tit">
  17. <image style="width: 130rpx; height: 30rpx" src="/static/img/left_img.png"></image>
  18. <view class="">点击图案 切换关卡</view>
  19. <image style="width: 130rpx; height: 30rpx" src="/static/img/right_img.png"></image>
  20. </view>
  21. <view class="tab_box">
  22. <view @click="tabBtn(index)" class="tab_item" v-for="(item, index) in 3" :key="item.index" :class="{ active2: index == tabIndex }"></view>
  23. </view>
  24. <view style="width: 333rpx; height: 20rpx; margin-left: 190rpx">
  25. <image src="/static/img/fenge.png" class="img"></image>
  26. </view>
  27. <view class="tit" style="font-size: 42rpx">知识风暴</view>
  28. <view @click="star" class="star"><view class="tit">开始闯关</view></view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {
  35. menuIndex: 0,
  36. tabIndex: 0,
  37. menuList: [
  38. {
  39. title: '全部'
  40. },
  41. {
  42. title: '闯关'
  43. },
  44. {
  45. title: '练习'
  46. }
  47. ]
  48. };
  49. },
  50. methods: {
  51. // menuBtn(i) {
  52. // this.menuIndex = i;
  53. // },
  54. tabBtn(i) {
  55. this.tabIndex = i;
  56. },
  57. star() {
  58. uni.navigateTo({
  59. url: '/answer_pages/home/dashboard'
  60. });
  61. }
  62. }
  63. };
  64. </script>
  65. <style>
  66. .box {
  67. height: auto;
  68. width: 100%;
  69. padding-bottom: 50rpx;
  70. background-image: url('https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/xy_bgt.png');
  71. background-repeat: repeat-y;
  72. background-size: cover;
  73. background-size: 100% 100%;
  74. }
  75. .menu_box {
  76. display: flex;
  77. margin: auto;
  78. margin-top: 50rpx;
  79. width: 80%;
  80. justify-content: space-around;
  81. }
  82. .item {
  83. width: 160rpx;
  84. height: 60rpx;
  85. font-size: 30rpx;
  86. text-align: center;
  87. color: #313131;
  88. line-height: 60rpx;
  89. background: url('/static/img/dt_bg2.png') no-repeat;
  90. background-size: 100% 100%;
  91. }
  92. .active {
  93. background: url('/static/img/dt_bg1.png') no-repeat !important;
  94. background-size: 100% 100% !important;
  95. }
  96. .active2 {
  97. background: url('/static/img/dt_tab2.png') no-repeat !important;
  98. background-size: 100% 100% !important;
  99. }
  100. .ban_box {
  101. position: relative;
  102. margin-top: 100rpx;
  103. }
  104. .img {
  105. width: 100%;
  106. height: 100%;
  107. }
  108. .ban_item1 {
  109. position: absolute;
  110. top: -40rpx;
  111. left: 62rpx;
  112. width: 619rpx;
  113. height: 619rpx;
  114. margin: auto;
  115. }
  116. .ban_item2 {
  117. width: 537rpx;
  118. height: 537rpx;
  119. margin: auto;
  120. }
  121. .map_tit {
  122. display: flex;
  123. align-items: center;
  124. margin-left: 110rpx;
  125. margin-top: 80rpx;
  126. font-size: 32rpx;
  127. line-height: 52rpx;
  128. background: linear-gradient(180deg, #af7e44 0%, #934b36 100%);
  129. -webkit-background-clip: text;
  130. -webkit-text-fill-color: transparent;
  131. }
  132. .tab_box {
  133. margin: auto;
  134. display: flex;
  135. justify-content: space-around;
  136. margin-top: 20rpx;
  137. margin-bottom: 30rpx;
  138. width: 45%;
  139. }
  140. .tab_item {
  141. width: 60rpx;
  142. height: 60rpx;
  143. background: url('/static/img/dt_tab1.png') no-repeat;
  144. background-size: 100% 100%;
  145. }
  146. .tit {
  147. width: 90%;
  148. margin: auto;
  149. margin-top: 30rpx;
  150. font-size: 32rpx;
  151. letter-spacing: 6rpx;
  152. text-align: center;
  153. font-weight: 700;
  154. background: linear-gradient(180deg, #af7e44 0%, #934b36 100%);
  155. -webkit-background-clip: text;
  156. -webkit-text-fill-color: transparent;
  157. }
  158. .star {
  159. width: 300rpx;
  160. height: 76rpx;
  161. margin: auto;
  162. margin-top: 80rpx;
  163. text-align: center;
  164. line-height: 76rpx;
  165. background: url('/static/img/dt_bg2.png') no-repeat;
  166. background-size: 100% 100%;
  167. }
  168. </style>