保存进度!
This commit is contained in:
		@@ -2,28 +2,24 @@
 | 
				
			|||||||
 * @Author: Kane
 | 
					 * @Author: Kane
 | 
				
			||||||
 * @Date: 2022-12-14 15:12:46
 | 
					 * @Date: 2022-12-14 15:12:46
 | 
				
			||||||
 * @LastEditors: Kane
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 * @LastEditTime: 2022-12-17 12:20:31
 | 
					 * @LastEditTime: 2022-12-22 21:13:59
 | 
				
			||||||
 * @FilePath: \admin_system\src\main.js
 | 
					 * @FilePath: \admin_system\src\main.js
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
 * 
 | 
					 * 
 | 
				
			||||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
import { createApp } from 'vue'
 | 
					import { createApp } from 'vue';
 | 
				
			||||||
import App from './App.vue'
 | 
					import App from './App.vue';
 | 
				
			||||||
import router from './router'
 | 
					import router from './router';
 | 
				
			||||||
import store from './store'
 | 
					import store from './store';
 | 
				
			||||||
// import installElementPlus from './plugins/element'
 | 
					
 | 
				
			||||||
import("./css/root.css");
 | 
					import("./css/root.css");
 | 
				
			||||||
import("./css/normalize.css");
 | 
					import("./css/normalize.css");
 | 
				
			||||||
import("element-plus/dist/index.css");
 | 
					import("element-plus/dist/index.css");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import ElementPlus from "element-plus";
 | 
					import ElementPlus from "element-plus";
 | 
				
			||||||
import axios from "axios";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
const app = createApp(App)
 | 
					const app = createApp(App);
 | 
				
			||||||
 | 
					 | 
				
			||||||
//注入axios
 | 
					 | 
				
			||||||
app.config.globalProperties.$axios = axios;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
app.use(ElementPlus);
 | 
					app.use(ElementPlus);
 | 
				
			||||||
app.use(store).use(router).mount('#app')
 | 
					app.use(store).use(router).mount('#app');
 | 
				
			||||||
							
								
								
									
										29
									
								
								企业级管理系统/web/admin_system/src/utils/api/common.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								企业级管理系统/web/admin_system/src/utils/api/common.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2022-12-22 17:16:53
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @LastEditTime: 2022-12-22 20:48:03
 | 
				
			||||||
 | 
					 * @FilePath: \admin_system\src\utils\api\common.js
 | 
				
			||||||
 | 
					 * @Description: 通用请求
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					//import axios from "axios";
 | 
				
			||||||
 | 
					import instance from "@utils/request";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const URL_GET_VALIDATE_CODE = "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * 获取验证码
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					export function GetValidate(data)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return instance.request(
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            method: "post",
 | 
				
			||||||
 | 
					            url: URL_GET_VALIDATE_CODE,
 | 
				
			||||||
 | 
					            data,
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -2,9 +2,23 @@
 | 
				
			|||||||
 * @Author: Kane
 | 
					 * @Author: Kane
 | 
				
			||||||
 * @Date: 2022-12-22 09:10:20
 | 
					 * @Date: 2022-12-22 09:10:20
 | 
				
			||||||
 * @LastEditors: Kane
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 * @LastEditTime: 2022-12-22 09:10:21
 | 
					 * @LastEditTime: 2022-12-22 20:54:10
 | 
				
			||||||
 * @FilePath: \admin_system\src\utils\api\info\account.js
 | 
					 * @FilePath: \admin_system\src\utils\api\info\account.js
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					import instance from "@/utils/api/request";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const URL_LOGIN = "http://localhost:8000/admin-sys/";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function Login(userInfo)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return instance.request(
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            method: "post",
 | 
				
			||||||
 | 
					            url: URL_LOGIN,
 | 
				
			||||||
 | 
					            userInfo,
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										43
									
								
								企业级管理系统/web/admin_system/src/utils/api/request.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								企业级管理系统/web/admin_system/src/utils/api/request.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2022-12-22 17:18:10
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @LastEditTime: 2022-12-22 20:47:10
 | 
				
			||||||
 | 
					 * @FilePath: \admin_system\src\utils\api\request.js
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					import axios from "axios";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const service = axios.create(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        baseURL: "",
 | 
				
			||||||
 | 
					        timeout: 5000,
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//加上请求拦截器
 | 
				
			||||||
 | 
					service.interceptors.request.use(
 | 
				
			||||||
 | 
					    function (config)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return config;
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    function (error)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return Promise.reject(error);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					service.interceptors.response.use(
 | 
				
			||||||
 | 
					    function (response)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return response;
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    function (error)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return Promise.reject(error);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default service;
 | 
				
			||||||
		Reference in New Issue
	
	Block a user