修改api地址以支持二级目录访问

This commit is contained in:
castle 2021-12-06 22:15:05 +08:00
parent 35e0b89ec8
commit 253178ac98
2 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,7 @@ const CompressionPlugin = require('compression-webpack-plugin');
export default defineConfig({
publicPath: './',
base: './',
hash: true,
layout: false,
nodeModulesTransform: {

View File

@ -1,6 +1,9 @@
let pathname = location.pathname.split('/');
pathname.pop();
pathname.push('/api/');
export default {
siteName: '青龙控制面板',
apiPrefix: '/api/',
apiPrefix: pathname.join('/'),
authKey: 'token',
/* Layout configuration, specify which layout to use for route. */