index.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <view class="bg-white">
  3. <div class="cell-box">
  4. <view v-for="(item, index) in classData" :key="index">
  5. <van-cell
  6. title-class="uni-app-fontsize-paragraph"
  7. value-class="custom-right-cell"
  8. class="cell"
  9. :title="
  10. item.placeIssueName ||
  11. item.classIssueName ||
  12. item.excellIssueName ||
  13. item.sequeIssueName
  14. "
  15. center
  16. :border="false"
  17. >
  18. <div class="select">
  19. <div
  20. class="select-item0 uni-app-fontsize-paragraph"
  21. @click="
  22. () => {
  23. goExercise({
  24. sequeIssueName: item.sequeIssueName,
  25. sequeIssue: item.sequeIssue,
  26. });
  27. }
  28. "
  29. >
  30. <image
  31. style="width: 22rpx; height: 26rpx;padding-right:6rpx;"
  32. src="https://ct.zzxcx.net/ctjk/mp-wx/classifyOrder/yuyin.png"
  33. ></image>
  34. 语音讲解
  35. </div>
  36. <div
  37. @click="
  38. () => {
  39. goExerciseExam({
  40. sequeIssueName: item.sequeIssueName,
  41. sequeIssue: item.sequeIssue,
  42. });
  43. }
  44. "
  45. class="select-item1 uni-app-fontsize-paragraph"
  46. >
  47. <image
  48. style="width: 26rpx; height: 26rpx;padding-right:6rpx;"
  49. src="https://ct.zzxcx.net/ctjk/mp-wx/classifyOrder/danxiang.png"
  50. ></image>
  51. 单项测试
  52. </div>
  53. </div>
  54. <template #icon>
  55. <div class="icon">{{ index + 1 }}</div>
  56. </template>
  57. </van-cell>
  58. </view>
  59. </div>
  60. <!-- <div style="height: 40rpx; width: 750rpx"></div>
  61. <div style="padding:0rpx 15rpx">
  62. <m-classify-tip :content="classifyTip"></m-classify-tip>
  63. </div> -->
  64. </view>
  65. </template>
  66. <script>
  67. import api from "@/api/index";
  68. import utils from "@/utils/index";
  69. export default {
  70. data() {
  71. return {
  72. classData: [],
  73. classifyTip: ["软件题库已同步更新至车管所最新"],
  74. query: {
  75. title: "",
  76. vehicle: "",
  77. },
  78. };
  79. },
  80. methods: {
  81. goExercise(extraQuery) {
  82. let query = Object.assign({}, this.query);
  83. if (extraQuery) {
  84. query = {
  85. ...query,
  86. ...extraQuery,
  87. };
  88. } else {
  89. }
  90. uni.navigateTo({
  91. url: "/otherPages/exercise/index?" + utils.mapToUrlQuery(query),
  92. });
  93. },
  94. goExerciseExam(extraQuery) {
  95. let query = Object.assign({}, this.query);
  96. if (extraQuery) {
  97. query = {
  98. ...query,
  99. ...extraQuery,
  100. };
  101. } else {
  102. }
  103. uni.navigateTo({
  104. url: "/otherPages/exerciseExam/index?" + utils.mapToUrlQuery(query),
  105. });
  106. },
  107. },
  108. onLoad(op) {
  109. this.query = op;
  110. },
  111. mounted() {
  112. api.exam.studentQuestionInfoSelectSxQuestionInfo(this.query).then((res) => {
  113. if (this.query.vehicle === "摩托车") {
  114. this.classData = res.data;
  115. } else {
  116. res.data.shift();
  117. this.classData = res.data;
  118. }
  119. });
  120. },
  121. };
  122. </script>
  123. <style>
  124. .custom-right-cell {
  125. flex: 1.8 !important;
  126. }
  127. </style>
  128. <style lang="scss" scoped>
  129. .bg-white {
  130. background: #ffffff;
  131. }
  132. .cell-box {
  133. display: flex;
  134. padding: 10rpx 0rpx;
  135. flex-wrap: wrap;
  136. justify-content: space-between;
  137. > view {
  138. width: 100%;
  139. border-bottom: 1px solid #ddd;
  140. }
  141. .cell {
  142. width: 100%;
  143. line-height: 56rpx;
  144. // box-shadow: 0px 0px 10px rgba(124, 129, 136, 0.2);
  145. }
  146. .select {
  147. display: flex;
  148. flex-direction: row;
  149. color: white;
  150. .select-item0 {
  151. padding: 0 18rpx;
  152. background: #d6e9fc;
  153. margin-right: 20rpx;
  154. border-radius: 8rpx;
  155. white-space: nowrap;
  156. font-size: 32rpx;
  157. color: #498ef5;
  158. height: 60rpx;
  159. line-height: 60rpx;
  160. border-radius: 50rpx;
  161. }
  162. .select-item1 {
  163. padding: 0 18rpx;
  164. background: #d1f5eb;
  165. white-space: nowrap;
  166. border-radius: 8rpx;
  167. font-size: 32rpx;
  168. color: #01c18d;
  169. height: 60rpx;
  170. line-height: 60rpx;
  171. border-radius: 50rpx;
  172. }
  173. }
  174. .icon {
  175. width: 40rpx;
  176. height: 40rpx;
  177. background: #d6e9fc;
  178. border-radius: 50%;
  179. font-weight: 500;
  180. font-family: PingFang SC;
  181. font-size: 26rpx;
  182. display: flex;
  183. justify-content: center;
  184. align-items: center;
  185. color: #498ef5;
  186. margin-right: 10rpx;
  187. }
  188. }
  189. </style>