question_bank.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <template>
  2. <view style="padding: 32rpx">
  3. <nav-bar title="我的题库通"></nav-bar>
  4. <navigator hover-class="none" url="/pages2/bank/my_question">
  5. <view class="my_question">
  6. <view class="flex">
  7. <view class="text">自购题卷<u-icon name="arrow-right"></u-icon></view>
  8. </view>
  9. <image src="/pages2/static/questionBank.png" class="my_bg"></image>
  10. </view>
  11. </navigator>
  12. <navigator hover-class="none" url="/pages2/bank/free_question">
  13. <view class="my_question">
  14. <view class="flex">
  15. <view class="text">赠送题卷<u-icon name="arrow-right"></u-icon></view>
  16. </view>
  17. <image src="/pages2/static/questionPresent.png" class="my_bg"></image>
  18. </view>
  19. </navigator>
  20. <view class="bottom">
  21. <navigator hover-class="none" url="/pages2/subject/collect">
  22. <view class="item collect">
  23. <view class="text">收藏集<u-icon name="arrow-right"></u-icon></view>
  24. <image class="img" src="/static/questionBank_collect.png"></image>
  25. </view>
  26. </navigator>
  27. <view class="item list">
  28. <navigator hover-class="none" url="/pages2/bank/question_record">
  29. <view class="list-in">
  30. <image class="img" src="/static/questionBank_record.png"></image>
  31. <view class="text">
  32. 做题记录 <u-icon name="arrow-right"></u-icon>
  33. </view>
  34. </view>
  35. </navigator>
  36. <navigator hover-class="none" url="/pages2/subject/wrong">
  37. <view class="list-in">
  38. <image class="img" src="/static/questionBank_wrong.png"></image>
  39. <view class="text">
  40. 错题集 <u-icon name="arrow-right"></u-icon>
  41. </view>
  42. </view>
  43. </navigator>
  44. </view>
  45. </view>
  46. </view>
  47. </template>
  48. <script>
  49. // import { websocket } from '@/common/socket.js';
  50. export default {
  51. data() {
  52. return {
  53. list: [1, 2, 3],
  54. timer: null,
  55. };
  56. },
  57. onLoad(option) {
  58. this.$api
  59. .lockLockAction({
  60. action: "bank",
  61. })
  62. .then((res) => {});
  63. this.timer = setInterval(() => {
  64. this.$api
  65. .lockLockAction({
  66. action: "bank",
  67. })
  68. .then((res) => {});
  69. }, 10000);
  70. // websocket.sendMsg('doQuestion')
  71. // this.getDict()
  72. },
  73. onUnload() {
  74. clearInterval(this.timer);
  75. this.$api
  76. .lockDelLock({
  77. action: "bank",
  78. })
  79. .then((res) => {});
  80. // websocket.sendMsg('delAction')
  81. },
  82. onShow() {},
  83. methods: {},
  84. };
  85. </script>
  86. <style >
  87. page {
  88. background: #fff;
  89. }
  90. </style>
  91. <style lang="scss" scope>
  92. .my_question {
  93. position: relative;
  94. display: flex;
  95. width: 686rpx;
  96. height: 240rpx;
  97. border-radius: 24rpx;
  98. padding: 0 40rpx;
  99. margin-bottom: 16rpx;
  100. .my_bg {
  101. position: absolute;
  102. left: 0;
  103. top: 0;
  104. width: 100%;
  105. height: 100%;
  106. }
  107. .flex {
  108. position: relative;
  109. z-index: 10;
  110. .text {
  111. padding-top: 32rpx;
  112. font-size: 32rpx;
  113. font-family: PingFang SC;
  114. font-weight: bold;
  115. color: #ffffff;
  116. }
  117. }
  118. }
  119. .bottom {
  120. display: flex;
  121. justify-content: space-between;
  122. .item {
  123. width: 335rpx;
  124. &.collect {
  125. position: relative;
  126. font-size: 32rpx;
  127. color: #ffffff;
  128. height: 240rpx;
  129. border-radius: 24rpx;
  130. padding: 32rpx;
  131. .text {
  132. position: relative;
  133. z-index: 10;
  134. font-size: 32rpx;
  135. font-weight: bold;
  136. color: #ffffff;
  137. }
  138. .img {
  139. position: absolute;
  140. left: 0;
  141. top: 0;
  142. width: 100%;
  143. height: 100%;
  144. }
  145. }
  146. &.list {
  147. .list-in {
  148. position: relative;
  149. width: 335rpx;
  150. height: 112rpx;
  151. background: #007aff;
  152. border-radius: 24rpx;
  153. display: flex;
  154. align-items: center;
  155. font-size: 32rpx;
  156. color: #fff;
  157. &:first-of-type {
  158. margin-bottom: 16rpx;
  159. }
  160. .text {
  161. padding-left: 91rpx;
  162. position: relative;
  163. z-index: 10;
  164. font-size: 32rpx;
  165. font-weight: bold;
  166. color: #ffffff;
  167. }
  168. .img {
  169. position: absolute;
  170. left: 0;
  171. top: 0;
  172. width: 100%;
  173. height: 100%;
  174. }
  175. }
  176. }
  177. }
  178. }
  179. </style>