Compare commits

..

No commits in common. "52beab311c8ff792275251e263ada7533362bce1" and "42d7c2d0e15dfdd8ba2ef5d3c98ca4e7a6170521" have entirely different histories.

5 changed files with 58 additions and 54 deletions

View File

@ -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

View File

@ -1,20 +0,0 @@
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}`)

View File

@ -171,17 +171,13 @@ 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 } =

View File

@ -108,17 +108,25 @@ defineOptions({
}) })
const { t } = useI18n() // t const { t } = useI18n() // t
const columns = [ const columns = [
{ title: '标题', dataIndex: 'title', width: 200 }, { title: '用户姓名', dataIndex: 'customerName', width: 200 },
{ title: '描述', dataIndex: 'description', width: 150 }, { title: '用户联系方式', dataIndex: 'phone', width: 150 },
{ {
title: '是否启用', title: '状态',
dataIndex: 'is_recommend', dataIndex: 'status',
key: 'is_recommend', key: 'status',
width: 150, width: 150,
customRender: ({ text }) => (text ? '启用' : '禁用'), customRender: ({ text }) => disabledDict.getLabel(text) || text,
}, },
{ title: '图片地址', key: 'imgUrl', dataIndex: 'imgUrl', width: 160 }, {
{ title: '页面地址', key: 'pageUrl', dataIndex: 'pageUrl', width: 160 }, title: '账号类型',
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 },
] ]
@ -137,8 +145,8 @@ async function getPageList() {
try { try {
showLoading() showLoading()
const { pageSize, current } = paginationState const { pageSize, current } = paginationState
const { data, total } = await apis.activities const { data, total } = await apis.userControl
.getActiveList({ .getBlackCustomersList({
pageSize, pageSize,
current: current, current: current,
...searchFormData.value, ...searchFormData.value,

View File

@ -40,17 +40,29 @@
<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="'is_recommend' === column.key"> <template v-if="'banner_type' === column.key">
<!--状态--> <!--状态-->
<a-tag v-if="record.is_recommend == true" color="processing"> <a-tag v-if="record.banner_type == 1" 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="'is_recommend' === column.key">
<!--状态-->
<a-tag v-if="record.banner_type == true" color="processing">
启用
</a-tag>
<!--状态-->
<a-tag v-else color="processing">
禁用
</a-tag>
</template>
<template v-if="'createAt' === column.key"> <template v-if="'createAt' === column.key">
{{ formatUtcDateTime(record.created_at) }} {{ formatUtcDateTime(record.created_at) }}
</template> </template>
@ -96,17 +108,25 @@ defineOptions({
}) })
const { t } = useI18n() // t const { t } = useI18n() // t
const columns = [ const columns = [
{ title: '标题', dataIndex: 'title', width: 200 }, { title: '用户姓名', dataIndex: 'customerName', width: 200 },
{ title: '描述', dataIndex: 'description', width: 150 }, { title: '用户联系方式', dataIndex: 'phone', width: 150 },
{ {
title: '是否推荐', title: '状态',
key: 'is_recommend', dataIndex: 'status',
dataIndex: 'is_recommend', key: 'status',
width: 120, width: 150,
customRender: ({ text }) => (text ? '推荐' : '不推荐'), customRender: ({ text }) => disabledDict.getLabel(text) || text,
}, },
{ title: '图片地址', key: 'image_url', dataIndex: 'image_url', width: 160 }, {
{ title: '页面地址', key: 'link_url', dataIndex: 'link_url', width: 160 }, title: '账号类型',
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 },
] ]
@ -125,8 +145,8 @@ async function getPageList() {
try { try {
showLoading() showLoading()
const { pageSize, current } = paginationState const { pageSize, current } = paginationState
const { data, total } = await apis.platform const { data, total } = await apis.userControl
.getTagList({ .getBlackCustomersList({
pageSize, pageSize,
current: current, current: current,
...searchFormData.value, ...searchFormData.value,