bottom.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <section class="toast" style="display:none;">错误信息</section>
  2. <{if !$cutScreenInfo && $display == 1}>
  3. <footer>
  4. <ul>
  5. <li <{if $action != 'gift'}>class="active"<{/if}>><a href="<{$listUrl}>"><i class="icon"><img src="<{$platform.home_img_url}>"></i><span><{$platform.home_img_text}></span></a></li>
  6. <li <{if $action == 'gift'}>class="active"<{/if}>><a href="<{$giftsUrl}>"><i class="icon"><img src="<{$platform.gift_img_url}>"></i><span><{$platform.gift_img_text}></span></a></li>
  7. <{if $platform.zs_img_link}>
  8. <li><a href="<{$platform.zs_img_link}>"><i class="icon"><img src="<{$platform.zs_img_url}>"></i><span><{$platform.zs_img_text}></span></a></li>
  9. <{/if}>
  10. <li class="bottom_follow"><a href="<{$platform.follow_url}>" target="_blank"><i class="icon"><img src="<{$platform.follow_img_url}>"></i><span><{$platform.follow_img_text}></span></a></li>
  11. <li style="display:none"><a class="bottom_share" href="<{$platform.share_url}>" ><i class="icon"><img src="<{$platform.share_img_url}>"></i><span><{$platform.share_img_text}></span></a></li>
  12. </ul>
  13. </footer>
  14. <{/if}>
  15. <script type="text/javascript">
  16. function toast(content, url)
  17. {
  18. var e = $(".toast");
  19. e.html(content).show();
  20. var func = function(url)
  21. {
  22. e.hide();
  23. if (url == 1) {
  24. return;
  25. } else if (url) {
  26. location.href = url;
  27. } else {
  28. location.reload();
  29. }
  30. };
  31. setTimeout(function(){func(url)}, 1000);
  32. }
  33. function checkApp() {
  34. var u = navigator.userAgent.toLowerCase();
  35. var isApple = /iphone|ipad|ipod|ios/i.test(u);
  36. var isAndroid = /android/i.test(u);
  37. if (isApple || isAndroid) {
  38. return true;
  39. } else {
  40. return false;
  41. }
  42. }
  43. function share_button(e, title, url, img, content) {
  44. console.log(title);
  45. if (checkApp()) {
  46. //e.parent().show();
  47. e.show();
  48. e.click(function()
  49. {
  50. WX_share(url, content, title, img);
  51. })
  52. } else {
  53. //e.parent().hide();
  54. e.hide();
  55. }
  56. }
  57. function buy_button()
  58. {
  59. if ($('.buy_button').length) {
  60. var buy = $('.buy_button');
  61. if (checkApp()) {
  62. buy.attr('href', 'javascript:;');
  63. var app = buy.attr('data-app');
  64. buy.click(function() {
  65. //app内链接
  66. })
  67. } else {
  68. buy.attr('href', buy.attr('data-weixin'));
  69. }
  70. }
  71. }
  72. function yaoqing()
  73. {
  74. if ($(".yaoqing").length) {
  75. var app = checkApp();
  76. if (app) {
  77. $(".yaoqing").addClass('share_button');
  78. } else {
  79. $(".yaoqing").removeClass('share_button');
  80. $(".yaoqing").click(function()
  81. {
  82. toast('点击右上角,分享邀请好友为你加油!', 1);
  83. });
  84. }
  85. }
  86. }
  87. </script>
  88. <{if !$notShowWeixinShare && !$weixinShare.notAllow}>
  89. <script type="text/javascript">
  90. var URL = window.location.href, site;
  91. site = 1;
  92. console.log(share_url);
  93. new brickjs.MShare({
  94. website : 'sg',
  95. site: site,
  96. catalog: "",
  97. sUrl: share_url, //分享地址
  98. title: share_title,
  99. imgUrl: share_img,
  100. imgWidth: "640",
  101. imgHeight: "640",
  102. source_id : 1,
  103. source_table : 'onepage',
  104. desc: share_content,
  105. appKey: {
  106. tsina: "2412621184"
  107. },
  108. ralateUid: '1658402750',
  109. wxGuide: {
  110. imgUrl: share_img,
  111. width: 100,
  112. height: 100,
  113. style: {
  114. right: 0,
  115. top: 0
  116. }
  117. }
  118. });
  119. function init()
  120. {
  121. yaoqing();
  122. buy_button();
  123. if ($('.share_button').length) {
  124. share_button($('.share_button'), share_title, share_url, share_img, share_content);
  125. }
  126. if (checkApp()) {
  127. if ($('.bottom_share').length) {
  128. $('.bottom_follow').hide();
  129. share_button($('.bottom_share'), share_title, share_url, share_img, share_content);
  130. }
  131. }
  132. }
  133. $(function()
  134. {
  135. init();
  136. })
  137. </script>
  138. <{else}>
  139. <script>
  140. //关闭分享按钮
  141. wx.hideOptionMenu();
  142. </script>
  143. <{/if}>
  144. <{if !$js}>
  145. <script type="text/javascript" src="<{$web_cfg.cdn}>/haili/js/global.js"></script>
  146. <{/if}>
  147. </body>
  148. </html>