goodsindex.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import request from '@/utils/request'
  2. // 批量通过内容
  3. export function handleUpDateOKShops(shopsId,data) {
  4. return request({
  5. url: '/goods/goods/okshops/' + shopsId,
  6. method: 'post',
  7. data: data
  8. })
  9. }
  10. // 查询商品信息列表
  11. export function listGoods(query) {
  12. return request({
  13. url: '/goods/goods/index/list',
  14. method: 'get',
  15. params: query
  16. })
  17. }
  18. // 查询商品信息详细
  19. export function getGoods(goodsId) {
  20. return request({
  21. url: '/goods/goods/index/' + goodsId,
  22. method: 'get'
  23. })
  24. }
  25. // 新增商品信息
  26. export function addGoods(data) {
  27. return request({
  28. url: '/goods/goods/index',
  29. method: 'post',
  30. data: data
  31. })
  32. }
  33. // 修改商品信息
  34. export function updateGoods(data) {
  35. return request({
  36. url: '/goods/goods',
  37. method: 'put',
  38. data: data
  39. })
  40. }
  41. // 删除商品信息
  42. export function delGoods(goodsId) {
  43. return request({
  44. url: '/goods/goods/' + goodsId,
  45. method: 'delete'
  46. })
  47. }
  48. // 导出商品信息
  49. export function exportGoods(query) {
  50. return request({
  51. url: '/goods/goods/index/export',
  52. method: 'get',
  53. params: query
  54. })
  55. }