storeProduct.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. export function importTemplate() {
  25. return request({
  26. url: '/store/storeProduct/importTemplate',
  27. method: 'get'
  28. })
  29. }
  30. // 删除商品
  31. export function delStoreProduct(productId) {
  32. return request({
  33. url: '/store/storeProduct/' + productId,
  34. method: 'delete'
  35. })
  36. }
  37. export function putOn(productId) {
  38. return request({
  39. url: '/store/storeProduct/putOn/' + productId,
  40. method: 'post'
  41. })
  42. }
  43. export function pullOff(productId) {
  44. return request({
  45. url: '/store/storeProduct/pullOff/' + productId,
  46. method: 'post'
  47. })
  48. }
  49. // 导出商品
  50. export function exportStoreProduct(query) {
  51. return request({
  52. url: '/store/storeProduct/export',
  53. method: 'get',
  54. params: query
  55. })
  56. }
  57. export function genFormatAttr(productId,json) {
  58. return request({
  59. url: '/store/storeProduct/genFormatAttr/'+productId,
  60. method: 'post',
  61. data: json
  62. })
  63. }
  64. export function getStoreProductAttrValueList(query) {
  65. return request({
  66. url: '/store/storeProduct/getStoreProductAttrValueList',
  67. method: 'get',
  68. params: query
  69. })
  70. }
  71. export function getStoreTuiProductAttrValueList(query) {
  72. return request({
  73. url: '/store/storeProduct/getStoreTuiProductAttrValueList',
  74. method: 'get',
  75. params: query
  76. })
  77. }