From 691140a13d211ac460eb5fbb3172ca12a228de9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=BF=90=E6=A8=A1?= <1724894114@qq.com> Date: Fri, 20 Sep 2024 23:40:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=BA=90=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/setup.js | 7 +++++++ src/layout/components/userbar.vue | 24 ++++++++++++++--------- src/views/order/dataConfirm/index.vue | 12 +++++++++++- src/views/order/orderList/index.vue | 3 +-- src/views/setting/advanced/setup/mail.vue | 23 ++++++++++++++++++++++ 5 files changed, 57 insertions(+), 12 deletions(-) diff --git a/src/api/model/setup.js b/src/api/model/setup.js index e33f4b8..c4a474d 100644 --- a/src/api/model/setup.js +++ b/src/api/model/setup.js @@ -32,6 +32,13 @@ export default { post: async function (data) { return await http.post(this.url, data); }, + }, + configInfo:{ + url: `${config.API_URL}/email.source.config.info`, + name: "源邮件获取数据同步模式", + post: async function (data) { + return await http.post(this.url, data); + }, } }, k3:{ diff --git a/src/layout/components/userbar.vue b/src/layout/components/userbar.vue index 5384a30..65f3722 100644 --- a/src/layout/components/userbar.vue +++ b/src/layout/components/userbar.vue @@ -176,14 +176,17 @@ if (command == "clearCache") { this.$confirm('清除缓存会将系统初始化,包括登录状态、主题、语言设置等,是否继续?', '警告', { type: 'warning', - }).then(() => { + }).then(async () => { const loading = this.$loading() - this.$TOOL.data.clear() - this.$router.replace({ path: '/login' }) - setTimeout(() => { - loading.close() - location.reload() - }, 1000) + const res = await this.$API.system.user.logout.post(); + if (res.code == 200) { + this.$TOOL.data.clear() + this.$router.replace({path: '/login'}); + setTimeout(() => { + loading.close() + location.reload() + }, 1000) + } }).catch(() => { //取消 }) @@ -194,8 +197,11 @@ type: 'warning', confirmButtonText: '退出', confirmButtonClass: 'el-button--danger' - }).then(() => { - this.$router.replace({ path: '/login' }); + }).then(async () => { + const res = await this.$API.system.user.logout.post(); + if(res.code == 200){ + this.$router.replace({path: '/login'}); + } }).catch(() => { //取消退出 }) diff --git a/src/views/order/dataConfirm/index.vue b/src/views/order/dataConfirm/index.vue index dc14e56..7c69a5f 100644 --- a/src/views/order/dataConfirm/index.vue +++ b/src/views/order/dataConfirm/index.vue @@ -46,7 +46,7 @@