question_bank.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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:[
  54. 1,2,3
  55. ],
  56. timer:null,
  57. }
  58. },
  59. onLoad(option) {
  60. this.$api.lockLockAction({
  61. action:'bank'
  62. }).then(res => {
  63. })
  64. this.timer = setInterval(() => {
  65. this.$api.lockLockAction({
  66. action:'bank'
  67. }).then(res => {
  68. })
  69. },10000)
  70. // websocket.sendMsg('doQuestion')
  71. // this.getDict()
  72. },
  73. onUnload() {
  74. clearInterval(this.timer)
  75. this.$api.lockDelLock({
  76. action:'bank'
  77. }).then(res => {
  78. })
  79. // websocket.sendMsg('delAction')
  80. },
  81. onShow(){
  82. },
  83. methods: {
  84. },
  85. }
  86. </script>
  87. <style >
  88. page {
  89. background: #fff;
  90. }
  91. </style>
  92. <style lang="scss" scope>
  93. .my_question {
  94. position:relative;
  95. display: flex;
  96. width: 686rpx;
  97. height: 240rpx;
  98. border-radius: 24rpx;
  99. padding:0 40rpx;
  100. margin-bottom:16rpx;
  101. .my_bg {
  102. position:absolute;
  103. left:0;
  104. top:0;
  105. width:100%;
  106. height:100%;
  107. }
  108. .flex {
  109. position: relative;
  110. z-index: 10;
  111. .text {
  112. padding-top:32rpx;
  113. font-size: 32rpx;
  114. font-family: PingFang SC;
  115. font-weight: bold;
  116. color: #FFFFFF;
  117. }
  118. }
  119. }
  120. .bottom {
  121. display: flex;
  122. justify-content: space-between;
  123. .item {
  124. width: 335rpx;
  125. &.collect {
  126. position: relative;
  127. font-size: 32rpx;
  128. color: #FFFFFF;
  129. height: 240rpx;
  130. border-radius: 24rpx;
  131. padding:32rpx;
  132. .text {
  133. position:relative;
  134. z-index: 10;
  135. font-size: 32rpx;
  136. font-weight: bold;
  137. color: #FFFFFF;
  138. }
  139. .img {
  140. position:absolute;
  141. left:0;
  142. top:0;
  143. width:100%;
  144. height:100%;
  145. }
  146. }
  147. &.list {
  148. .list-in {
  149. position:relative;
  150. width: 335rpx;
  151. height: 112rpx;
  152. background: #007AFF;
  153. border-radius: 24rpx;
  154. display: flex;
  155. align-items: center;
  156. font-size: 32rpx;
  157. color: #fff;
  158. &:first-of-type {
  159. margin-bottom:16rpx;
  160. }
  161. .text {
  162. padding-left:91rpx;
  163. position:relative;
  164. z-index: 10;
  165. font-size: 32rpx;
  166. font-weight: bold;
  167. color: #FFFFFF;
  168. }
  169. .img {
  170. position:absolute;
  171. left:0;
  172. top:0;
  173. width:100%;
  174. height:100%;
  175. }
  176. }
  177. }
  178. }
  179. }
  180. </style>