fix(AccountListModal): 更新账号状态显示逻辑和颜色标识

修改账号状态显示逻辑,将字符串状态改为数字类型,并更新对应的颜色标识和状态文本。同时更新构建产物的文件引用路径。
This commit is contained in:
超级老白兔
2025-08-28 16:06:16 +08:00
parent 1053d4125f
commit 31d75be68e
3 changed files with 40 additions and 29 deletions

View File

@@ -1,9 +1,9 @@
{
"_charts-BY5IGS3y.js": {
"file": "assets/charts-BY5IGS3y.js",
"_charts-62ymwWYF.js": {
"file": "assets/charts-62ymwWYF.js",
"name": "charts",
"imports": [
"_ui-g-9w80lh.js",
"_ui-DUe_gloh.js",
"_vendor-2vc8h_ct.js"
]
},
@@ -11,8 +11,8 @@
"file": "assets/ui-D0C0OGrH.css",
"src": "_ui-D0C0OGrH.css"
},
"_ui-g-9w80lh.js": {
"file": "assets/ui-g-9w80lh.js",
"_ui-DUe_gloh.js": {
"file": "assets/ui-DUe_gloh.js",
"name": "ui",
"imports": [
"_vendor-2vc8h_ct.js"
@@ -33,15 +33,15 @@
"name": "vendor"
},
"index.html": {
"file": "assets/index-D1PYRHiS.js",
"file": "assets/index-BmpchxsT.js",
"name": "index",
"src": "index.html",
"isEntry": true,
"imports": [
"_vendor-2vc8h_ct.js",
"_utils-6WF66_dS.js",
"_ui-g-9w80lh.js",
"_charts-BY5IGS3y.js"
"_ui-DUe_gloh.js",
"_charts-62ymwWYF.js"
],
"css": [
"assets/index-ejYsXKTB.css"

View File

@@ -11,11 +11,11 @@
</style>
<!-- 引入 uni-app web-view SDK必须 -->
<script type="text/javascript" src="/websdk.js"></script>
<script type="module" crossorigin src="/assets/index-D1PYRHiS.js"></script>
<script type="module" crossorigin src="/assets/index-BmpchxsT.js"></script>
<link rel="modulepreload" crossorigin href="/assets/vendor-2vc8h_ct.js">
<link rel="modulepreload" crossorigin href="/assets/utils-6WF66_dS.js">
<link rel="modulepreload" crossorigin href="/assets/ui-g-9w80lh.js">
<link rel="modulepreload" crossorigin href="/assets/charts-BY5IGS3y.js">
<link rel="modulepreload" crossorigin href="/assets/ui-DUe_gloh.js">
<link rel="modulepreload" crossorigin href="/assets/charts-62ymwWYF.js">
<link rel="stylesheet" crossorigin href="/assets/ui-D0C0OGrH.css">
<link rel="stylesheet" crossorigin href="/assets/index-ejYsXKTB.css">
</head>

View File

@@ -61,29 +61,40 @@ const AccountListModal: React.FC<AccountListModalProps> = ({
}, [visible, ruleId]);
const title = ruleName ? `${ruleName} - 已添加账号列表` : "已添加账号列表";
const getStatusColor = (status?: string) => {
switch (status) {
case "normal":
return "#52c41a";
case "limited":
return "#faad14";
case "blocked":
return "#ff4d4f";
const getStatusColor = (status?: string | number) => {
// 确保status是数字类型
const statusNum = Number(status);
switch (statusNum) {
case 0:
return "#faad14"; // 待添加 - 黄色警告色
case 1:
return "#1890ff"; // 添加中 - 蓝色进行中
case 2:
return "#ff4d4f"; // 添加失败 - 红色错误色
case 3:
return "#ff4d4f"; // 添加失败 - 红色错误色
case 4:
return "#52c41a"; // 已添加 - 绿色成功色
default:
return "#d9d9d9";
return "#d9d9d9"; // 未知状态 - 灰色
}
};
const getStatusText = (status?: string) => {
const getStatusText = (status?: number) => {
switch (status) {
case "normal":
return "正常";
case "limited":
return "受限";
case "blocked":
return "封禁";
case 0:
return "待添加";
case 1:
return "添加中";
case 2:
return "添加失败";
case 3:
return "添加失败";
case 4:
return "已添加";
default:
return "未知";
return "未知状态";
}
};
@@ -149,7 +160,7 @@ const AccountListModal: React.FC<AccountListModalProps> = ({
style={{ backgroundColor: getStatusColor(account.status) }}
/>
<span className={style.statusText}>
{getStatusText(account.status)}
{getStatusText(Number(account.status))}
</span>
</div>
</div>