ananzhusen 1 жил өмнө
parent
commit
f1edc18cb8

+ 15 - 7
src/services/enterprise.ts

@@ -2,14 +2,22 @@ import { reactive } from 'vue';
 import axios from 'axios';
 import { rootDomain } from './defaults';
 
+const getUrl = (path: string) => {
+  if (import.meta.env.BASE_URL[0] === '/') {
+    return location.protocol + '//' + location.host + '/' + path;
+  }else{
+    return 'https://' + path + rootDomain;
+  }
+}
+
 const enterprise = reactive({
   name: '乐吾乐',
   home: `https://${rootDomain.slice(1)}`,
-  account: location.protocol + '//' + location.host + '/account',
-  v: location.protocol + '//' + location.host + '/v',
-  '3d': location.protocol + '//' + location.host + '/3d',
-  '2d': location.protocol + '//' + location.host + '/2d',
-  admin: location.protocol + '//' + location.host + '/admin',
+  account: getUrl('account'),
+  v: getUrl('v'),
+  '3d': getUrl('3d'),
+  '2d': getUrl('2d'),
+  admin: getUrl('admin'),
   helps: [
     {
       name: '产品介绍',
@@ -30,12 +38,12 @@ const enterprise = reactive({
     },
     {
       name: '企业服务与支持',
-      url: `https://doc${rootDomain}/document/119296274`,
+      url: `https://doc${rootDomain}/document/120608083`,
       divider: true,
     },
     {
       name: '关于我们',
-      url: `https://${rootDomain.slice(1)}/about.html`,
+      url: `https://${rootDomain.slice(1)}/us`,
     },
   ],
 });