diff --git a/app/bill/[type]/page.jsx b/app/bill/[type]/page.jsx index a0b60dd..72ed7f0 100644 --- a/app/bill/[type]/page.jsx +++ b/app/bill/[type]/page.jsx @@ -5,13 +5,10 @@ import {useRouter} from "next/navigation"; import requireAPI from "@/utils/requireAPI"; export default function BillDetail({ params }) { const [data, setData] = useState([]); - const [isFetching, setIsFetching] = useState(true); + const [isFetching, setIsFetching] = useState(false); const router = useRouter(); useEffect(() => { - - setTimeout(() => { - getData(); - }, 500); + getData(); }, []); const getData = async () => { let type; @@ -32,6 +29,7 @@ export default function BillDetail({ params }) { break; } try { + setIsFetching(true); const _data = await requireAPI( "POST", "/api/vas/get_ch_list", @@ -86,7 +84,7 @@ export default function BillDetail({ params }) { )} {data.length === 0 && ( -
+
- + + {metadata.title} - - - + + + + + +
{withAuth({children})} {/* {children} */} diff --git a/app/messageDetail/page.js b/app/messageDetail/page.js index 0e1dd1d..69f7343 100644 --- a/app/messageDetail/page.js +++ b/app/messageDetail/page.js @@ -5,10 +5,11 @@ import React, { useState, useRef, useEffect, useCallback } from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faAngleLeft } from "@fortawesome/free-solid-svg-icons"; import { Input, Button, Toast, Avatar, DotLoading } from "antd-mobile"; -import { useRouter } from "next/navigation"; +import { useRouter, useSearchParams } from "next/navigation"; import { get } from "@/utils/storeInfo"; import requireAPI from "@/utils/requireAPI"; import { formatDeadline } from "@/utils/tools"; +import { getStreamerDetailInfo } from "@/api/space"; /* params格式: { @@ -19,6 +20,7 @@ params格式: export default function MessageDetail({}) { // const [hasMore, setHasMore] = useState(true); const router = useRouter(); + const searchParams = useSearchParams(); const [oldMessages, setOldMessages] = useState([]); const [messages, setMessages] = useState([]); const [handledmessages, setHandledmessages] = useState([]); @@ -26,15 +28,33 @@ export default function MessageDetail({}) { const [userInfo, setUserInfo] = useState(null); const [newMessage, setNewMessage] = useState(""); const [loading, setLoading] = useState(false); - const [offset, setOffset] = useState(0); const [more, setMore] = useState(1); const scrollBox = useRef(); const toScrollBottom = useRef(0); useEffect(() => { const userData = get("account"); - setUserInfo(userData); - getSession(userData.mid); + const mid = searchParams.get("mid") + if (mid) { + getStreamerDetailInfo(Number(mid)).then(data=>{ + setMessages([[{ + predicate: 1, + _id: 1, + createdAt: new Date()/1000, + text: data?.streamer_ext.auto_response_message, + user: { + _id: 0, + name: "客服", + avatar: data?.streamer_ext?.avatar?.images[0]?.urls[0], + }, + }]]); + }) + + + } else { + setUserInfo(userData); + getSession(userData.mid); + } }, []); useEffect(() => { const intervalId = setInterval(() => { @@ -262,7 +282,7 @@ export default function MessageDetail({}) { user: { _id: 0, name: "客服", - avatar: process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"images/icon.png", + avatar: process.env.NEXT_PUBLIC_WEB_ASSETS_URL + "images/icon.png", }, }; } @@ -369,7 +389,7 @@ export default function MessageDetail({}) {
-
+ {searchParams.get("mid")=="" &&
{loading ? ( @@ -379,7 +399,7 @@ export default function MessageDetail({}) { 无更早消息 )}
-
+
}
    {messages?.map((item, index) => (
  • @@ -433,26 +453,28 @@ export default function MessageDetail({}) { {/* */}
-
-
- + {searchParams.get("mid")=="" && ( +
+
+ +
+
- -
+ )}
); diff --git a/app/profile/[mid]/page.js b/app/profile/[mid]/page.js index 7ca6d9e..5be32e3 100644 --- a/app/profile/[mid]/page.js +++ b/app/profile/[mid]/page.js @@ -472,7 +472,7 @@ export default function PersonSpace() {
handleFollow(isFollow, Number(mid), setIsFollow)} + onClick={() => router.push("/messageDetail?mid="+streamerInfo?.streamer_ext?.mid)} > 私聊
diff --git a/app/search/page.js b/app/search/page.js index d22dd89..0e3629f 100644 --- a/app/search/page.js +++ b/app/search/page.js @@ -168,10 +168,11 @@ const ZoneItem = ({ data, showMore, link,search }) => { className="grid grid-cols-[2.5rem_100%] gap-2 items-center" style={{ maxWidth: "calc(100vw - 2rem)" }} > -
diff --git a/components/WithAuth/index.js b/components/WithAuth/index.js index b00d0e5..102b50c 100644 --- a/components/WithAuth/index.js +++ b/components/WithAuth/index.js @@ -16,10 +16,10 @@ export default function WithAuth(WrappedComponent) { }, [pathname]); const checkLogin = async () => { const hasToken = await get("token"); - console.log("hasToken", hasToken); + // console.log("hasToken", hasToken); if (hasToken) { const hasToken = get("token"); - console.log("hasToken", hasToken); + // console.log("hasToken", hasToken); if (hasToken) { const currentIsLogin = await checkAuth(); if (!currentIsLogin) { diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000..b195838 Binary files /dev/null and b/public/favicon.png differ diff --git a/public/icons/32DP/contact.png b/public/icons/32DP/contact.png new file mode 100644 index 0000000..0318cd6 Binary files /dev/null and b/public/icons/32DP/contact.png differ diff --git a/public/icons/32DP/edit.png b/public/icons/32DP/edit.png new file mode 100644 index 0000000..a757ea6 Binary files /dev/null and b/public/icons/32DP/edit.png differ diff --git a/public/icons/32DP/editplatform.png b/public/icons/32DP/editplatform.png new file mode 100644 index 0000000..87b1ec5 Binary files /dev/null and b/public/icons/32DP/editplatform.png differ diff --git a/public/icons/32DP/editprofile.png b/public/icons/32DP/editprofile.png new file mode 100644 index 0000000..ba49bdd Binary files /dev/null and b/public/icons/32DP/editprofile.png differ diff --git a/public/icons/32DP/join.png b/public/icons/32DP/join.png new file mode 100644 index 0000000..9f9ec97 Binary files /dev/null and b/public/icons/32DP/join.png differ diff --git a/public/icons/32DP/link.png b/public/icons/32DP/link.png new file mode 100644 index 0000000..eb2d1b2 Binary files /dev/null and b/public/icons/32DP/link.png differ diff --git a/public/icons/32DP/myposts.png b/public/icons/32DP/myposts.png new file mode 100644 index 0000000..70b8c81 Binary files /dev/null and b/public/icons/32DP/myposts.png differ diff --git a/public/icons/32DP/search.png b/public/icons/32DP/search.png new file mode 100644 index 0000000..9c52ea4 Binary files /dev/null and b/public/icons/32DP/search.png differ diff --git a/public/icons/32DP/setting.png b/public/icons/32DP/setting.png new file mode 100644 index 0000000..84c14d0 Binary files /dev/null and b/public/icons/32DP/setting.png differ diff --git a/public/icons/32DP/share.png b/public/icons/32DP/share.png new file mode 100644 index 0000000..c2f820a Binary files /dev/null and b/public/icons/32DP/share.png differ diff --git a/public/icons/32DP/sharemoney.png b/public/icons/32DP/sharemoney.png new file mode 100644 index 0000000..f12ee29 Binary files /dev/null and b/public/icons/32DP/sharemoney.png differ diff --git a/public/icons/32DP/smalllink.png b/public/icons/32DP/smalllink.png new file mode 100644 index 0000000..47e0fef Binary files /dev/null and b/public/icons/32DP/smalllink.png differ diff --git a/public/icons/32DP/space.png b/public/icons/32DP/space.png new file mode 100644 index 0000000..0a47ee4 Binary files /dev/null and b/public/icons/32DP/space.png differ diff --git a/public/icons/32DP/wallet.png b/public/icons/32DP/wallet.png new file mode 100644 index 0000000..4e93300 Binary files /dev/null and b/public/icons/32DP/wallet.png differ diff --git a/public/icons/32DP/wechat.png b/public/icons/32DP/wechat.png new file mode 100644 index 0000000..0836e97 Binary files /dev/null and b/public/icons/32DP/wechat.png differ diff --git a/public/icons/appbuy.png b/public/icons/appbuy.png new file mode 100644 index 0000000..c729cde Binary files /dev/null and b/public/icons/appbuy.png differ diff --git a/public/icons/chaofen.png b/public/icons/chaofen.png new file mode 100644 index 0000000..cae40cf Binary files /dev/null and b/public/icons/chaofen.png differ diff --git a/public/icons/chaofen_bg.png b/public/icons/chaofen_bg.png new file mode 100644 index 0000000..14dbdd4 Binary files /dev/null and b/public/icons/chaofen_bg.png differ diff --git a/public/icons/copy.png b/public/icons/copy.png new file mode 100644 index 0000000..d6bf209 Binary files /dev/null and b/public/icons/copy.png differ diff --git a/public/icons/edit.png b/public/icons/edit.png new file mode 100644 index 0000000..3dc0296 Binary files /dev/null and b/public/icons/edit.png differ diff --git a/public/icons/goldlink.png b/public/icons/goldlink.png new file mode 100644 index 0000000..3caacd5 Binary files /dev/null and b/public/icons/goldlink.png differ diff --git a/public/icons/goto.png b/public/icons/goto.png new file mode 100644 index 0000000..936a91b Binary files /dev/null and b/public/icons/goto.png differ diff --git a/public/icons/gray....png b/public/icons/gray....png new file mode 100644 index 0000000..71ebe13 Binary files /dev/null and b/public/icons/gray....png differ diff --git a/public/icons/h5buy.png b/public/icons/h5buy.png new file mode 100644 index 0000000..9b1c6b9 Binary files /dev/null and b/public/icons/h5buy.png differ diff --git a/public/icons/image_post.png b/public/icons/image_post.png new file mode 100644 index 0000000..6e9c9da Binary files /dev/null and b/public/icons/image_post.png differ diff --git a/public/icons/info/ID.png b/public/icons/info/ID.png new file mode 100644 index 0000000..3d16343 Binary files /dev/null and b/public/icons/info/ID.png differ diff --git a/public/icons/info/constellation.png b/public/icons/info/constellation.png new file mode 100644 index 0000000..e772ce8 Binary files /dev/null and b/public/icons/info/constellation.png differ diff --git a/public/icons/info/edit.png b/public/icons/info/edit.png new file mode 100644 index 0000000..3dc0296 Binary files /dev/null and b/public/icons/info/edit.png differ diff --git a/public/icons/info/fan.png b/public/icons/info/fan.png new file mode 100644 index 0000000..d75b967 Binary files /dev/null and b/public/icons/info/fan.png differ diff --git a/public/icons/info/female.png b/public/icons/info/female.png new file mode 100644 index 0000000..ded21db Binary files /dev/null and b/public/icons/info/female.png differ diff --git a/public/icons/info/height.png b/public/icons/info/height.png new file mode 100644 index 0000000..fdb8290 Binary files /dev/null and b/public/icons/info/height.png differ diff --git a/public/icons/info/location.png b/public/icons/info/location.png new file mode 100644 index 0000000..71435ea Binary files /dev/null and b/public/icons/info/location.png differ diff --git a/public/icons/info/male.png b/public/icons/info/male.png new file mode 100644 index 0000000..20b9f84 Binary files /dev/null and b/public/icons/info/male.png differ diff --git a/public/icons/info/weight.png b/public/icons/info/weight.png new file mode 100644 index 0000000..31a080e Binary files /dev/null and b/public/icons/info/weight.png differ diff --git a/public/icons/magnifier.png b/public/icons/magnifier.png new file mode 100644 index 0000000..23b78b0 Binary files /dev/null and b/public/icons/magnifier.png differ diff --git a/public/icons/money_gold.png b/public/icons/money_gold.png new file mode 100644 index 0000000..568ec30 Binary files /dev/null and b/public/icons/money_gold.png differ diff --git a/public/icons/money_pink.png b/public/icons/money_pink.png new file mode 100644 index 0000000..0a4a510 Binary files /dev/null and b/public/icons/money_pink.png differ diff --git a/public/icons/myblur.png b/public/icons/myblur.png new file mode 100644 index 0000000..1341417 Binary files /dev/null and b/public/icons/myblur.png differ diff --git a/public/icons/myfocus.png b/public/icons/myfocus.png new file mode 100644 index 0000000..941a6b7 Binary files /dev/null and b/public/icons/myfocus.png differ diff --git a/public/icons/nodata.png b/public/icons/nodata.png new file mode 100644 index 0000000..476db2c Binary files /dev/null and b/public/icons/nodata.png differ diff --git a/public/icons/notthumbup.png b/public/icons/notthumbup.png new file mode 100644 index 0000000..cb8c518 Binary files /dev/null and b/public/icons/notthumbup.png differ diff --git a/public/icons/pinkline.png b/public/icons/pinkline.png new file mode 100644 index 0000000..5514ac0 Binary files /dev/null and b/public/icons/pinkline.png differ diff --git a/public/icons/pinklink.png b/public/icons/pinklink.png new file mode 100644 index 0000000..23656fd Binary files /dev/null and b/public/icons/pinklink.png differ diff --git a/public/icons/play.png b/public/icons/play.png new file mode 100644 index 0000000..99c593a Binary files /dev/null and b/public/icons/play.png differ diff --git a/public/icons/postblur.png b/public/icons/postblur.png new file mode 100644 index 0000000..93183ec Binary files /dev/null and b/public/icons/postblur.png differ diff --git a/public/icons/postfocus.png b/public/icons/postfocus.png new file mode 100644 index 0000000..c3124bc Binary files /dev/null and b/public/icons/postfocus.png differ diff --git a/public/icons/report.png b/public/icons/report.png new file mode 100644 index 0000000..ef68353 Binary files /dev/null and b/public/icons/report.png differ diff --git a/public/icons/report_bg.png b/public/icons/report_bg.png new file mode 100644 index 0000000..74cb259 Binary files /dev/null and b/public/icons/report_bg.png differ diff --git a/public/icons/review_fail_bg.png b/public/icons/review_fail_bg.png new file mode 100644 index 0000000..c8b1230 Binary files /dev/null and b/public/icons/review_fail_bg.png differ diff --git a/public/icons/rightarrow_border.png b/public/icons/rightarrow_border.png new file mode 100644 index 0000000..a3d0610 Binary files /dev/null and b/public/icons/rightarrow_border.png differ diff --git a/public/icons/search.png b/public/icons/search.png new file mode 100644 index 0000000..9c52ea4 Binary files /dev/null and b/public/icons/search.png differ diff --git a/public/icons/setting.png b/public/icons/setting.png new file mode 100644 index 0000000..5195e29 Binary files /dev/null and b/public/icons/setting.png differ diff --git a/public/icons/space_blur.png b/public/icons/space_blur.png new file mode 100644 index 0000000..b26e96d Binary files /dev/null and b/public/icons/space_blur.png differ diff --git a/public/icons/space_focus.png b/public/icons/space_focus.png new file mode 100644 index 0000000..534ace7 Binary files /dev/null and b/public/icons/space_focus.png differ diff --git a/public/icons/space_new_post.png b/public/icons/space_new_post.png new file mode 100644 index 0000000..ec48579 Binary files /dev/null and b/public/icons/space_new_post.png differ diff --git a/public/icons/tabindicator.png b/public/icons/tabindicator.png new file mode 100644 index 0000000..5748384 Binary files /dev/null and b/public/icons/tabindicator.png differ diff --git a/public/icons/thumbup.png b/public/icons/thumbup.png new file mode 100644 index 0000000..1f82d55 Binary files /dev/null and b/public/icons/thumbup.png differ diff --git a/public/icons/tiefen.png b/public/icons/tiefen.png new file mode 100644 index 0000000..600750b Binary files /dev/null and b/public/icons/tiefen.png differ diff --git a/public/icons/verification.png b/public/icons/verification.png new file mode 100644 index 0000000..bad7fb5 Binary files /dev/null and b/public/icons/verification.png differ diff --git a/public/icons/video_post.png b/public/icons/video_post.png new file mode 100644 index 0000000..819ce4a Binary files /dev/null and b/public/icons/video_post.png differ diff --git a/public/icons/vipbig.png b/public/icons/vipbig.png new file mode 100644 index 0000000..9da9c55 Binary files /dev/null and b/public/icons/vipbig.png differ diff --git a/public/images/icon.png b/public/images/icon.png new file mode 100644 index 0000000..17a1b57 Binary files /dev/null and b/public/images/icon.png differ diff --git a/public/images/icon_diamond.png b/public/images/icon_diamond.png new file mode 100644 index 0000000..bec875a Binary files /dev/null and b/public/images/icon_diamond.png differ diff --git a/public/images/icon_goldcoin.png b/public/images/icon_goldcoin.png new file mode 100644 index 0000000..9c86678 Binary files /dev/null and b/public/images/icon_goldcoin.png differ diff --git a/public/images/logo.png b/public/images/logo.png new file mode 100644 index 0000000..e0faeef Binary files /dev/null and b/public/images/logo.png differ diff --git a/public/images/pinklink.png b/public/images/pinklink.png new file mode 100644 index 0000000..ea1c540 Binary files /dev/null and b/public/images/pinklink.png differ diff --git a/public/images/platform_wechat.png b/public/images/platform_wechat.png new file mode 100644 index 0000000..d986c5e Binary files /dev/null and b/public/images/platform_wechat.png differ diff --git a/public/images/profilebackground.png b/public/images/profilebackground.png new file mode 100644 index 0000000..42438ef Binary files /dev/null and b/public/images/profilebackground.png differ diff --git a/public/images/space_active.png b/public/images/space_active.png new file mode 100644 index 0000000..2ef216c Binary files /dev/null and b/public/images/space_active.png differ diff --git a/public/images/space_new.png b/public/images/space_new.png new file mode 100644 index 0000000..2ef216c Binary files /dev/null and b/public/images/space_new.png differ diff --git a/public/images/top_post.png b/public/images/top_post.png new file mode 100644 index 0000000..026cb91 Binary files /dev/null and b/public/images/top_post.png differ diff --git a/public/images/wechat.png b/public/images/wechat.png new file mode 100644 index 0000000..382b389 Binary files /dev/null and b/public/images/wechat.png differ