瀏覽代碼

removetoken

zhuangyunsheng 1 年之前
父節點
當前提交
c067edcc55
共有 2 個文件被更改,包括 57 次插入53 次删除
  1. 2 2
      .env.development
  2. 55 51
      src/api/model/auth.js

+ 2 - 2
.env.development

@@ -6,10 +6,10 @@ VUE_APP_TITLE = 城发集团招采管理平台
 
 # 接口地址
 # VUE_APP_API_BASEURL = http://www.qdeasydo.com
-VUE_APP_API_BASEURL = http://192.168.101.93:8810
+# VUE_APP_API_BASEURL = http://192.168.101.93:8810
 
 # VUE_APP_API_BASEURL = http://172.16.1.150:8810
-# VUE_APP_API_BASEURL = http://172.16.1.132:8810
+VUE_APP_API_BASEURL = http://172.16.1.132:8810
 
 # 本地端口
 VUE_APP_PORT = 7800

+ 55 - 51
src/api/model/auth.js

@@ -3,63 +3,67 @@ import http from "@/utils/request"
 import tool from '@/utils/tool'
 
 export default {
-	token: {
-		url: `${config.API_URL}/zcxt/auth/login`,
-		name: "登录获取TOKEN",
-		post: async function (data = {}) {
-			const query = {
-				username: data.user,
-				password: tool.crypto.encrypt(data.password),
-				code: data.code,
-				uuid: data.uuid
-			}
-			return await http.post(this.url, query);
-		}
-	},
+    token: {
+        url: `${config.API_URL}/zcxt/auth/login`,
+        name: "登录获取TOKEN",
+        post: async function (data = {}) {
+            const query = {
+                username: data.user,
+                password: tool.crypto.encrypt(data.password),
+                code: data.code,
+                uuid: data.uuid
+            }
+            return await http.post(this.url, query);
+        }
+    },
 
-	codeImg: {
-		url: `${config.API_URL}/zcxt/auth/code`,
-		name: "获取登录验证码",
-		get: async function () {
-			return await http.get(this.url);
-		}
-	},
+    codeImg: {
+        url: `${config.API_URL}/zcxt/auth/code`,
+        name: "获取登录验证码",
+        get: async function () {
+            return await http.get(this.url);
+        }
+    },
 
-	updatePassword: {
-		url: `${config.API_URL}/zcxt/users/updatePass`,
-		name: "修改密码",
-		post: async function (data = {}) {
-			const query = {
-				oldPass: tool.crypto.encrypt(data.userPassword),
-				newPass: tool.crypto.encrypt(data.newPassword)
-			}
-			return await http.post(this.url, query);
-		}
-	},
+    updatePassword: {
+        url: `${config.API_URL}/zcxt/users/updatePass`,
+        name: "修改密码",
+        post: async function (data = {}) {
+            const query = {
+                oldPass: tool.crypto.encrypt(data.userPassword),
+                newPass: tool.crypto.encrypt(data.newPassword)
+            }
+            return await http.post(this.url, query);
+        }
+    },
 
-	oa: {
-		url: `${config.API_URL}/zcxt/oa`,
-		name: "oa跳转 单点登录 -> 获取token user",
+    oa: {
+        url: `${config.API_URL}/zcxt/oa`,
+        name: "oa跳转 单点登录 -> 获取token user",
 
-		getUserToken: async function (data = {}) {
-			return await http.post(`${this.url}/getUserToken`, data);
-		},
+        getUserToken: async function (data = {}) {
+            return await http.post(`${this.url}/getUserToken`, data);
+        },
 
-		updateStatus: async function (data = {}) {
-			return await http.post(`${this.url}/updateStatus`, data);
-		}
-	},
+        updateStatus: async function (data = {}) {
+            return await http.post(`${this.url}/updateStatus`, data);
+        }
+    },
 
-	gldMaster: {
-		url: `${config.API_URL}/zcxt/gldMaster`,
-		name: "审批流参数",
+    gldMaster: {
+        url: `${config.API_URL}/zcxt/gldMaster`,
+        name: "审批流参数",
 
-		getToken: async function (data = {}) { // 获取审批流 参数
-			return await http.post(`${this.url}/getToken`, data);
-		},
+        getToken: async function (data = {}) { // 获取审批流 参数
+            return await http.post(`${this.url}/getToken`, data);
+        },
 
-		getFormId: async function (data = {}) { // 获取审批流 formId
-			return await http.post(`${this.url}/getFormId`, data);
-		}
-	}
+        removeToken: async function () {
+            return await http.get(`${this.url}/removeToken`);
+        },
+
+        getFormId: async function (data = {}) { // 获取审批流 formId
+            return await http.post(`${this.url}/getFormId`, data);
+        }
+    }
 }