bottom.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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" class="bottom_share"><a 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 loadLogin()
  17. {
  18. <{if $applogin && $applogin == 1}>
  19. $("#loginyes").attr('href', 'javascript:;');
  20. $("#loginyes").click(function()
  21. {
  22. istoken('<{$loginUrl}>');
  23. });
  24. <{/if}>
  25. $('#loginbox').show();
  26. /*
  27. app = checkApp();
  28. if (app) {
  29. istoken('<{$info.thisUrl}>');
  30. } else {
  31. $('#loginbox').show();
  32. }
  33. */
  34. }
  35. function toast(content, url)
  36. {
  37. var e = $(".toast");
  38. e.html(content).show();
  39. var func = function(url)
  40. {
  41. e.hide();
  42. if (url == 1) {
  43. return;
  44. } else if (url) {
  45. location.href = url;
  46. } else {
  47. location.reload();
  48. }
  49. };
  50. setTimeout(function(){func(url)}, 1000);
  51. }
  52. function checkApp() {
  53. var u = navigator.userAgent.toLowerCase();
  54. var isApple = /iphone|ipad|ipod|ios|android/i.test(u);
  55. var isAndroid = /android/i.test(u);
  56. var isWeixin = /micromessenger/i.test(u);
  57. if (!isWeixin) {
  58. return true;
  59. } else {
  60. return false;
  61. }
  62. }
  63. function share_button(e, title, url, img, content) {
  64. console.log(title);
  65. if (checkApp()) {
  66. //e.parent().show();
  67. e.show();
  68. e.find('a').attr('href', 'javascript:;');
  69. e.click(function()
  70. {
  71. WX_share(url, content, title, img);
  72. })
  73. } else {
  74. //e.parent().hide();
  75. e.hide();
  76. }
  77. }
  78. function buy_button()
  79. {
  80. if ($('.buy_button').length) {
  81. var buy = $('.buy_button');
  82. if (checkApp()) {
  83. buy.attr('href', 'javascript:;');
  84. var app = buy.attr('data-app');
  85. buy.click(function() {
  86. //app内链接
  87. })
  88. } else {
  89. buy.attr('href', buy.attr('data-weixin'));
  90. }
  91. }
  92. }
  93. function yaoqing()
  94. {
  95. if ($(".yaoqing").length) {
  96. var app = checkApp();
  97. if (app) {
  98. $(".yaoqing").addClass('share_button');
  99. } else {
  100. $(".yaoqing").removeClass('share_button');
  101. /*
  102. $(".yaoqing").click(function()
  103. {
  104. toast('点击右上角,分享邀请好友为你加油!', 1);
  105. });
  106. */
  107. }
  108. }
  109. }
  110. </script>
  111. <script type="text/javascript">
  112. var URL = window.location.href, site;
  113. site = 1;
  114. console.log(share_url);
  115. new brickjs.MShare({
  116. website : 'sg',
  117. site: site,
  118. catalog: "",
  119. sUrl: share_url, //分享地址
  120. title: share_title,
  121. imgUrl: share_img,
  122. imgWidth: "640",
  123. imgHeight: "640",
  124. source_id : 1,
  125. source_table : 'onepage',
  126. desc: share_content,
  127. appKey: {
  128. tsina: "2412621184"
  129. },
  130. ralateUid: '1658402750',
  131. wxGuide: {
  132. imgUrl: share_img,
  133. width: 100,
  134. height: 100,
  135. style: {
  136. right: 0,
  137. top: 0
  138. }
  139. }
  140. });
  141. function init()
  142. {
  143. yaoqing();
  144. buy_button();
  145. if ($('.share_button').length) {
  146. share_button($('.share_button'), share_title, share_url, share_img, share_content);
  147. }
  148. if (checkApp()) {
  149. if ($('.bottom_share').length) {
  150. $('.bottom_follow').hide();
  151. share_button($('.bottom_share'), share_title, share_url, share_img, share_content);
  152. }
  153. }
  154. }
  155. $(function()
  156. {
  157. init();
  158. })
  159. </script>
  160. <script>
  161. //关闭分享按钮
  162. //wx.hideOptionMenu();
  163. </script>
  164. </body>
  165. </html>