diff --git a/app/streamerPosts/[id]/page.jsx b/app/streamerPosts/[id]/page.jsx index 761811c..7c69767 100644 --- a/app/streamerPosts/[id]/page.jsx +++ b/app/streamerPosts/[id]/page.jsx @@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react"; import { List, InfiniteScroll, Toast } from "antd-mobile"; -import { useRouter } from "next/navigation"; +import { useRouter, useParams } from "next/navigation"; import requireAPI from "@/utils/requireAPI"; import Empty from "@/components/Empty"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; @@ -10,7 +10,8 @@ import { faAngleLeft } from "@fortawesome/free-solid-svg-icons"; import PostItem from "@/components/PostItem"; import { get } from "@/utils/storeInfo"; -export default function StreamerPosts({ id }) { +export default function StreamerPosts() { + const { id } = useParams(); //获取当前时间 const [currentTime, setCurrentTime] = useState(); const [account, setAccount] = useState(null); @@ -33,7 +34,7 @@ export default function StreamerPosts({ id }) { // if (!more) return; try { const body = { - mid: id, + mid: parseInt(id), ct_upper_bound: currentTime, offset: offset, limit: 4, diff --git a/app/streamerPosts/editPost/[zid]/page.jsx b/app/streamerPosts/editPost/[zid]/page.jsx index b9dd33f..9664c59 100644 --- a/app/streamerPosts/editPost/[zid]/page.jsx +++ b/app/streamerPosts/editPost/[zid]/page.jsx @@ -132,7 +132,7 @@ export default function EditPost() { //提交成功后显示Toast并返回上一页 Toast.show({ icon: "success", - content: "更新成功", + content: "提交成功,等待审核!", position: "top", }); router.back();