index.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. const _Http = getApp().globalData.http;
  2. Component({
  3. properties: {
  4. add: Boolean, //是否允许新增
  5. ownertable: {
  6. type: String,
  7. value: "sa_itemgroup"
  8. },
  9. ownerid: {
  10. type: String,
  11. value: 11
  12. }
  13. },
  14. data: {
  15. list: [],
  16. },
  17. methods: {
  18. getList() {
  19. _Http.basic({
  20. "id": 20220930103501,
  21. "content": {
  22. ownertable: this.data.ownertable,
  23. ownerid: this.data.ownerid,
  24. pageSize: this.data.add ? 8 : 9
  25. }
  26. }).then(res => {
  27. console.log("团队", res)
  28. if (res.msg != '成功') return wx.showToast({
  29. title: res.data,
  30. icon: "none"
  31. });
  32. this.setData({
  33. list: res.data
  34. })
  35. })
  36. },
  37. addUser() {
  38. wx.navigateTo({
  39. url: '/packageA/group/index?ownertable=' + this.data.ownertable + '&ownerid=' + this.data.ownerid,
  40. })
  41. },
  42. }
  43. })