common.js 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. import {
  2. request
  3. } from '../config/http.js'
  4. import env from "../config/config.js"
  5. //获取菜单列表
  6. export const getMenuListByOpen = (data) => request({
  7. url: '/open/columnArticle/getMenuListByOpen',
  8. method: 'POST',
  9. data: data
  10. })
  11. //获取文章列表
  12. export const getArticleByOpen = (data) => request({
  13. url: '/open/columnArticle/getArticleByOpen',
  14. method: 'POST',
  15. data: data
  16. })
  17. //获取文章详情
  18. export const getArticleDetailByOpen = (data) => request({
  19. url: '/open/columnArticle/getArticleDetailByOpen',
  20. method: 'POST',
  21. data: data
  22. })
  23. //轮播图列表
  24. export const carouselList = (data) => request({
  25. url: '/open/carousel/list',
  26. method: 'POST',
  27. data: data
  28. })
  29. //收货地址 列表
  30. export const deliveryAddressList = (data) => request({
  31. url: '/open/wechat/myCenter/deliveryAddressList',
  32. method: 'POST',
  33. data: data
  34. })
  35. //收货地址 新增
  36. export const addDeliveryAddress = (data) => request({
  37. url: '/open/wechat/myCenter/addDeliveryAddress',
  38. method: 'POST',
  39. data: data
  40. })
  41. //收货地址 删除
  42. export const delDeliveryAddressList = (id) => request({
  43. url: `/open/wechat/myCenter/delDeliveryAddressList/${id}`,
  44. method: 'POST'
  45. })
  46. //收货地址 修改
  47. export const modifyDeliveryAddress = (data,id) => request({
  48. url: `/open/wechat/myCenter/modifyDeliveryAddress/${id}`,
  49. method: 'POST',
  50. data: data
  51. })
  52. //登录
  53. export const login = (code) => request({
  54. url: `/open/wechat/login/${env.appid}/${code}`,
  55. method: 'POST'
  56. })
  57. //绑定手机号
  58. export const bindphone = (code) => request({
  59. url: `/open/wechat/bind/${env.appid}/${code}`,
  60. method: 'POST'
  61. })
  62. //获取个人信息
  63. export const myInfo = (code) => request({
  64. url: `/open/wechat/myCenter/myInfo`,
  65. method: 'POST'
  66. })
  67. //修改个人信息
  68. export const modifyInfo = (data) => request({
  69. url: `/open/wechat/myCenter/modifyInfo`,
  70. method: 'POST',
  71. data: data
  72. })
  73. //模块一接口(推荐)
  74. export const moduleByOne = (data) => request({
  75. url: '/open/homeSetting/moduleByOne',
  76. method: 'POST',
  77. data: data
  78. })
  79. //模块二接口(技术培训)
  80. export const moduleByTwo = (data) => request({
  81. url: '/open/homeSetting/moduleByTwo',
  82. method: 'POST',
  83. data: data
  84. })
  85. //模块三接口(行业详情)
  86. export const moduleByThree = (data) => request({
  87. url: '/open/homeSetting/moduleByThree',
  88. method: 'POST',
  89. data: data
  90. })
  91. //模块四接口(最新资讯)
  92. export const moduleByFour = (data) => request({
  93. url: '/open/homeSetting/moduleByFour',
  94. method: 'POST',
  95. data: data
  96. })
  97. //模块五接口(视频资讯
  98. export const moduleByFive = (data) => request({
  99. url: '/open/homeSetting/moduleByFive',
  100. method: 'POST',
  101. data: data
  102. })
  103. //模块六接口(商品分类)
  104. export const moduleBySix = (data) => request({
  105. url: '/open/homeSetting/moduleBySix',
  106. method: 'POST',
  107. data: data
  108. })
  109. //模块七接口(互动天地)
  110. export const moduleBySeven = (data) => request({
  111. url: '/open/homeSetting/moduleBySeven',
  112. method: 'POST',
  113. data: data
  114. })
  115. //产品列表
  116. export const productPage = (data) => request({
  117. url: '/open/wechat/product/productPage',
  118. method: 'POST',
  119. data: data
  120. })
  121. //产品详情
  122. export const productdetail = (id) => request({
  123. url: `/open/wechat/product/detail/${id}`,
  124. method: 'POST',
  125. })
  126. //规格型号及配方
  127. export const productspecs = (id) => request({
  128. url: `/open/wechat/product/specs/${id}`,
  129. method: 'POST',
  130. })
  131. //收藏
  132. export const productcollection = (id) => request({
  133. url: `/open/wechat/product/collection/${id}`,
  134. method: 'POST'
  135. })
  136. //取消收藏
  137. export const cancelCollection = (id) => request({
  138. url: `/open/wechat/product/cancelCollection/${id}`,
  139. method: 'POST'
  140. })
  141. //发表评论
  142. export const publishReviews = (data) => request({
  143. url: `/open/wechat/product/publishReviews`,
  144. method: 'POST',
  145. data: data
  146. })
  147. //评论列表
  148. export const reviewsPage = (data) => request({
  149. url: `/open/wechat/product/reviewsPage`,
  150. method: 'POST',
  151. data: data
  152. })
  153. //产品类目
  154. export const categoriesList = (data) => request({
  155. url: `/open/wechat/product/categoriesList`,
  156. method: 'POST',
  157. data: data
  158. })
  159. //加入购物车
  160. export const addShoppingCart = (data) => request({
  161. url: `/open/wechat/order/addShoppingCart`,
  162. method: 'POST',
  163. data: data
  164. })
  165. //移除购物车
  166. export const removeShoppingCart = (id) => request({
  167. url: `/open/wechat/order/removeShoppingCart/${id}`,
  168. method: 'POST',
  169. // data: data
  170. })
  171. //购物车列表
  172. export const shoppingCartPage = (data) => request({
  173. url: `/open/wechat/order/shoppingCartPage`,
  174. method: 'POST',
  175. data: data
  176. })
  177. //计算购物车价格
  178. export const calcShoppingCart = (data) => request({
  179. url: `/open/wechat/order/calcShoppingCart`,
  180. method: 'POST',
  181. data: data
  182. })
  183. //购物车下单
  184. export const shoppingCartCreateOrder = (data) => request({
  185. url: `/open/wechat/order/shoppingCartCreateOrder`,
  186. method: 'POST',
  187. data: data
  188. })
  189. //确认订单
  190. export const confirmOrder = (data,orderId) => request({
  191. url: `/open/wechat/order/confirmOrder/${orderId}`,
  192. method: 'POST',
  193. data: data
  194. })
  195. //立即支付
  196. export const prePayOrder = (orderId) => request({
  197. url: `/open/wechat/order/prePay/${orderId}`,
  198. method: 'POST'
  199. })
  200. //确认订单页面中取消订单
  201. export const cancelOrderByConfirm = (orderId) => request({
  202. url: `/open/wechat/order/cancelOrderByConfirm/${orderId}`,
  203. method: 'POST',
  204. // data: data
  205. })
  206. //订单详情
  207. export const orderDetail = (orderId) => request({
  208. url: `/open/wechat/order/orderDetail/${orderId}`,
  209. method: 'POST',
  210. // data: data
  211. })
  212. //订单列表
  213. export const orderPage = (data) => request({
  214. url: `/open/wechat/order/orderPage`,
  215. method: 'POST',
  216. data: data
  217. })
  218. //订单列表页 取消订单
  219. export const cancelOrder = (orderId) => request({
  220. url: `/open/wechat/order/cancelOrder/${orderId}`,
  221. method: 'POST',
  222. // data: data
  223. })
  224. //订单列表页 再次购买
  225. export const orderAgain = (orderId) => request({
  226. url: `/open/wechat/order/orderAgain/${orderId}`,
  227. method: 'POST',
  228. // data: data
  229. })
  230. //前端支付完成回调
  231. export const payPaying = (orderId) => request({
  232. url: `/open/wechat/pay/paying/${orderId}`,
  233. method: 'POST',
  234. // data: data
  235. })
  236. //退款申请
  237. export const refundApply = (orderId) => request({
  238. url: `/open/wechat/pay/refundApply/${orderId}`,
  239. method: 'POST',
  240. // data: data
  241. })
  242. //主题详情
  243. export const topicDetail = (data,topicId) => request({
  244. url: `/open/topic/detail/${topicId}`,
  245. method: 'POST',
  246. data: data
  247. })
  248. //回复列表
  249. export const replyPage = (data) => request({
  250. url: `/open/topic/replyPage`,
  251. method: 'POST',
  252. data: data
  253. })
  254. //回复主题/楼层
  255. export const topicReply = (data,topicId) => request({
  256. url: `/open/topic/reply/${topicId}`,
  257. method: 'POST',
  258. data: data
  259. })
  260. //收藏列表
  261. export const collectionList = (data) => request({
  262. url: `/open/wechat/product/collectionList`,
  263. method: 'POST',
  264. data: data
  265. })
  266. //浏览记录
  267. export const browsingHistoryPage = (data) => request({
  268. url: `/open/wechat/product/browsingHistoryPage`,
  269. method: 'POST',
  270. data: data
  271. })
  272. //意见反馈
  273. export const feedback = (data) => request({
  274. url: `/open/wechat/myCenter/feedback`,
  275. method: 'POST',
  276. data: data
  277. })
  278. //互动天地列表
  279. export const contentPage = (data,sortType) => request({
  280. url: `/open/topic/contentPage/${sortType}`,
  281. method: 'POST',
  282. data: data
  283. })
  284. //互动天地我参与的条数
  285. export const joinCountByMe = (data) => request({
  286. url: `/open/topic/joinCountByMe`,
  287. method: 'POST',
  288. data: data
  289. })
  290. //公告列表
  291. export const notifiesPage = (data) => request({
  292. url: `/open/wechat/common/notifiesPage`,
  293. method: 'POST',
  294. data: data
  295. })
  296. //公告详情
  297. export const notifiesDetails = (id) => request({
  298. url: `/open/wechat/common/notifies/${id}`,
  299. method: 'POST'
  300. })
  301. //所在城市
  302. export const getAreaList = (data) => request({
  303. url: `/open/vendor/getAreaList`,
  304. method: 'GET',
  305. data: data
  306. })
  307. //获取主营类目列表
  308. export const getCategoryList = (id) => request({
  309. url: `/open/vendor/getCategoryList`,
  310. method: 'GET'
  311. })
  312. //供应商入驻
  313. export const settledVendor = (data) => request({
  314. url: `/open/vendor/settledVendor`,
  315. method: 'POST',
  316. data: data
  317. })
  318. //我的供应商信息
  319. export const myVendor = (data) => request({
  320. url: `/open/vendor/myVendor`,
  321. method: 'POST',
  322. data: data
  323. })
  324. //可申报商品
  325. export const supplierList = (data) => request({
  326. url: `/open/vendor/supplierList`,
  327. method: 'POST',
  328. data: data
  329. })
  330. //我的申报记录
  331. export const myDeclareSupplier = (data) => request({
  332. url: `/open/vendor/myDeclareSupplier`,
  333. method: 'POST',
  334. data: data
  335. })
  336. //采购单申报
  337. export const declareSupplier = (data) => request({
  338. url: `/open/vendor/declareSupplier`,
  339. method: 'POST',
  340. data: data
  341. })
  342. //采购单列表-按供应商
  343. export const vendorListOfDeclare = (data) => request({
  344. url: `/open/vendor/vendorListOfDeclare`,
  345. method: 'POST',
  346. data: data
  347. })
  348. //采购单列表-按产品
  349. export const supplierListOfProduct = (data) => request({
  350. url: `/open/vendor/supplierListOfProduct`,
  351. method: 'POST',
  352. data: data
  353. })
  354. //供应商商品列表
  355. export const vendorDeclareList = (vendorId) => request({
  356. url: `/open/vendor/vendorDeclareList/${vendorId}`,
  357. method: 'POST'
  358. })
  359. // 互动问答
  360. //主题列表
  361. export const getContentPage = (data,sortType) => request({
  362. url: `/open/topicQa/contentPage/${sortType}`,
  363. method: 'POST',
  364. data: data
  365. })
  366. //创建提问
  367. export const createQuestion = (data) => request({
  368. url: `/open/topicQa/createQuestion`,
  369. method: 'POST',
  370. data: data
  371. })
  372. //主题详情及楼层回复
  373. export const topicQaDetail = (data,topicId)=> request({
  374. url: `/open/topicQa/detail/${topicId}`,
  375. method: 'POST',
  376. data: data
  377. })
  378. //回复列表
  379. export const QareplyPage = (data) => request({
  380. url: `/open/topicQa/replyPage`,
  381. method: 'POST',
  382. data: data
  383. })
  384. //回复主题/楼层
  385. export const Qareplybyid = (data,topicId) => request({
  386. url: `/open/topicQa/reply/${topicId}`,
  387. method: 'POST',
  388. data: data
  389. })
  390. //点赞 (再次点击取消点赞)
  391. export const Qalike = (replyId) => request({
  392. url: `/open/topicQa/like/${replyId}`,
  393. method: 'POST',
  394. })
  395. //关注问题(次点击取消关注)
  396. export const Qacollect = (topicId) => request({
  397. url: `/open/topicQa/collect/${topicId}`,
  398. method: 'POST',
  399. })