import { httpProvider } from './http' ; export class CommentProvider { /**
     * 获取所有评论
     */ static async getComments ( params ) { return httpProvider . get ( '/comment' , { params } ) ; } param id static async getComment ( id ) { return httpProvider . get ( `/comment/${ id }` ) ; } param hostId static async getArticleComments ( hostId , params ) { return httpProvider . get ( `/comment/host/${ hostId }` , { params } ) ; } param data static async addComment ( data ) { return httpProvider . post ( '/comment' , data ) ; } param id param data static async updateComment ( id , data ) { return httpProvider . patch ( `/comment/${ id }` , data ) ; } param id static async deleteComment ( id ) { return httpProvider . delete ( `/comment/${ id }` ) ; } }