diff --git a/Cunkebao/dist/.vite/manifest.json b/Cunkebao/dist/.vite/manifest.json index 9630fc98..0307e260 100644 --- a/Cunkebao/dist/.vite/manifest.json +++ b/Cunkebao/dist/.vite/manifest.json @@ -1,18 +1,14 @@ { - "_charts-DRkEUjsu.js": { - "file": "assets/charts-DRkEUjsu.js", + "_charts-BKZw5YGd.js": { + "file": "assets/charts-BKZw5YGd.js", "name": "charts", "imports": [ - "_ui-ltFujOOi.js", + "_ui-CQE-Ac3N.js", "_vendor-2vc8h_ct.js" ] }, - "_ui-D0C0OGrH.css": { - "file": "assets/ui-D0C0OGrH.css", - "src": "_ui-D0C0OGrH.css" - }, - "_ui-ltFujOOi.js": { - "file": "assets/ui-ltFujOOi.js", + "_ui-CQE-Ac3N.js": { + "file": "assets/ui-CQE-Ac3N.js", "name": "ui", "imports": [ "_vendor-2vc8h_ct.js" @@ -21,6 +17,10 @@ "assets/ui-D0C0OGrH.css" ] }, + "_ui-D0C0OGrH.css": { + "file": "assets/ui-D0C0OGrH.css", + "src": "_ui-D0C0OGrH.css" + }, "_utils-6WF66_dS.js": { "file": "assets/utils-6WF66_dS.js", "name": "utils", @@ -33,18 +33,18 @@ "name": "vendor" }, "index.html": { - "file": "assets/index-C1eWqLbB.js", + "file": "assets/index-Do1bKVHK.js", "name": "index", "src": "index.html", "isEntry": true, "imports": [ "_vendor-2vc8h_ct.js", - "_ui-ltFujOOi.js", + "_ui-CQE-Ac3N.js", "_utils-6WF66_dS.js", - "_charts-DRkEUjsu.js" + "_charts-BKZw5YGd.js" ], "css": [ - "assets/index-DqyE1UEk.css" + "assets/index-ZCB0Bf2x.css" ] } } \ No newline at end of file diff --git a/Cunkebao/dist/index.html b/Cunkebao/dist/index.html index 51b87117..40df896b 100644 --- a/Cunkebao/dist/index.html +++ b/Cunkebao/dist/index.html @@ -11,13 +11,13 @@ - + - + - + - +
diff --git a/Cunkebao/src/components/FriendSelection/data.ts b/Cunkebao/src/components/FriendSelection/data.ts index 30b9ec70..434aa641 100644 --- a/Cunkebao/src/components/FriendSelection/data.ts +++ b/Cunkebao/src/components/FriendSelection/data.ts @@ -10,7 +10,7 @@ export interface FriendSelectionItem { export interface FriendSelectionProps { selectedOptions?: FriendSelectionItem[]; onSelect: (friends: FriendSelectionItem[]) => void; - deviceIds?: string[]; + deviceIds?: number[]; enableDeviceFilter?: boolean; placeholder?: string; className?: string; diff --git a/Cunkebao/src/components/FriendSelection/selectionPopup.tsx b/Cunkebao/src/components/FriendSelection/selectionPopup.tsx index f5713c80..c527f755 100644 --- a/Cunkebao/src/components/FriendSelection/selectionPopup.tsx +++ b/Cunkebao/src/components/FriendSelection/selectionPopup.tsx @@ -12,7 +12,7 @@ interface SelectionPopupProps { onVisibleChange: (visible: boolean) => void; selectedOptions: FriendSelectionItem[]; onSelect: (friends: FriendSelectionItem[]) => void; - deviceIds?: string[]; + deviceIds?: number[]; enableDeviceFilter?: boolean; readonly?: boolean; onConfirm?: ( diff --git a/Cunkebao/src/pages/mobile/mine/traffic-pool/list/BatchAddModal.tsx b/Cunkebao/src/pages/mobile/mine/traffic-pool/list/BatchAddModal.tsx index 9a034765..5c7eae5c 100644 --- a/Cunkebao/src/pages/mobile/mine/traffic-pool/list/BatchAddModal.tsx +++ b/Cunkebao/src/pages/mobile/mine/traffic-pool/list/BatchAddModal.tsx @@ -15,7 +15,7 @@ interface BatchAddModalProps { const BatchAddModal: React.FC = ({ visible, onClose, - packageOptions, + packageOptions = [], batchTarget, setBatchTarget, selectedCount, diff --git a/Cunkebao/src/pages/mobile/mine/traffic-pool/list/api.ts b/Cunkebao/src/pages/mobile/mine/traffic-pool/list/api.ts index a5b757ef..5f1509e5 100644 --- a/Cunkebao/src/pages/mobile/mine/traffic-pool/list/api.ts +++ b/Cunkebao/src/pages/mobile/mine/traffic-pool/list/api.ts @@ -9,10 +9,10 @@ export function fetchTrafficPoolList(params: { return request("/v1/traffic/pool", params, "GET"); } -export async function fetchScenarioOptions(): Promise { +export async function fetchScenarioOptions() { return request("/v1/plan/scenes", {}, "GET"); } -export async function fetchPackageOptions(): Promise { +export async function fetchPackageOptions() { return request("/v1/traffic/pool/getPackage", {}, "GET"); } diff --git a/Cunkebao/src/pages/mobile/mine/traffic-pool/list/dataAnyx.tsx b/Cunkebao/src/pages/mobile/mine/traffic-pool/list/dataAnyx.tsx index 6894ce1b..390e439b 100644 --- a/Cunkebao/src/pages/mobile/mine/traffic-pool/list/dataAnyx.tsx +++ b/Cunkebao/src/pages/mobile/mine/traffic-pool/list/dataAnyx.tsx @@ -78,8 +78,14 @@ export function useTrafficPoolListLogic() { // 获取筛选项 useEffect(() => { - fetchPackageOptions().then(setPackageOptions); - fetchScenarioOptions().then(setScenarioOptions); + fetchPackageOptions().then(res => { + console.log("packageOptions", res); + + setPackageOptions(res.list || []); + }); + fetchScenarioOptions().then(res => { + setScenarioOptions(res.list || []); + }); }, []); // 筛选条件变化时刷新列表 diff --git a/Cunkebao/src/pages/mobile/mine/traffic-pool/list/index.tsx b/Cunkebao/src/pages/mobile/mine/traffic-pool/list/index.tsx index a2a2edec..e3bacf8f 100644 --- a/Cunkebao/src/pages/mobile/mine/traffic-pool/list/index.tsx +++ b/Cunkebao/src/pages/mobile/mine/traffic-pool/list/index.tsx @@ -173,8 +173,8 @@ const TrafficPoolList: React.FC = () => { status: "offline" as const, })), ); - setPackageId(filters.packageId); - setScenarioId(filters.scenarioId); + setPackageId(filters.packageId ? parseInt(filters.packageId) : 0); + setScenarioId(filters.scenarioId ? parseInt(filters.scenarioId) : 0); setUserValue(filters.userValue); setUserStatus(filters.userStatus); // 重新获取列表 diff --git a/Cunkebao/src/pages/mobile/workspace/auto-like/new/data.ts b/Cunkebao/src/pages/mobile/workspace/auto-like/new/data.ts index 32201f84..43f1da6f 100644 --- a/Cunkebao/src/pages/mobile/workspace/auto-like/new/data.ts +++ b/Cunkebao/src/pages/mobile/workspace/auto-like/new/data.ts @@ -79,9 +79,9 @@ export interface CreateLikeTaskData { startTime: string; endTime: string; contentTypes: ContentType[]; - deveiceGroups: string[]; + deveiceGroups: number[]; deveiceGroupsOptions: DeviceSelectionItem[]; - friendsGroups: string[]; + friendsGroups: number[]; friendsGroupsOptions: FriendSelectionItem[]; friendMaxLikes: number; friendTags?: string; diff --git a/Cunkebao/src/pages/mobile/workspace/auto-like/new/index.tsx b/Cunkebao/src/pages/mobile/workspace/auto-like/new/index.tsx index 5be27d57..3d0aca8d 100644 --- a/Cunkebao/src/pages/mobile/workspace/auto-like/new/index.tsx +++ b/Cunkebao/src/pages/mobile/workspace/auto-like/new/index.tsx @@ -330,7 +330,12 @@ const NewAutoLike: React.FC = () => {
handleUpdateFormData({ devices })} + onSelect={devices => + handleUpdateFormData({ + deveiceGroups: devices.map(v => v.id), + deveiceGroupsOptions: devices, + }) + } showInput={true} showSelectedList={true} /> @@ -363,7 +368,7 @@ const NewAutoLike: React.FC = () => { selectedOptions={formData.friendsGroupsOptions || []} onSelect={friends => handleUpdateFormData({ - friendsGroups: friends.map(f => String(f.id)), + friendsGroups: friends.map(f => f.id), friendsGroupsOptions: friends, }) } @@ -385,7 +390,7 @@ const NewAutoLike: React.FC = () => { size="large" loading={isSubmitting} disabled={ - !formData.friendsgroups || formData.friendsgroups.length === 0 + !formData.friendsGroups || formData.friendsGroups.length === 0 } > {isEditMode ? "更新任务" : "创建任务"}