question_bank.vue 3.9 KB

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