storeProduct.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. export function batchModify(param) {
  11. return request({
  12. url: '/store/storeProduct/batchModify',
  13. method: 'post',
  14. data: param
  15. })
  16. }
  17. // 查询商品详细
  18. export function getStoreProduct(productId) {
  19. return request({
  20. url: '/store/storeProduct/' + productId,
  21. method: 'get'
  22. })
  23. }
  24. export function addOrEdit(data) {
  25. return request({
  26. url: '/store/storeProduct/addOrEdit',
  27. method: 'post',
  28. data: data
  29. })
  30. }
  31. export function importTemplate() {
  32. return request({
  33. url: '/store/storeProduct/importTemplate',
  34. method: 'get'
  35. })
  36. }
  37. // 删除商品
  38. export function delStoreProduct(productId) {
  39. return request({
  40. url: '/store/storeProduct/' + productId,
  41. method: 'delete'
  42. })
  43. }
  44. // 导出商品
  45. export function exportStoreProduct(query) {
  46. return request({
  47. url: '/store/storeProduct/export',
  48. method: 'get',
  49. params: query
  50. })
  51. }
  52. export function genFormatAttr(productId,json) {
  53. return request({
  54. url: '/store/storeProduct/genFormatAttr/'+productId,
  55. method: 'post',
  56. data: json
  57. })
  58. }
  59. export function getStoreProductAttrValueList(query) {
  60. return request({
  61. url: '/store/storeProduct/getStoreProductAttrValueList',
  62. method: 'get',
  63. params: query
  64. })
  65. }
  66. export function getStoreTuiProductAttrValueList(query) {
  67. return request({
  68. url: '/store/storeProduct/getStoreTuiProductAttrValueList',
  69. method: 'get',
  70. params: query
  71. })
  72. }
  73. export function productBySearCh(query) {
  74. return request({
  75. url: '/store/storeProduct/listBySearch',
  76. method: 'get',
  77. params: query
  78. })
  79. }