index.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. const _Http = getApp().globalData.http;
  2. Component({
  3. properties: {
  4. siteid: {
  5. type: String
  6. },
  7. },
  8. lifetimes: {
  9. attached: function () {
  10. getApp().globalData.Language.getLanguagePackage(this)
  11. }
  12. },
  13. methods: {
  14. queryList(condition) {
  15. return _Http.basic({
  16. "id": 20230727134902,
  17. "content": {
  18. "pageNumber": 1,
  19. "pageSize": 9999,
  20. "where": {
  21. condition
  22. }
  23. }
  24. }).then(res => {
  25. console.log("项目名称", res)
  26. if (res.code == 0) {
  27. wx.showToast({
  28. title: res.msg,
  29. icon: "none"
  30. })
  31. return res.msg
  32. }
  33. this.setData({
  34. repetitionList: res.data,
  35. show: this.data.siteid == 'HY' ? false : res.data.length != 0
  36. })
  37. return res.data.length != 0
  38. })
  39. },
  40. repClose() {
  41. this.setData({
  42. show: false
  43. })
  44. }
  45. }
  46. })