diff --git a/web/src/store/bot.js b/web/src/store/bot.js index 70a3d43..3f6cb30 100644 --- a/web/src/store/bot.js +++ b/web/src/store/bot.js @@ -11,7 +11,7 @@ export default { add(context, data) { // 新建 bot $.ajax({ - url: "http://localhost:3000/user/bot/add/", + url: "http://localhost:3001/api/user/bot/add/", type: "POST", data: { title: data.title, @@ -33,7 +33,7 @@ export default { remove(context, data) { // 移除 bot $.ajax({ - url: "http://localhost:3000/user/bot/remove/", + url: "http://localhost:3001/api/user/bot/remove/", type: "POST", data: { bot_id: data.bot_id, @@ -57,7 +57,7 @@ export default { update(context, data) { // 更新 bot $.ajax({ - url: "http://localhost:3000/user/bot/update/", + url: "http://localhost:3001/api/user/bot/update/", type: "POST", data: { bot_id: data.bot_id, @@ -80,7 +80,7 @@ export default { getList(context, data) { // 获取 Bot 列表 $.ajax({ - url: "http://localhost:3000/user/bot/getlist/", + url: "http://localhost:3001/api/user/bot/getlist/", type: "GET", headers: { Authorization: "Bearer " + store.state.user.token, diff --git a/web/src/store/record.js b/web/src/store/record.js index fac3830..baff986 100644 --- a/web/src/store/record.js +++ b/web/src/store/record.js @@ -25,7 +25,7 @@ export default { getRecordList(context, data) { // 获取 Bot 列表 $.ajax({ - url: "http://localhost:3000/record/getlist/", + url: "http://localhost:3001/api/record/getlist/", data: { page_index: data.page, }, diff --git a/web/src/store/user.js b/web/src/store/user.js index a50eb6f..ea3afd0 100644 --- a/web/src/store/user.js +++ b/web/src/store/user.js @@ -41,7 +41,7 @@ export default { // 登录函数 login(context, data) { $.ajax({ - url: "http://localhost:3000/user/account/token/", + url: "http://localhost:3001/api/user/account/token/", type: "POST", data: { username: data.username, @@ -71,7 +71,7 @@ export default { // 注册函数 register(context, data) { $.ajax({ - url: "http://localhost:3000/user/account/register/", + url: "http://localhost:3001/api/user/account/register/", type: "POST", data: { username: data.username, @@ -94,7 +94,7 @@ export default { // 获取登录成功后的用户信息 getinfo(context, data) { $.ajax({ - url: "http://localhost:3000/user/account/info/", + url: "http://localhost:3001/api/user/account/info/", type: "GET", headers: { Authorization: "Bearer " + context.state.token, diff --git a/web/src/views/pk/PkIndexView.vue b/web/src/views/pk/PkIndexView.vue index f9e4077..15f72ca 100644 --- a/web/src/views/pk/PkIndexView.vue +++ b/web/src/views/pk/PkIndexView.vue @@ -29,7 +29,7 @@ export default { setup() { const store = useStore(); // 定义后端连接的 url, 使用 ws 协议 - const socketUrl = `ws://127.0.0.1:3000/websocket/${store.state.user.token}/`; + const socketUrl = `ws://127.0.0.1:3001/websocket/${store.state.user.token}/`; let socket = null; diff --git a/web/src/views/ranklist/RanklistIndexView.vue b/web/src/views/ranklist/RanklistIndexView.vue index b3ad365..9d1dd89 100644 --- a/web/src/views/ranklist/RanklistIndexView.vue +++ b/web/src/views/ranklist/RanklistIndexView.vue @@ -91,7 +91,7 @@ export default { const pull_ranklist_page = (page) => { current_page = page; $.ajax({ - url: "http://127.0.0.1:3000/ranklist/getranklist/", + url: "http://localhost:3001/api/ranklist/getranklist/", data: { page_index:page, },