serviceView.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <view class="wrap">
  3. <view class="content" v-show="showIndex == 0">
  4. <index></index>
  5. </view>
  6. <view class="content" v-show="showIndex == 1">
  7. <freeEnter></freeEnter>
  8. </view>
  9. <view class="content" v-show="showIndex == 2">
  10. <news></news>
  11. </view>
  12. <view class="content" v-show="showIndex == 3">
  13. <user></user>
  14. </view>
  15. <view class="footer">
  16. <view class="facilitator_tabbar">
  17. <view class="facilitator_tabbar_item"
  18. v-for="item,index in tabbar"
  19. :key="index"
  20. @click="changeIndex(index)">
  21. <view class="footer_img"><image :src="index == showIndex?item.select:item.no_select"></image></view>
  22. <view class="facilitator_tabbar_item_title">{{item.title}}</view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. import api from '../../../../api.js';
  30. import index from "../index/index.vue";
  31. import user from "../user/index/index.vue";
  32. import freeEnter from "@/components/free-enter/free-enter.vue";
  33. import news from "@/components/news/list/list.vue";
  34. export default {
  35. data() {
  36. return {
  37. tabbar:[
  38. { id: 0,select:'https://wx.fujinyangche.com/nvrnetwork/images/home01.png',no_select:'https://wx.fujinyangche.com/nvrnetwork/images/home.png', tapFunction:'toIndex',title: '首页' },
  39. { id: 1,select:'https://wx.fujinyangche.com/nvrnetwork/images/ruzhu01.png', tapFunction: 'toLevel2', title: '免费入驻', no_select: 'https://wx.fujinyangche.com/nvrnetwork/images/ruzhu.png' },
  40. { id: 2,select:'https://wx.fujinyangche.com/nvrnetwork/images/news01.png',no_select:'https://wx.fujinyangche.com/nvrnetwork/images/news.png', tapFunction:'toNews',title: '活动资讯' },
  41. { id: 3,select:'https://wx.fujinyangche.com/nvrnetwork/images/mine01.png',no_select:'https://wx.fujinyangche.com/nvrnetwork/images/mine.png', tapFunction:'toUser',title: '我' }
  42. ],
  43. showIndex:0
  44. }
  45. },
  46. components:{
  47. index,
  48. user,
  49. freeEnter,
  50. news
  51. },
  52. methods: {
  53. changeIndex(index){
  54. this.showIndex = index;
  55. }
  56. },
  57. onLoad(options) {
  58. console.log(options);
  59. if(options.index !== undefined){
  60. this.showIndex = options.index;
  61. }
  62. }
  63. }
  64. </script>
  65. <style>
  66. /* 底部导航栏 */
  67. .facilitator_tabbar{
  68. width:100%;
  69. height:100rpx;
  70. background:rgba(255,255,255,1);
  71. box-shadow:0px 4rpx 8rpx 0px rgba(0,0,0,0.5);
  72. position: fixed;
  73. bottom:0;
  74. left:0;
  75. z-index:200;
  76. display: flex;
  77. box-sizing: border-box;
  78. }
  79. .facilitator_tabbar_item{
  80. flex:1;
  81. text-align: center;
  82. overflow: hidden;
  83. color:#222222;
  84. }
  85. .footer_img{
  86. width:60rpx;
  87. height:60rpx;
  88. margin:10rpx auto 0;
  89. }
  90. .footer_img image{
  91. display: block;
  92. width:100%;
  93. height:100%;
  94. }
  95. .facilitator_tabbar_item_title{
  96. font-size: 20rpx;
  97. }
  98. .active{
  99. color:#E77817;
  100. }
  101. /* */
  102. page{
  103. width: 100%;
  104. height: 100%;
  105. }
  106. .wrap{
  107. width: 100%;
  108. height: 100%;
  109. }
  110. .content{
  111. width: 100%;
  112. height: 100%;
  113. /* box-sizing: border-box;
  114. padding-bottom:50px; */
  115. }
  116. .footer{
  117. width:375px;
  118. height:50px;
  119. background:rgba(255,255,255,1);
  120. box-shadow:0px 2px 4px 0px rgba(0,0,0,0.5);
  121. position: fixed;
  122. bottom:0;
  123. z-index:1000;
  124. box-sizing: border-box;
  125. }
  126. </style>