index.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import Request from '../common/request.js';
  2. let request = new Request().http
  3. export function getDicts(data) {
  4. return request('/app/common/getDicts', data, 'GET');
  5. }
  6. export function getCanvas() {
  7. return request('/app/index/getCanvas', null, 'GET');
  8. }
  9. export function getMenu() {
  10. return request('/app/index/getMenu', null, 'GET');
  11. }
  12. export function getIndexData(data) {
  13. return request('/app/index/getIndexData', data, 'GET');
  14. }
  15. export function getTuiArticle(data) {
  16. return request('/app/index/getTuiArticle', data, 'GET');
  17. }
  18. export function getTuiDoctor(data) {
  19. return request('/app/index/getTuiDoctor', data, 'GET');
  20. }
  21. export function getTuiDoctorOrder(data) {
  22. return request('/app/index/getTuiDoctorOrder', data, 'GET');
  23. }
  24. // 商品搜索瀑布流
  25. export function productWaterfall(data) {
  26. return request('/app/product/getProductWaterfall', data, 'POST');
  27. }
  28. // 获取首页推荐商品
  29. export function recommendProduct() {
  30. return request('/app/product/getRecommendProduct', null, 'GET');
  31. }
  32. // 添加购物车
  33. export function addCart(data) {
  34. return request('/app/product/addCart', data, 'POST');
  35. }
  36. // 删除购物车
  37. export function delCart(data) {
  38. return request('/app/product/delCart', data, 'POST');
  39. }
  40. // 改变购物车数量
  41. export function cartNum(data) {
  42. return request('/app/product/cartNum', data, 'POST');
  43. }
  44. // 获取商品购物车数量
  45. export function getCartCount() {
  46. return request('/app/product/getCartCount', null, 'GET');
  47. }
  48. // 获取购物车列表
  49. export function getCarts() {
  50. return request('/app/product/getCarts', null, 'GET');
  51. }
  52. // 获取我的频道
  53. export function getMyProductCate() {
  54. return request('/app/product/getMyProductCate', null, 'GET');
  55. }
  56. // 添加我的频道
  57. export function channelAdd(data) {
  58. return request(`/app/product/channelAdd/${data}`, data, 'POST');
  59. }
  60. // 移除我的频道
  61. export function channelDelete(data) {
  62. return request(`/app/product/channelDelete/${data}`, data, 'POST');
  63. }
  64. // 获取商品规格列表
  65. export function getProductValues(data) {
  66. return request(`/app/product/getProductValues?productId=${data}`, data, 'GET');
  67. }