share.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. const util = require("../../utils/util.js");
  2. const app = getApp();
  3. Component({
  4. properties: {
  5. type: {
  6. type: Number,
  7. observer: function (newVal, oldVal) {
  8. this.setData({ type: newVal });
  9. }
  10. },
  11. orderid: {
  12. type: String,
  13. observer: function (newVal, oldVal) {
  14. this.setData({ orderid: newVal });
  15. }
  16. },
  17. groupid: {
  18. type: String,
  19. observer: function (newVal, oldVal) {
  20. this.setData({ groupid: newVal });
  21. }
  22. },
  23. aid: {
  24. type: String,
  25. observer: function (newVal, oldVal) {
  26. this.setData({ aid: newVal });
  27. }
  28. },
  29. sid:{
  30. type: Number,
  31. observer: function (newVal, oldVal) {
  32. this.setData({ sid: newVal });
  33. }
  34. },
  35. pid:{
  36. type: String,
  37. observer: function (newVal, oldVal) {
  38. this.setData({ pid: newVal });
  39. }
  40. },
  41. groupbook:{
  42. type: Number,
  43. observer: function (newVal, oldVal) {
  44. this.setData({ groupbook: newVal });
  45. }
  46. },
  47. channel: {
  48. type: Number,
  49. observer: function (newVal, oldVal) {
  50. this.setData({ channel: newVal });
  51. }
  52. },
  53. status: {
  54. type: Number,
  55. observer: function (newVal, oldVal) {
  56. this.setData({ status: newVal });
  57. }
  58. },
  59. channelTimes: {
  60. type: Number,
  61. observer: function (newVal, oldVal) {
  62. this.setData({ channelTimes: newVal });
  63. }
  64. },
  65. invitefbtn:{
  66. type: Boolean,
  67. observer: function (newVal, oldVal) {
  68. console.log(newVal, oldVal)
  69. this.setData({ invitefbtn: newVal });
  70. }
  71. },
  72. make:{
  73. type: Boolean,
  74. observer: function (newVal, oldVal) {
  75. this.setData({ make: newVal });
  76. }
  77. },
  78. to:{
  79. type: String,
  80. observer: function (newVal, oldVal) {
  81. this.setData({ toLink: newVal });
  82. }
  83. },
  84. bill:{
  85. type: Number,
  86. observer: function (newVal, oldVal) {
  87. this.setData({ bill: newVal });
  88. }
  89. }
  90. },
  91. data: {
  92. aid:'',
  93. sid:'',
  94. pid:'',
  95. groupid:'',
  96. orderid:'',
  97. status:0,
  98. type: 0,
  99. channel:0,
  100. channelTimes:0,
  101. groupbook:-1,
  102. invitefbtn:true,
  103. toLink:'',
  104. to:"",
  105. bill:0
  106. },
  107. pageLifetimes:{
  108. hide(){
  109. this.setData({ make: false });
  110. }
  111. },
  112. methods: {
  113. navigatorTo(e) {
  114. console.log(this.data.to);
  115. if(this.data.bill==1){
  116. wx.navigateTo({
  117. url: '/pages/growup/activePhoto/bill',
  118. })
  119. return
  120. }
  121. if (util.isEmpty(this.data.to)) {
  122. let channelinfo=this.data.channelTimes==1?('&channel='+this.data.channel+'&channelTimes='+this.data.channelTimes):'';
  123. util.navigator('/pages/product/activity/bill?id='+this.data.aid+
  124. '&orderid='+this.data.orderid+
  125. '&groupid='+this.data.groupid+
  126. '&status='+this.data.status+
  127. '&groupbook='+this.data.groupbook+
  128. channelinfo +
  129. '&sid='+this.data.sid+
  130. '&pid='+this.data.pid
  131. );
  132. }else{
  133. util.navigator(this.data.toLink);
  134. }
  135. },
  136. close() {
  137. console.log(this.data.invitefbtn)
  138. this.setData({ make: false });
  139. }
  140. }
  141. })