enterprise.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="column" style="height: 100%;position: relative;">
  3. <enterpriseimgs v-if="actindex==0"></enterpriseimgs>
  4. <newuser v-else></newuser>
  5. <view class="tabbar align-center">
  6. <view v-for="(item, index) in tabbarList" :key="index" @click="switchTabs(item)" class="tablist">
  7. <view class="column align-center justify-center" >
  8. <image :src="actindex==index?item.selectedIconPath:item.iconPath" class="w48 h48"></image>
  9. <text class="fs24 base-textcol" :class="actindex==index?'actcolor':'morecolor'">{{item.Text}}</text>
  10. </view>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. import{getenterprise} from '@/api/courseManage.js'
  17. import enterpriseimgs from '@/components/enterpriseimg.vue'
  18. import newuser from '@/components/newuser.vue'
  19. export default {
  20. components: {
  21. enterpriseimgs,
  22. newuser
  23. },
  24. data() {
  25. return {
  26. statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
  27. enterpriseimg:'',
  28. actindex:0,
  29. tabbarList : [{
  30. iconPath: '/static/manageTabIcon/training.png',
  31. selectedIconPath: '/static/manageTabIcon/training_on.png',
  32. Text: '企业理念',
  33. val:0
  34. },
  35. {
  36. iconPath: '/static/manageTabIcon/manage.png',
  37. selectedIconPath: '/static/manageTabIcon/manage_on.png',
  38. Text: '我的',
  39. val:1
  40. },
  41. ]
  42. }
  43. },
  44. //发送给朋友
  45. onShareAppMessage(res) {
  46. return {
  47. title: this.$store.state.logoname,
  48. path: '/pages/enterprise/enterprise',
  49. imageUrl: this.$store.state.imgpath+'/app/image/logo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  50. }
  51. },
  52. //分享到朋友圈
  53. onShareTimeline(res) {
  54. return {
  55. title: this.$store.state.logoname,
  56. imageUrl: this.$store.state.imgpath+'/app/image/logo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  57. }
  58. },
  59. methods: {
  60. switchTabs(item) {
  61. this.actindex=item.val
  62. console.log(item)
  63. },
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .top-content {
  69. width: 100%;
  70. z-index: 10;
  71. position: fixed;
  72. top: 0;
  73. left: 0;
  74. background-color: #FFFFFF;
  75. .top-title {
  76. height: 88rpx;
  77. line-height: 88rpx;
  78. font-size: 42rpx;
  79. font-family: Source Han Sans CN;
  80. font-weight: bold;
  81. color: #222222;
  82. padding-left: 41rpx;
  83. background-color: #FFFFFF;
  84. }
  85. }
  86. .tabbar {
  87. display: flex;
  88. position: fixed;
  89. bottom: 0;
  90. left: 0;
  91. right: 0;
  92. background-color: #fff;
  93. z-index: 1000;
  94. height: 120rpx;
  95. padding-bottom: 20rpx;
  96. }
  97. .tablist {
  98. width: 50%;
  99. }
  100. .morecolor{
  101. color: #626468;
  102. }
  103. .actcolor {
  104. color: #1773ff;
  105. }
  106. </style>