family-share.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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_guide').hide();
  13. } else {
  14. $('#overlay_pop').show();
  15. $('#introduce_guide').show();
  16. }
  17. $(function() {
  18. $('#require_sign').on('click',function() {
  19. window.scrollTo(0,document.body.scrollHeight)
  20. });
  21. $('#overlay_pop').on('touchstart',function() {
  22. $(this).hide();
  23. $('#introduce_text').hide();
  24. $('#introduce_guide').hide();
  25. });
  26. if(enableSign) {
  27. $('#require_sign').click(function() {
  28. //location.href = "signing-doctors.html";
  29. });
  30. }
  31. window.onscroll=function(){
  32. var offsetHeight = document.body.offsetHeight,
  33. scrollTop = $(document.body).scrollTop(),
  34. height = $(window).height();
  35. if(scrollTop + height == offsetHeight) {
  36. $('#require_sign').hide();
  37. } else {
  38. $('#require_sign').show();
  39. }
  40. };
  41. })