tabbar.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <div id="tabbar">
  2. <div class="tab_nav {if $tab_choice == 'bookshelf' }choice{/if}">
  3. {if condition="$showBookShelf"}
  4. <a href="javascript:void(0);" data-href="{:getCurrentDomain($channel_id,'/index/book/shelf')}" onclick="do_burydot($(this), 'bookshelf')">
  5. <div class="tab_icon bookshelf"></div>
  6. <div style="font-size: .1rem">书架</div>
  7. </a>
  8. {else}
  9. <a href="javascript:void(0);" data-href="{:getCurrentDomain($channel_id,'/index/user/recent')}" onclick="do_burydot($(this), 'bookshelf')">
  10. <div class="tab_icon bookshelf"></div>
  11. <div style="font-size: .1rem">书架</div>
  12. </a>
  13. {/if}
  14. </div>
  15. <div class="tab_nav {if $tab_choice == 'bookcity' }choice{/if}">
  16. <a href="javascript:void(0);" data-href="{:getCurrentDomain($channel_id,'/index')}" onclick="do_burydot($(this), 'bookcity')">
  17. <div class="tab_icon bookcity"></div>
  18. <div style="font-size: .1rem">书城</div>
  19. </a>
  20. </div>
  21. <div class="tab_nav {if $tab_choice == 'recharge' }choice{/if}">
  22. <a href="javascript:void(0);" data-href="{:getCurrentDomain($channel_id,'/index/recharge/pay')}" onclick="do_burydot($(this), 'recharge')">
  23. <div class="tab_icon recharge"></div>
  24. <div style="font-size: .1rem">充值</div>
  25. </a>
  26. </div>
  27. <!--<div class="tab_nav {if $tab_choice == 'rank_list' }choice{/if}">
  28. <a href="javascript:void(0);" data-href="{:getCurrentDomain($channel_id,'/index/book/list?sex=1&type=click')}" onclick="do_burydot($(this), 'rank_list')">
  29. <div class="tab_icon rank_list"></div>
  30. <div style="font-size: .1rem">排行</div>
  31. </a>
  32. </div>-->
  33. <div class="tab_nav {if $tab_choice == 'my' }choice{/if}">
  34. <a href="javascript:void(0);" data-href="{:getCurrentDomain($channel_id,'/index/user')}" onclick="do_burydot($(this), 'my')">
  35. <div class="tab_icon my"></div>
  36. <div style="font-size: .1rem">我的</div>
  37. </a>
  38. </div>
  39. </div>
  40. <style type="text/css">
  41. .footer_box{
  42. padding-bottom: .56rem;
  43. }
  44. /** Tab Bar **/
  45. #tabbar {
  46. width: 100%;
  47. position: fixed;
  48. bottom: 0rem;
  49. left: 0;
  50. right: 0;
  51. height: .46rem;
  52. background: #f9f9f9;
  53. display: flex;
  54. justify-content: space-around;
  55. padding-top: 0.05rem;
  56. z-index:999;
  57. padding-bottom: constant(safe-area-inset-bottom); /* 兼容 iOS < 11.2 */
  58. padding-bottom: env(safe-area-inset-bottom); /* 兼容 iOS >= 11.2 */
  59. }
  60. .tab_nav {
  61. color: #B0B0B0;
  62. font-size: .1rem;
  63. text-align: center;
  64. }
  65. .tab_nav a{
  66. color: #B0B0B0;
  67. }
  68. .tab_nav .icon {
  69. width: .27rem;
  70. height: .268rem;
  71. }
  72. .tab_icon {
  73. width: 0.27rem;
  74. height: 0.27rem;
  75. background-size: .27rem, .27rem;
  76. }
  77. .choice a{
  78. color: #E63B64;
  79. }
  80. .choice .tab_icon {
  81. width: 0.27rem;
  82. height: 0.27rem;
  83. background: url("{:asset('/img/bookcity-select.png')}") 50% 50% no-repeat;
  84. background-size: .27rem, .27rem;
  85. }
  86. /** 书架 **/
  87. .bookshelf{
  88. background: url("{:asset('/img/bookshelf-no.png')}") 50% 50% no-repeat;
  89. background-size: .27rem, .27rem;
  90. }
  91. .choice .bookshelf{
  92. background: url("{:asset('/img/bookshelf-select.png')}") 50% 50% no-repeat;
  93. background-size: .27rem, .27rem;
  94. }
  95. /** 书城 **/
  96. .bookcity{
  97. background: url("{:asset('/img/bookcity-no.png')}") 50% 50% no-repeat;
  98. background-size: .27rem, .27rem;
  99. }
  100. .choice .bookcity{
  101. background: url("{:asset('/img/bookcity-select.png')}") 50% 50% no-repeat;
  102. background-size: .27rem, .27rem;
  103. }
  104. /** 充值 **/
  105. .recharge{
  106. background: url("{:asset('/img/bookcity-no.png')}") 50% 50% no-repeat;
  107. background-size: .27rem, .27rem;
  108. }
  109. .choice .recharge{
  110. background: url("{:asset('/img/bookcity-select.png')}") 50% 50% no-repeat;
  111. background-size: .27rem, .27rem;
  112. }
  113. /** 我的 **/
  114. .my{
  115. background: url("{:asset('/img/my-no.png')}") 50% 50% no-repeat;
  116. background-size: .27rem, .27rem;
  117. }
  118. .choice .my{
  119. background: url("{:asset('/img/my-select.png')}") 50% 50% no-repeat;
  120. background-size: .27rem, .27rem;
  121. }
  122. /** 排行榜 **/
  123. .rank_list{
  124. background: url("{:asset('/img/rank-list-no.png')}") 50% 50% no-repeat;
  125. background-size: .27rem, .27rem;
  126. }
  127. .choice .rank_list{
  128. background: url("{:asset('/img/rank-list-select.png')}") 50% 50% no-repeat;
  129. background-size: .27rem, .27rem;
  130. }
  131. </style>
  132. <script>
  133. function do_burydot(obj, idstr ='') {
  134. cpslog([702, {
  135. map: {
  136. page: obj.data('href'),
  137. idstr: idstr,
  138. }
  139. }, 'tabbar']);
  140. location.href = obj.data('href');
  141. }
  142. </script>