C端小程序
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.

55 rivejä
1.5 KiB

  1. const Http = require("../../utils/HttpBasics");
  2. var config = require("../../config/config.js");
  3. Component({
  4. properties: {
  5. questionnaire: {
  6. type: Object,
  7. value: {}
  8. }
  9. },
  10. data: {
  11. widthScreen: null,
  12. moveData: null,
  13. rotateData: null,
  14. alphaData: null,
  15. scaleData: null,
  16. skewData: null,
  17. matrixData: null,
  18. },
  19. methods:{
  20. close:function(){
  21. this.alphaClick();
  22. this.queueClick();
  23. // 子组件向父组件传值
  24. // 传值到 coupon=>detail页面
  25. var myEvent = "questions";
  26. this.triggerEvent('myevent', myEvent);
  27. },
  28. /**
  29. * 点击提交问题
  30. */
  31. formSubmit:function(e){
  32. console.log(e);
  33. console.log(e.target.dataset.questitle)
  34. console.log(e.target.dataset.question)
  35. this.alphaClick();
  36. this.queueClick();
  37. // 子组件向父组件传值
  38. // 传值到 coupon=>detail页面
  39. var myEvent1 = "questions";
  40. this.triggerEvent('myevent1', myEvent1);
  41. },
  42. queueClick: function () {
  43. let that = this;
  44. var animation = wx.createAnimation({});
  45. animation.translate((this.data.widthScreen - 0), 0).scale(0).opacity(0.5).step({ duration: 1500 })
  46. that.setData({ queueData: animation.export()})
  47. },
  48. alphaClick: function (even) {
  49. let that = this;
  50. var animation = wx.createAnimation({})
  51. animation.opacity(0).step({ duration: 1500 })
  52. that.setData({ alphaData: animation.export()});
  53. }
  54. },
  55. });