api.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import request from "@/utils/request.js";
  2. /**
  3. * 获取小程序配置
  4. *
  5. */
  6. export function getMiniProgramData() {
  7. return request.get("mini-program/config/info", {}, { noAuth: true });
  8. }
  9. /**
  10. * 获取主页数据 无需授权
  11. *
  12. */
  13. export function getIndexData() {
  14. return request.get("index", {}, { noAuth: true });
  15. }
  16. /**
  17. * 优惠券列表
  18. * @param object data
  19. */
  20. export function getCoupons(data) {
  21. return request.get("coupons", data, { noAuth: true });
  22. }
  23. /**
  24. * 领取优惠卷
  25. * @param int couponId
  26. *
  27. */
  28. export function setCouponReceive(couponId) {
  29. return request.post("coupon/receive", { couponId: couponId });
  30. }
  31. /**
  32. * 获取小程序二维码
  33. */
  34. export function getQrcode(data) {
  35. return request.post("qrcode/get", data, { noAuth: true });
  36. }
  37. /**
  38. * 获取城市信息
  39. */
  40. export function getCity() {
  41. return request.get("city/list", {}, { noAuth: true });
  42. }
  43. /**
  44. * 获取商家的轮播图
  45. */
  46. export function getMerchantBannerList(data) {
  47. return request.get("sbmerchant/banner/list", data, { noAuth: true });
  48. }