bottom.html 4.9 KB

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