跨域手动配置
This commit is contained in:
parent
259a72fbc5
commit
8e31cc3696
|
@ -4,5 +4,6 @@
|
|||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$/my-project-frontend" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="index" level="application" />
|
||||
</component>
|
||||
</module>
|
|
@ -4,6 +4,7 @@
|
|||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="//unpkg.com/element-plus/dist/index.css" />
|
||||
<title>Vite App</title>
|
||||
<style>
|
||||
body {
|
||||
|
|
|
@ -5,6 +5,8 @@ import App from './App.vue'
|
|||
import router from "@/router";
|
||||
import axios from "axios";
|
||||
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css'
|
||||
|
||||
axios.defaults.baseURL = 'http://localhost:8080'
|
||||
|
||||
const app = createApp(App)
|
||||
|
|
|
@ -66,7 +66,7 @@ function login(username , password , remember , success , failure = defaultFailu
|
|||
}, {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},(data)=> {
|
||||
storeAccessToken(remember, data.token , data.expire)
|
||||
storeAccessToken(data.token , remember , data.expire)
|
||||
ElMessage.success(`登录成功,欢迎 ${data.username} 来到我们的系统`)
|
||||
success(data)
|
||||
|
||||
|
|
Loading…
Reference in New Issue