猫妈狗爸伴宠师小程序前端代码
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.

71 lines
1.1 KiB

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