You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

325 lines
8.0 KiB

4 months ago
4 months ago
  1. <template>
  2. <view class="content">
  3. <up-navbar title="理论学习" :leftIconColor="'#333'" :safeAreaInsetTop="true" :autoBack="true" :bgColor="'transparent'">
  4. <template #right>
  5. <view class="u-nav-slot flex">
  6. <view class="txt">小车</view>
  7. <u-icon name="arrow-down-fill" color="#333" size="12"></u-icon>
  8. </view>
  9. </template>
  10. </up-navbar>
  11. <view class="tabs flex">
  12. <view class="tab" @click="changeTab(1)" :class="{active: currentTab==1}">科目一</view>
  13. <view class="tab" @click="changeTab(2)" :class="{active: currentTab==2}">收藏夹</view>
  14. </view>
  15. <view class="swiperBox">
  16. <u-swiper :list="list1" @click="swiperClick" :dots-styles="dotsStyles" indicatorMode="dot"></u-swiper>
  17. </view>
  18. <view class="notice">
  19. <view class="yellowT">通知/</view>
  20. <view class="txt">06月11日已更新至最新题库</view>
  21. </view>
  22. <view class="iconBox">
  23. <view class="iconComl">
  24. <view class="item" v-for="(item,index) in leftItem" :key="index">
  25. <view class="icon">
  26. <image :src="item.icon" mode=""></image>
  27. </view>
  28. <view class="text">{{item.name}}</view>
  29. </view>
  30. </view>
  31. <view class="centerComl">
  32. <view class="ctItem">
  33. <view class="txt">顺序练习</view>
  34. <view class="txt">0/1700</view>
  35. </view>
  36. <view class="ctItem">
  37. <view class="txt">精选试题</view>
  38. <view class="txt">0/1700</view>
  39. </view>
  40. </view>
  41. <view class="iconComl">
  42. <view class="item" v-for="(item,index) in rightItem" :key="index">
  43. <view class="icon">
  44. <image :src="item.icon" mode=""></image>
  45. </view>
  46. <view class="text">{{ item.name }}</view>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="simulatedExam flex-b">
  51. <view class="leftTxt">
  52. <view class="h8">科一模拟考试</view>
  53. <view class="text">考试次数1</view>
  54. <view class="text">预测通过率10%</view>
  55. <view class="btnBox flex">
  56. <view class="btnTxt" @click="$goPage('/pages/exercises/beforeExam/beforeExam')">开始考试</view>
  57. <view class="btnIcon">
  58. <image src="@/static/images/theory/sanjx.png" mode=""></image>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="rightImg">
  63. <image src="@/static/images/theory/computed.png" mode=""></image>
  64. </view>
  65. </view>
  66. <view class="ul flex">
  67. <view class="li" v-for="(item,index) in bottomItem" :key="index">
  68. <view class="icon">
  69. <image :src="item.icon" mode=""></image>
  70. </view>
  71. <view class="txt">{{ item.name }}</view>
  72. </view>
  73. </view>
  74. </view>
  75. </template>
  76. <script setup>
  77. import { ref } from 'vue'
  78. const list1 = [
  79. 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
  80. 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
  81. 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
  82. ]
  83. function swiperClick(val) {
  84. console.log(val)
  85. }
  86. const currentTab = ref(1)
  87. const dotsStyles = ref({
  88. backgroundColor: '#E8E9EC',
  89. border: '1px #E8E9EC solid',
  90. color: '#fff',
  91. selectedBackgroundColor: '#1989FA',
  92. selectedBorder: '1px #1989FA solid'
  93. })
  94. const leftItem = ref([
  95. {name: '分类学习', icon: new URL('@/static/images/theory/theoryIcon1.png', import.meta.url).href, url: ''},
  96. {name: '章节练习', icon: new URL('@/static/images/theory/theoryIcon7.png', import.meta.url).href, url: ''},
  97. {name: '精选试题', icon: new URL('@/static/images/theory/theoryIcon9.png', import.meta.url).href, url: ''},
  98. {name: '考前密卷', icon: new URL('@/static/images/theory/theoryIcon11.png', import.meta.url).href, url: ''},
  99. ])
  100. const rightItem = ref([
  101. {name: '题型练习', icon: new URL('@/static/images/theory/theoryIcon6.png', import.meta.url).href, url: ''},
  102. {name: '错题收藏', icon: new URL('@/static/images/theory/theoryIcon8.png', import.meta.url).href, url: ''},
  103. {name: '仿真考试', icon: new URL('@/static/images/theory/theoryIcon10.png', import.meta.url).href, url: ''},
  104. {name: '我的学习', icon: new URL('@/static/images/theory/theoryIcon12.png', import.meta.url).href, url: ''},
  105. ])
  106. const bottomItem = ref([
  107. {name: '考试简介', icon: new URL('@/static/images/theory/theoryIcon3.png', import.meta.url).href, url: ''},
  108. {name: '考试准备', icon: new URL('@/static/images/theory/theoryIcon2.png', import.meta.url).href, url: ''},
  109. {name: '考试流程', icon: new URL('@/static/images/theory/theoryIcon4.png', import.meta.url).href, url: ''},
  110. {name: '注意事项', icon: new URL('@/static/images/theory/theoryIcon5.png', import.meta.url).href, url: ''},
  111. ])
  112. </script>
  113. <style lang="scss" scoped>
  114. image {
  115. display: block;
  116. width: 100%;
  117. height: 100%;
  118. }
  119. .tabs {
  120. display: flex;
  121. height: 100rpx;
  122. width: 100%;
  123. justify-content: center;
  124. .tab {
  125. color: #333;
  126. position: relative;
  127. padding: 0 40rpx;
  128. font-weight: 400;
  129. flex: 1;
  130. text-align: center;
  131. &.active {
  132. width: 100%;
  133. &::before {
  134. content: '';
  135. position: absolute;
  136. left: 50%;
  137. bottom: -20rpx;
  138. width: 30rpx;
  139. height: 4rpx;
  140. background: #333;
  141. font-weight: 700;
  142. border-radius: 2rpx;
  143. transform: translateX(-50%);
  144. }
  145. }
  146. }
  147. }
  148. .content {
  149. padding: 100rpx 30rpx 30rpx 30rpx;
  150. .u-nav-slot {
  151. .txt {
  152. font-size: 28rpx;
  153. margin-right: 10rpx;
  154. }
  155. }
  156. .swiperBox {
  157. padding-top: 20rpx;
  158. }
  159. .notice {
  160. padding: 18rpx;
  161. background: #FEF9ED;
  162. border-radius: 8rpx;
  163. margin-top: 20rpx;
  164. font-size: 28rpx;
  165. .yellowT {
  166. font-weight: 800;
  167. color: #F1AD40;
  168. font-style: italic;
  169. display: inline-block;
  170. margin-right: 10rpx;
  171. }
  172. .txt {
  173. display: inline-block;
  174. }
  175. }
  176. .iconBox {
  177. display: flex;
  178. justify-content: space-between;
  179. padding: 60rpx 30rpx;
  180. .iconComl {
  181. display: flex;
  182. flex-direction: column;
  183. .item {
  184. text-align: center;
  185. margin-bottom: 40rpx;
  186. display: flex;
  187. flex-direction: column;
  188. justify-content: center;
  189. align-items: center;
  190. .icon {
  191. width: 72rpx;
  192. height: 72rpx;
  193. }
  194. .text {
  195. font-size: 28rpx;
  196. margin-top: 10rpx;
  197. }
  198. }
  199. }
  200. .centerComl {
  201. display: flex;
  202. flex-direction: column;
  203. justify-content: space-around;
  204. padding-bottom: 30rpx;
  205. .ctItem {
  206. width: 230rpx;
  207. height: 230rpx;
  208. background: linear-gradient(0deg, #4FACFE 0%, #00F2FE 100%);
  209. border-radius: 50%;
  210. // border: 10px solid;
  211. // opacity: 0.1;
  212. // border-image: linear-gradient(0deg, #4FACFE, #00F2FE) 10 10;
  213. display: flex;
  214. align-items: center;
  215. justify-content: center;
  216. flex-direction: column;
  217. &:last-child {
  218. background: linear-gradient(45deg, #0FE25C 0%, #1FF2CA 100%);
  219. }
  220. .txt {
  221. font-size: 32rpx;
  222. color: #fff;
  223. padding: 6rpx 0;
  224. }
  225. }
  226. }
  227. }
  228. .simulatedExam {
  229. background: #DFF6FF;
  230. border-radius: 20rpx;
  231. padding: 30rpx;
  232. // margin-top: 40rpx;
  233. .leftTxt {
  234. flex: 1;
  235. width: 0;
  236. .h8 {
  237. font-weight: bold;
  238. font-size: 44rpx;
  239. }
  240. .text {
  241. font-size: 28rpx;
  242. margin-top: 12rpx;
  243. }
  244. .btnBox {
  245. width: 188rpx;
  246. height: 66rpx;
  247. background: #3776FF;
  248. border-radius: 33rpx;
  249. display: flex;
  250. justify-content: center;
  251. margin-top: 30rpx;
  252. .btnTxt {
  253. font-size: 30rpx;
  254. color: #FFFFFF;
  255. }
  256. .btnIcon {
  257. width: 10rpx;
  258. height: 12rpx;
  259. margin-left: 12rpx;
  260. }
  261. }
  262. }
  263. .rightImg {
  264. width: 256rpx;
  265. height: 256rpx;
  266. img {
  267. }
  268. }
  269. }
  270. .ul {
  271. padding: 20rpx 0 0 0;
  272. justify-content: space-between;
  273. .li {
  274. width: 23%;
  275. height: 174rpx;
  276. background: linear-gradient(0deg, #FFFFFF 0%, #E5F7FF 100%);
  277. box-shadow: 0px 2px 2px 0px #E5F7FF;
  278. border-radius: 10px;
  279. display: flex;
  280. flex-direction: column;
  281. align-items: center;
  282. justify-content: center;
  283. .icon {
  284. width: 58rpx;
  285. height: 60rpx;
  286. margin: 0 auto;
  287. }
  288. .txt {
  289. font-weight: 500;
  290. font-size: 28rpx;
  291. margin-top: 24rpx;
  292. text-align: center;
  293. }
  294. }
  295. }
  296. }
  297. </style>