From 6a4b897b7975b188114e7086d5bf36e2121b5e66 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Tue, 05 Mar 2024 09:47:04 +0800
Subject: [PATCH] 邮件管理接口对接

---
 src/views/system/email/emailTemplates.vue |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/views/system/email/emailTemplates.vue b/src/views/system/email/emailTemplates.vue
index 3ec4274..1bd5770 100644
--- a/src/views/system/email/emailTemplates.vue
+++ b/src/views/system/email/emailTemplates.vue
@@ -14,7 +14,7 @@
 </template>
 
 <script>
-import { getList, getDetail, add, update, remove, enable, sendEmail } from "@/api/system/email"
+import { getEmailTemplateList, saveEmailTemplateList, updateEmailTemplateList, detailEmailTemplateList, removeEmailTemplateList } from "@/api/system/email"
 import { mapGetters } from "vuex"
 
 export default {
@@ -43,14 +43,16 @@
                 menuWidth: 350,
                 column: [
                     {
-                        label: "主题",
-                        prop: "remark",
+                        label: "标题",
+                        prop: "title",
                         type: "input",
+                        align: 'center'
                     },
                     {
                         label: "正文内容",
-                        prop: "remark",
+                        prop: "content",
                         type: "input",
+                        align: 'center'
                     },
                 ]
             },
@@ -90,7 +92,7 @@
             done()
         },
         rowSave (row, done, loading) {
-            add(row).then(() => {
+            saveEmailTemplateList(row).then(() => {
                 this.onLoad(this.page)
                 this.$message({
                     type: "success",
@@ -103,7 +105,7 @@
             })
         },
         rowUpdate (row, index, done, loading) {
-            update(row).then(() => {
+            updateEmailTemplateList(row).then(() => {
                 this.onLoad(this.page)
                 this.$message({
                     type: "success",
@@ -122,7 +124,7 @@
                 type: "warning"
             })
                 .then(() => {
-                    return remove(row.id)
+                    return removeEmailTemplateList(row.id)
                 })
                 .then(() => {
                     this.onLoad(this.page)
@@ -162,7 +164,7 @@
                 type: "warning"
             })
                 .then(() => {
-                    return remove(this.ids)
+                    return removeEmailTemplateList(this.ids)
                 })
                 .then(() => {
                     this.onLoad(this.page)
@@ -175,7 +177,7 @@
         },
         beforeOpen (done, type) {
             if (["edit", "view"].includes(type)) {
-                getDetail(this.form.id).then(res => {
+                detailEmailTemplateList(this.form.id).then(res => {
                     this.form = res.data.data
                 })
             }
@@ -209,7 +211,7 @@
         },
         onLoad (page, params = {}) {
             this.loading = true
-            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+            getEmailTemplateList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                 const data = res.data.data
                 this.page.total = data.total
                 this.data = data.records

--
Gitblit v1.9.3