generate.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. const { post,get } = require('./request')
  2. module.exports = {
  3. // 生成主图详情页
  4. generatePhotoDetail(data){
  5. return post({
  6. url: '/handle_detail',
  7. data: data,
  8. headers:{
  9. 'Content-Type':"application/json",
  10. }
  11. })
  12. },
  13. addLogo(data){
  14. console.log(data);
  15. return post({
  16. url: '/add_logo',
  17. data: data
  18. })
  19. },
  20. getLogoList(data){
  21. return get({
  22. url: '/logo_list',
  23. data: data
  24. })
  25. },
  26. deleteLogo(data){
  27. console.log(data);
  28. return post({
  29. url: '/delete_logo',
  30. data: data
  31. })
  32. },
  33. // 根据货号获取商品图片 JSON(生成商品模板用)
  34. getGoodsImageJson(data){
  35. return get({
  36. url: '/get_goods_image_json',
  37. data: data,
  38. })
  39. },
  40. generatePoster(data){
  41. return post({
  42. url: '/shoes_compose?type=0',
  43. data: data,
  44. headers:{
  45. 'Content-Type':"application/json",
  46. }
  47. })
  48. },
  49. sceneSetPrepare(data){
  50. return post({
  51. url: '/scene_set/prepare',
  52. data: data,
  53. headers:{
  54. 'Content-Type':"application/json",
  55. }
  56. })
  57. },
  58. sceneSetRun(data){
  59. return post({
  60. url: '/scene_set/run',
  61. data: data,
  62. headers:{
  63. 'Content-Type':"application/json",
  64. }
  65. })
  66. },
  67. sceneSetSave(data){
  68. return post({
  69. url: '/scene_set/save',
  70. data: data,
  71. headers:{
  72. 'Content-Type':"application/json",
  73. }
  74. })
  75. },
  76. sceneSetCutout(data){
  77. return post({
  78. url: '/remove_background',
  79. data: data,
  80. headers:{
  81. 'Content-Type':"application/json",
  82. }
  83. })
  84. },
  85. }