69b41bfa by lxs

通过config.js配置appKey

1 parent 0c2748ea
......@@ -3,8 +3,7 @@ VITE_APP_TITLE = 数据资产管理系统
# 接口域名
# VITE_API_BASEURL = https://www.zgsjzc.com/api
# VITE_API_BASEURL = https://swzl-test.csbr.cn/api
# VITE_API_BASEURL = http://localhost:9000
VITE_API_BASEURL = https://daop-zcgl-test.zgsjzc.com/
VITE_API_BASEURL = http://192.168.6.20:28052/
VITE_IDASS_BASEURL = https://daop-test.zgsjzc.com/portalLogin
......
......@@ -12,7 +12,7 @@
<meta http-equiv="Cache" content="no-cache">
<meta name="Keywords" content="数据资产服务平台-服务于央国企、上市公司、拟上市公司的数据要素登记流通服务">
<meta name="description" content="数据资产服务平台,服务于央国企、上市公司、拟上市公司的数据要素登记流通服务。数据资产服务平台提供最专业、权威的数据要素资产登记服务、入表服务、交易流通服务、金融服务和治理及挖掘服务,旨在激活央国企、上市公司、拟上市公司的数据流通体系,释放数据要素新质生产力。">
<script src="./public/config.js"></script>
<script src="/config.js"></script>
<title>%VITE_APP_TITLE%</title>
</head>
<body class="over-hidden">
......
......@@ -31,11 +31,11 @@ const useUserStore = defineStore(
const timer: any = ref(null);
//获取token.
async function getToken(data, state) {
// const config = system.appConfig;
const config = system.appConfig;
data.platformGuid = "7f16f697aec111ef8656fa163e60becd";
data.userType = 2;
data.appKey = '672c2c38e4b0cac8732a6106';
// data.appKey = config.appKey;
// data.appKey = '672c2c38e4b0cac8732a6106';
data.appKey = config.appKey;
data.validateUri = location.origin == 'http://localhost:9000' ? 'http://localhost:9000/' : location.origin + '/';
return getTokenPromise.value = getTokenByCode(data).then((res: any) => {
getTokenPromise.value = null;
......
......@@ -57,11 +57,13 @@ export default ({ mode, command }) => {
}
},
},
publicDir: 'public',
// 构建选项 https://cn.vitejs.dev/config/#server-fsserve-root
build: {
outDir: mode === 'product' ? 'dist' : `dist-${mode}`,
sourcemap: env.VITE_BUILD_SOURCEMAP === 'true',
assetsInlineLimit: 0 // 确保config.js不会被内联
assetsInlineLimit: 0, // 确保config.js不会被内联
copyPublicDir: true, // 确保 public 目录下的文件被复制到输出目录的根目录
},
define: {
__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!