diff --git a/src/pages/pc/ckbox/weChat/components/CustomerList/com.module.scss b/src/pages/pc/ckbox/weChat/components/CustomerList/com.module.scss index 3decb64..a2b100d 100644 --- a/src/pages/pc/ckbox/weChat/components/CustomerList/com.module.scss +++ b/src/pages/pc/ckbox/weChat/components/CustomerList/com.module.scss @@ -105,45 +105,98 @@ flex-direction: column; align-items: center; padding: 10px 0; - } - .skeletonItem { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - padding: 10px 0; - position: relative; - margin-bottom: 10px; - } - - .skeletonAvatar { - width: 50px; - height: 50px; - border-radius: 50%; - background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); - background-size: 200% 100%; - animation: skeleton-loading 1.5s infinite; - } - - .skeletonIndicator { - position: absolute; - bottom: 10px; - right: 10px; - width: 8px; - height: 8px; - border-radius: 50%; - background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); - background-size: 200% 100%; - animation: skeleton-loading 1.5s infinite; - } - - @keyframes skeleton-loading { - 0% { - background-position: 200% 0; + .skeletonItem { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 10px 0; + position: relative; + margin-bottom: 10px; } - 100% { - background-position: -200% 0; + + .skeletonAvatar { + width: 50px; + height: 50px; + border-radius: 50%; + background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); + background-size: 200% 100%; + animation: skeleton-loading 1.5s infinite; + } + + .skeletonIndicator { + position: absolute; + bottom: 10px; + right: 10px; + width: 8px; + height: 8px; + border-radius: 50%; + background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); + background-size: 200% 100%; + animation: skeleton-loading 1.5s infinite; + } + + @keyframes skeleton-loading { + 0% { + background-position: 200% 0; + } + 100% { + background-position: -200% 0; + } + } + } +} + +// Tooltip 样式 +:global { + .customerTooltip { + .ant-tooltip-inner { + background-color: rgba(0, 0, 0, 0.85); + padding: 12px 16px; + border-radius: 6px; + box-shadow: + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 9px 28px 8px rgba(0, 0, 0, 0.05); + } + + .ant-tooltip-arrow { + &::before { + background-color: rgba(0, 0, 0, 0.85); + } + } + } +} + +.tooltipContent { + min-width: 200px; + + .tooltipItem { + display: flex; + align-items: center; + line-height: 1.4; + margin-bottom: 6px; + + &:last-child { + margin-bottom: 0; + } + + .tooltipLabel { + color: rgba(255, 255, 255, 0.65); + font-size: 12px; + min-width: 70px; + flex-shrink: 0; + line-height: 1.4; + } + + .tooltipValue { + color: #ffffff; + font-size: 13px; + font-weight: 500; + word-break: break-all; + flex: 1; + line-height: 1.4; } } } diff --git a/src/pages/pc/ckbox/weChat/components/CustomerList/index.tsx b/src/pages/pc/ckbox/weChat/components/CustomerList/index.tsx index 8f50c57..2f834a5 100644 --- a/src/pages/pc/ckbox/weChat/components/CustomerList/index.tsx +++ b/src/pages/pc/ckbox/weChat/components/CustomerList/index.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react"; -import { Avatar, Badge } from "antd"; +import { Avatar, Badge, Tooltip } from "antd"; import styles from "./com.module.scss"; import { useCustomerStore, @@ -74,6 +74,35 @@ const CustomerList: React.FC = () => { ); + // 渲染客服信息提示内容 + const renderTooltipContent = (customer: any) => { + const deviceName = customer.deviceExtra?.memo || customer.deviceExtra?.market_name || "未知设备"; + const deviceModel = customer.deviceExtra?.market_name || "未知型号"; + const wechatAlias = customer.alias || "未设置"; + const wechatId = customer.wechatId || "未知"; + + return ( +