import request from '../utils/request.js'


class comments extends request {

    static async getCommentsByProduct(page=1,pageSize=10,storeId, productId) {
        const res = await this.getRequest(`${this.BASE_URL}Discuss/index?page=${page}&pageSize=${pageSize}&productId=${productId}&storeId=${storeId}`, this._defaultHeader)
        return res.data;
    }
    static async getCommentsByStore(page=1,pageSize=10,storeId) {
        const res = await this.getRequest(`${this.BASE_URL}Discuss/index?page=${page}&pageSize=${pageSize}&storeId=${storeId}`, this._defaultHeader)
        return res.data;
    }
    static async getPersonComments(page=1,pageSize=10,myDiscuss=1) {
        const res = await this.getRequest(`${this.BASE_URL}Discuss/index?page=${page}&pageSize=${pageSize}&myDiscuss=${myDiscuss}`, this._defaultHeader)
        return res.data;
    }


}

export default comments;