69b41bfa by lxs

通过config.js配置appKey

1 parent 0c2748ea
...@@ -3,8 +3,7 @@ VITE_APP_TITLE = 数据资产管理系统 ...@@ -3,8 +3,7 @@ VITE_APP_TITLE = 数据资产管理系统
3 # 接口域名 3 # 接口域名
4 # VITE_API_BASEURL = https://www.zgsjzc.com/api 4 # VITE_API_BASEURL = https://www.zgsjzc.com/api
5 # VITE_API_BASEURL = https://swzl-test.csbr.cn/api 5 # VITE_API_BASEURL = https://swzl-test.csbr.cn/api
6 # VITE_API_BASEURL = http://localhost:9000 6 VITE_API_BASEURL = http://192.168.6.20:28052/
7 VITE_API_BASEURL = https://daop-zcgl-test.zgsjzc.com/
8 7
9 VITE_IDASS_BASEURL = https://daop-test.zgsjzc.com/portalLogin 8 VITE_IDASS_BASEURL = https://daop-test.zgsjzc.com/portalLogin
10 9
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
12 <meta http-equiv="Cache" content="no-cache"> 12 <meta http-equiv="Cache" content="no-cache">
13 <meta name="Keywords" content="数据资产服务平台-服务于央国企、上市公司、拟上市公司的数据要素登记流通服务"> 13 <meta name="Keywords" content="数据资产服务平台-服务于央国企、上市公司、拟上市公司的数据要素登记流通服务">
14 <meta name="description" content="数据资产服务平台,服务于央国企、上市公司、拟上市公司的数据要素登记流通服务。数据资产服务平台提供最专业、权威的数据要素资产登记服务、入表服务、交易流通服务、金融服务和治理及挖掘服务,旨在激活央国企、上市公司、拟上市公司的数据流通体系,释放数据要素新质生产力。"> 14 <meta name="description" content="数据资产服务平台,服务于央国企、上市公司、拟上市公司的数据要素登记流通服务。数据资产服务平台提供最专业、权威的数据要素资产登记服务、入表服务、交易流通服务、金融服务和治理及挖掘服务,旨在激活央国企、上市公司、拟上市公司的数据流通体系,释放数据要素新质生产力。">
15 <script src="./public/config.js"></script> 15 <script src="/config.js"></script>
16 <title>%VITE_APP_TITLE%</title> 16 <title>%VITE_APP_TITLE%</title>
17 </head> 17 </head>
18 <body class="over-hidden"> 18 <body class="over-hidden">
......
...@@ -31,11 +31,11 @@ const useUserStore = defineStore( ...@@ -31,11 +31,11 @@ const useUserStore = defineStore(
31 const timer: any = ref(null); 31 const timer: any = ref(null);
32 //获取token. 32 //获取token.
33 async function getToken(data, state) { 33 async function getToken(data, state) {
34 // const config = system.appConfig; 34 const config = system.appConfig;
35 data.platformGuid = "7f16f697aec111ef8656fa163e60becd"; 35 data.platformGuid = "7f16f697aec111ef8656fa163e60becd";
36 data.userType = 2; 36 data.userType = 2;
37 data.appKey = '672c2c38e4b0cac8732a6106'; 37 // data.appKey = '672c2c38e4b0cac8732a6106';
38 // data.appKey = config.appKey; 38 data.appKey = config.appKey;
39 data.validateUri = location.origin == 'http://localhost:9000' ? 'http://localhost:9000/' : location.origin + '/'; 39 data.validateUri = location.origin == 'http://localhost:9000' ? 'http://localhost:9000/' : location.origin + '/';
40 return getTokenPromise.value = getTokenByCode(data).then((res: any) => { 40 return getTokenPromise.value = getTokenByCode(data).then((res: any) => {
41 getTokenPromise.value = null; 41 getTokenPromise.value = null;
......
...@@ -57,11 +57,13 @@ export default ({ mode, command }) => { ...@@ -57,11 +57,13 @@ export default ({ mode, command }) => {
57 } 57 }
58 }, 58 },
59 }, 59 },
60 publicDir: 'public',
60 // 构建选项 https://cn.vitejs.dev/config/#server-fsserve-root 61 // 构建选项 https://cn.vitejs.dev/config/#server-fsserve-root
61 build: { 62 build: {
62 outDir: mode === 'product' ? 'dist' : `dist-${mode}`, 63 outDir: mode === 'product' ? 'dist' : `dist-${mode}`,
63 sourcemap: env.VITE_BUILD_SOURCEMAP === 'true', 64 sourcemap: env.VITE_BUILD_SOURCEMAP === 'true',
64 assetsInlineLimit: 0 // 确保config.js不会被内联 65 assetsInlineLimit: 0, // 确保config.js不会被内联
66 copyPublicDir: true, // 确保 public 目录下的文件被复制到输出目录的根目录
65 }, 67 },
66 define: { 68 define: {
67 __SYSTEM_INFO__: JSON.stringify({ 69 __SYSTEM_INFO__: JSON.stringify({
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!