taskDetail.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. var app = getApp()
  2. var that;
  3. Page({
  4. data: {
  5. date: app.globalData.month,
  6. activeIndex: 1,
  7. array: ['编辑任务', '删除任务'],
  8. },
  9. onLoad(e) {
  10. that = this;
  11. dd.setNavigationBar({ title: "任务详情" });
  12. // that.getDetail(e.event_id);
  13. },
  14. bindPickerChange(e) {
  15. console.log(e.detail.value,this.data.array.length)
  16. if ((e.detail.value + 1) == this.data.array.length) {
  17. dd.confirm({
  18. title: '删除任务',
  19. content: '删除此任务将会删除其相关记录和积分数据,确认删除吗?',
  20. confirmButtonText: '确定',
  21. cancelButtonText: '取消',
  22. success: (result) => {
  23. if (result.confirm) {
  24. }
  25. },
  26. });
  27. } else {
  28. dd.navigateTo({
  29. url: '../schedule/schedule'
  30. })
  31. }
  32. },
  33. //显示图片
  34. showImg(e) {
  35. var index = e.target.dataset.index;
  36. var item = e.target.dataset.item
  37. dd.previewImage({
  38. current: index,
  39. urls: item
  40. });
  41. },
  42. activeItem(e) {
  43. var index = e.target.dataset.index;
  44. this.setData({ activeIndex: index })
  45. },
  46. openSearch() {
  47. app.globalData.showToast("暂不支持筛选");
  48. },
  49. getDetail(id) {
  50. app.$get("api/integral/statistics/integral/info", { event_id: 533 }).then((res) => {
  51. this.setData({ dataDetail: res.data.data })
  52. })
  53. },
  54. openSchedule() {
  55. dd.navigateTo({
  56. url: '../schedule/schedule'
  57. })
  58. },
  59. });