free_bank.vue 4.0 KB

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