diff --git a/src/api/article/index.ts b/src/api/article/index.ts
index 63657b6..d779dcb 100644
--- a/src/api/article/index.ts
+++ b/src/api/article/index.ts
@@ -11,6 +11,8 @@ import { baseUrlHost } from '../baseUrlHost';
* @method getLabelList 获取标签列表
* @method deleteArticle 删除文章
* @method getArticleDetail 获取文章详情
+ * @method saveArticle 保存文章
+ * @method updateArticle 更新文章
*/
export function articleApi() {
@@ -45,6 +47,28 @@ export function articleApi() {
url: baseUrlHost + `/cpArticle/${id}`,
method: 'get',
});
+ },
+ saveArticle: (data: object) => {
+ return request({
+ url: baseUrlHost + '/cpArticle',
+ method: 'post',
+ data,
+ })
+ },
+ updateArticle: (data: object) => {
+ return request({
+ url: baseUrlHost + '/cpArticle',
+ method: 'put',
+ data,
+ })
+ },
+ uploadFile: (data: object) => {
+ return request({
+ url: baseUrlHost + '/enAttachment/upload',
+ method: 'post',
+ data,
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded'}
+ })
}
};
}
diff --git a/src/views/article/component/detail.vue b/src/views/article/component/detail.vue
index 37e13c4..1244015 100644
--- a/src/views/article/component/detail.vue
+++ b/src/views/article/component/detail.vue
@@ -7,9 +7,9 @@
@@ -52,7 +52,15 @@
-
+
+
+
+
+
+ 取消
+
+
+
@@ -61,12 +69,16 @@