东风启辰小程序端
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

everyday.js 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. // pages/everyday/everyday.js
  2. const app = getApp()
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. imgUrl: app.globalData.urlStatic,//图片路径
  9. maskShow: false,
  10. taskShow: false,
  11. taskName:'集齐启辰星【大灯】碎片',
  12. taskImgUrl:'https://www.jiyou-tech.com/2020/496_qichen/static/star/everyday/taskImg1.png',
  13. isSign:true,
  14. isShare:false,
  15. picturlList: ['picturePuzzle1', 'picturePuzzle1','picturePuzzle1'],
  16. picturlCurrent:0,
  17. },
  18. /**
  19. * 关闭任务窗
  20. */
  21. hiddenTask:function(){
  22. this.setData({
  23. maskShow: false,
  24. taskShow: false
  25. })
  26. },
  27. /**
  28. * 签到
  29. */
  30. signIn(){
  31. this.setData({
  32. taskName: '集齐启辰星【大灯】碎片1/4',
  33. taskImgUrl: 'https://www.jiyou-tech.com/2020/496_qichen/static/star/everyday/taskImg2.png',
  34. isSign: false,
  35. isShare: true
  36. })
  37. },
  38. /**
  39. * 下个碎片
  40. */
  41. nextPicturl(){
  42. var max = this.data.picturlList.length-1;
  43. var current = this.data.picturlCurrent + 1;
  44. if (current <= max){
  45. this.setData({
  46. picturlCurrent: current
  47. })
  48. }
  49. },
  50. //上一个碎片
  51. prevPicturl(){
  52. var current = this.data.picturlCurrent - 1;
  53. if (current >= 0) {
  54. this.setData({
  55. picturlCurrent: current
  56. })
  57. }
  58. },
  59. /**
  60. * 生命周期函数--监听页面加载
  61. */
  62. onLoad: function (options) {
  63. },
  64. /**
  65. * 生命周期函数--监听页面初次渲染完成
  66. */
  67. onReady: function () {
  68. },
  69. /**
  70. * 生命周期函数--监听页面显示
  71. */
  72. onShow: function () {
  73. },
  74. /**
  75. * 生命周期函数--监听页面隐藏
  76. */
  77. onHide: function () {
  78. },
  79. /**
  80. * 生命周期函数--监听页面卸载
  81. */
  82. onUnload: function () {
  83. },
  84. /**
  85. * 页面相关事件处理函数--监听用户下拉动作
  86. */
  87. onPullDownRefresh: function () {
  88. },
  89. /**
  90. * 页面上拉触底事件的处理函数
  91. */
  92. onReachBottom: function () {
  93. },
  94. /**
  95. * 用户点击右上角分享
  96. */
  97. onShareAppMessage: function () {
  98. }
  99. })