customRamking.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. var app = getApp()
  2. var that;
  3. Page({
  4. data: {
  5. // dataList:[],
  6. isShowGs:true,
  7. disabled:false,
  8. },
  9. onLoad() {
  10. that = this;
  11. dd.getStorage({
  12. key: 'isShowGs',
  13. success: function(res) {
  14. if(res.data){
  15. that.setData({
  16. isShowGs: false
  17. })
  18. }
  19. },
  20. });
  21. dd.setNavigationBar({ title: "自定义分组B分排名" });
  22. },
  23. onShow(){
  24. this.getData();
  25. },
  26. activeGs(){
  27. this.setData({
  28. isShowGs: false
  29. })
  30. dd.setStorage({
  31. key: 'isShowGs',
  32. data: true,
  33. success: function() {}
  34. });
  35. },
  36. getData(){
  37. app.$get('api/integral/statistics/groups').then((res) => {
  38. var data = res.data.data.list;
  39. this.setData({
  40. dataList: data
  41. })
  42. })
  43. },
  44. //打开编辑
  45. openCompile(e){
  46. var item=e.target.dataset.item;
  47. dd.navigateTo({
  48. url: '../addCustom/addCustom?id='+item.id
  49. })
  50. },
  51. //打开排名
  52. openDetail(e){
  53. var item=e.target.dataset.item;
  54. dd.navigateTo({
  55. url: '../C_ranking/C_ranking?id='+item.id+'&name='+item.name
  56. })
  57. },
  58. //打开添加
  59. openAdd(){
  60. dd.navigateTo({
  61. url: '../addCustom/addCustom'
  62. })
  63. },
  64. });