applist.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import request from '@/utils/request'
  2. import {
  3. baseUrl
  4. }
  5. from '@/api/baseurl'
  6. // 按品类查询商家列表
  7. export function getTypeAppList(id,params) {
  8. return request({
  9. url: baseUrl + `/student/applet/customer/getCustomerListByProductId/${id}`,
  10. method: 'get',
  11. params
  12. })
  13. }
  14. // 查询用户收藏列表
  15. export function collectionList(params) {
  16. return request({
  17. url: baseUrl + '/student/applet/collection/collectionList',
  18. method: 'get',
  19. params
  20. })
  21. }
  22. // 查询用户浏览记录
  23. export function getBrowseRecordInfoList(params) {
  24. return request({
  25. url: baseUrl + '/student/applet/record/info/getBrowseRecordInfoList',
  26. method: 'get',
  27. params
  28. })
  29. }
  30. // 查询品类列表
  31. export function typeList(params) {
  32. return request({
  33. url: baseUrl + '/student/applet/product/info/list',
  34. method: 'get',
  35. params
  36. })
  37. }
  38. // 收藏商家
  39. export function addFavorites(id) {
  40. return request({
  41. url: baseUrl + `/student/applet/collection/collectionBusiness/${id}`,
  42. method: 'put'
  43. })
  44. }
  45. // 删除收藏
  46. export function delFavorites(ids) {
  47. return request({
  48. url: baseUrl + `/student/applet/collection/cancelCollection/${ids}`,
  49. method: 'delete'
  50. })
  51. }
  52. // 新增记录
  53. export function BrowseRecordAdd(id) {
  54. return request({
  55. url: baseUrl + `/student/applet/record/info/insertBrowseRecord/${id}`,
  56. method: 'put'
  57. })
  58. }
  59. // 删除记录
  60. export function BrowseRecordDel(ids) {
  61. return request({
  62. url: baseUrl + `/student/applet/record/info/${ids}`,
  63. method: 'delete'
  64. })
  65. }