hire.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. define(['template', 'native', 'config'], function (template, native, config) {
  2. function back(event) {
  3. event.preventDefault();
  4. $(document).trigger('spa:navigate', {
  5. hash: ''
  6. });
  7. }
  8. return {
  9. title: '壹管家保洁师招聘',
  10. body: '',
  11. init: function (pageData, dtd) {
  12. var $view = this;
  13. var $doc = $(document);
  14. var tpl = template('hire/index', {
  15. showNavBar: !config.isWX && !config.isChubao
  16. });
  17. $('.spa-page-body', $view).html(tpl);
  18. setTimeout(function () {
  19. pageData.scroll = new IScroll('#hireScroll');
  20. }, 50);
  21. //返回
  22. $.newTouch('.back-button', function (event) {
  23. back.call(this, event);
  24. }, $view);
  25. $view.on('tapBackButton', function (event) {
  26. back.call(this, event);
  27. });
  28. $view.on('swipeRight', function (event) {
  29. back.call(this, event);
  30. });
  31. // setTimeout(function () {
  32. // //获取video
  33. // var oLiveVideo=document.getElementById("liveVideo");
  34. // //获取canvas画布
  35. // var oLiveCanvas=document.getElementById("liveCanvas");
  36. // //设置画布
  37. // var oLiveCanvas2D=oLiveCanvas.getContext('2d');
  38. // //设置setinterval定时器
  39. // var bLiveVideoTimer=null;
  40. // //监听播放
  41. // oLiveVideo.addEventListener('play',function() {
  42. // bLiveVideoTimer=setInterval(function() {
  43. // oLiveCanvas2D.drawImage(myPlayer,0,0,640,320);
  44. // },20);
  45. // },false);
  46. // //监听暂停
  47. // oLiveVideo.addEventListener('pause',function() {
  48. // clearInterval(bLiveVideoTimer);
  49. // },false);
  50. // //监听结束
  51. // oLiveVideo.addEventListener('ended',function() {
  52. // clearInterval(bLiveVideoTimer);
  53. // },false);
  54. // },500);
  55. //客服电话
  56. $.newTouch('.service-telephone', function (event) {
  57. event.preventDefault();
  58. native.call('021-62109097');
  59. }, $view);
  60. dtd.resolve();
  61. }
  62. }
  63. })