From 9544b0efba7d5f411936744ca21015a5284c052e Mon Sep 17 00:00:00 2001 From: Your Name <2377147866@qq.com> Date: Tue, 6 Jun 2023 19:31:27 +0800 Subject: [PATCH] aa --- src/api/cy/movie.tsx | 4 ++-- .../components/MovieDetails/MovieDetails.tsx | 23 ++++++++++++++----- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/api/cy/movie.tsx b/src/api/cy/movie.tsx index 1d2c08b..f27acaa 100644 --- a/src/api/cy/movie.tsx +++ b/src/api/cy/movie.tsx @@ -1,4 +1,4 @@ -import request, { GET } from "../request"; +import request, { GET, POST } from "../request"; export const getRotationList = (params: any) => { return request.get('/prod-api/api/movie/rotation/list', params) } @@ -32,5 +32,5 @@ export const getnamelist = (params: any) => { return GET('prod-api/api/movie/film/list', params) } export const getpinglist = (params: any) => { - return GET('prod-api/api/movie/film/comment', params) + return POST('prod-api/api/movie/film/comment', params) } diff --git a/src/pages/cy/components/MovieDetails/MovieDetails.tsx b/src/pages/cy/components/MovieDetails/MovieDetails.tsx index 61c871a..673135a 100644 --- a/src/pages/cy/components/MovieDetails/MovieDetails.tsx +++ b/src/pages/cy/components/MovieDetails/MovieDetails.tsx @@ -63,7 +63,9 @@ export default function MovieDetails() { setHasMore(ping.length > 0) } const seping = async()=>{ - let res =await getpinglist({content:value,movieId:movie.id,score:rate}) + let res =await getpinglist({content:value,movieId:numlist[0]?.id,score:rate}) + console.log(movie) +// console.log(value,numlist[0].id,rate) } useEffect(() => { getNumList() @@ -135,7 +137,7 @@ useEffect(()=>{ setVisible1(true) }} > - 底部弹出 + 评价 { }} bodyStyle={{ height: '40vh' }} > - - setvalue(e.target.value)} placeholder='请输入内容' clearable /> - 评分 setrate(val.toString())} /> -

+ + + +
} -- Gitee