adminUser.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //获取应用实例
  2. const app = getApp()
  3. Page({
  4. data: {
  5. active: 0,
  6. // 待审核
  7. oneList: [],
  8. // 审核通过
  9. twoList: []
  10. },
  11. // 审核用户
  12. checkBtn: function (data) {
  13. wx.navigateTo({
  14. url: `../adminUser/check?id=${data.currentTarget.dataset.id}`
  15. })
  16. },
  17. onLoad: function () {
  18. // 查询办卡列表
  19. // 待审核
  20. wx.request({
  21. url: app.globalData.publicUrl + '/api/htyd/card',
  22. method: "get",
  23. data: { status: '1' },
  24. success: (res) => {
  25. if (res.data.errcode == '0') {
  26. console.log(res.data.data);
  27. this.setData({ oneList: res.data.data })
  28. } else {
  29. wx.showToast({
  30. title: '查询失败',
  31. icon: 'error',
  32. duration: 2000
  33. })
  34. }
  35. }
  36. })
  37. // 审核通过
  38. wx.request({
  39. url: app.globalData.publicUrl + '/api/htyd/card',
  40. method: "get",
  41. data: { status: '0' },
  42. success: (res) => {
  43. if (res.data.errcode == '0') {
  44. this.setData({ twoList: res.data.data })
  45. } else {
  46. wx.showToast({
  47. title: '查询失败',
  48. icon: 'error',
  49. duration: 2000
  50. })
  51. }
  52. }
  53. })
  54. },
  55. })