diff --git a/src/api/all/common.ts b/src/api/all/common.ts index 1e19878..9b210da 100644 --- a/src/api/all/common.ts +++ b/src/api/all/common.ts @@ -6,10 +6,10 @@ import Http from '@/api'; // 获取用户自定义列 export const getCustomColumns = (params = {}) => { - return Http.get('/v1/user-custom-columns', params); + return Http.get('/v1/custom-columns', params); }; // 保存用户自定义列 export const updateCustomColumns = (params = {}) => { - return Http.put('/v1/user-custom-columns', params); + return Http.put('/v1/custom-columns', params); }; diff --git a/src/api/all/propertyMarketing.ts b/src/api/all/propertyMarketing.ts index a1e6c6b..93f61a3 100644 --- a/src/api/all/propertyMarketing.ts +++ b/src/api/all/propertyMarketing.ts @@ -19,16 +19,21 @@ export const fetchAccountOperators = (params = {}) => { return Http.get('/v1/media-account-operators/list', params); }; -// 投放账户运营人员分组-列表 -export const fetchPlacementAccountOperators = (params = {}) => { - return Http.get('/v1/placement-account-operators/list', params); -}; - // 媒体账号-分页 export const getMediaAccounts = (params = {}) => { return Http.get('/v1/media-accounts', params); }; +// 媒体账号-健康情况 +export const getMediaAccountsHealth = (params = {}) => { + return Http.get('/v1/media-accounts/health', params); +}; + +// 投放账号-健康情况 +export const getPlacementAccountsHealth = (params = {}) => { + return Http.get('/v1/placement-accounts/health', params); +}; + // 媒体账号-添加 export const postMediaAccounts = (params = {}) => { return Http.post('/v1/media-accounts', params); @@ -298,3 +303,8 @@ export const getPlacementGuide = (params: {}) => { export const getAiResult = (params: {}) => { return Http.get(`/v1/placement-guide/getAiResult`); }; + +// 投放账号-列表 +export const getPlacementAccountsList = (params = {}) => { + return Http.get('/v1/placement-accounts/list', params); +}; diff --git a/src/api/index.ts b/src/api/index.ts index 30efc74..3eeb04b 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -2,7 +2,7 @@ * @Author: 田鑫 * @Date: 2023-02-17 11:58:44 * @LastEditors: Please set LastEditors - * @LastEditTime: 2025-06-23 05:51:32 + * @LastEditTime: 2025-07-05 17:59:59 * @Description: */ @@ -16,7 +16,7 @@ const contentType = 'application/json'; const requestTimeout = 30000; enum HttpStatusCode { - OK = 200, + Success = 200, BadRequest = 400, // 请求参数错误 Unauthorized = 401, // token 无效或过期 NotFound = 404, @@ -62,22 +62,30 @@ export class Request { (res: AxiosResponse) => { const { data } = res; switch (data.code) { - case HttpStatusCode.OK: + case HttpStatusCode.Success: return data; default: return Promise.reject(data); } }, (err: any) => { - const { message, code } = err.response?.data ?? {}; - AMessage.error(message ?? err.message); + const { response } = err; + const status = response?.status; + let errMessage = response?.data?.message ?? err.message; - switch (code) { + switch (status) { + case HttpStatusCode.InternalServerError: + errMessage = '系统繁忙,请稍后再试或联系管理员。'; + break; + case HttpStatusCode.NotFound: + errMessage = '接口不存在'; + break; case HttpStatusCode.Unauthorized: - goUserLogin(); + handleUserLogout(); break; } + AMessage.error(errMessage); return Promise.reject(err.response); }, ); diff --git a/src/components/_base/menu/index.vue b/src/components/_base/menu/index.vue index b4f9043..9714392 100644 --- a/src/components/_base/menu/index.vue +++ b/src/components/_base/menu/index.vue @@ -146,7 +146,7 @@ export default defineComponent({ } .arco-menu-title { color: var(--Text-2, #3c4043); - font-family: 'PuHuiTi-Regular'; + font-family: 'PuHuiTi-Medium'; font-size: 16px; font-style: normal; font-weight: 400; diff --git a/src/components/_base/navbar/index.vue b/src/components/_base/navbar/index.vue index 87e2fbb..79a11fc 100644 --- a/src/components/_base/navbar/index.vue +++ b/src/components/_base/navbar/index.vue @@ -9,6 +9,7 @@ import { MENU_GROUP_IDS } from '@/router/constants'; import router from '@/router'; import { useRoute } from 'vue-router'; import ExitAccountModal from '@/components/_base/exit-account-modal/index.vue'; +import { appRoutes } from '@/router/routes'; interface MenuItem { name: string; @@ -56,21 +57,31 @@ const handleSelect = (index: any) => { } }; +const flattenRoutes = (routes: any, parentPath = ''): any[] => { + let result: any[] = []; + for (const route of routes) { + const fullPath = route.path.startsWith('/') ? route.path : parentPath.replace(/\/$/, '') + '/' + route.path; + if (route.children && route.children.length) { + result = result.concat(flattenRoutes(route.children, fullPath)); + } else { + result.push({ ...route, fullPath }); + } + } + return result; +}; + const handleDopdownClick = (index: any, ind: any) => { const { children } = lists.value[index]; - const indPath = children[ind] as any; - if (indPath.name === '行业热门话题洞察') { - router.push('/dataEngine/hotTranslation'); - } else if (indPath.name === '行业词云') { - router.push('/dataEngine/hotCloud'); - } else if (indPath.name === '行业关键词动向') { - router.push('/dataEngine/keyWord'); - } else if (indPath.name === '用户痛点观察') { - router.push('/dataEngine/userPainPoints'); - } else if (indPath.name === '重点品牌动向') { - router.push('/dataEngine/keyBrandMovement'); - } else if (indPath.name === '用户画像') { - router.push('/dataEngine/userPersona'); + const indPath = children[ind]; + + const allChildren = flattenRoutes(appRoutes); + + const target = allChildren.find((item) => item.meta && item.meta.menuId === indPath.id); + + if (target) { + router.push(target.fullPath); + } else { + console.warn('未找到对应的菜单路由', indPath.id); } }; diff --git a/src/components/custom-table-column-modal/index.vue b/src/components/custom-table-column-modal/index.vue index 675ea98..9ffb83b 100644 --- a/src/components/custom-table-column-modal/index.vue +++ b/src/components/custom-table-column-modal/index.vue @@ -39,7 +39,7 @@ 已添加({{ checkColumns.length }})
{{ record.ai_evaluation?.text }}
-- {{ `观看: ${record.ai_evaluation?.look_chain}% 点赞: ${record.ai_evaluation?.like_chain}%` }} -
-{{ `${record.ai_evaluate?.level} | ${record.ai_evaluate?.advise}` }}。
++ {{ + `观看: ${record[`${getPropPrefix(dateType)}view_rate`]}% 点赞: ${ + record[`${getPropPrefix(dateType)}like_rate`] + }%` + }} +
+-
+打工人的环游世界旅行计划(国内版)
-2025-06-18
+ +{{ record.newest_work_title }}
++ {{ exactFormatTime(record.newest_work_published_at) }} +
+ + +{{ record.second_new_work_title }}
++ {{ exactFormatTime(record.second_new_work_published_at) }} +
{{ formatTableField(column, record, true) }}数据总览
-数据总览
+{{ item.label }}
-{{ item.label }}
+{{ `${detailData.ai_evaluate?.level} | ${detailData.ai_evaluate?.advise}` }}。
++ {{ + `观看: ${detailData[`${getPropPrefix(dateType)}view_rate`] ?? '-'}% 点赞: ${ + detailData[`${getPropPrefix(dateType)}like_rate`] ?? '-' + }%` + }} +
+{{ field.label }}
+{{ field.title }}
- 正常
- 异常
+