index.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import https from "@/plugins/luch-request_0.0.7/request";
  2. export const getOptions = param =>
  3. https.get("/apihkds/api/option/getOptions", param);
  4. // 图片上传
  5. export const uploadPic = data => https.post("/upload/save-img", data);
  6. // M 端商家信息
  7. export const getMerchantInfo = param => https.get("/merchant/get-info", param);
  8. // M 端用户信息
  9. export const getShopUserApi = param => https.get("/user/my-profile", param);
  10. // 商户信息
  11. export const getUserApi = param => https.get("/merchant/detail", param);
  12. // 员工信息
  13. export const getStaffApi = param => https.get("/admin/login-detail", param);
  14. // 常用链接 b
  15. export const commonUrl = param => https.get("/merchant/common-url", param);
  16. // 常用链接 b
  17. export const getFestList = param => https.get("/fest/list", param);
  18. // 商家的门店 m
  19. export const getShop = param => https.get("/shop/detail", param);
  20. // 获取验证码 m
  21. export const sendSms = param => https.get("/inform-user/send-sms", param);
  22. // 地图查询 m b s w
  23. export const suggestion = param => https.get("/map/suggestion", param);
  24. // 微信分享 m b
  25. export const wxShare = data => https.post("/wx-share/get-params", data);
  26. // 获取所有门店
  27. export const shopAll = data => https.get("/shop/all", data);
  28. // 切换门店
  29. export const toggleShop = data => https.post("/shop/toggle-shop", data);
  30. //socket链接初始化
  31. export const initSocket = async clientId => {
  32. const st = uni.getStorageSync("token");
  33. return https.post(`/ws/bind?token=${st}`, { clientId: clientId });
  34. };
  35. //app登陆
  36. export const appLogin = data => https.get("/auth/app-login", data);
  37. //app重新获取登陆信息
  38. export const hasTokenAutoLogin = data => https.get("/admin/has-token-auto-login", data);