generated from Leo_Ding/web-template
1
This commit is contained in:
parent
a9fd22c5a3
commit
0661196c60
@ -1,6 +1,6 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
//获取banner列表
|
//获取产品优势列表
|
||||||
export const getActiveList = (params) => request.basic.get('/api/v1/active', params)
|
export const getActiveList = (params) => request.basic.get('/api/v1/active', params)
|
||||||
|
|
||||||
//获取单个banner
|
//获取单个banner
|
||||||
|
|||||||
@ -0,0 +1,20 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
//获取标签列表
|
||||||
|
export const getTagList = (params) => request.basic.get('/api/v1/home-top-labels', params)
|
||||||
|
|
||||||
|
//获取算力卡列表
|
||||||
|
export const getCardsList = (params) => request.basic.get('/api/v1/cards', params)
|
||||||
|
|
||||||
|
//获取算力中心列表
|
||||||
|
export const getCentersList = (params) => request.basic.get('/api/v1/centers', params)
|
||||||
|
|
||||||
|
|
||||||
|
//获取单个banner
|
||||||
|
export const getBanner = (id) => request.basic.get(`/api/v1/banners/${id}`)
|
||||||
|
//创建banner
|
||||||
|
export const createBanner = (data) => request.basic.post('/api/v1/banners', data)
|
||||||
|
//更新banner
|
||||||
|
export const updateBanner = (id, data) => request.basic.put(`/api/v1/banners/${id}`, data)
|
||||||
|
//删除banner
|
||||||
|
export const deleteBanner = (id) => request.basic.delete(`/api/v1/banners/${id}`)
|
||||||
@ -171,13 +171,17 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '活动ID', dataIndex: 'id' },
|
|
||||||
{ title: '标题', dataIndex: 'title' },
|
{ title: '标题', dataIndex: 'title' },
|
||||||
{ title: '描述', dataIndex: 'description' },
|
{ title: '描述', dataIndex: 'description ' },
|
||||||
{ title: '图片地址', dataIndex: 'imgUrl' },
|
{ title: '图片地址', dataIndex: 'imgUrl' },
|
||||||
|
{
|
||||||
|
title: '状态',
|
||||||
|
dataIndex: 'is_recommend',
|
||||||
|
key: 'is_recommend',
|
||||||
|
width: 150,
|
||||||
|
customRender: ({ text }) => (text ? '推荐' : '不推荐'),
|
||||||
|
},
|
||||||
{ title: '页面地址', dataIndex: 'pageUrl' },
|
{ title: '页面地址', dataIndex: 'pageUrl' },
|
||||||
{ title: '排序', dataIndex: 'order' },
|
|
||||||
{ title: '是否启用', dataIndex: 'is_recommend' },
|
|
||||||
{ title: '操作', key: 'action', width: 160 },
|
{ title: '操作', key: 'action', width: 160 },
|
||||||
]
|
]
|
||||||
const { listData, loading, showLoading, hideLoading, paginationState, searchFormData, resetPagination } =
|
const { listData, loading, showLoading, hideLoading, paginationState, searchFormData, resetPagination } =
|
||||||
|
|||||||
@ -108,25 +108,17 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
const { t } = useI18n() // 解构出t方法
|
const { t } = useI18n() // 解构出t方法
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '用户姓名', dataIndex: 'customerName', width: 200 },
|
{ title: '标题', dataIndex: 'title', width: 200 },
|
||||||
{ title: '用户联系方式', dataIndex: 'phone', width: 150 },
|
{ title: '描述', dataIndex: 'description', width: 150 },
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '是否启用',
|
||||||
dataIndex: 'status',
|
dataIndex: 'is_recommend',
|
||||||
key: 'status',
|
key: 'is_recommend',
|
||||||
width: 150,
|
width: 150,
|
||||||
customRender: ({ text }) => disabledDict.getLabel(text) || text,
|
customRender: ({ text }) => (text ? '启用' : '禁用'),
|
||||||
},
|
},
|
||||||
{
|
{ title: '图片地址', key: 'imgUrl', dataIndex: 'imgUrl', width: 160 },
|
||||||
title: '账号类型',
|
{ title: '页面地址', key: 'pageUrl', dataIndex: 'pageUrl', width: 160 },
|
||||||
key: 'accountType',
|
|
||||||
dataIndex: 'accountType',
|
|
||||||
width: 120,
|
|
||||||
customRender: ({ text }) => authenticationTypeDict.getLabel(text) || text,
|
|
||||||
},
|
|
||||||
{ title: '拉黑时间', key: 'blackTime', dataIndex: 'blackTime', width: 160 },
|
|
||||||
{ title: '解除时间', key: 'unblackTime', dataIndex: 'unblackTime', width: 160 },
|
|
||||||
{ title: '拉黑原因', key: 'blacklistReason', dataIndex: 'blacklistReason', width: 220 },
|
|
||||||
{ title: t('button.action'), key: 'action', fixed: 'right', width: 120 },
|
{ title: t('button.action'), key: 'action', fixed: 'right', width: 120 },
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -145,8 +137,8 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { data, total } = await apis.userControl
|
const { data, total } = await apis.activities
|
||||||
.getBlackCustomersList({
|
.getActiveList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
...searchFormData.value,
|
...searchFormData.value,
|
||||||
|
|||||||
@ -40,29 +40,17 @@
|
|||||||
<a-table :columns="columns" :data-source="listData" :loading="loading" :pagination="paginationState"
|
<a-table :columns="columns" :data-source="listData" :loading="loading" :pagination="paginationState"
|
||||||
:scroll="{ x: 1000 }" @change="onTableChange">
|
:scroll="{ x: 1000 }" @change="onTableChange">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="'banner_type' === column.key">
|
|
||||||
<!--状态-->
|
|
||||||
<a-tag v-if="record.banner_type == 1" color="processing">
|
|
||||||
首页轮播图
|
|
||||||
</a-tag>
|
|
||||||
<!--状态-->
|
|
||||||
<a-tag v-else color="processing">
|
|
||||||
营销活动图
|
|
||||||
</a-tag>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-if="'is_recommend' === column.key">
|
<template v-if="'is_recommend' === column.key">
|
||||||
<!--状态-->
|
<!--状态-->
|
||||||
<a-tag v-if="record.banner_type == true" color="processing">
|
<a-tag v-if="record.is_recommend == true" color="processing">
|
||||||
启用
|
推荐
|
||||||
</a-tag>
|
</a-tag>
|
||||||
<!--状态-->
|
<!--状态-->
|
||||||
<a-tag v-else color="processing">
|
<a-tag v-else color="processing">
|
||||||
禁用
|
不推荐
|
||||||
</a-tag>
|
</a-tag>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<template v-if="'createAt' === column.key">
|
<template v-if="'createAt' === column.key">
|
||||||
{{ formatUtcDateTime(record.created_at) }}
|
{{ formatUtcDateTime(record.created_at) }}
|
||||||
</template>
|
</template>
|
||||||
@ -108,25 +96,17 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
const { t } = useI18n() // 解构出t方法
|
const { t } = useI18n() // 解构出t方法
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '用户姓名', dataIndex: 'customerName', width: 200 },
|
{ title: '标题', dataIndex: 'title', width: 200 },
|
||||||
{ title: '用户联系方式', dataIndex: 'phone', width: 150 },
|
{ title: '描述', dataIndex: 'description', width: 150 },
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '是否推荐',
|
||||||
dataIndex: 'status',
|
key: 'is_recommend',
|
||||||
key: 'status',
|
dataIndex: 'is_recommend',
|
||||||
width: 150,
|
|
||||||
customRender: ({ text }) => disabledDict.getLabel(text) || text,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '账号类型',
|
|
||||||
key: 'accountType',
|
|
||||||
dataIndex: 'accountType',
|
|
||||||
width: 120,
|
width: 120,
|
||||||
customRender: ({ text }) => authenticationTypeDict.getLabel(text) || text,
|
customRender: ({ text }) => (text ? '推荐' : '不推荐'),
|
||||||
},
|
},
|
||||||
{ title: '拉黑时间', key: 'blackTime', dataIndex: 'blackTime', width: 160 },
|
{ title: '图片地址', key: 'image_url', dataIndex: 'image_url', width: 160 },
|
||||||
{ title: '解除时间', key: 'unblackTime', dataIndex: 'unblackTime', width: 160 },
|
{ title: '页面地址', key: 'link_url', dataIndex: 'link_url', width: 160 },
|
||||||
{ title: '拉黑原因', key: 'blacklistReason', dataIndex: 'blacklistReason', width: 220 },
|
|
||||||
{ title: t('button.action'), key: 'action', fixed: 'right', width: 120 },
|
{ title: t('button.action'), key: 'action', fixed: 'right', width: 120 },
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -145,8 +125,8 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { data, total } = await apis.userControl
|
const { data, total } = await apis.platform
|
||||||
.getBlackCustomersList({
|
.getTagList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
...searchFormData.value,
|
...searchFormData.value,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user