bottom.html 4.6 KB

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