刘洋 7 сар өмнө
parent
commit
00ddbf81e8

+ 2 - 2
src/components/applyItem.vue

@@ -35,14 +35,14 @@
         @click="seeTicket(item)"
         >电子准考证</van-button
       >
-      <!-- <van-button
+      <van-button
         plain
         type="danger"
         size="small"
         v-if="!item.cancel && item.allowCancel"
         @click="cancel(item)"
         >取消预约</van-button
-      > -->
+      >
     </div>
   </div>
 </template>

+ 9 - 2
src/pages/applyResult.vue

@@ -31,12 +31,19 @@
 </template>
 <script name="ApplyResult" setup>
 import { useRoute, useRouter } from "vue-router";
+import { getStuInfo } from "@/api/user";
 import bus from "@/utils/bus";
 const route = useRoute();
 const router = useRouter();
 const continueApply = () => {
-  router.back();
-  bus.emit("continueApply");
+  getStuInfo().then((res) => {
+    if (res?.selfApplyEnable) {
+      router.back();
+      bus.emit("continueApply");
+    } else {
+      router.replace({ name: "Index" });
+    }
+  });
 };
 const seeOrders = () => {
   router.push({ name: "Index", replace: true });

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

@@ -294,7 +294,7 @@ function _getReservationList() {
     date: params.date.value,
   }).then((res) => {
     unApplyNumber.value = res.unApplyNumber;
-    resultList.value = res.periodList || [];
+    resultList.value = (res.periodList || []).filter((item) => !!item.enable);
   });
 }
 

+ 2 - 2
vite.config.js

@@ -26,8 +26,8 @@ export default defineConfig(({ mode }) => {
       cors: true,
       proxy: {
         "/api": {
-          target: "http://192.168.10.41:8080",
-          // target: "http://apply-test.qmth.com.cn",
+          // target: "http://192.168.10.41:8080",
+          target: "http://apply-test.qmth.com.cn",
           changeOrigin: true,
           // rewrite: (path) => path.replace(new RegExp(`^${envConfig.proxy}`), ''),
         },