bottom.html 4.8 KB

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