diff --git a/src/utils/axios/interceptors/request.js b/src/utils/axios/interceptors/request.js
new file mode 100644
index 0000000..42b85c1
--- /dev/null
+++ b/src/utils/axios/interceptors/request.js
@@ -0,0 +1,13 @@
+import axios from "axios"
+// 请求拦截器
+axios.interceptors.request.use(
+ config => {
+ // 每次发送请求之前判断是否存在token
+ // 如果存在,则统一在http请求的header都加上token,这样后台根据token判断你的登录情况,此处token一般是用户完成登录后储存到localstorage里的
+ token && (config.headers.Authorization = token)
+ return config
+ },
+ error => {
+ return Promise.error(error)
+ }
+)
\ No newline at end of file
diff --git a/src/utils/axios/interceptors/response.js b/src/utils/axios/interceptors/response.js
new file mode 100644
index 0000000..fc32e48
--- /dev/null
+++ b/src/utils/axios/interceptors/response.js
@@ -0,0 +1,24 @@
+import axios from "axios"
+// 响应拦截器
+axios.interceptors.response.use(response => {
+ // 如果返回的状态码为200,说明接口请求成功,可以正常拿到数据
+ // 否则的话抛出错误
+ if (response.status === 200) {
+ if (response.data.code === 511) {
+ // 未授权调取授权接口
+ } else if (response.data.code === 510) {
+ // 未登录跳转登录页
+ } else {
+ return Promise.resolve(response)
+ }
+ } else {
+ return Promise.reject(response)
+ }
+}, error => {
+ // 我们可以在这里对异常状态作统一处理
+ if (error.response.status) {
+ // 处理请求失败的情况
+ // 对不同返回码对相应处理
+ return Promise.reject(error.response)
+ }
+})
\ No newline at end of file
diff --git a/src/utils/axios/util/api.js b/src/utils/axios/util/api.js
new file mode 100644
index 0000000..9b391a5
--- /dev/null
+++ b/src/utils/axios/util/api.js
@@ -0,0 +1,2 @@
+import { httpGet, httpPost } from './http'
+export const getorglist = (params = {}) => httpGet({ url: 'apps/api/org/list', params })
\ No newline at end of file
diff --git a/src/utils/axios/util/http.js b/src/utils/axios/util/http.js
new file mode 100644
index 0000000..4f21b5c
--- /dev/null
+++ b/src/utils/axios/util/http.js
@@ -0,0 +1,43 @@
+export function httpGet({
+ url,
+ params = {}
+ }) {
+ return new Promise((resolve, reject) => {
+ axios.get(url, {
+ params
+ }).then((res) => {
+ resolve(res.data)
+ }).catch(err => {
+ reject(err)
+ })
+ })
+ }
+
+ // post
+ // post请求
+ export function httpPost({
+ url,
+ data = {},
+ params = {}
+ }) {
+ return new Promise((resolve, reject) => {
+ axios({
+ url,
+ method: 'post',
+ transformRequest: [function (data) {
+ let ret = ''
+ for (let it in data) {
+ ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
+ }
+ return ret
+ }],
+ // 发送的数据
+ data,
+ // url参数
+ params
+
+ }).then(res => {
+ resolve(res.data)
+ })
+ })
+ }
\ No newline at end of file
diff --git a/src/utils/pasretTokenUtil.js b/src/utils/pasretTokenUtil.js
new file mode 100644
index 0000000..e69de29
diff --git a/src/utils/vuex/index.js b/src/utils/vuex/index.js
new file mode 100644
index 0000000..89498ad
--- /dev/null
+++ b/src/utils/vuex/index.js
@@ -0,0 +1,5 @@
+import { createStore } from 'vuex'
+
+export default createStore({
+ modules
+})
\ No newline at end of file
diff --git a/src/utils/vuex/modules/user.js b/src/utils/vuex/modules/user.js
new file mode 100644
index 0000000..241a6ac
--- /dev/null
+++ b/src/utils/vuex/modules/user.js
@@ -0,0 +1,35 @@
+export default {
+ store: {
+ username: '',
+ token: '',
+ image: '',
+ path: ''
+ },
+ mutations: {
+
+ },
+ actions: {
+
+ },
+ getName: {
+ get(state) {
+ return username = store.username
+ }
+ },
+ getToken: {
+ get(state) {
+ return token = store.token
+ }
+ },
+ getPath: {
+ get(state) {
+ return path = store.path
+ }
+
+ },
+ getImage: {
+ get(state) {
+ return image = store.image
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/views/Login2.vue b/src/views/Login2.vue
new file mode 100644
index 0000000..f3583a4
--- /dev/null
+++ b/src/views/Login2.vue
@@ -0,0 +1,13 @@
+
+
+ login2
+
+
+
+
\ No newline at end of file