index.js 706 B

1234567891011121314151617181920212223242526272829
  1. var sceneReadyBehavior = require('../../behavior-scene/scene-ready');
  2. var handleDecodedXML = require('../../behavior-scene/util').handleDecodedXML;
  3. var xmlCode = ``;
  4. var envWords = [
  5. "TiT创意园白天",
  6. "TiT创意园晚上",
  7. "海边夕阳",
  8. ];
  9. Page({
  10. behaviors:[sceneReadyBehavior],
  11. data: {
  12. xmlCode: '<div class="codeWrap">' + handleDecodedXML(xmlCode) + '</div>',
  13. envIndex: 0,
  14. envWord: "TiT创意园白天",
  15. },
  16. handleEnv0: function() {
  17. this.setData({envIndex: 0, envWord: envWords[0]});
  18. },
  19. handleEnv1: function() {
  20. this.setData({envIndex: 1, envWord: envWords[1]});
  21. },
  22. handleEnv2: function() {
  23. this.setData({envIndex: 2, envWord: envWords[2]});
  24. }
  25. });