prizeBuckleDetail.js 926 B

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