alternatePopup.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. Component({
  2. options:{addGlobalClass: true},//使用全局css样式
  3. properties: {
  4. show:{
  5. type: Boolean,
  6. observer: function (newVal) {
  7. this.setData({ show: newVal });
  8. }
  9. },
  10. alternateData:{
  11. type: Object,
  12. observer: function (newVal) {
  13. this.setData({ info: newVal });
  14. }
  15. },
  16. },
  17. data: {
  18. show:false,
  19. info:{},
  20. },
  21. methods: {
  22. // 关闭弹窗
  23. closeTip(e){
  24. this.close(e.detail)
  25. },
  26. closePopup(){
  27. this.close(false)
  28. },
  29. close(data){
  30. this.triggerEvent("close");
  31. },
  32. // 跳转至候补说明页
  33. jumpPage(){
  34. wx.navigateTo({
  35. url: '/pages/product/alternateInstract/index',
  36. })
  37. },
  38. sub(){
  39. wx.navigateTo({
  40. url: '/pages/product/buy/index?aid=' + this.data.info.aid + '&atype=' + this.data.info.atype + '&createGroup=' + this.data.info.createGroup + '&qptype=' + this.data.info.qptype + '&groupid=' + this.data.info.groupid + '&sessionsIndex=' + this.data.info.sessionsIndex + '&mealsIndex=' + this.data.info.mealsIndex + '&quantity=' + this.data.info.quantity + '&recommender=' + this.data.info.recommender + '&street=' + this.data.info.street +'&presellOpen='+this.data.info.presellOpen+'&btype='+this.data.info.btype + '&military='+this.data.info.military
  41. });
  42. }
  43. }
  44. })