This repository has been archived by the owner on Nov 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,28 @@ export function getMyNews({ type = 0, limit = 15, after = 0 }) { | |
}); | ||
} | ||
|
||
/** | ||
* 新增投稿 | ||
* @author mutoe <[email protected]> | ||
* @export | ||
* @param {Number} categoryId | ||
* @param {Object} params | ||
* @param {String} params.title 标题 | ||
* @param {String} params.content 内容 | ||
* @param {Number|Number[]} params.tags 标签id或其数组 | ||
* @param {String=} params.subject 概要 | ||
* @param {Number=} params.image 缩略图 | ||
* @param {String=} params.from 资讯来源 | ||
* @param {String=} params.author 作者 | ||
* @param {String=} params.text_content 纯文本 | ||
* @returns {Promise} | ||
*/ | ||
export function postNews(categoryId, params) { | ||
return api.post(`/news/categories/${categoryId}/currency-news`, params, { | ||
validateStatus: s => s === 201 | ||
}); | ||
} | ||
|
||
/** | ||
* 搜索资讯 | ||
* @author jsonleex <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters