index.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. methods: {
  13. /* 获取产品列表 */
  14. getList(id) {
  15. if (id == 0) return;
  16. let content = {
  17. nocache: true,
  18. sa_projectid: id
  19. };
  20. _Http.basic({
  21. "id": "20230628155502",
  22. content
  23. }).then(res => {
  24. console.log("报备进度", res)
  25. if (res.msg != '成功') return wx.showToast({
  26. title: res.data,
  27. icon: "none"
  28. });
  29. this.setData({
  30. list: res.data.map(v => {
  31. v.time = formatTime(new Date(v.createDate), '-')
  32. return v
  33. }),
  34. sa_projectid: id
  35. })
  36. })
  37. }
  38. }
  39. })