feat: 本次提交更新内容如下暂存一波

This commit is contained in:
笔记本里的永平
2025-07-23 17:13:41 +08:00
parent 55ba56fcf1
commit 155a6ddc46
3 changed files with 171 additions and 291 deletions

View File

@@ -4,12 +4,12 @@ import {
PlusOutlined, PlusOutlined,
MinusOutlined, MinusOutlined,
ArrowLeftOutlined, ArrowLeftOutlined,
CheckOutlined,
} from "@ant-design/icons"; } from "@ant-design/icons";
import { Button, Input, Switch, Spin, message } from "antd"; import { Button, Input, Switch, Spin, message } from "antd";
import Layout from "@/components/Layout/Layout"; import Layout from "@/components/Layout/Layout";
import DeviceSelection from "@/components/DeviceSelection"; import DeviceSelection from "@/components/DeviceSelection";
import FriendSelection from "@/components/FriendSelection"; import FriendSelection from "@/components/FriendSelection";
import StepIndicator from "@/components/StepIndicator";
import { import {
createAutoLikeTask, createAutoLikeTask,
updateAutoLikeTask, updateAutoLikeTask,
@@ -29,9 +29,9 @@ const contentTypeLabels: Record<ContentType, string> = {
}; };
const steps = [ const steps = [
{ title: "基础设置", desc: "设置点赞规则" }, { id: 1, title: "基础设置", subtitle: "设置点赞规则" },
{ title: "设备选择", desc: "选择执行设备" }, { id: 2, title: "设备选择", subtitle: "选择执行设备" },
{ title: "人群选择", desc: "选择目标人群" }, { id: 3, title: "人群选择", subtitle: "选择目标人群" },
]; ];
const NewAutoLike: React.FC = () => { const NewAutoLike: React.FC = () => {
@@ -146,38 +146,7 @@ const NewAutoLike: React.FC = () => {
// 步骤器 // 步骤器
const renderStepIndicator = () => ( const renderStepIndicator = () => (
<div className={style.stepIndicatorWrapper}> <StepIndicator steps={steps} currentStep={currentStep} />
<div className={style.stepIndicator}>
{steps.map((s, i) => (
<div
key={s.title}
className={
style.stepItem +
" " +
(currentStep === i + 1
? style.stepActive
: i + 1 < currentStep
? style.stepDone
: "")
}
>
<span className={style.stepNum}>
{i + 1 < currentStep ? <CheckOutlined /> : i + 1}
</span>
<span className={style.stepTitle}>{s.title}</span>
<span className={style.stepDesc}>{s.desc}</span>
</div>
))}
</div>
<div className={style.stepProgressBarBg}>
<div
className={style.stepProgressBar}
style={{
width: `${((currentStep - 1) / (steps.length - 1)) * 100}%`,
}}
></div>
</div>
</div>
); );
// 步骤1基础设置 // 步骤1基础设置

View File

@@ -5,95 +5,6 @@
position: relative; position: relative;
} }
.stepIndicatorWrapper {
position: sticky;
top: 0;
z-index: 20;
background: #f8f6f3;
padding: 16px 0 8px 0;
}
.stepIndicator {
display: flex;
justify-content: center;
gap: 32px;
}
.stepItem {
display: flex;
flex-direction: column;
align-items: center;
color: #bbb;
font-size: 13px;
font-weight: 400;
transition: color 0.2s;
min-width: 80px;
}
.stepActive {
color: #188eee;
font-weight: 600;
}
.stepDone {
color: #19c37d;
}
.stepNum {
width: 28px;
height: 28px;
border-radius: 50%;
background: #e5e7eb;
color: #888;
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
margin-bottom: 4px;
}
.stepActive .stepNum {
background: #188eee;
color: #fff;
}
.stepDone .stepNum {
background: #19c37d;
color: #fff;
}
.stepTitle {
font-size: 14px;
margin-top: 2px;
font-weight: 500;
}
.stepDesc {
font-size: 12px;
color: #888;
margin-top: 2px;
text-align: center;
}
.stepProgressBarBg {
position: relative;
width: 80%;
height: 4px;
background: #e5e7eb;
border-radius: 2px;
margin: 12px auto 0 auto;
}
.stepProgressBar {
position: absolute;
left: 0;
top: 0;
height: 100%;
background: #188eee;
border-radius: 2px;
transition: width 0.3s;
}
.basicSection { .basicSection {
background: none; background: none;
border-radius: 0; border-radius: 0;

View File

@@ -1,166 +1,166 @@
/* Reset & 基础样式兼容移动端和PC端补充 iOS/安卓容差处理 */ /* Reset & 基础样式兼容移动端和PC端补充 iOS/安卓容差处理 */
/* 主题色变量定义 */ /* 主题色变量定义 */
:root { :root {
--primary-color: #188eee; --primary-color: #188eee;
--primary-color-light: #40a9ff; --primary-color-light: #40a9ff;
--primary-color-dark: #096dd9; --primary-color-dark: #096dd9;
--primary-gradient: linear-gradient(135deg, #188eee 0%, #096dd9 100%); --primary-gradient: linear-gradient(135deg, #188eee 0%, #096dd9 100%);
--primary-shadow: rgba(24, 142, 238, 0.3); --primary-shadow: rgba(24, 142, 238, 0.3);
--primary-shadow-light: rgba(24, 142, 238, 0.1); --primary-shadow-light: rgba(24, 142, 238, 0.1);
--primary-shadow-dark: rgba(24, 142, 238, 0.4); --primary-shadow-dark: rgba(24, 142, 238, 0.4);
} }
/* 1. 通用 Reset */ /* 1. 通用 Reset */
html, body, div, span, applet, object, iframe, html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code, a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp, del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var, small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li, b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table, caption, fieldset, form, label, legend, table, caption,
tbody, tfoot, thead, tr, th, td, article, tbody, tfoot, thead, tr, th, td, article,
aside, canvas, details, embed, figure, aside, canvas, details, embed, figure,
figcaption, footer, header, hgroup, menu, figcaption, footer, header, hgroup, menu,
nav, output, ruby, section, summary, time, nav, output, ruby, section, summary, time,
mark, audio, video { mark, audio, video {
margin: 0; margin: 0;
padding: 0; padding: 0;
border: 0; border: 0;
font-size: 100%; font-size: 100%;
font: inherit; font: inherit;
vertical-align: baseline; vertical-align: baseline;
box-sizing: border-box; box-sizing: border-box;
} }
/* 2. HTML5 display-role reset for older browsers */ /* 2. HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section { footer, header, hgroup, menu, nav, section {
display: block; display: block;
} }
/* 3. 列表、表格、图片等 */ /* 3. 列表、表格、图片等 */
ol, ul { ol, ul {
list-style: none; list-style: none;
} }
table { table {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
} }
img { img {
max-width: 100%; max-width: 100%;
display: block; display: block;
border: 0; border: 0;
} }
/* 4. 链接、按钮等 */ /* 4. 链接、按钮等 */
a { a {
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
} }
button, input, select, textarea { button, input, select, textarea {
font: inherit; font: inherit;
outline: none; outline: none;
border: none; border: none;
background: none; background: none;
box-shadow: none; box-shadow: none;
appearance: none; appearance: none;
} }
/* 5. 滚动条美化(可选) */ /* 5. 滚动条美化(可选) */
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 8px; width: 8px;
background: transparent; background: transparent;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background: #e0e0e0; background: #e0e0e0;
border-radius: 4px; border-radius: 4px;
} }
/* 6. 移动端/PC端兼容基础样式 */ /* 6. 移动端/PC端兼容基础样式 */
html, body { html, body {
height: 100%; height: 100%;
overflow: hidden; // 禁止 body 滚动和回弹 overflow: hidden; // 禁止 body 滚动和回弹
-webkit-tap-highlight-color: transparent; // 移动端点击无高亮 -webkit-tap-highlight-color: transparent; // 移动端点击无高亮
-webkit-text-size-adjust: 100%; // 禁止iOS自动调整字体 -webkit-text-size-adjust: 100%; // 禁止iOS自动调整字体
text-size-adjust: 100%; text-size-adjust: 100%;
/* iOS/安卓容差补充 */ /* iOS/安卓容差补充 */
/* 解决 iOS 12+ 及部分安卓机型底部安全区适配 */ /* 解决 iOS 12+ 及部分安卓机型底部安全区适配 */
padding-bottom: constant(safe-area-inset-bottom); padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
/* 解决 iOS 顶部刘海屏安全区 */ /* 解决 iOS 顶部刘海屏安全区 */
padding-top: constant(safe-area-inset-top); padding-top: constant(safe-area-inset-top);
padding-top: env(safe-area-inset-top); padding-top: env(safe-area-inset-top);
} }
#root, .app-content { #root, .app-content {
height: 100vh; height: 100vh;
overflow-y: auto; overflow-y: auto;
-webkit-overflow-scrolling: touch; // iOS 惯性滚动 -webkit-overflow-scrolling: touch; // iOS 惯性滚动
/* 安卓部分 WebView 兼容 */ /* 安卓部分 WebView 兼容 */
overscroll-behavior: contain; overscroll-behavior: contain;
} }
body { body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif; sans-serif;
background: #f5f5f5; background: #f5f5f5;
color: #222; color: #222;
line-height: 1.5; line-height: 1.5;
/* 安卓部分机型字体抗锯齿 */ /* 安卓部分机型字体抗锯齿 */
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
/* iOS input、textarea 默认圆角和阴影去除 */ /* iOS input、textarea 默认圆角和阴影去除 */
input, textarea { input, textarea {
border-radius: 0; border-radius: 0;
box-shadow: none; box-shadow: none;
} }
/* 安卓部分 WebView 点击延迟优化 */ /* 安卓部分 WebView 点击延迟优化 */
body, input, textarea, select, button { body, input, textarea, select, button {
touch-action: manipulation; touch-action: manipulation;
} }
// 导航栏样式 // 导航栏样式
.nav-title { .nav-title {
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
color: var(--primary-color); color: var(--primary-color);
} }
// 搜索相关样式 // 搜索相关样式
.search-bar { .search-bar {
display: flex; display: flex;
gap: 12px; gap: 12px;
align-items: center; align-items: center;
padding: 12px; padding: 12px;
} }
.search-input-wrapper { .search-input-wrapper {
position: relative; position: relative;
flex: 1; flex: 1;
.ant-input { .ant-input {
border-radius: 8px; border-radius: 8px;
} }
} }
.refresh-btn { .refresh-btn {
height: 40px; height: 40px;
width: 40px; width: 40px;
padding: 0; padding: 0;
border-radius: 8px; border-radius: 8px;
} }
.new-task-btn { .new-task-btn {
height: 32px; height: 32px;
padding: 0 12px; padding: 0 12px;
border-radius: 6px; border-radius: 6px;
font-size: 14px; font-size: 14px;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 6px; gap: 6px;
} }