修改前端 api 路径
This commit is contained in:
		
							parent
							
								
									dbbfb700e4
								
							
						
					
					
						commit
						304f2fbd0c
					
				| @ -11,7 +11,7 @@ export default { | |||||||
|     add(context, data) { |     add(context, data) { | ||||||
|       // 新建 bot
 |       // 新建 bot
 | ||||||
|       $.ajax({ |       $.ajax({ | ||||||
|         url: "http://localhost:3000/user/bot/add/", |         url: "http://localhost:3001/api/user/bot/add/", | ||||||
|         type: "POST", |         type: "POST", | ||||||
|         data: { |         data: { | ||||||
|           title: data.title, |           title: data.title, | ||||||
| @ -33,7 +33,7 @@ export default { | |||||||
|     remove(context, data) { |     remove(context, data) { | ||||||
|       // 移除 bot
 |       // 移除 bot
 | ||||||
|       $.ajax({ |       $.ajax({ | ||||||
|         url: "http://localhost:3000/user/bot/remove/", |         url: "http://localhost:3001/api/user/bot/remove/", | ||||||
|         type: "POST", |         type: "POST", | ||||||
|         data: { |         data: { | ||||||
|           bot_id: data.bot_id, |           bot_id: data.bot_id, | ||||||
| @ -57,7 +57,7 @@ export default { | |||||||
|     update(context, data) { |     update(context, data) { | ||||||
|       // 更新 bot
 |       // 更新 bot
 | ||||||
|       $.ajax({ |       $.ajax({ | ||||||
|         url: "http://localhost:3000/user/bot/update/", |         url: "http://localhost:3001/api/user/bot/update/", | ||||||
|         type: "POST", |         type: "POST", | ||||||
|         data: { |         data: { | ||||||
|           bot_id: data.bot_id, |           bot_id: data.bot_id, | ||||||
| @ -80,7 +80,7 @@ export default { | |||||||
|     getList(context, data) { |     getList(context, data) { | ||||||
|       // 获取 Bot 列表
 |       // 获取 Bot 列表
 | ||||||
|       $.ajax({ |       $.ajax({ | ||||||
|         url: "http://localhost:3000/user/bot/getlist/", |         url: "http://localhost:3001/api/user/bot/getlist/", | ||||||
|         type: "GET", |         type: "GET", | ||||||
|         headers: { |         headers: { | ||||||
|           Authorization: "Bearer " + store.state.user.token, |           Authorization: "Bearer " + store.state.user.token, | ||||||
|  | |||||||
| @ -25,7 +25,7 @@ export default { | |||||||
|     getRecordList(context, data) { |     getRecordList(context, data) { | ||||||
|       // 获取 Bot 列表
 |       // 获取 Bot 列表
 | ||||||
|       $.ajax({ |       $.ajax({ | ||||||
|         url: "http://localhost:3000/record/getlist/", |         url: "http://localhost:3001/api/record/getlist/", | ||||||
|         data: { |         data: { | ||||||
|           page_index: data.page, |           page_index: data.page, | ||||||
|         }, |         }, | ||||||
|  | |||||||
| @ -41,7 +41,7 @@ export default { | |||||||
|     // 登录函数
 |     // 登录函数
 | ||||||
|     login(context, data) { |     login(context, data) { | ||||||
|       $.ajax({ |       $.ajax({ | ||||||
|         url: "http://localhost:3000/user/account/token/", |         url: "http://localhost:3001/api/user/account/token/", | ||||||
|         type: "POST", |         type: "POST", | ||||||
|         data: { |         data: { | ||||||
|           username: data.username, |           username: data.username, | ||||||
| @ -71,7 +71,7 @@ export default { | |||||||
|     // 注册函数
 |     // 注册函数
 | ||||||
|     register(context, data) { |     register(context, data) { | ||||||
|       $.ajax({ |       $.ajax({ | ||||||
|         url: "http://localhost:3000/user/account/register/", |         url: "http://localhost:3001/api/user/account/register/", | ||||||
|         type: "POST", |         type: "POST", | ||||||
|         data: { |         data: { | ||||||
|           username: data.username, |           username: data.username, | ||||||
| @ -94,7 +94,7 @@ export default { | |||||||
|     // 获取登录成功后的用户信息
 |     // 获取登录成功后的用户信息
 | ||||||
|     getinfo(context, data) { |     getinfo(context, data) { | ||||||
|       $.ajax({ |       $.ajax({ | ||||||
|         url: "http://localhost:3000/user/account/info/", |         url: "http://localhost:3001/api/user/account/info/", | ||||||
|         type: "GET", |         type: "GET", | ||||||
|         headers: { |         headers: { | ||||||
|           Authorization: "Bearer " + context.state.token, |           Authorization: "Bearer " + context.state.token, | ||||||
|  | |||||||
| @ -29,7 +29,7 @@ export default { | |||||||
|   setup() { |   setup() { | ||||||
|     const store = useStore(); |     const store = useStore(); | ||||||
|     // 定义后端连接的 url, 使用 ws 协议 |     // 定义后端连接的 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; |     let socket = null; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -91,7 +91,7 @@ export default { | |||||||
|     const pull_ranklist_page = (page) => { |     const pull_ranklist_page = (page) => { | ||||||
|       current_page = page; |       current_page = page; | ||||||
|       $.ajax({ |       $.ajax({ | ||||||
|         url: "http://127.0.0.1:3000/ranklist/getranklist/", |         url: "http://localhost:3001/api/ranklist/getranklist/", | ||||||
|         data: { |         data: { | ||||||
|           page_index:page, |           page_index:page, | ||||||
|         }, |         }, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user