diff --git a/nkebao/src/api/common.ts b/nkebao/src/api/common.ts index 6e675d3b..ebe966eb 100644 --- a/nkebao/src/api/common.ts +++ b/nkebao/src/api/common.ts @@ -1,28 +1,27 @@ -import request from "./request"; -/** - * 通用文件上传方法(支持图片、文件) - * @param {File} file - 要上传的文件对象 - * @param {string} [uploadUrl='/v1/attachment/upload'] - 上传接口地址 - * @returns {Promise} - 上传成功后返回文件url - */ -export async function uploadFile( - file: File, - uploadUrl: string = "/v1/attachment/upload" -): Promise { - try { - // 创建 FormData 对象用于文件上传 - const formData = new FormData(); - formData.append("file", file); - - // 使用 request 方法上传文件,设置正确的 Content-Type - const res = await request(uploadUrl, formData, "POST", { - headers: { - "Content-Type": "multipart/form-data", - }, - }); - - return res.url; - } catch (e: any) { - throw new Error(e?.message || "文件上传失败"); - } -} +import request from "./request"; +/** + * 通用文件上传方法(支持图片、文件) + * @param {File} file - 要上传的文件对象 + * @param {string} [uploadUrl='/v1/attachment/upload'] - 上传接口地址 + * @returns {Promise} - 上传成功后返回文件url + */ +export async function uploadFile( + file: File, + uploadUrl: string = "/v1/attachment/upload" +): Promise { + try { + // 创建 FormData 对象用于文件上传 + const formData = new FormData(); + formData.append("file", file); + + // 使用 request 方法上传文件,设置正确的 Content-Type + const res = await request(uploadUrl, formData, "POST", { + headers: { + "Content-Type": "multipart/form-data", + }, + }); + return res.url; + } catch (e: any) { + throw new Error(e?.message || "文件上传失败"); + } +} diff --git a/nkebao/src/components/FriendSelection/index.tsx b/nkebao/src/components/FriendSelection/index.tsx index 0cf9e06f..8048e8b6 100644 --- a/nkebao/src/components/FriendSelection/index.tsx +++ b/nkebao/src/components/FriendSelection/index.tsx @@ -150,9 +150,18 @@ export default function FriendSelection({ }; // 获取已选好友详细信息 - const selectedFriendObjs = friends.filter((friend) => - selectedFriends.includes(friend.id) - ); + const selectedFriendObjs = [ + ...friends.filter((friend) => selectedFriends.includes(friend.id)), + ...selectedFriends + .filter((id) => !friends.some((friend) => friend.id === id)) + .map((id) => ({ + id, + nickname: id, + wechatId: id, + avatar: "", + customer: "", + })), + ]; // 删除已选好友 const handleRemoveFriend = (id: string) => { diff --git a/nkebao/src/pages/mine/index.module.scss b/nkebao/src/pages/mine/index.module.scss index d0ddc66a..7da15672 100644 --- a/nkebao/src/pages/mine/index.module.scss +++ b/nkebao/src/pages/mine/index.module.scss @@ -3,54 +3,118 @@ } .user-card { - margin-bottom: 16px; - border-radius: 12px; - overflow: hidden; - - :global(.adm-card-body) { - padding: 20px; - } + border-radius: 16px; + box-shadow: 0 2px 8px rgba(0,0,0,0.06); + margin: 16px 0 12px 0; + padding: 0 0 0 0; } -.user-info { +.user-info-row { display: flex; align-items: center; - gap: 16px; + padding: 20px 24px 16px 24px; } .user-avatar { - width: 60px; - height: 60px; + width: 56px; + height: 56px; border-radius: 50%; + background: #666; + display: flex; + align-items: center; + justify-content: center; + font-size: 28px; + font-weight: 700; + color: #1890ff; + margin-right: 18px; overflow: hidden; - border: 2px solid var(--primary-color); - - img { - width: 100%; - height: 100%; - object-fit: cover; - } +} +.avatar-placeholder { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + font-size: 28px; + font-weight: 700; + color: #1890ff; + background: #e6f7ff; + border-radius: 50%; } -.user-details { +.user-main-info { flex: 1; + min-width: 0; + position: relative; } +.user-main-row { + display: flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; +} .user-name { - font-size: 18px; - font-weight: 600; - color: #333; + font-size: 20px; + font-weight: 700; + color: #222; + margin-right: 2px; } - -.user-level { - font-size: 14px; - color: var(--primary-color); - margin-bottom: 4px; +.role-badge { + background: #fa8c16; + color: #fff; + font-size: 13px; + font-weight: 500; + border-radius: 12px; + padding: 2px 10px; + margin-right: 8px; } - -.user-points { - font-size: 12px; +.balance-label { color: #666; + font-size: 15px; + margin-right: 2px; +} +.balance-value { + color: #16b364; + font-size: 20px; + font-weight: 700; + margin-right: 4px; +} +.recharge-btn { + margin-right: 8px; + padding: 0 14px; + font-size: 14px; + height: 28px; + line-height: 28px; + border-radius: 8px; +} + +.icon-setting{ + font-size: 26px; + color: #666; + position: absolute; + right: 0px; + top: 0px; +} + +.icon-btn { + display: flex; + align-items: center; + justify-content: center; + width: 32px; + height: 32px; + border-radius: 50%; + background: none; + font-size: 20px; + color: #666; + cursor: pointer; + margin-left: 2px; +} +.last-login { + color: #888; + font-size: 13px; + margin-top: 6px; + margin-left: 2px; } .menu-card { @@ -124,6 +188,7 @@ .user-avatar { width: 50px; height: 50px; + background: #666; } .user-name { diff --git a/nkebao/src/pages/mine/index.tsx b/nkebao/src/pages/mine/index.tsx index 4019d842..afab1db6 100644 --- a/nkebao/src/pages/mine/index.tsx +++ b/nkebao/src/pages/mine/index.tsx @@ -23,6 +23,7 @@ const Mine: React.FC = () => { wechat: 25, traffic: 8, content: 156, + balance: 0, }); const [showLogoutDialog, setShowLogoutDialog] = useState(false); @@ -90,6 +91,7 @@ const Mine: React.FC = () => { wechat: res.wechatNum, traffic: 999, content: 999, + balance: res.balance || 0, }); } catch (error) { console.error("加载统计数据失败:", error); @@ -173,45 +175,51 @@ const Mine: React.FC = () => { footer={} >
- {/* 用户信息卡片 */} + {/* 用户信息卡片(严格按图片风格) */} -
-
{renderUserAvatar()}
-
-
-
{currentUserInfo.name}
- +
+ {/* 头像 */} +
+ {currentUserInfo.avatar ? ( + + ) : ( +
+ )} +
+ {/* 右侧内容 */} +
+
+ + {currentUserInfo.name} + + {currentUserInfo.role} + + + +
-
- {currentUserInfo.email} +
+ 余额: + + ¥{Number(stats.balance || 0).toFixed(2)} + +
-
- 最近登录: {currentUserInfo.lastLogin} +
+ 最近登录:{currentUserInfo.lastLogin}
-
-
- + navigate("/settings")} + />
diff --git a/nkebao/src/pages/mine/recharge/index.module.scss b/nkebao/src/pages/mine/recharge/index.module.scss new file mode 100644 index 00000000..e03d5412 --- /dev/null +++ b/nkebao/src/pages/mine/recharge/index.module.scss @@ -0,0 +1,127 @@ +.recharge-page { + padding: 16px 0 60px 0; + background: #f7f8fa; + min-height: 100vh; +} + +.balance-card { + margin: 16px; + background: #f6ffed; + border: 1px solid #b7eb8f; + border-radius: 12px; + padding: 18px 0 18px 0; + display: flex; + align-items: center; + .balance-content { + display: flex; + color: #16b364; + padding-left: 30px; + } + .wallet-icon { + color: #16b364; + font-size: 30px; + flex-shrink: 0; + } + .balance-info { + margin-left: 15px; + display: flex; + flex-direction: column; + justify-content: center; + } + .balance-label { + font-size: 14px; + font-weight: normal; + color: #666; + margin-bottom: 2px; + } + .balance-amount { + font-size: 24px; + font-weight: 700; + color: #16b364; + line-height: 1.1; + } +} + +.quick-card { + margin: 16px; + .quick-list { + display: flex; + flex-wrap: wrap; + gap: 8px; + justify-content: flex-start; + margin-bottom: 8px; + } +} + +.desc-card { + margin: 16px; + background: #fffbe6; + border: 1px solid #ffe58f; +} + +.warn-card { + margin: 16px; + background: #fff2e8; + border: 1px solid #ffbb96; +} + +.quick-title { + font-weight: 500; + margin-bottom: 8px; + font-size: 16px; +} +.quick-list { + display: flex; + flex-wrap: wrap; + gap: 8px; + justify-content: flex-start; + margin-bottom: 8px; +} +.quick-btn { + min-width: 80px; + margin: 4px 0; + font-size: 16px; + border-radius: 8px; +} +.quick-btn-active { + @extend .quick-btn; + font-weight: 600; +} +.recharge-main-btn { + margin-top: 16px; + font-size: 18px; + border-radius: 8px; +} +.desc-title { + font-weight: 500; + margin-bottom: 8px; + font-size: 16px; +} +.desc-text { + color: #666; + font-size: 14px; +} +.warn-content { + display: flex; + align-items: center; + gap: 8px; + color: #faad14; + font-size: 14px; +} +.warn-icon { + font-size: 30px; + color: #faad14; + flex-shrink: 0; +} +.warn-info { + display: flex; + flex-direction: column; +} +.warn-title { + font-weight: 600; + font-size: 15px; +} +.warn-text { + color: #faad14; + font-size: 14px; +} \ No newline at end of file diff --git a/nkebao/src/pages/mine/recharge/index.tsx b/nkebao/src/pages/mine/recharge/index.tsx new file mode 100644 index 00000000..9f5ad853 --- /dev/null +++ b/nkebao/src/pages/mine/recharge/index.tsx @@ -0,0 +1,101 @@ +import React, { useState } from "react"; +import { useNavigate } from "react-router-dom"; +import { Card, Button, Toast, NavBar } from "antd-mobile"; +import { useUserStore } from "@/store/module/user"; +import style from "./index.module.scss"; +import { WalletOutlined, WarningOutlined } from "@ant-design/icons"; +import NavCommon from "@/components/NavCommon"; +import Layout from "@/components/Layout/Layout"; + +const quickAmounts = [50, 100, 200, 500, 1000]; + +const Recharge: React.FC = () => { + const navigate = useNavigate(); + const { user } = useUserStore(); + // 假设余额从后端接口获取,实际可用props或store传递 + const [balance, setBalance] = useState(0); + const [selected, setSelected] = useState(null); + const [loading, setLoading] = useState(false); + + // 充值操作 + const handleRecharge = async () => { + if (!selected) { + Toast.show({ content: "请选择充值金额", position: "top" }); + return; + } + setLoading(true); + setTimeout(() => { + setBalance((b) => b + selected); + Toast.show({ content: `充值成功,已到账¥${selected}` }); + setLoading(false); + }, 1200); + }; + + return ( + }> +
+ +
+ +
+
当前余额
+
+ ¥{balance.toFixed(2)} +
+
+
+
+ +
快捷充值
+
+ {quickAmounts.map((amt) => ( + + ))} +
+ +
+ +
服务消耗
+
+ 使用以下服务将从余额中扣除相应费用。 +
+
+ {balance < 10 && ( + +
+ +
+
余额不足提醒
+
+ 当前余额较低,建议及时充值以免影响服务使用 +
+
+
+
+ )} +
+
+ ); +}; + +export default Recharge; diff --git a/nkebao/src/pages/mine/userSet/index.module.scss b/nkebao/src/pages/mine/userSet/index.module.scss new file mode 100644 index 00000000..b48a8001 --- /dev/null +++ b/nkebao/src/pages/mine/userSet/index.module.scss @@ -0,0 +1,115 @@ +.user-set-page { + background: #f7f8fa; +} +.user-card { + margin: 18px 16px 0 16px; + border-radius: 14px; + box-shadow: 0 2px 8px rgba(0,0,0,0.06); +} +.user-info { + display: flex; + align-items: flex-start; + padding: 24px 20px 20px 20px; +} +.avatar { + width: 64px; + height: 64px; + border-radius: 50%; + background: #f5f5f5; + display: flex; + align-items: center; + justify-content: center; + font-size: 30px; + font-weight: 700; + color: #1890ff; + margin-right: 22px; + overflow: hidden; +} +.avatar-placeholder { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + font-size: 30px; + font-weight: 700; + color: #1890ff; + background: #e6f7ff; + border-radius: 50%; +} +.info-list { + flex: 1; + min-width: 0; + display: flex; + flex-direction: column; + gap: 14px; +} +.info-item { + display: flex; + align-items: center; + font-size: 16px; +} +.label { + color: #888; + min-width: 70px; + font-size: 15px; +} +.value { + color: #222; + font-weight: 500; + font-size: 16px; + margin-left: 8px; + word-break: break-all; +} +.avatar-upload { + position: relative; + cursor: pointer; + width: 64px; + height: 64px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; + overflow: hidden; + background: #f5f5f5; + transition: box-shadow 0.2s; + box-shadow: 0 2px 8px rgba(0,0,0,0.04); +} +.avatar-upload img { + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 50%; +} +.avatar-edit { + position: absolute; + left: 0; + right: 0; + bottom: 0; + background: rgba(0,0,0,0.45); + color: #fff; + font-size: 13px; + text-align: center; + padding: 3px 0 2px 0; + border-radius: 0 0 32px 32px; + opacity: 0; + transition: opacity 0.2s; + pointer-events: none; +} +.avatar-upload:hover .avatar-edit { + opacity: 1; + pointer-events: auto; +} +.edit-input { + flex: 1; + min-width: 0; + font-size: 16px; + border-radius: 8px; + border: 1px solid #e5e6eb; + padding: 4px 10px; + background: #fafbfc; +} +.save-btn { +padding: 12px; +background: #fff; +} \ No newline at end of file diff --git a/nkebao/src/pages/mine/userSet/index.tsx b/nkebao/src/pages/mine/userSet/index.tsx new file mode 100644 index 00000000..99ed61c6 --- /dev/null +++ b/nkebao/src/pages/mine/userSet/index.tsx @@ -0,0 +1,113 @@ +import React, { useRef, useState } from "react"; +import { useUserStore } from "@/store/module/user"; +import { Card, Button, Input, Toast } from "antd-mobile"; +import style from "./index.module.scss"; +import { useNavigate } from "react-router-dom"; +import Layout from "@/components/Layout/Layout"; +import NavCommon from "@/components/NavCommon"; + +const UserSetting: React.FC = () => { + const { user, setUser } = useUserStore(); + const navigate = useNavigate(); + const [nickname, setNickname] = useState(user?.username || ""); + const [avatar, setAvatar] = useState(user?.avatar || ""); + const [uploading, setUploading] = useState(false); + const fileInputRef = useRef(null); + + // 头像上传 + const handleAvatarChange = (e: React.ChangeEvent) => { + const file = e.target.files?.[0]; + if (!file) return; + const reader = new FileReader(); + reader.onload = (ev) => { + setAvatar(ev.target?.result as string); + }; + reader.readAsDataURL(file); + }; + + // 保存 + const handleSave = async () => { + if (!nickname.trim()) { + Toast.show({ content: "昵称不能为空", position: "top" }); + return; + } + if (!user) return; + setUser({ ...user, id: user.id, username: nickname, avatar }); + Toast.show({ content: "保存成功", position: "top" }); + navigate(-1); + }; + + return ( + } + footer={ +
+ +
+ } + > +
+ +
+
+
fileInputRef.current?.click()} + > + {avatar ? ( + 头像 + ) : ( +
+ )} +
更换头像
+ +
+
+
+
+ 昵称 + +
+
+ 手机号 + {user?.phone || "-"} +
+
+ 账号 + {user?.account || "-"} +
+
+ 角色 + + {user?.isAdmin === 1 ? "管理员" : "普通用户"} + +
+
+
+
+
+
+ ); +}; + +export default UserSetting; diff --git a/nkebao/src/pages/scenarios/plan/new/steps/BasicSettings.tsx b/nkebao/src/pages/scenarios/plan/new/steps/BasicSettings.tsx index abc55a50..e2d0ba35 100644 --- a/nkebao/src/pages/scenarios/plan/new/steps/BasicSettings.tsx +++ b/nkebao/src/pages/scenarios/plan/new/steps/BasicSettings.tsx @@ -598,6 +598,7 @@ const BasicSettings: React.FC = ({ onChange={async (e) => { const file = e.target.files?.[0]; if (file) { + // 直接上传 try { const url = await uploadFile(file); const newPoster = { @@ -606,14 +607,9 @@ const BasicSettings: React.FC = ({ type: "poster", preview: url, }; - console.log(newPoster); - setCustomPosters((prev) => [...prev, newPoster]); - setSelectedMaterials([newPoster]); - onChange({ ...formData, materials: [newPoster] }); } catch (err) { // 可加toast提示 - log; } e.target.value = ""; } diff --git a/nkebao/src/pages/scenarios/plan/new/steps/FriendRequestSettings.tsx b/nkebao/src/pages/scenarios/plan/new/steps/FriendRequestSettings.tsx index 16e458d2..1c7b11e8 100644 --- a/nkebao/src/pages/scenarios/plan/new/steps/FriendRequestSettings.tsx +++ b/nkebao/src/pages/scenarios/plan/new/steps/FriendRequestSettings.tsx @@ -1,19 +1,10 @@ "use client"; import React, { useState, useEffect } from "react"; -import { - Form, - Input, - Button, - Checkbox, - Modal, - Alert, - Select, - message, -} from "antd"; -import { QuestionCircleOutlined, MessageOutlined } from "@ant-design/icons"; +import { Input, Button, Modal, Alert, Select } from "antd"; +import { MessageOutlined } from "@ant-design/icons"; import DeviceSelection from "@/components/DeviceSelection"; -import Layout from "@/components/Layout/Layout"; +import styles from "./friend.module.scss"; interface FriendRequestSettingsProps { formData: any; @@ -46,8 +37,8 @@ const FriendRequestSettings: React.FC = ({ }) => { const [isTemplateDialogOpen, setIsTemplateDialogOpen] = useState(false); const [hasWarnings, setHasWarnings] = useState(false); - const [selectedDevices, setSelectedDevices] = useState( - formData.selectedDevices || [] + const [selectedDevices, setSelectedDevices] = useState( + formData.device || [] ); const [showRemarkTip, setShowRemarkTip] = useState(false); @@ -97,171 +88,156 @@ const FriendRequestSettings: React.FC = ({ }; return ( - <> - -
- - -
-
- } - > -
-
- 选择设备 -
- d.id)} - onSelect={(deviceIds) => { - const newSelectedDevices = deviceIds.map((id) => ({ - id, - name: `设备 ${id}`, - status: "online", - })); - setSelectedDevices(newSelectedDevices); - onChange({ ...formData, device: deviceIds }); - }} - placeholder="选择设备" - /> -
-
+
+ {/* 选择设备区块 */} +
选择设备
+
+ { + setSelectedDevices(deviceIds); + onChange({ ...formData, device: deviceIds }); + }} + placeholder="选择设备" + /> +
-
-
- 好友备注 - setShowRemarkTip(true)} - onMouseLeave={() => setShowRemarkTip(false)} - onClick={() => setShowRemarkTip((v) => !v)} - > - ? - - {showRemarkTip && ( -
-
设置添加好友时的备注格式
-
- 备注格式预览: -
-
- {formData.remarkType === "phone" && - `138****1234+${getScenarioTitle()}`} - {formData.remarkType === "nickname" && - `小红书用户2851+${getScenarioTitle()}`} - {formData.remarkType === "source" && - `抖音直播+${getScenarioTitle()}`} -
-
- )} + {/* 好友备注区块 */} +
好友备注
+
+ + setShowRemarkTip(true)} + onMouseLeave={() => setShowRemarkTip(false)} + > + ? + + {showRemarkTip && ( +
+
设置添加好友时的备注格式
+
+ 备注格式预览:
- onChange({ ...formData, greeting: e.target.value })} + placeholder="请输入招呼语" + suffix={ +
+ 参考模板 + + } + /> +
-
-
- 招呼语 - -
- - onChange({ ...formData, greeting: e.target.value }) - } - placeholder="请输入招呼语" - className="mt-2" - /> -
+ {/* 添加间隔区块 */} +
添加间隔
+
+ + onChange({ + ...formData, + addFriendInterval: Number(e.target.value), + }) + } + style={{ width: 100 }} + /> + 分钟 +
-
- 添加间隔 -
- - onChange({ - ...formData, - addFriendInterval: Number(e.target.value), - }) - } - /> -
分钟
-
-
+ {/* 允许加人时间段区块 */} +
允许加人的时间段
+
+ + onChange({ ...formData, addFriendTimeStart: e.target.value }) + } + style={{ width: 120 }} + /> + + + onChange({ ...formData, addFriendTimeEnd: e.target.value }) + } + style={{ width: 120 }} + /> +
-
- 允许加人的时间段 -
- - onChange({ ...formData, addFriendTimeStart: e.target.value }) - } - className="w-32" - /> - - - onChange({ ...formData, addFriendTimeEnd: e.target.value }) - } - className="w-32" - /> -
-
+ {hasWarnings && ( + + )} - {hasWarnings && ( - - )} -
- + {/* 底部按钮 */} +
+ + +
+ {/* 招呼语模板弹窗 */} setIsTemplateDialogOpen(false)} footer={null} > -
+
{greetingTemplates.map((template, index) => ( ))}
- +
); }; diff --git a/nkebao/src/pages/scenarios/plan/new/steps/MessageSettings.tsx b/nkebao/src/pages/scenarios/plan/new/steps/MessageSettings.tsx index a3a34c24..9d2c795a 100644 --- a/nkebao/src/pages/scenarios/plan/new/steps/MessageSettings.tsx +++ b/nkebao/src/pages/scenarios/plan/new/steps/MessageSettings.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { Form, Input, Button, Tabs, Modal, Alert, Upload, message } from "antd"; +import { Input, Button, Tabs, Modal, Alert, message } from "antd"; import { PlusOutlined, CloseOutlined, @@ -13,7 +13,7 @@ import { LinkOutlined, TeamOutlined, } from "@ant-design/icons"; -import Layout from "@/components/Layout/Layout"; +import styles from "./messages.module.scss"; interface MessageContent { id: string; @@ -194,9 +194,9 @@ const MessageSettings: React.FC = ({ key: plan.day.toString(), label: plan.day === 0 ? "即时消息" : `第${plan.day}天`, children: ( -
+
{plan.messages.map((message, messageIndex) => ( -
+
{plan.day === 0 ? ( @@ -524,7 +524,10 @@ const MessageSettings: React.FC = ({
))} - @@ -533,31 +536,24 @@ const MessageSettings: React.FC = ({ })); return ( - <> - -
- - -
-
- } - > -
-
-

消息设置

- -
- - -
- - +
+
+

消息设置

+ +
+ +
+ + +
{/* 添加天数计划弹窗 */} = ({ }} >

选择要添加的消息计划类型

-
- {/* 选择群聊弹窗 */} = ({ setIsGroupSelectOpen(false); }} > -
+
{mockGroups.map((group) => (
handleSelectGroup(group.id)} >
{group.name}
@@ -603,7 +600,7 @@ const MessageSettings: React.FC = ({ ))}
- +
); }; diff --git a/nkebao/src/pages/scenarios/plan/new/steps/friend.module.scss b/nkebao/src/pages/scenarios/plan/new/steps/friend.module.scss new file mode 100644 index 00000000..0c0f1138 --- /dev/null +++ b/nkebao/src/pages/scenarios/plan/new/steps/friend.module.scss @@ -0,0 +1,48 @@ +.friend-container { + padding: 12px; +} +.friend-label { + margin-bottom: 12px; + font-weight: 500; +} +.friend-block { + margin-bottom: 16px; +} +.friend-remark-tip { + position: absolute; + right: 0; + top: 36px; + z-index: 10; + background: #fff; + border: 1px solid #eee; + border-radius: 6px; + padding: 12px; + width: 220px; + box-shadow: 0 2px 8px rgba(0,0,0,0.08); +} +.friend-remark-q { + position: absolute; + right: 8px; + top: 8px; + cursor: pointer; + color: #888; +} +.friend-interval-row { + display: flex; + align-items: center; + gap: 8px; +} +.friend-time-row { + display: flex; + align-items: center; + gap: 8px; +} +.friend-footer { + display: flex; + justify-content: space-between; + margin-top: 32px; +} +.friend-modal-btn { + width: 100%; + margin-bottom: 8px; +} diff --git a/nkebao/src/pages/scenarios/plan/new/steps/messages.module.scss b/nkebao/src/pages/scenarios/plan/new/steps/messages.module.scss new file mode 100644 index 00000000..37ff9a1d --- /dev/null +++ b/nkebao/src/pages/scenarios/plan/new/steps/messages.module.scss @@ -0,0 +1,60 @@ +.messages-container { + padding: 16px; +} +.messages-header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 16px; +} +.messages-title { + font-size: 18px; + font-weight: 600; +} +.messages-tab { + margin-bottom: 16px; +} +.messages-day-panel { + background: #fafbfc; + border-radius: 10px; + padding: 16px; + margin-bottom: 16px; +} +.messages-message-card { + background: #fff; + border-radius: 8px; + box-shadow: 0 2px 8px rgba(0,0,0,0.03); + padding: 16px; + margin-bottom: 16px; +} +.messages-message-type-btns { + display: flex; + gap: 8px; + margin-bottom: 8px; +} +.messages-add-message-btn { + width: 100%; + margin-top: 8px; +} +.messages-footer { + display: flex; + justify-content: space-between; + margin-top: 32px; +} +.messages-modal-btn { + width: 100%; + margin-bottom: 8px; +} +.messages-group-select-item { + padding: 16px; + border-radius: 8px; + cursor: pointer; + background: #fff; + margin-bottom: 8px; + border: 1px solid #eee; + transition: border 0.2s, background 0.2s; +} +.messages-group-select-item.selected { + background: #e6f7ff; + border: 1.5px solid #1677ff; +} diff --git a/nkebao/src/pages/workspace/auto-like/list/index.tsx b/nkebao/src/pages/workspace/auto-like/list/index.tsx index e70fc26a..d9598828 100644 --- a/nkebao/src/pages/workspace/auto-like/list/index.tsx +++ b/nkebao/src/pages/workspace/auto-like/list/index.tsx @@ -1,6 +1,7 @@ import React, { useState, useEffect, useRef } from "react"; import { useNavigate } from "react-router-dom"; -import { NavBar, Button, Toast, SpinLoading, Dialog, Card } from "antd-mobile"; +import { Button, Toast, SpinLoading, Dialog, Card } from "antd-mobile"; +import NavCommon from "@/components/NavCommon"; import { Input } from "antd"; import { PlusOutlined, @@ -230,25 +231,15 @@ const AutoLike: React.FC = () => { - - navigate(-1)} - /> -
- } + navigate("/workspace")} right={ } - > - 自动点赞 - + /> {/* 搜索栏 */}
diff --git a/nkebao/src/router/module/index.tsx b/nkebao/src/router/module/index.tsx index c68fdffd..c7233d03 100644 --- a/nkebao/src/router/module/index.tsx +++ b/nkebao/src/router/module/index.tsx @@ -2,6 +2,8 @@ import Home from "@/pages/home/index"; import Mine from "@/pages/mine/index"; import WechatAccounts from "@/pages/wechat-accounts/list/index"; import WechatAccountDetail from "@/pages/wechat-accounts/detail/index"; +import Recharge from "@/pages/mine/recharge/index"; +import UserSetting from "@/pages/mine/userSet/index"; const routes = [ // 基础路由 @@ -26,6 +28,16 @@ const routes = [ element: , auth: true, }, + { + path: "/recharge", + element: , + auth: true, + }, + { + path: "/settings", + element: , + auth: true, + }, ]; export default routes; diff --git a/nkebao/src/router/module/workspace.tsx b/nkebao/src/router/module/workspace.tsx index 85282d91..ee4ca0c5 100644 --- a/nkebao/src/router/module/workspace.tsx +++ b/nkebao/src/router/module/workspace.tsx @@ -40,7 +40,7 @@ const workspaceRoutes = [ auth: true, }, { - path: "/workspace/auto-like/:id/edit", + path: "/workspace/auto-like/edit/:id", element: , auth: true, },