storeProduct.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import request from '@/utils/request'
  2. // 查询商品列表
  3. export function listStoreProduct(query) {
  4. return request({
  5. url: '/store/storeProduct/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询商品详细
  11. export function getStoreProduct(productId) {
  12. return request({
  13. url: '/store/storeProduct/' + productId,
  14. method: 'get'
  15. })
  16. }
  17. export function addOrEdit(data) {
  18. return request({
  19. url: '/store/storeProduct/addOrEdit',
  20. method: 'post',
  21. data: data
  22. })
  23. }
  24. // 删除商品
  25. export function delStoreProduct(productId) {
  26. return request({
  27. url: '/store/storeProduct/' + productId,
  28. method: 'delete'
  29. })
  30. }
  31. // 导出商品
  32. export function exportStoreProduct(query) {
  33. return request({
  34. url: '/store/storeProduct/export',
  35. method: 'get',
  36. params: query
  37. })
  38. }
  39. export function genFormatAttr(productId,json) {
  40. return request({
  41. url: '/store/storeProduct/genFormatAttr/'+productId,
  42. method: 'post',
  43. data: json
  44. })
  45. }
  46. export function getStoreProductAttrValueList(query) {
  47. return request({
  48. url: '/store/storeProduct/getStoreProductAttrValueList',
  49. method: 'get',
  50. params: query
  51. })
  52. }
  53. export function getStoreTuiProductAttrValueList(query) {
  54. return request({
  55. url: '/store/storeProduct/getStoreTuiProductAttrValueList',
  56. method: 'get',
  57. params: query
  58. })
  59. }