123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271 |
- <template>
- <div class="cell-container">
- <div class="cell-box" :class="{
- 'is-row': isRow,
- }">
- <van-cell title-class="uni-app-fontsize-paragraph" class="cell" :title="item.title" is-link center v-for="(item, index) in classDataLeft" :key="index" :border="false" @click="
- () => {
- goExercise({
- excellIssueName: item.excellIssueName,
- sort: 2,
- });
- }
- ">
- <template #icon>
- <div class="icon-red">{{ index + 1 }}</div>
- </template>
- </van-cell>
- <van-cell title-class="uni-app-fontsize-paragraph" class="cell" :title="
- item.excellIssueName ||
- item.placeIssueName ||
- item.classIssueName ||
- item.sequeIssueName
- " is-link center v-for="(item, index) in classDataSpecial" :key="index" :border="false" @click="
- () => {
- goExercise({
- excellIssueName: item.excellIssueName,
- sort: 2,
- });
- }
- ">
- <template #icon>
- <div class="icon-red">{{ '新' }}</div>
- </template>
- </van-cell>
- <!-- <van-cell
- v-if="query.title !== '地方专题'"
- @click="
- () => {
- push({
- name: 'classify',
- query: {
- ...query,
- title: '地方专题',
- path: 'selectDfQuestionInfo',
- sort: 4,
- },
- });
- }
- "
- class="cell"
- title="地方专题"
- is-link
- center
- :border="false"
- >
- <template #icon>
- <div class="icon-blue">{{ "地" }}</div>
- </template>
- </van-cell> -->
- </div>
- <div style="padding-right: 0rpx" class="cell-box">
- <van-cell class="cell" :title="
- item.placeIssueName ||
- item.classIssueName ||
- item.excellIssueName ||
- item.sequeIssueName
- " @click="
- () => {
- goExercise({
- excellIssueName: item.excellIssueName,
- });
- }
- " is-link center v-for="(item, index) in classDataRight" :key="index" :border="false">
- <template #icon>
- <div class="icon-red">{{ index + 1 }}</div>
- </template>
- </van-cell>
- </div>
- <div style="height: 40rpx; width: 750rpx"></div>
- <m-classify-tip :content="classifyTip"></m-classify-tip>
- <view class="wxad">
- <ad ad-type="video" :ad-intervals="100" unit-id="adunit-8eb44bbd7e3147d4"></ad>
- </view>
-
- </div>
- </template>
- <script>
- import api from "@/api/index";
- import utils from "@/utils/index";
- export default {
- data() {
- return {
- isRow: false,
- classifyTip: [
- "软件题库已同步更新至车管所最新,左边的红色必学题,每套题必须学完.",
- "模拟考试能连续5次以上达到96分左右,即可参加考试",
- "如果模拟考试达不到要求,请把右边的选学题也学习一遍",
- ],
- classDataSpecial: [],
- classDataRight: [],
- classDataLeft: [],
- query: {
- vehicle: "",
- },
- };
- },
- onLoad(query) {
- this.query = query;
- this.isRow = this.query.vehicle === "摩托车";
- this.getClassData();
- },
- methods: {
- goExercise(extraQuery) {
- let query = Object.assign({}, this.query);
- if (extraQuery) {
- query = {
- ...query,
- ...extraQuery,
- };
- } else {
- }
- uni.navigateTo({
- url: "/otherPages/exercise/index?" + utils.mapToUrlQuery(query),
- });
- },
- getClassData() {
- api.exam.studentQuestion2InfoGetQuestionColumn({
- subject:'k1',
- model:'cart'
- }).then(res=>{
- this.classDataLeft = res.data;
- })
- // if (this.query.vehicle === "摩托车") {
- // api.exam
- // .studentQuestionInfoSelectJxQuestionInfo({
- // ...this.query,
- // })
- // .then((res) => {
- // this.classDataLeft = res.data;
- // });
- // } else {
- // api.exam
- // .studentQuestionInfoSelectJxQuestionInfo({
- // ...this.query,
- // excellIssueName: "选学",
- // })
- // .then((res) => {
- // this.classDataRight = res.data;
- // });
- // api.exam
- // .studentQuestionInfoSelectJxQuestionInfo({
- // ...this.query,
- // excellIssueName: "必",
- // })
- // .then((res) => {
- // // res.data.shift();
- // this.classDataLeft = res.data;
- // api.exam
- // .studentQuestionInfoSelectJxQuestionInfo({
- // ...this.query,
- // excellIssueName: "新",
- // })
- // .then((res) => {
- // this.classDataSpecial = [...res.data];
- // });
- // });
- // }
- },
- },
- };
- // getTopicClass(query.path as string, {
- // ...query,
- // excellIssueName: "必",
- // }).then(({ data }) => {
- // // res.data.data.shift();
- // console.log(data);
- // classDataLeft.value = data.data;
- // getTopicClass(query.path as string, {
- // ...query,
- // excellIssueName: "新增",
- // }).then(({ data }) => {
- // // data.data.shift();
- // classDataLeft.value = [...classDataLeft.value, ...data.data];
- // });
- // getTopicClass(query.path as string, {
- // ...query,
- // excellIssueName: "地方",
- // }).then(({ data }) => {
- // // data.data.shift();
- // classDataLeft.value = [...classDataLeft.value, ...data.data];
- // });
- // });
- // getTopicClass(query.path as string, {
- // ...query,
- // excellIssueName: "选学",
- // }).then(({ data }) => {
- // classDataRight.value = data.data;
- // });
- </script>
- <style lang="scss" scoped>
- .cell-container {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- padding: 30rpx 30rpx;
- justify-content: space-between;
- width: 100%;
- box-sizing: border-box;
- }
- .cell-box {
- display: flex;
- align-content: flex-start;
- align-items: flex-start;
- flex-wrap: wrap;
- flex-direction: row;
- justify-content: space-between;
- box-sizing: border-box;
- .cell {
- width: 334rpx;
- margin-bottom: 30rpx;
- box-shadow: 0px 0px 10rpx rgba(124, 129, 136, 0.2);
- }
- .icon-blue {
- width: 40rpx;
- height: 40rpx;
- background: #498ef5;
- border-radius: 50%;
- font-weight: 500;
- font-family: PingFang SC;
- font-size: 26rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #ffffff;
- margin-right: 10rpx;
- }
- .icon-red {
- width: 50rpx;
- height: 50rpx;
- background: red;
- border-radius: 50%;
- font-weight: 500;
- font-family: PingFang SC;
- font-size: 26rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #ffffff;
- margin-right: 10rpx;
- }
- }
- .is-row {
- flex-direction: row;
- width: 100%;
- justify-content: space-between;
- }
- </style>
|