....
This commit is contained in:
@@ -478,9 +478,31 @@ interface CommentlData{
|
||||
msg: string;
|
||||
total: number;
|
||||
}
|
||||
interface ReplylistData{
|
||||
data: CommentList[];
|
||||
code: number;
|
||||
msg: string;
|
||||
score?:string,
|
||||
total: number;
|
||||
}
|
||||
export async function getcommentlist(data?:any) {
|
||||
const res=await get<CommentlData>('comments',data)
|
||||
return res
|
||||
console.log(data.type==2)
|
||||
|
||||
if(data.type==2){
|
||||
const res=await get<CommentlData>('comments',data)
|
||||
return res
|
||||
}else{
|
||||
const res=await get<ReplylistData>('comments',data)
|
||||
console.log(res)
|
||||
return res
|
||||
}
|
||||
|
||||
// if(data.type==2){
|
||||
// return res
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -495,8 +517,22 @@ interface SendData{
|
||||
}
|
||||
export async function addcomment(data?:any):Promise<void> {
|
||||
const res=await post<SendData>('comments',data)
|
||||
|
||||
if(res.code==0){
|
||||
message.success("发布成功")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除评论
|
||||
*/
|
||||
|
||||
export async function delreply(data?:any) {
|
||||
const res = await del<Liveaddrule>('comments/'+data);
|
||||
if(res.code==0){
|
||||
message.success("删除成功")
|
||||
}
|
||||
return res
|
||||
}
|
||||
/**
|
||||
* 发送验证码
|
||||
* @param phone 手机号
|
||||
|
||||
Reference in New Issue
Block a user