product.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. import {
  2. myRequestPhp
  3. } from './requestPhp.js'
  4. const pre = ""
  5. const apiType = "php"
  6. /**
  7. * 获取供应链tab
  8. */
  9. export function getSupplyChainTab(data) {
  10. return myRequestPhp({
  11. url: `${pre}mer/store/product/gong_lst_filter`,
  12. method: 'GET',
  13. data,
  14. apiType
  15. })
  16. }
  17. /**
  18. * 获取供应链tab
  19. */
  20. // export function getSupplyChainTab(data) {
  21. // return myRequestPhp({
  22. // url: `${pre}mer/store/product/gong_lst_filter`,
  23. // method: 'GET',
  24. // data,
  25. // apiType
  26. // })
  27. // }
  28. /**
  29. * 供应链列表
  30. * page: 1
  31. limit: 20
  32. keyword:
  33. type: 1 2
  34. spec_type: 商品规格 null 0 1
  35. * @param {*} data
  36. * @returns
  37. */
  38. export function getSupplyChainList(data) {
  39. return myRequestPhp({
  40. url: `${pre}mer/store/product/gong_lst`,
  41. method: 'GET',
  42. data,
  43. apiType
  44. })
  45. }
  46. // 供应链修改价格
  47. /**
  48. *{
  49. "skuArr": [{
  50. "sku_id": "Se88f891b5d",
  51. "edit_price": "10.5"
  52. }],
  53. "type": 1
  54. }
  55. * @param {*} id
  56. * @param {*} data
  57. * @returns
  58. */
  59. export function editSupplyChainPrice(id,data) {
  60. return myRequestPhp({
  61. url: `${pre}mer/store/product/edit_price/${id}`,
  62. method: 'POST',
  63. data,
  64. apiType
  65. })
  66. }
  67. /**
  68. * @description 供应链商品 -- 修改销售价
  69. */
  70. /**
  71. * @description 供应链商品 -- 上下架
  72. */
  73. export function postchangeshow(data) {
  74. return myRequestPhp({
  75. url: `${pre}mer/store/product/change_show`,
  76. method: 'POST',
  77. data,
  78. apiType
  79. })
  80. }
  81. /**商品模块 */
  82. // 商品列表tab
  83. export function getGoodsTab(data) {
  84. return myRequestPhp({
  85. url: `${pre}mer/store/product/lst_filter`,
  86. method: 'GET',
  87. data,
  88. apiType
  89. })
  90. }
  91. /**商品列表
  92. *
  93. * page = 1 & limit = 20 & mer_cate_id = & cate_id = & keyword = & type = 1 & is_gift_bag = & p_type =
  94. */
  95. export function getProductList(data) {
  96. return myRequestPhp({
  97. url: `${pre}mer/store/product/lst`,
  98. method: 'GET',
  99. data,
  100. apiType
  101. })
  102. }
  103. // 平台商品分类
  104. export function getGoodsClassCategory(data) {
  105. return myRequestPhp({
  106. url: `${pre}mer/store/category/list`,
  107. method: 'GET',
  108. data,
  109. apiType
  110. })
  111. }
  112. // 商品评价
  113. /**
  114. * is_reply:
  115. nickname:
  116. keyword:
  117. order_sn:
  118. status:
  119. date:
  120. page: 1
  121. limit: 20
  122. * */
  123. export function getGoodsEvaluate(data) {
  124. return myRequestPhp({
  125. url: `${pre}mer/store/reply/lst`,
  126. method: 'GET',
  127. data,
  128. apiType
  129. })
  130. }
  131. // 商品评价回复获取规则
  132. export function reviewGoodsEvaluateReply(id) {
  133. return myRequestPhp({
  134. url: `${pre}mer/store/reply/form/${id}`,
  135. method: 'GET',
  136. apiType
  137. })
  138. }
  139. //商品评价回复
  140. export function reviewGoodsReplyApi(id,data) {
  141. return myRequestPhp({
  142. url: `${pre}mer/store/reply/reply/${id}.html`,
  143. method: 'POST',
  144. data,
  145. apiType
  146. })
  147. }
  148. /**
  149. * @description 商品列表 -- 上下架
  150. */
  151. export function changeshowApi(id, data) {
  152. return myRequestPhp({
  153. url: `${pre}mer/store/product/status/${id}`,
  154. method: 'POST',
  155. data,
  156. apiType
  157. })
  158. }
  159. /**
  160. * @description 商品列表--删除
  161. */
  162. export function destoryApi(id,data) {
  163. return myRequestPhp({
  164. url: `${pre}mer/store/product/destory/${id}`,
  165. method: 'DELETE',
  166. data,
  167. apiType
  168. })
  169. }
  170. /**
  171. * @description 商品列表 -- 删除
  172. */
  173. export function productDeleteApi(id,data) {
  174. return myRequestPhp({
  175. url: `${pre}mer/store/product/delete/${id}`,
  176. method: 'DELETE',
  177. data,
  178. apiType
  179. })
  180. }
  181. /***
  182. * @description 商品列表 -- 恢复商品
  183. */
  184. export function productRestoreApi(id,data) {
  185. return myRequestPhp({
  186. url: `${pre}mer/store/product/restore/${id}`,
  187. method: 'POST',
  188. data,
  189. apiType
  190. })
  191. }
  192. export function Addseckill(data) {
  193. return myRequestPhp({
  194. url: `${pre}mer/store/product/seckill`,
  195. method: 'POST',
  196. data,
  197. apiType
  198. })
  199. }