Commit aba9141e03f18d8f2dc786650e11af4f247bc9b9

Authored by loveumiko
1 parent e34e9934

fix: 修复客户账号点击用户详情返回后返回404

@@ -8,9 +8,8 @@ @@ -8,9 +8,8 @@
8 8
9 <script> 9 <script>
10 import { defineComponent } from 'vue'; 10 import { defineComponent } from 'vue';
11 - import { useRoute } from 'vue-router'; 11 + import { useRoute, useRouter } from 'vue-router';
12 import { PageWrapper } from '/@/components/Page'; 12 import { PageWrapper } from '/@/components/Page';
13 - import { useGo } from '/@/hooks/web/usePage';  
14 import { Description } from '../../../components/Description'; 13 import { Description } from '../../../components/Description';
15 import { getAccountInfo } from '../../../api/system/system'; 14 import { getAccountInfo } from '../../../api/system/system';
16 import { accountSchema } from './account.detail.data'; 15 import { accountSchema } from './account.detail.data';
@@ -22,7 +21,8 @@ @@ -22,7 +21,8 @@
22 components: { PageWrapper, Description }, 21 components: { PageWrapper, Description },
23 setup() { 22 setup() {
24 const route = useRoute(); 23 const route = useRoute();
25 - const go = useGo(); 24 +
  25 + const ROUTER = useRouter();
26 const { setTitle, close } = useTabs(); 26 const { setTitle, close } = useTabs();
27 const [register, { setDescProps }] = useDescription({ 27 const [register, { setDescProps }] = useDescription({
28 title: '账号基础信息', 28 title: '账号基础信息',
@@ -52,7 +52,8 @@ @@ -52,7 +52,8 @@
52 function goBack() { 52 function goBack() {
53 // 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页 53 // 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页
54 close(); 54 close();
55 - go('/system/account'); 55 + ROUTER.go(-1);
  56 + // go('/system/account');
56 } 57 }
57 return { goBack, accountSchema, accountData, register }; 58 return { goBack, accountSchema, accountData, register };
58 }, 59 },