brand.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import request from '@/utils/request'
  2. //恢复
  3. export function recoverBrand(brandId){
  4. return request({
  5. url: '/recycle/brand/recoverBrand',
  6. method: 'put',
  7. data:{brandId:brandId}
  8. })
  9. }
  10. //移除
  11. export function deleteBrand(brandId) {
  12. return request({
  13. url: `/recycle/brand/deleteBrand/${brandId}`,
  14. method: 'delete',
  15. })
  16. }
  17. // 查询品牌列表
  18. export function listBrand(query) {
  19. return request({
  20. url: '/recycle/brand/list',
  21. method: 'get',
  22. params: query
  23. })
  24. }
  25. // 查询品牌详细
  26. export function getBrand(brandId) {
  27. return request({
  28. url: '/core/brand/' + brandId,
  29. method: 'get'
  30. })
  31. }
  32. // 新增品牌
  33. export function addBrand(data) {
  34. return request({
  35. url: '/core/brand',
  36. method: 'post',
  37. data: data
  38. })
  39. }
  40. // 修改品牌
  41. export function updateBrand(data) {
  42. return request({
  43. url: '/core/brand',
  44. method: 'put',
  45. data: data
  46. })
  47. }
  48. // 删除品牌
  49. export function delBrand(brandId) {
  50. return request({
  51. url: '/core/brand/' + brandId,
  52. method: 'delete'
  53. })
  54. }