From 0661196c60ba604cc4398122d0f37f819e3d9848 Mon Sep 17 00:00:00 2001 From: qiuyuan Date: Fri, 23 Jan 2026 18:41:17 +0800 Subject: [PATCH] 1 --- src/apis/modules/activities.js | 2 +- src/apis/modules/platform.js | 20 ++++++++++ src/views/activities/eventCopy/index.vue | 12 ++++-- src/views/platform/platformList/index.vue | 28 +++++--------- src/views/platform/tagList/index.vue | 46 +++++++---------------- 5 files changed, 52 insertions(+), 56 deletions(-) diff --git a/src/apis/modules/activities.js b/src/apis/modules/activities.js index d18368e..9b07c1c 100644 --- a/src/apis/modules/activities.js +++ b/src/apis/modules/activities.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -//获取banner列表 +//获取产品优势列表 export const getActiveList = (params) => request.basic.get('/api/v1/active', params) //获取单个banner diff --git a/src/apis/modules/platform.js b/src/apis/modules/platform.js index e69de29..cc2de92 100644 --- a/src/apis/modules/platform.js +++ b/src/apis/modules/platform.js @@ -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}`) \ No newline at end of file diff --git a/src/views/activities/eventCopy/index.vue b/src/views/activities/eventCopy/index.vue index e128129..5743ce2 100644 --- a/src/views/activities/eventCopy/index.vue +++ b/src/views/activities/eventCopy/index.vue @@ -171,13 +171,17 @@ defineOptions({ }) const columns = [ - { title: '活动ID', dataIndex: 'id' }, { title: '标题', dataIndex: 'title' }, - { title: '描述', dataIndex: 'description' }, + { title: '描述', dataIndex: 'description ' }, { title: '图片地址', dataIndex: 'imgUrl' }, + { + title: '状态', + dataIndex: 'is_recommend', + key: 'is_recommend', + width: 150, + customRender: ({ text }) => (text ? '推荐' : '不推荐'), + }, { title: '页面地址', dataIndex: 'pageUrl' }, - { title: '排序', dataIndex: 'order' }, - { title: '是否启用', dataIndex: 'is_recommend' }, { title: '操作', key: 'action', width: 160 }, ] const { listData, loading, showLoading, hideLoading, paginationState, searchFormData, resetPagination } = diff --git a/src/views/platform/platformList/index.vue b/src/views/platform/platformList/index.vue index 617b381..f621001 100644 --- a/src/views/platform/platformList/index.vue +++ b/src/views/platform/platformList/index.vue @@ -108,25 +108,17 @@ defineOptions({ }) const { t } = useI18n() // 解构出t方法 const columns = [ - { title: '用户姓名', dataIndex: 'customerName', width: 200 }, - { title: '用户联系方式', dataIndex: 'phone', width: 150 }, + { title: '标题', dataIndex: 'title', width: 200 }, + { title: '描述', dataIndex: 'description', width: 150 }, { - title: '状态', - dataIndex: 'status', - key: 'status', + title: '是否启用', + dataIndex: 'is_recommend', + key: 'is_recommend', width: 150, - customRender: ({ text }) => disabledDict.getLabel(text) || text, + customRender: ({ text }) => (text ? '启用' : '禁用'), }, - { - 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: '图片地址', key: 'imgUrl', dataIndex: 'imgUrl', width: 160 }, + { title: '页面地址', key: 'pageUrl', dataIndex: 'pageUrl', width: 160 }, { title: t('button.action'), key: 'action', fixed: 'right', width: 120 }, ] @@ -145,8 +137,8 @@ async function getPageList() { try { showLoading() const { pageSize, current } = paginationState - const { data, total } = await apis.userControl - .getBlackCustomersList({ + const { data, total } = await apis.activities + .getActiveList({ pageSize, current: current, ...searchFormData.value, diff --git a/src/views/platform/tagList/index.vue b/src/views/platform/tagList/index.vue index 617b381..74572c6 100644 --- a/src/views/platform/tagList/index.vue +++ b/src/views/platform/tagList/index.vue @@ -40,29 +40,17 @@