index.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. const _Http = getApp().globalData.http,
  2. {
  3. formatTime
  4. } = require("../../../../utils/getTime");
  5. Component({
  6. data: {
  7. sa_projectid: 0,
  8. content: {
  9. total: null
  10. }
  11. },
  12. lifetimes: {
  13. attached: function () {
  14. getApp().globalData.Language.getLanguagePackage(this)
  15. }
  16. },
  17. methods: {
  18. /* 获取产品列表 */
  19. getList(id) {
  20. if (id == 0) return;
  21. let content = {
  22. nocache: true,
  23. sa_projectid: id
  24. };
  25. _Http.basic({
  26. "id": "20230628155502",
  27. content
  28. }).then(res => {
  29. console.log("报备进度", res)
  30. if (res.code != '1') return wx.showToast({
  31. title: res.data,
  32. icon: "none"
  33. });
  34. this.setData({
  35. list: res.data.map(v => {
  36. v.time = formatTime(new Date(v.createDate), '-')
  37. return v
  38. }),
  39. sa_projectid: id
  40. })
  41. })
  42. }
  43. }
  44. })