From 8a30c883353c4855e4f05a4c3e0605cf2eec269e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A5=9D=E8=A8=80=E5=AD=9F?= <1656307454@qq.com>
Date: Sat, 24 Feb 2024 23:26:48 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=20=E5=AF=8C=E6=96=87?=
=?UTF-8?q?=E6=9C=AC=E7=AE=A1=E7=90=86=20=E5=AF=B9=E6=8E=A5=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/content/richText.js | 52 +++++++++
src/views/content/richText/Index.vue | 26 +++--
.../content/richText/modules/AddForm.vue | 5 +-
.../content/richText/modules/EditForm.vue | 11 +-
.../content/richText/modules/ViewForm.vue | 106 ++++++++++++++++++
src/views/content/richText/modules/index.js | 3 +-
6 files changed, 185 insertions(+), 18 deletions(-)
create mode 100644 src/api/content/richText.js
create mode 100644 src/views/content/richText/modules/ViewForm.vue
diff --git a/src/api/content/richText.js b/src/api/content/richText.js
new file mode 100644
index 0000000..39827b0
--- /dev/null
+++ b/src/api/content/richText.js
@@ -0,0 +1,52 @@
+import { axios } from '@/utils/request'
+
+// api接口列表
+const api = {
+ list: '/content.agreement/list',
+ // detail: '/content.help/detail',
+ add: '/content.agreement/add',
+ edit: '/content.agreement/edit',
+ delete: '/content.agreement/delete'
+}
+
+// 列表记录
+export function list (params) {
+ return axios({
+ url: api.list,
+ method: 'get',
+ params
+ })
+}
+
+// 新增记录
+export function add (data) {
+ return axios({
+ url: api.add,
+ method: 'post',
+ data
+ })
+}
+
+/**
+ * 编辑记录
+ * @param {*} data
+ */
+export function edit (data) {
+ return axios({
+ url: api.edit,
+ method: 'post',
+ data
+ })
+}
+
+/**
+ * 删除记录
+ * @param {*} data
+ */
+export function deleted (data) {
+ return axios({
+ url: api.delete,
+ method: 'post',
+ data: data
+ })
+}
diff --git a/src/views/content/richText/Index.vue b/src/views/content/richText/Index.vue
index 46bcbbc..e3384d6 100644
--- a/src/views/content/richText/Index.vue
+++ b/src/views/content/richText/Index.vue
@@ -6,7 +6,7 @@
编辑
- 删除
+ 删除
+ 查看
+
diff --git a/src/views/content/richText/modules/index.js b/src/views/content/richText/modules/index.js
index 308f27b..2b8aa7d 100644
--- a/src/views/content/richText/modules/index.js
+++ b/src/views/content/richText/modules/index.js
@@ -1,4 +1,5 @@
import AddForm from './AddForm'
import EditForm from './EditForm'
+import ViewForm from './ViewForm'
-export { AddForm, EditForm }
\ No newline at end of file
+export { AddForm, EditForm, ViewForm }
\ No newline at end of file