question_bank.vue 3.6 KB

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