posterTask.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. const util = require('../../../utils/util.js');
  2. const config = require('../../../utils/config')
  3. Page({
  4. data: {
  5. imgPath:config.imgPath,
  6. act_list:[],
  7. pageIndex:1
  8. },
  9. onLoad(options) {
  10. this.getActList()
  11. },
  12. onShow() {
  13. },
  14. jumpToPoster(e){
  15. let id =e.currentTarget.dataset.id
  16. wx.navigateTo({
  17. url: '/pages/product/activity/bill?id='+id+'&makeTask=true',
  18. })
  19. },
  20. jumpPage(){
  21. wx.navigateTo({
  22. url: '/pages/turntable/hairpin/index',
  23. })
  24. },
  25. getActList(e){
  26. let that=this;
  27. util.ajax({
  28. func: "v2/article/recom_list",
  29. data: {
  30. pageIndex: this.data.pageIndex,
  31. pageSize: 10
  32. },
  33. load:false
  34. }, function (res) {
  35. if (res.code == 0) {
  36. that.setData({act_list:e?[...that.data.act_list,...res.data.list]:res.data.list})
  37. }
  38. })
  39. },
  40. onReachBottom() {
  41. let that=this;
  42. this.data.pageIndex++;
  43. this.setData({pageIndex:this.data.pageIndex})
  44. this.getActList(true)
  45. },
  46. onShareAppMessage() {
  47. return{
  48. title:'上传发圈截图,领取更多优惠福利。',
  49. path:'/pages/account/monetaryCenter/posterTask',
  50. imageUrl:'https://img.bbztx.com/image_test/upload/thumbs/20220905/logo/1662359120902091698.png'
  51. }
  52. }
  53. })