Merge remote-tracking branch 'origin/master'

master
Yangwl 2 years ago
commit 395494d70a

@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求 // 过滤请求
.authorizeRequests() .authorizeRequests()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问 // 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/**","/login", "/register", "/captchaImage","/system/language/change","/websocket/**").permitAll() .antMatchers("/login", "/register", "/captchaImage","/system/language/change","/websocket/**").permitAll()
// 静态资源,可匿名访问 // 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()

@ -17,6 +17,7 @@
"dependencies": { "dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1", "@amap/amap-jsapi-loader": "^1.0.1",
"@element-plus/icons-vue": "2.0.10", "@element-plus/icons-vue": "2.0.10",
"@vitejs/plugin-basic-ssl": "^1.0.1",
"@vueuse/core": "9.5.0", "@vueuse/core": "9.5.0",
"axios": "0.27.2", "axios": "0.27.2",
"echarts": "^5.4.0", "echarts": "^5.4.0",

@ -26,7 +26,7 @@ console.log(import.meta.env.VITE_APP_BASE_API)
const service = axios.create({ const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分 // axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: import.meta.env.VITE_APP_BASE_API, baseURL: import.meta.env.VITE_APP_BASE_API,
// baseURL: 'http://47.94.93.46/dev-api', // baseURL: 'https://ticptest.tercelo.com/dev-api',
// 超时 // 超时
timeout: 10000 timeout: 10000
}) })

@ -1,6 +1,7 @@
import {defineConfig, loadEnv} from 'vite' import {defineConfig, loadEnv} from 'vite'
import path from 'path' import path from 'path'
import createVitePlugins from './vite/plugins' import createVitePlugins from './vite/plugins'
import basicSsl from '@vitejs/plugin-basic-ssl'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig(({mode, command}) => { export default defineConfig(({mode, command}) => {
@ -11,7 +12,7 @@ export default defineConfig(({mode, command}) => {
// 默认情况下vite 会假设你的应用是被部署在一个域名的根路径上 // 默认情况下vite 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
base: VITE_APP_ENV === 'production' ? '/' : '/', base: VITE_APP_ENV === 'production' ? '/' : '/',
plugins: createVitePlugins(env, command === 'build'), plugins: [createVitePlugins(env, command === 'build'),basicSsl()],
resolve: { resolve: {
// https://cn.vitejs.dev/config/#resolve-alias // https://cn.vitejs.dev/config/#resolve-alias
alias: { alias: {
@ -27,12 +28,14 @@ export default defineConfig(({mode, command}) => {
server: { server: {
port: 80, port: 80,
host: true, host: true,
https:true,
open: true, open: true,
proxy: { proxy: {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api': { '/dev-api': {
target: 'https://ticptest.tercelo.com/dev-api',
// target: 'http://47.94.93.46/dev-api',
// target: 'http://10.11.41.249:8080', // target: 'http://10.11.41.249:8080',
target: 'http://localhost:8080', // target: 'http://localhost:8080',
changeOrigin: true, changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '') rewrite: (p) => p.replace(/^\/dev-api/, '')
} }

Loading…
Cancel
Save