Commit 060b4d61 authored by 曹泽华's avatar 曹泽华

话题管理

parent 438d5aaf
import request from '@/utils/request'
import Qs from 'qs'
/**
* 1. 列表查询
* 2. 查询详细信息
* 3. 新增
* 4. 修改
* 5. 逻辑删除
* 6. 导出
*
*/
// 1. 查询话题列表
export function listOpmTopic(query) {
return request({
url: '/opmTopic/queryOpmTopicByPagination',
method: 'get',
params: query
})
}
// 2. 查询新闻资讯详细信息
export function getOpmTopic(businessId) {
return request({
url: '/opmTopic/detail/' + businessId,
method: 'get'
})
}
// 3. 新增新闻资讯
export function addOpmTopic(data) {
data = Qs.stringify(data)
return request({
url: '/opmTopic/add',
method: 'post',
data: data
})
}
// 4. 修改新闻资讯
export function updateOpmTopic(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/opmTopic/update/' + businessId,
method: 'post',
data
})
}
// 5. 逻辑删除新闻资讯
export function delOpmTopic(businessId) {
return request({
url: '/opmTopic/delete/' + businessId,
method: 'delete'
})
}
// 6. 导出新闻资讯
export function exportOpmTopic(query) {
return request({
url: '/opmTopic/export',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 7. 修改新闻资讯状态
export function updateStatus(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/opmTopic/updateStatus/' + businessId,
method: 'post',
data: data
})
}
// 7. 修改审核状态
export function updateExamStatus(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/opmTopic/updateExamStatus/' + businessId,
method: 'post',
data: data
})
}
export function updateNoExamStatus(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/opmTopic/updateNoExamStatus/' + businessId,
method: 'post',
data: data
})
}
// 命名导出
export { typeField, enableOrDisable, yesOrNo }
export { typeField, enableOrDisable, yesOrNo, isExam }
/** banner管理*/
/** 分类*/
const typeField = [
......@@ -17,3 +17,8 @@ const yesOrNo = [
{ value: 0, label: '是' },
{ value: 1, label: '否' }
]
const isExam = [
{ value: '0', label: '未审核' },
{ value: '1', label: '已审核' }
]
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment