Ver Fonte

修改跳转问题

lex há 2 anos atrás
pai
commit
bb23b20f84
1 ficheiros alterados com 6 adições e 3 exclusões
  1. 6 3
      src/school/orchestra/modal/add-information.tsx

+ 6 - 3
src/school/orchestra/modal/add-information.tsx

@@ -3,10 +3,11 @@ import OSticky from '@/components/o-sticky'
 import OUpload from '@/components/o-upload'
 import request from '@/helpers/request'
 import { verifyUrl } from '@/helpers/toolsValidate'
+import router from '@/router'
 import { state } from '@/state'
 import { Button, Field, Form, showNotify, showToast } from 'vant'
 import { defineComponent, onMounted, reactive, ref, watch } from 'vue'
-import { useRoute } from 'vue-router'
+import { useRoute, useRouter } from 'vue-router'
 import styles from './add-information.module.less'
 
 export default defineComponent({
@@ -24,6 +25,7 @@ export default defineComponent({
   emits: ['close', 'getList'],
   setup(props, { emit }) {
     const route = useRoute()
+    const router = useRouter()
     const header = ref('添加资讯')
     const forms = reactive({
       type: 'HOT_CONSULTATION',
@@ -69,8 +71,9 @@ export default defineComponent({
           // showNotify({ type: 'primary', message: '修改成功' })
         }
 
-        emit('close')
-        emit('getList')
+        // emit('close')
+        // emit('getList')
+        router.back()
       } catch {
         //
       }