question_bank.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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.getLock()
  61. this.timer = setInterval(this.getLock,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. uni.hideLoading()
  71. })
  72. // websocket.sendMsg('delAction')
  73. },
  74. onShow(){
  75. },
  76. methods: {
  77. getLock() {
  78. this.$api.lockLockAction({
  79. action:'bank'
  80. }).then(res => {
  81. })
  82. }
  83. },
  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>