comments.js 729 B

12345678910111213141516171819202122
  1. import request from '../utils/request.js'
  2. class comments extends request {
  3. static async getCommentsByProduct(storeId, productId) {
  4. const res = await this.getRequest(`${this.BASE_URL}Discuss/index?productId=${productId}&storeId=${storeId}`, this._defaultHeader)
  5. return res.data;
  6. }
  7. static async getCommentsByStore(storeId) {
  8. const res = await this.getRequest(`${this.BASE_URL}Discuss/index?storeId=${storeId}`, this._defaultHeader)
  9. return res.data;
  10. }
  11. static async getPersonComments(myDiscuss=1) {
  12. const res = await this.getRequest(`${this.BASE_URL}Discuss/index?myDiscuss=${myDiscuss}`, this._defaultHeader)
  13. return res.data;
  14. }
  15. }
  16. export default comments;