awardrecord.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import Vue from 'vue'
  2. import lib from 'lib'
  3. let uid = lib.getParam("uid"),token = lib.getParam("token")
  4. export default {
  5. data() {
  6. return {
  7. timeline : 0,
  8. isloading : false,
  9. nextFlag : 1,
  10. records : [],
  11. isloading : false,
  12. nextFlag : 1
  13. };
  14. },
  15. mounted () {
  16. lib.setTitle("获奖记录");
  17. this.getBonusList()
  18. },
  19. methods: {
  20. //获奖记录
  21. getBonusList(){
  22. let self = this
  23. let url = `${lib.apiUrl}/share/bonusList.do`
  24. let param = {
  25. count : 20,
  26. timeline : self.timeline,
  27. channel : "LuciferChannel",
  28. ver : 1,
  29. os : 1,
  30. uid : uid || 1,
  31. token : token || "lucifer_test_token"
  32. }
  33. self.isloading = true
  34. $.ajax({
  35. type: "get",
  36. url: url,
  37. data: param,
  38. dataType: "jsonp",
  39. success: function(ret) {
  40. ret = lib.formatHttpProtocol(ret);
  41. self.isloading = false
  42. if(ret.code == 0) {
  43. let data = ret.data
  44. self.nextFlag = data.next
  45. self.timeline = data.timeline
  46. if(data.records) self.records = self.records.concat(data.records)
  47. } else {
  48. self.nextFlag = 0
  49. lib.showDialog(ret.msg)
  50. }
  51. }
  52. })
  53. }
  54. },
  55. filters : {
  56. parseReleaseDate(value){
  57. return lib.handleTime(value,2)
  58. }
  59. }
  60. };