Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
IrisVega | 99e4e8b3d8 | |
IrisVega | de67edeb4e | |
IrisVega | 043c0a922a | |
IrisVega | 1d5009c51c | |
IrisVega | bdb34c9bf7 | |
IrisVega | 8e2335bf71 |
|
@ -4,14 +4,14 @@ const bodyParser = require('body-parser');
|
|||
const cors = require('cors');
|
||||
const path = require('path');
|
||||
const app = express();
|
||||
const port = 3000;
|
||||
const port = 4040;
|
||||
|
||||
app.use(bodyParser.json());
|
||||
app.use(cors());
|
||||
|
||||
// 创建 MySQL 连接
|
||||
const db = mysql.createConnection({
|
||||
host: '1.14.200.189',
|
||||
host: '172.17.0.1',
|
||||
user: 'login_test',
|
||||
password: 'tTiwnNbzMeLFxbLj',
|
||||
database: 'login_test'
|
||||
|
@ -67,5 +67,5 @@ app.get('*', (req, res) => {
|
|||
});
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`服务器在 http://localhost:${port} 上运行`);
|
||||
console.log(`服务器在 http://0.0.0.0:${port} 上运行`);
|
||||
});
|
||||
|
|
|
@ -55,7 +55,7 @@ export default {
|
|||
methods: {
|
||||
async login() {
|
||||
try {
|
||||
const response = await fetch('http://localhost:3000/api/login', {
|
||||
const response = await fetch('http://1.14.200.189:4040/api/login', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -74,7 +74,7 @@ export default {
|
|||
},
|
||||
async register() {
|
||||
try {
|
||||
const response = await fetch('http://localhost:3000/api/register', {
|
||||
const response = await fetch('http://1.14.200.189:4040/api/register', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -97,11 +97,11 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
auth-container {
|
||||
.auth-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: calc(100vh-100px);
|
||||
height: calc(100vh);
|
||||
background-color: rgba(255,255,255,0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue