From 2f368e631a2c58d8e720afc455da7ba1cb1b38d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=99=8C?= Date: Thu, 27 Jul 2023 18:15:55 +0800 Subject: [PATCH] no message --- src/api/model/auth.js | 2 +- src/api/model/common.js | 4 ++-- src/api/model/system.js | 6 +++--- src/config/index.js | 6 +++--- src/views/login/index.vue | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/api/model/auth.js b/src/api/model/auth.js index 94d943a..0044707 100644 --- a/src/api/model/auth.js +++ b/src/api/model/auth.js @@ -2,7 +2,7 @@ import http from "@/utils/request" export default { token: { post: async function(data = {}) { - return await http.post('/api/login', data); + return await http.post('/login', data); } } } \ No newline at end of file diff --git a/src/api/model/common.js b/src/api/model/common.js index 0ca5239..656ff82 100644 --- a/src/api/model/common.js +++ b/src/api/model/common.js @@ -1,14 +1,14 @@ import http from "@/utils/request" export default { upload: { - url: '/app/upload', + url: '/upload', post: async function(data, config = {}) { return await http.post(this.url, data, config); } }, uploadFile: { post: async function(data, config = {}) { - return await http.post('/app/upload?type=file', data, config); + return await http.post('/upload?type=file', data, config); } }, } \ No newline at end of file diff --git a/src/api/model/system.js b/src/api/model/system.js index fcde21e..7cda555 100644 --- a/src/api/model/system.js +++ b/src/api/model/system.js @@ -7,15 +7,15 @@ export default { }, table: { get: async function(name = '') { - return await http.get('/system/table/get', { + return await http.get('/table/get', { name }, {cache:true}); }, getUpdate: async function(name = '', data=[]) { - return await http.post('/system/table/getUpdate', {name:name}, data); + return await http.post('/table/getUpdate', {name:name}, data); }, columnSettingSave: async function(name = '', column=[]) { - return await http.post('/system/table/columnSettingSave', {name:name, column:column}); + return await http.post('/table/columnSettingSave', {name:name, column:column}); } }, } \ No newline at end of file diff --git a/src/config/index.js b/src/config/index.js index 4a0ac62..78df7cc 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -12,7 +12,7 @@ const DEFAULT_CONFIG = { CORE_VER: "1.6.9", //接口地址 - API_URL: 'https://app.gter.net/admin', + API_URL: 'http://localhost/admin', //请求超时 TIMEOUT: 10000, @@ -24,10 +24,10 @@ const DEFAULT_CONFIG = { THEMEHEADER: true, //TokenName - TOKEN_NAME: "Authorization", + TOKEN_NAME: "token", // Cookie Name - SESSIONNAME: "X-PHPSSESSION", + SESSIONNAME: "MIUCMSSESSION", //Token前缀,注意最后有个空格,如不需要需设置空字符串 TOKEN_PREFIX: "", diff --git a/src/views/login/index.vue b/src/views/login/index.vue index b759c6c..c6f7456 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -132,7 +132,7 @@ setTimeout(async ()=>{ - var res = await this.$http.post('api/login/wechatSubmit', {uniqid:this.WechatLoginuniqid}); + var res = await this.$http.post('login/wechatSubmit', {uniqid:this.WechatLoginuniqid}); if(res.code==201){ @@ -185,7 +185,7 @@ }, async wechatLogin(){ - var res = await this.$http.get('api/login/wechatQrcode'); + var res = await this.$http.get('login/wechatQrcode'); if (res.code==200) { this.showWechatLogin = true this.WechatLoginCode = res.data.qrcodeurl