api.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. const { request } = require("../func/request");
  2. // 用户登录
  3. const doLogin = (data) => {
  4. return request({
  5. url: '/admin/doLogin',
  6. data: data,
  7. method: 'get',
  8. type: 'application/x-www-form-urlencoded',
  9. extra: 1
  10. })
  11. }
  12. // 用户登录 获取用户信息
  13. const doGetInfo = data => {
  14. return request({
  15. url: "/api/appoint/getUserInfoByCode",
  16. data: data,
  17. method: "get",
  18. type: "application/x-www-form-urlencoded"
  19. });
  20. };
  21. // 接⼝实名⼊库
  22. const userWithimage = data => {
  23. return request({
  24. url: "/api/v1/open/iotvsp/userwithimage/create",
  25. data: data,
  26. method: "post",
  27. type: "application/json",
  28. extra: 2
  29. });
  30. };
  31. // 支付宝用户一键入库
  32. const userWithverified = data => {
  33. return request({
  34. url: "/api/v1/open/iotvsp/userwithverified/create",
  35. data: data,
  36. method: "post",
  37. type: "application/json",
  38. extra: 2
  39. });
  40. };
  41. // 接⼝匿名⼊库
  42. const userWithanonymous = data => {
  43. return request({
  44. url: "/api/v1/open/iotvsp/userwithanonymous/create",
  45. data: data,
  46. method: "post",
  47. type: "application/json",
  48. extra: 2
  49. });
  50. };
  51. // 查询接口
  52. const userPageList = data => {
  53. return request({
  54. url: "/admin/userPageList",
  55. data: data,
  56. method: "post",
  57. type: "application/json",
  58. extra: 1
  59. });
  60. };
  61. // 出库
  62. const userDelete = data => {
  63. return request({
  64. url: "/api/v1/open/iotvsp/user/delete",
  65. data: data,
  66. method: "post",
  67. type: "application/json",
  68. extra: 2
  69. });
  70. };
  71. module.exports = {
  72. doLogin,
  73. doGetInfo,
  74. userWithverified,
  75. userWithimage,
  76. userWithanonymous,
  77. userPageList,
  78. userDelete
  79. };