Bladeren bron

视频模块增加3

JXDS18FUJT 2 jaren geleden
bovenliggende
commit
9df9cd9a69

+ 8 - 0
src/api/modules/carVideo.js

@@ -130,6 +130,14 @@ class CarVideo {
 
 		return res
 	}
+	//查询考场视频列表
+	studentVipVideoList(params){
+		return request({
+			url:"student/vip/video/list",
+			params
+		})
+
+	}
 }
 
 

+ 28 - 1
src/api/modules/exam.js

@@ -171,13 +171,40 @@ const exam = {
 
 	},
 	//查询秘密卷
-	studentQuestionInfoSelectMiQuestionInfoList(params){
+	studentQuestionInfoSelectMiQuestionInfoList(params) {
 		return request({
 			url: "student/question/info/selectMiQuestionInfoList",
 			method: "get",
 			params
 		})
 
+	},
+	//获取考场省份
+	studentExamInfoGetProvice(params) {
+		return request({
+			url: "student/exam/info/getProvice",
+			method: "get",
+			params
+		})
+
+
+	},
+	//查询考场信息列表
+	studentExamInfoList(params){
+		return request({
+			url: "student/exam/info/list",
+			method: "get",
+			params
+		})
+
+	},
+	//根据省份ID获取考场城市
+	studentExamInfoCityProviceId(proviceId){
+		return request({
+			url: `student/exam/info/city/${proviceId}`,
+			method: "get"
+		})
+
 	}
 }
 

+ 8 - 0
src/otherPages/courseCatalog/components/courseCatalog.vue

@@ -44,11 +44,13 @@
         mode="widthFix"
         src="https://ct.zzxcx.net/ctjk/mp-wx/courseCatalog/payBg.png"
       ></image>
+       <!-- <image mode="widthFix" src="https://ct.zzxcx.net/ctjk/mp-wx/courseCatalog/alreadyPay.png"></image> -->
     </view>
     <view class="advantage">
       <view class="advantage-title"> 实拍优势</view>
       <view class="advantage-img"> 
         <image mode="widthFix" src="https://ct.zzxcx.net/ctjk/mp-wx/courseCatalog/advantage.png"></image>
+       
       </view>
     </view>
   </view>
@@ -59,6 +61,12 @@ export default {
   data() {
     return {};
   },
+  props: {
+    list: {
+      type: Array,
+      default: []
+    },
+  },
 };
 </script>
 

File diff suppressed because it is too large
+ 1 - 2
src/otherPages/courseCatalog/index.vue


+ 81 - 24
src/otherPages/buyVideo/index.vue → src/otherPages/examRoadVideo/index.vue

@@ -12,10 +12,11 @@
           style="display: flex; padding: 30rpx; justify-content: space-between"
         >
           <input
-            v-model="provice.name"
+            readonly
+            v-model="provice.province"
             @click="
               () => {
-                areaShow = true;
+                proviceShow = true;
               }
             "
             placeholder="省份"
@@ -23,39 +24,56 @@
             type="text"
           />
           <input
+            readonly
             @click="
               () => {
-                areaShow = true;
+                cityShow = true;
               }
             "
-            v-model="city.name"
+            v-model="city.city"
             placeholder="地市"
             class="header-city"
             type="text"
           />
         </view>
       </view>
-      <van-popup round position="bottom" :show="areaShow">
-        <van-area
+      <van-popup round position="bottom" :show="proviceShow">
+        <van-picker
+          show-toolbar
+          title="考场省份"
+          :columns="examProviceList"
+          value-key="province"
+          @confirm="getExamCityAndProviceName"
           @cancel="
             () => {
-              areaShow = false;
+              proviceShow = false;
             }
           "
-          @confirm="confirmArea"
-          :value="provice.code"
-          :area-list="areaList"
-          columns-num="2" ></van-area>
+        />
+      </van-popup>
+      <van-popup round position="bottom" :show="cityShow">
+        <van-picker
+          show-toolbar
+          title="考场地市"
+          :columns="examCityList"
+          value-key="city"
+          @confirm="getCityName"
+          @cancel="
+            () => {
+              cityShow = false;
+            }
+          "
+        />
       </van-popup>
     </view>
     <view class="content">
       <view class="list">
-        <view class="list-item">
-          <image
-            mode="widthFx"
-            src="https://ct.zzxcx.net/ctjk/mp-wx/buyVideo/course1.png"
-            class="list-item-image"
-          >
+        <view
+          class="list-item"
+          v-for="(item, index) in examRoomList"
+          :key="index"
+        >
+          <image mode="widthFx" :src="item.image" class="list-item-image">
           </image>
           <view
             style="
@@ -65,7 +83,7 @@
               width: 355rpx;
             "
           >
-            <view class="list-item-text1">福州 | 华威科目三考场</view>
+            <view class="list-item-text1">{{ item.name }}</view>
             <view class="list-item-text2">共3节</view>
           </view>
           <view class="list-item-border"></view>
@@ -76,22 +94,60 @@
 </template>
 
 <script>
-import { areaList } from "@vant/area-data";
+import api from "@/api";
 export default {
   data() {
     return {
-      areaShow: false,
-      provice: { code: "", name: "" },
-      city: { code: "", name: "" },
-      areaList: areaList,
+      query: {},
+      cityShow: false,
+      proviceShow: false,
+      examProviceList: [],
+      examCityList: [],
+      examRoomList: [],
+      provice: { provinceId: "", province: "" },
+      city: { cityId: "", city: "" },
     };
   },
   methods: {
     confirmArea(e) {
       this.provice = e.detail.values[0];
       this.city = e.detail.values[1];
-      this.areaShow=false
+      this.areaShow = false;
+    },
+    getCityName(e) {
+      this.city = e.detail.value;
+      this.cityShow = false;
+      api.exam
+        .studentExamInfoList({
+          ...this.city,
+        })
+        .then((res) => {
+          this.examRoomList = res.rows;
+        });
     },
+    getExamCityAndProviceName(e) {
+      this.proviceShow = false;
+      this.provice = e.detail.value;
+      api.exam
+        .studentExamInfoCityProviceId(e.detail.value.provinceId)
+        .then((res) => {
+          this.examCityList = res.data;
+        });
+      console.log(e);
+    },
+  },
+  onLoad(query) {
+    this.query = query;
+    api.exam.studentExamInfoGetProvice().then((res) => {
+      this.examProviceList = res.data;
+    });
+    api.exam
+      .studentExamInfoList({
+        ...this.city,
+      })
+      .then((res) => {
+        this.examRoomList = res.rows;
+      });
   },
 };
 </script>
@@ -135,6 +191,7 @@ export default {
   width: 100%;
   padding: 0rpx 30rpx;
   transform: translateY(-80px);
+
   .list {
     width: 100%;
     background: #edf4ff;

+ 1 - 1
src/pages.json

@@ -216,7 +216,7 @@
           "styles": {}
         },
         {
-          "path": "buyVideo/index",
+          "path": "examRoadVideo/index",
           "styles": {
             "navigationStyle":"custom"
           }

Some files were not shown because too many files changed in this diff