猫妈狗爸伴宠师小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.1 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. import request from '@/utils/request'
  2. // 查询我的宠物列表
  3. export function getpetList(params) {
  4. return request({
  5. headers: {
  6. "isToken": true
  7. },
  8. url: "/applet/pet/list",
  9. method: 'get',
  10. params
  11. })
  12. }
  13. // 根据宠物标识查询宠物信息
  14. export function getByPetId(params) {
  15. return request({
  16. headers: {
  17. "isToken": true
  18. },
  19. url: "/applet/pet/getByPetId",
  20. method: 'get',
  21. params
  22. })
  23. }
  24. // 根据宠物标识删除宠物信息
  25. export function delByPetId(data) {
  26. return request({
  27. headers: {
  28. "isToken": true
  29. },
  30. url: "/applet/pet/delete",
  31. method: 'post',
  32. data
  33. })
  34. }
  35. // 新增宠物信息
  36. export function addPet(data) {
  37. return request({
  38. headers: {
  39. "isToken": true
  40. },
  41. url: "/applet/pet/add",
  42. method: 'post',
  43. data
  44. })
  45. }
  46. // 修改宠物信息
  47. export function updatePet(data) {
  48. return request({
  49. headers: {
  50. "isToken": true
  51. },
  52. url: "/applet/pet/edit",
  53. method: 'post',
  54. data
  55. })
  56. }
  57. // 获取宠物详情
  58. export function getPetDetails(params) {
  59. return request({
  60. headers: {
  61. "isToken": true
  62. },
  63. url: "/applet/pet/getByPetId",
  64. method: 'get',
  65. params
  66. })
  67. }