|
|
@@ -44,7 +44,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { articleList, articleAudit } from '@/api/article'
|
|
|
+import { adminArticleList, adminArticleAudit } from '@/api/article'
|
|
|
|
|
|
export default {
|
|
|
name: 'ArticleAudit',
|
|
|
@@ -69,7 +69,7 @@ export default {
|
|
|
async loadData() {
|
|
|
this.loading = true
|
|
|
try {
|
|
|
- const res = await articleList({
|
|
|
+ const res = await adminArticleList({
|
|
|
page: this.page,
|
|
|
size: this.size,
|
|
|
status: 'draft',
|
|
|
@@ -93,7 +93,7 @@ export default {
|
|
|
async handleAudit(row, action) {
|
|
|
try {
|
|
|
await this.$confirm(action === 'approved' ? '确认通过审核?' : '确认驳回?', '提示', { type: 'warning' })
|
|
|
- await articleAudit({ id: row.id, action })
|
|
|
+ await adminArticleAudit({ id: row.id, auditStatus: action })
|
|
|
this.$message.success(action === 'approved' ? '已通过' : '已驳回')
|
|
|
this.loadData()
|
|
|
} catch (e) {
|
|
|
@@ -109,7 +109,7 @@ export default {
|
|
|
if (!this.rejectReason.trim()) return this.$message.warning('请填写驳回原因')
|
|
|
this.rejectDialogVisible = false
|
|
|
try {
|
|
|
- await articleAudit({ id: this.currentRow.id, action: 'rejected', reason: this.rejectReason })
|
|
|
+ await adminArticleAudit({ id: this.currentRow.id, auditStatus: 'rejected', auditReason: this.rejectReason })
|
|
|
this.$message.success('已驳回')
|
|
|
this.loadData()
|
|
|
} catch (e) {
|