Bladeren bron

fix: 修改跳转问题

jiaxing.liao 2 weken geleden
bovenliggende
commit
76daf5fba4

+ 5 - 1
apps/web-velofex/src/views/dashboard/application-management/index.vue

@@ -220,7 +220,11 @@ async function deleteApplication(item: any) {
 }
 
 function handleClick(item: UserApi.ApplicationModel) {
-  window.open(`/#/jumpToEnterprise?enterpriseCode=${item.code}`, '_blank');
+  const baseUrl = location.origin + location.pathname;
+  window.open(
+    `${baseUrl}#/jumpToEnterprise?enterpriseCode=${item.code}&webSite=${item.webSite}`,
+    '_blank',
+  );
 }
 
 watch(

+ 5 - 1
apps/web-velofex/src/views/dashboard/home/application-management.vue

@@ -70,7 +70,11 @@ function handleMore() {
 }
 
 function handleClick(item: UserApi.ApplicationModel) {
-  window.open(`/#/jumpToEnterprise?enterpriseCode=${item.code}`, '_blank');
+  const baseUrl = location.origin + location.pathname;
+  window.open(
+    `${baseUrl}#/jumpToEnterprise?enterpriseCode=${item.code}&webSite=${item.webSite}`,
+    '_blank',
+  );
 }
 
 watch(

+ 5 - 1
apps/web-velofex/src/views/dashboard/home/product-list.vue

@@ -65,7 +65,11 @@ function handleMore() {
 }
 
 function handleClick(item: UserApi.ApplicationModel) {
-  window.open(`/#/jumpToEnterprise?enterpriseCode=${item.code}`, '_blank');
+  const baseUrl = location.origin + location.pathname;
+  window.open(
+    `${baseUrl}#/jumpToEnterprise?enterpriseCode=${item.code}&webSite=${item.webSite}`,
+    '_blank',
+  );
 }
 
 watch(

+ 2 - 1
apps/web-velofex/src/views/jump-to-enterprise/index.vue

@@ -8,7 +8,8 @@ window.BACKEND_VERSION = 'V2';
 
 const url = computed(() => {
   const token = localStorage.getItem('token_a');
-  return `/api/enterpriselogin/doLoginByToken?enterpriseCode=${route.query?.enterpriseCode || ''}&token=${token || ''}`;
+  const { enterpriseCode, webSite } = route.query;
+  return `${webSite}/api/enterpriselogin/doLoginByToken?enterpriseCode=${enterpriseCode || ''}&token=${token || ''}`;
 });
 </script>