index.js 577 B

12345678910111213141516171819202122232425262728
  1. var sceneReadyBehavior = require('../../behavior-scene/scene-ready');
  2. var handleDecodedXML = require('../../behavior-scene/util').handleDecodedXML;
  3. var xmlCode = ``;
  4. Page({
  5. behaviors:[sceneReadyBehavior],
  6. data: {
  7. xmlCode: '<div class="codeWrap">' + handleDecodedXML(xmlCode) + '</div>',
  8. arDetected: false,
  9. throwing: false
  10. },
  11. handleARDetected() {
  12. this.setData({
  13. arDetected: true
  14. });
  15. },
  16. handleThrowStart() {
  17. this.setData({
  18. throwing: true
  19. });
  20. },
  21. handleThrowEnd() {
  22. this.setData({
  23. throwing: false
  24. });
  25. }
  26. });