bottom.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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. $(".yaoqing").click(function()
  98. {
  99. toast('点击右上角,分享邀请好友为你加油!', 1);
  100. });
  101. }
  102. }
  103. }
  104. </script>
  105. <{if !$notShowWeixinShare && !$weixinShare.notAllow}>
  106. <script type="text/javascript">
  107. var URL = window.location.href, site;
  108. site = 1;
  109. console.log(share_url);
  110. new brickjs.MShare({
  111. website : 'sg',
  112. site: site,
  113. catalog: "",
  114. sUrl: share_url, //分享地址
  115. title: share_title,
  116. imgUrl: share_img,
  117. imgWidth: "640",
  118. imgHeight: "640",
  119. source_id : 1,
  120. source_table : 'onepage',
  121. desc: share_content,
  122. appKey: {
  123. tsina: "2412621184"
  124. },
  125. ralateUid: '1658402750',
  126. wxGuide: {
  127. imgUrl: share_img,
  128. width: 100,
  129. height: 100,
  130. style: {
  131. right: 0,
  132. top: 0
  133. }
  134. }
  135. });
  136. function init()
  137. {
  138. yaoqing();
  139. buy_button();
  140. if ($('.share_button').length) {
  141. share_button($('.share_button'), share_title, share_url, share_img, share_content);
  142. }
  143. if (checkApp()) {
  144. if ($('.bottom_share').length) {
  145. $('.bottom_follow').hide();
  146. share_button($('.bottom_share'), share_title, share_url, share_img, share_content);
  147. }
  148. }
  149. }
  150. $(function()
  151. {
  152. init();
  153. })
  154. </script>
  155. <{else}>
  156. <script>
  157. //关闭分享按钮
  158. wx.hideOptionMenu();
  159. </script>
  160. <{/if}>
  161. </body>
  162. </html>