You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
1.8 KiB

  1. // components/list/list.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. },
  8. /**
  9. * 组件的初始数据
  10. */
  11. data: {
  12. flag1: 0,
  13. flag2: 0,
  14. flag3: 0,
  15. icon: ["/asset/img/icon-display1.png",
  16. "/asset/img/icon-display2.png"],
  17. star: ["/asset/img/icon-star.png",
  18. "/asset/img/redstar.png"],
  19. st: 0,
  20. display1 : 'none',
  21. display2: 'none',
  22. display3: 'none',
  23. pubScenic : [1]
  24. },
  25. /**
  26. * 组件的方法列表
  27. */
  28. methods: {
  29. onRet: function () {
  30. wx.reLaunch({
  31. url: "/Pages/travel/home/home",
  32. });
  33. },
  34. hit: function () {
  35. this.setData({
  36. display1: this.data.flag1 == 1 ? 'none' : 'block',
  37. })
  38. this.data.flag1 = this.data.flag1 == 0 ? 1 : 0
  39. },
  40. hit2: function () {
  41. this.setData({
  42. display2: this.data.flag2 == 1 ? 'none' : 'block',
  43. })
  44. this.data.flag2 = this.data.flag2 == 0 ? 1 : 0
  45. },
  46. hitc: function () {
  47. this.setData({
  48. display3: this.data.flag3 == 1 ? 'none' : 'block',
  49. })
  50. this.data.flag3 = this.data.flag3 == 0 ? 1 : 0
  51. },
  52. addPub: function(){
  53. const length = this.data.pubScenic
  54. this.setData({
  55. pubScenic : this.data.pubScenic.concat([length+1])
  56. })
  57. },
  58. addPrivate: function(){
  59. const length = this.data.priBillNum.length
  60. this.setData({
  61. priBillNum:this.data.priBillNum.concat([length+1])
  62. })
  63. },
  64. emphasize:function(){
  65. this.setData({
  66. st: this.data.st == 0 ? 1 : 0
  67. })
  68. },
  69. }
  70. })