bottom.html 4.6 KB

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