test.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <{include file="header.html"}>
  2. <{include file="nav.html"}>
  3. <script src="<{$web_cfg.cdn}>/public/static/js/spin.min.js" charset="utf-8"></script>
  4. <{if $user}>
  5. <{$user.nickname}>
  6. <{else}>
  7. <a href="<{$web_cfg.domain}>/connect/">微信登陆</a>
  8. <{/if}>
  9. <div id=foo style="margin:auto;"></div>
  10. <script>
  11. KISSY.use('node, vogue/test, cookie, gallery/pageNotification/1.0/index', function (S, Node, Test, Cookie, PageNotification) {
  12. var $ = S.all;
  13. var opts = {
  14. lines: 12, // The number of lines to draw
  15. length: 3, // The length of each line
  16. width: 2, // The line thickness
  17. radius: 4, // The radius of the inner circle
  18. corners: 1, // Corner roundness (0..1)
  19. rotate: 2, // The rotation offset
  20. direction: 1, // 1: clockwise, -1: counterclockwise
  21. color: 'red', // #rgb or #rrggbb or array of colors
  22. speed: 2, // Rounds per second
  23. trail: 100, // Afterglow percentage
  24. //shadow: false, // Whether to render a shadow
  25. //hwaccel: false, // Whether to use hardware acceleration
  26. className: 'spinner', // The CSS class to assign to the spinner
  27. zIndex: 2e9, // The z-index (defaults to 2000000000)
  28. top: '50%', // Top position relative to parent
  29. left: '50%' // Left position relative to parent
  30. };
  31. var target = document.getElementById('foo');
  32. var spinner = new Spinner(opts).spin(target);
  33. /* spinner.stop(); */
  34. var objPN = new PageNotification({
  35. "closeButton": true,
  36. "positionClass": "page-notification-bottom-left",
  37. "onclick": null,
  38. "showDuration": "300",
  39. "hideDuration": "1000",
  40. "timeOut": "50000",
  41. "extendedTimeOut": "1000",
  42. "showEasing": "swing",
  43. "hideEasing": "linear",
  44. "showMethod": "fadeIn",
  45. "hideMethod": "fadeOut"
  46. });
  47. objPN.success("hello world");
  48. var TM = Cookie.get('TM_PASSPORT_MEMBER');
  49. if (TM) {
  50. objPN.success(TM);
  51. }
  52. });
  53. </script>
  54. <{include file="bottom.html"}>