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.

61 rivejä
1.4 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. flag: false,
  12. widthScreen: null,
  13. moveData: null,
  14. rotateData: null,
  15. alphaData: null,
  16. scaleData: null,
  17. skewData: null,
  18. matrixData: null,
  19. zindex:null,
  20. },
  21. methods:{
  22. close:function(){
  23. this.alphaClick();
  24. this.queueClick();
  25. },
  26. /**
  27. * 点击提交问题
  28. */
  29. formSubmit:function(e){
  30. console.log(e);
  31. console.log(e.target.dataset.questitle)
  32. console.log(e.target.dataset.question)
  33. this.alphaClick();
  34. this.queueClick();
  35. },
  36. queueClick: function () {
  37. let that = this;
  38. var animation = wx.createAnimation({});
  39. animation.translate((this.data.widthScreen - 0), 0).scale(0).opacity(0.5).step({ duration: 1000 })
  40. that.setData({ queueData: animation.export()})
  41. setTimeout(function () {
  42. that.setData({
  43. flag: true
  44. })
  45. }, 1000)
  46. },
  47. alphaClick: function (even) {
  48. let that = this;
  49. var animation = wx.createAnimation({})
  50. animation.opacity(0).step({ duration: 1000 })
  51. that.setData({ alphaData: animation.export()});
  52. setTimeout(function(){
  53. that.setData({
  54. flag:true
  55. })
  56. },1000)
  57. }
  58. },
  59. onLoad(){
  60. }
  61. });