index.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import Request from "./request.js";
  2. let request = Request.http;
  3. export default {
  4. // 查询店铺信息
  5. getStoreInfoByScan(data) {
  6. return request({
  7. url: "/user/offlineOrder/getStoreInfoByScan",
  8. method: "get",
  9. data: data,
  10. });
  11. },
  12. checkBindPhone(data) {
  13. return request({
  14. url: "/user/userInfo/checkBindPhone",
  15. method: "get",
  16. data: data,
  17. });
  18. },
  19. weChatH5Login(data) {
  20. return request({
  21. url: `/oauth2/oauth/token?grant_type=${data.grant_type}&code=${data.code}${data.password ? `&password=${data.password}` : ''}&${data.phone ? `&phone=${data.phone}` : ''}`,
  22. method: "post",
  23. header: {
  24. 'Authorization': 'Basic cWhiaHV2MWg0djJ1bWp0ZXYwcWg2a3NlZm1maXV3dnk6JDJhJDEwJHdGRE51cndXQ0loMTdYdXNQZUdCa2Vvc2MxcXpRbEFqM2Jlekw5emdFWUV1RzlWNUkvUDh1',
  25. }
  26. });
  27. },
  28. sendSms(data) {
  29. return request({
  30. url: "/external/third/sms/sendSmsH5",
  31. method: "get",
  32. data: data,
  33. // header: {
  34. // 'Content-Type': 'application/json'
  35. // },
  36. });
  37. },
  38. bindH5Phone(data) {
  39. return request({
  40. url: "/user/userInfo/bindH5Phone",
  41. method: "get",
  42. data: data,
  43. // header: {
  44. // 'Content-Type': 'application/json'
  45. // },
  46. });
  47. },
  48. payOrder(data) {
  49. return request({
  50. url: "/user/offlineOrder/payOrder",
  51. method: "post",
  52. data: data,
  53. header: {
  54. 'Content-Type': 'application/json'
  55. }
  56. });
  57. },
  58. availableList(data) {
  59. return request({
  60. url: "/user/voucher/claim/available/list",
  61. method: "get",
  62. data: data,
  63. });
  64. },
  65. }