Procházet zdrojové kódy

修改了弹窗组件的方法

zhangyujun před 3 roky
rodič
revize
4fb8f9cc1c
1 změnil soubory, kde provedl 17 přidání a 12 odebrání
  1. 17 12
      src/components/mask/submitMask.vue

+ 17 - 12
src/components/mask/submitMask.vue

@@ -18,7 +18,12 @@
           <button
             @click="
               () => {
-                backView();
+                router.push({
+                  name: 'examBegin',
+                  query: {
+                    ...router.currentRoute.value.query,
+                  },
+                });
               }
             "
           >
@@ -35,7 +40,7 @@
 import { defineProps, reactive, toRefs, ref } from 'vue';
 import router from '@/router/';
 import Phone from '@/utils/phone';
-export default { 
+export default {
   setup(props, { emit }) {
     const state = reactive({
       count: 0,
@@ -47,13 +52,13 @@ export default {
       time.value = time.value - 1;
       if (time.value === 0) {
         window.clearInterval(timer);
-        backView()
-        // router.push({
-        //   name: 'examBegin',
-        //   query: {
-        //     ...router.currentRoute.value.query,
-        //   },
-        // });
+        // backView()
+        router.push({
+          name: 'examBegin',
+          query: {
+            ...router.currentRoute.value.query,
+          },
+        });
       }
     }, 1000);
     const sendPaper = () => {
@@ -89,7 +94,7 @@ export default {
 
 <style lang="scss" scoped>
 button {
-   border-radius: 0;
+  border-radius: 0;
   border: none;
 }
 .mask {
@@ -111,7 +116,7 @@ button {
       width: 100%;
       line-height: 40px;
       height: 40px;
-      background: #498ef5;
+      background: #306ace;
       color: #fff;
       font-size: 12px;
     }
@@ -141,7 +146,7 @@ button {
       }
     }
     .bottom {
-      background: #498ef5;
+      background: #306ace;
       width: 100%;
       height: 70px;
       display: flex;