bottom.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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"><a class="bottom_share" 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.click(function()
  66. {
  67. WX_share(url, content, title, img);
  68. })
  69. } else {
  70. //e.parent().hide();
  71. e.hide();
  72. }
  73. }
  74. function buy_button()
  75. {
  76. if ($('.buy_button').length) {
  77. var buy = $('.buy_button');
  78. if (checkApp()) {
  79. buy.attr('href', 'javascript:;');
  80. var app = buy.attr('data-app');
  81. buy.click(function() {
  82. //app内链接
  83. })
  84. } else {
  85. buy.attr('href', buy.attr('data-weixin'));
  86. }
  87. }
  88. }
  89. function yaoqing()
  90. {
  91. if ($(".yaoqing").length) {
  92. var app = checkApp();
  93. if (app) {
  94. $(".yaoqing").addClass('share_button');
  95. } else {
  96. $(".yaoqing").removeClass('share_button');
  97. /*
  98. $(".yaoqing").click(function()
  99. {
  100. toast('点击右上角,分享邀请好友为你加油!', 1);
  101. });
  102. */
  103. }
  104. }
  105. }
  106. </script>
  107. <{if !$notShowWeixinShare && !$weixinShare.notAllow}>
  108. <script type="text/javascript">
  109. var URL = window.location.href, site;
  110. site = 1;
  111. console.log(share_url);
  112. new brickjs.MShare({
  113. website : 'sg',
  114. site: site,
  115. catalog: "",
  116. sUrl: share_url, //分享地址
  117. title: share_title,
  118. imgUrl: share_img,
  119. imgWidth: "640",
  120. imgHeight: "640",
  121. source_id : 1,
  122. source_table : 'onepage',
  123. desc: share_content,
  124. appKey: {
  125. tsina: "2412621184"
  126. },
  127. ralateUid: '1658402750',
  128. wxGuide: {
  129. imgUrl: share_img,
  130. width: 100,
  131. height: 100,
  132. style: {
  133. right: 0,
  134. top: 0
  135. }
  136. }
  137. });
  138. function init()
  139. {
  140. yaoqing();
  141. buy_button();
  142. if ($('.share_button').length) {
  143. share_button($('.share_button'), share_title, share_url, share_img, share_content);
  144. }
  145. if (checkApp()) {
  146. if ($('.bottom_share').length) {
  147. $('.bottom_follow').hide();
  148. share_button($('.bottom_share'), share_title, share_url, share_img, share_content);
  149. }
  150. }
  151. }
  152. $(function()
  153. {
  154. init();
  155. })
  156. </script>
  157. <{else}>
  158. <script>
  159. //关闭分享按钮
  160. wx.hideOptionMenu();
  161. </script>
  162. <{/if}>
  163. </body>
  164. </html>