帧视界壹通告,付费看视频的微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
2.6 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="tabbar">
  3. <!-- v-if="isVedio || index != 1" -->
  4. <view
  5. :class="{item : true, active : select == index}"
  6. v-for="(item, index) in list"
  7. :key="index"
  8. @click="toPath(item, index)">
  9. <view class="icon">
  10. <image :src="select == index ?
  11. item.selectedIconPath :
  12. item.iconPath" class="icon-image" mode=""></image>
  13. </view>
  14. <view class="title">
  15. {{ item.title }}
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import { mapGetters, mapState } from 'vuex'
  22. export default {
  23. name:"tabbar",
  24. props : ['select'],
  25. computed : {
  26. ...mapGetters(['isVedio']),
  27. ...mapState(['configList']),
  28. },
  29. data() {
  30. return {
  31. list : [
  32. {
  33. "selectedIconPath": "/static/image/tabbar/1.png",
  34. "iconPath": "/static/image/tabbar/2.png",
  35. "pagePath": "/pages/index/index",
  36. "title": "首页",
  37. },{
  38. "selectedIconPath": "/static/image/tabbar/3.png",
  39. "iconPath": "/static/image/tabbar/4.png",
  40. "pagePath": "/pages/index/publish",
  41. "title": "发布",
  42. },{
  43. "selectedIconPath": "/static/image/tabbar/5.png",
  44. "iconPath": "/static/image/tabbar/6.png",
  45. "pagePath": "/pages/index/center",
  46. "title": "我的",
  47. }
  48. ],
  49. inter : null,
  50. };
  51. },
  52. mounted() {
  53. // this.inter = setInterval(() => {
  54. // console.log('$forceUpdate', this.isVedio);
  55. // this.$forceUpdate()
  56. // }, 500)
  57. // setTimeout(() => {
  58. // clearInterval(this.inter)
  59. // this.inter = null
  60. // }, 20000)
  61. },
  62. beforeDestroy() {
  63. if(this.inter){
  64. clearInterval(this.inter)
  65. }
  66. },
  67. methods : {
  68. toPath(item, index){
  69. if(index == this.select){
  70. return
  71. }
  72. uni.reLaunch({
  73. url: item.pagePath
  74. })
  75. },
  76. }
  77. }
  78. </script>
  79. <style scoped lang="scss">
  80. .tabbar{
  81. position: fixed;
  82. width: 750rpx;
  83. background-color: #fff;
  84. display: flex;
  85. justify-content: center;
  86. align-items: center;
  87. flex-direction: row;
  88. height: 120rpx;
  89. z-index: 999999;
  90. bottom: 0;
  91. left: 0;
  92. line-height: 50rpx;
  93. color: #333;
  94. .item{
  95. flex: 1;
  96. display: flex;
  97. flex-direction: column;
  98. justify-content: center;
  99. align-items: center;
  100. .icon{
  101. width: 54rpx;
  102. height: 54rpx;
  103. .icon-image{
  104. width: 54rpx;
  105. height: 54rpx;
  106. }
  107. }
  108. .title{
  109. overflow: hidden;
  110. // white-space: nowrap;
  111. // text-overflow: ellipsis;
  112. // -o-text-overflow: ellipsis;
  113. font-size: 23rpx;
  114. }
  115. }
  116. }
  117. .active .title{
  118. background: $uni-linear-gradient-color; /*设置渐变的方向从左到右 颜色从ff0000到ffff00*/
  119. -webkit-background-clip: text;/*将设置的背景颜色限制在文字中*/
  120. -webkit-text-fill-color: transparent;/*给文字设置成透明*/
  121. }
  122. </style>