prizeBuckleDetail.js 906 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. var app = getApp()
  2. var that;
  3. Page({
  4. data: {
  5. date: app.globalData.month
  6. },
  7. onLoad(e) {
  8. that = this;
  9. dd.setNavigationBar({ title: "事件详情" });
  10. if(e.id){
  11. that.getDetail(e.id);
  12. }
  13. },
  14. showImg(e){
  15. var index=e.target.dataset.index;
  16. var item=e.target.dataset.item
  17. dd.previewImage({
  18. current: index,
  19. urls: item
  20. });
  21. },
  22. activeItem(e) {
  23. var index = e.target.dataset.index;
  24. this.setData({ activeIndex: index })
  25. },
  26. openSearch() {
  27. app.globalData.showToast("暂不支持筛选");
  28. },
  29. getDetail(id) {
  30. app.$get("api/integral/statistics/integral/info", { event_id: id }).then((res) => {
  31. var data = res.data.data;
  32. app.globalData.types.forEach(item => {
  33. if (item.id == data.pt_id) {
  34. data.typeName = item.name
  35. }
  36. });
  37. this.setData({ dataDetail: data })
  38. })
  39. },
  40. });