social.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. "use strict";
  2. const sheep_request_index = require("../../request/index.js");
  3. const SocialApi = {
  4. // 获得社交用户
  5. getSocialUser: (type) => {
  6. return sheep_request_index.request({
  7. url: "/member/social-user/get",
  8. method: "GET",
  9. params: {
  10. type
  11. },
  12. custom: {
  13. showLoading: false
  14. }
  15. });
  16. },
  17. // 社交绑定
  18. socialBind: (type, code, state) => {
  19. return sheep_request_index.request({
  20. url: "/member/social-user/bind",
  21. method: "POST",
  22. data: {
  23. type,
  24. code,
  25. state
  26. },
  27. custom: {
  28. custom: {
  29. showSuccess: true,
  30. loadingMsg: "绑定中",
  31. successMsg: "绑定成功"
  32. }
  33. }
  34. });
  35. },
  36. // 社交绑定
  37. socialUnbind: (type, openid) => {
  38. return sheep_request_index.request({
  39. url: "/member/social-user/unbind",
  40. method: "DELETE",
  41. data: {
  42. type,
  43. openid
  44. },
  45. custom: {
  46. showLoading: false,
  47. loadingMsg: "解除绑定",
  48. successMsg: "解绑成功"
  49. }
  50. });
  51. }
  52. };
  53. const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  54. __proto__: null,
  55. default: SocialApi
  56. }, Symbol.toStringTag, { value: "Module" }));
  57. exports.SocialApi = SocialApi;
  58. exports.__vite_glob_0_8 = __vite_glob_0_8;