刘洋 il y a 1 an
Parent
commit
30f9244201

+ 4 - 2
src/assets/styles/main.css

@@ -35,8 +35,10 @@
 .page .sub-page,
 .tab-page .sub-page {
   padding-bottom: env(safe-area-inset-bottom) !important;
-  position: absolute;
-  z-index: 1;
+  position: fixed;
+  left: 0;
+  top: 0;
+  z-index: 100;
   width: 100vw;
   height: 100vh;
   background-color: #f0f0f0;

+ 4 - 2
src/assets/styles/main.less

@@ -38,8 +38,10 @@
   justify-content: flex-start;
   .sub-page {
     padding-bottom: env(safe-area-inset-bottom) !important;
-    position: absolute;
-    z-index: 1;
+    position: fixed;
+    left: 0;
+    top: 0;
+    z-index: 100;
     width: 100vw;
     height: 100vh;
     background-color: #f0f0f0;

+ 3 - 1
src/pages/applyResult.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="apply-result vh-100 flex-h-center">
+  <div class="apply-result sub-page flex-h-center">
     <div>
       <NoData>
         <template #img>
@@ -29,10 +29,12 @@
 </template>
 <script name="ApplyResult" setup>
 import { useRoute, useRouter } from "vue-router";
+import bus from "@/utils/bus";
 const route = useRoute();
 const router = useRouter();
 const continueApply = () => {
   router.back();
+  bus.emit("continueApply");
 };
 const seeOrders = () => {
   router.push({ name: "MyHistory" });

+ 3 - 3
src/pages/tab-pages/reservation.vue

@@ -133,11 +133,11 @@
       </div>
     </div>
 
-    <!-- <router-view v-slot="{ Component }">
+    <router-view v-slot="{ Component }">
       <transition name="zoom-fade" mode="out-in" appear>
         <component :is="Component" />
       </transition>
-    </router-view> -->
+    </router-view>
   </div>
 </template>
 <script name="Reservation" setup>
@@ -274,7 +274,6 @@ function reservationHandle(item) {
       timePeriodId: item.timePeriodId,
     })
       .then(() => {
-        // showSuccessToast("预约成功");
         router.push({ name: "ApplyResult", query: { status: "success" } });
       })
       .catch(() => {
@@ -295,6 +294,7 @@ function siteConfirm(obj) {
   params.examSiteId = { text: obj.examSiteName, value: obj.examSiteId };
   showSites.value = false;
 }
+bus.on("continueApply", _getReservationList);
 </script>
 <style lang="less" scoped>
 .reservation {

+ 9 - 6
src/router/routes.js

@@ -18,6 +18,14 @@ const routes = [
         name: "Reservation",
         component: () => import("@/pages/tab-pages/reservation.vue"),
         meta: { title: "预约考试" },
+        children: [
+          {
+            path: "applyResult",
+            name: "ApplyResult",
+            component: () => import("@/pages/applyResult.vue"),
+            meta: { title: "预约结果" },
+          },
+        ],
       },
       {
         path: "/mine",
@@ -55,12 +63,7 @@ const routes = [
     component: () => import("@/pages/myHistory.vue"),
     meta: { title: "预约订单" },
   },
-  {
-    path: "/applyResult",
-    name: "ApplyResult",
-    component: () => import("@/pages/applyResult.vue"),
-    meta: { title: "预约结果" },
-  },
+
   {
     path: "/404",
     name: "NotFound",