Răsfoiți Sursa

根据后端修改取消预约接口和获取电子准考证接口的入参

刘洋 1 an în urmă
părinte
comite
a9a84aea59
3 a modificat fișierele cu 11 adăugiri și 5 ștergeri
  1. 8 2
      src/components/applyItem.vue
  2. 2 2
      src/pages/admissionCard.vue
  3. 1 1
      src/router/routes.js

+ 8 - 2
src/components/applyItem.vue

@@ -58,14 +58,20 @@ function cancel(item) {
     // title: '标题',
     message: "确定取消该预约吗?",
   }).then(() => {
-    reservationCancel({ applyId: item.applyId }).then(() => {
+    reservationCancel({
+      examSiteId: item.examSiteId,
+      timePeriodId: item.timePeriodId,
+    }).then(() => {
       showSuccessToast("取消成功");
       emit("update");
     });
   });
 }
 function seeTicket(item) {
-  router.push({ name: "AdmissionCard", params: { applyId: item.applyId } });
+  router.push({
+    name: "AdmissionCard",
+    query: { examSiteId: item.examSiteId, timePeriodId: item.timePeriodId },
+  });
 }
 </script>
 <style lang="less" scoped>

+ 2 - 2
src/pages/admissionCard.vue

@@ -97,7 +97,7 @@ import { useAppStore } from "@/store";
 const appStore = useAppStore();
 const route = useRoute();
 const router = useRouter();
-const applyId = route.params.applyId;
+const { examSiteId, timePeriodId } = route.query;
 const info = ref({
   applyId: "",
   applyTaskId: "",
@@ -122,7 +122,7 @@ const info = ref({
 });
 
 function _getAdmissionInfo() {
-  getAdmissionInfo({ applyId }).then((res) => {
+  getAdmissionInfo({ examSiteId, timePeriodId }).then((res) => {
     res && (info.value = res);
   });
 }

+ 1 - 1
src/router/routes.js

@@ -52,7 +52,7 @@ const routes = [
     },
   },
   {
-    path: "/admissionCard/:applyId",
+    path: "/admissionCard",
     name: "AdmissionCard",
     component: () => import("@/pages/admissionCard.vue"),
     meta: { title: "电子准考证" },