product.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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. export function postchangeshow(data) {
  71. return myRequestPhp({
  72. url: `${pre}mer/store/product/change_show`,
  73. method: 'POST',
  74. data,
  75. apiType
  76. })
  77. }
  78. /**商品模块 */
  79. // 商品列表tab
  80. export function getGoodsTab(data) {
  81. return myRequestPhp({
  82. url: `${pre}mer/store/product/lst_filter`,
  83. method: 'GET',
  84. data,
  85. apiType
  86. })
  87. }
  88. /**商品列表
  89. *
  90. * page = 1 & limit = 20 & mer_cate_id = & cate_id = & keyword = & type = 1 & is_gift_bag = & p_type =
  91. */
  92. export function getProductList(data) {
  93. return myRequestPhp({
  94. url: `${pre}mer/store/product/lst`,
  95. method: 'GET',
  96. data,
  97. apiType
  98. })
  99. }
  100. // 平台商品分类
  101. export function getGoodsClassCategory(data) {
  102. return myRequestPhp({
  103. url: `${pre}mer/store/category/list`,
  104. method: 'GET',
  105. data,
  106. apiType
  107. })
  108. }
  109. // 商品评价
  110. /**
  111. * is_reply:
  112. nickname:
  113. keyword:
  114. order_sn:
  115. status:
  116. date:
  117. page: 1
  118. limit: 20
  119. * */
  120. export function getGoodsEvaluate(data) {
  121. return myRequestPhp({
  122. url: `${pre}mer/store/reply/lst`,
  123. method: 'GET',
  124. data,
  125. apiType
  126. })
  127. }
  128. // 商品评价回复获取规则
  129. export function reviewGoodsEvaluateReply(id) {
  130. return myRequestPhp({
  131. url: `${pre}mer/store/reply/form/${id}`,
  132. method: 'GET',
  133. apiType
  134. })
  135. }
  136. //商品评价回复
  137. export function reviewGoodsReplyApi(id,data) {
  138. return myRequestPhp({
  139. url: `${pre}mer/store/reply/reply/${id}.html`,
  140. method: 'POST',
  141. data,
  142. apiType
  143. })
  144. }
  145. /**
  146. * @description 商品列表 -- 上下架
  147. */
  148. export function changeshowApi(id, data) {
  149. return myRequestPhp({
  150. url: `${pre}mer/store/product/status/${id}`,
  151. method: 'POST',
  152. data,
  153. apiType
  154. })
  155. }
  156. /**
  157. * @description 商品列表--删除
  158. */
  159. export function destoryApi(id,data) {
  160. return myRequestPhp({
  161. url: `${pre}mer/store/product/destory/${id}`,
  162. method: 'DELETE',
  163. data,
  164. apiType
  165. })
  166. }
  167. /**
  168. * @description 商品列表 -- 删除
  169. */
  170. export function productDeleteApi(id,data) {
  171. return myRequestPhp({
  172. url: `${pre}mer/store/product/delete/${id}`,
  173. method: 'DELETE',
  174. data,
  175. apiType
  176. })
  177. }
  178. /***
  179. * @description 商品列表 -- 恢复商品
  180. */
  181. export function productRestoreApi(id,data) {
  182. return myRequestPhp({
  183. url: `${pre}mer/store/product/restore/${id}`,
  184. method: 'POST',
  185. data,
  186. apiType
  187. })
  188. }
  189. export function Addseckill(data) {
  190. return myRequestPhp({
  191. url: `${pre}mer/store/product/seckill`,
  192. method: 'POST',
  193. data,
  194. apiType
  195. })
  196. }