feat: 组件切换动画过渡效果,查询ip转移到后端实现

This commit is contained in:
taoran
2023-12-01 16:38:09 +08:00
parent fc8377adde
commit 6720ef722b
15 changed files with 86 additions and 89 deletions
+3 -11
View File
@@ -9,6 +9,9 @@ import { createHtmlPlugin } from 'vite-plugin-html'
export default defineConfig(({command, mode}) => {
let env = loadEnv(mode, process.cwd())
return {
define: {
'process.env.NODE_ENV': JSON.stringify('production')
},
plugins: [
vue(),
createSvgIconsPlugin({
@@ -37,17 +40,6 @@ export default defineConfig(({command, mode}) => {
},
server: {
proxy: {
'/v1/ip': {
target: 'https://searchplugin.csdn.net', //ip查询
changeOrigin: true,
rewrite: (path) => path.replace(/^\/v1\/ip/, '/api/v1/ip'),
// bypass(req, res, options) {
// console.log(1111)
// const proxyUrl = new URL(options.rewrite(req.url) || '', (options.target) as string)?.href || ''
// req.headers['x-req-proxyUrl'] = proxyUrl;
// res.setHeader("x-res-proxyUrl", proxyUrl)
// }
},
[env.VITE_APP_BASE_API] : {
target: env.VITE_SERVE,
changeOrigin: true,