signing-share.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. var Request = GetRequest();
  2. var userAgent = window.localStorage.getItem(agentName);
  3. if(userAgent) {
  4. userAgent = JSON.parse(userAgent);
  5. }
  6. // 判断是否点击“我要签约”按钮跳转到“签约管理首页”
  7. var enableSign = Request["enableSign"],
  8. guide = Request["guide"],
  9. from = Request["from"];//用from判断是否直接点击分享链接
  10. if(from) {
  11. $('#overlay_pop').hide();
  12. $('#introduce_text').hide();
  13. $('#introduce_guide').hide();
  14. } else{
  15. $('#overlay_pop').show();
  16. $('#introduce_text').show();
  17. $('#introduce_guide').show();
  18. }
  19. $(function() {
  20. $('#require_sign').on('click',function() {
  21. window.scrollTo(0,document.body.scrollHeight)
  22. });
  23. $('#overlay_pop').on('touchstart',function() {
  24. $(this).hide();
  25. $('#introduce_text').hide();
  26. $('#introduce_guide').hide();
  27. });
  28. if(enableSign) {
  29. $('#require_sign').click(function() {
  30. //location.href = "signing-doctors.html";
  31. });
  32. }
  33. window.onscroll=function(){
  34. var offsetHeight = document.body.offsetHeight,
  35. scrollTop = $(document.body).scrollTop(),
  36. height = $(window).height();
  37. if(scrollTop + height == offsetHeight) {
  38. $('#require_sign').hide();
  39. } else {
  40. $('#require_sign').show();
  41. }
  42. };
  43. })