index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <view>
  3. <u-navbar title="首页" :autoBack="true" :placeholder="true" v-hideNav></u-navbar>
  4. <u-sticky class="sticky_wrap" :customNavHeight="isWeixin ? 0 : undefined" bgColor="#fff">
  5. <view class="header_wrap">
  6. <view class="header_top_wrap" @click="toPerson">
  7. <view class="header_info_left">
  8. <u-avatar :src="$avatar(userInfo.avatar)" size="60rpx"></u-avatar>
  9. <view class="info_wrap">
  10. <text class="follow_name">{{userInfo.userName ? userInfo.userName : "-"}}</text>
  11. <text class="deptName">{{userInfo.dept ? userInfo.dept.deptName : "-"}}</text>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <u-tabs class="uTabsWrap" :list="list" :activeStyle="{
  17. color: '#303133',
  18. fontWeight: 'bold',
  19. fontSize : '36rpx'
  20. }" :inactiveStyle="{
  21. color: '#606266',
  22. fontWeight: 'bold',
  23. fontSize : '32rpx'}" @change="handleTabChange">
  24. </u-tabs>
  25. <!-- <view class="dayNum_wrap" @click="handleClickDayNum">
  26. <view class="text">{{dayName}}</view>
  27. <u-icon name="arrow-down-fill" color="#aaa" size="10"></u-icon>
  28. </view> -->
  29. </u-sticky>
  30. <view class="main_warp" id="main_warp">
  31. <team :class="[activeTab !== 'team' ? 'hidden' : '' ]" ref="team"></team>
  32. <personage :class="[activeTab !== 'personage' ? 'hidden' : '' ]" ref="personage"></personage>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. import dayjs from "dayjs";
  38. import personage from "./personage/index.vue";
  39. import team from "./team/index.vue";
  40. import { is_weixin } from "../../utils/util";
  41. export default {
  42. components : { personage , team },
  43. data() {
  44. return {
  45. list: [{
  46. name: '团队管理',
  47. value: "team"
  48. }, {
  49. name: '个人跟进',
  50. value: "personage"
  51. }],
  52. activeTab: "team",
  53. isWeixin : is_weixin(),
  54. userInfo: this.$store.state.user.userInfo,
  55. };
  56. },
  57. methods: {
  58. toPerson() {
  59. uni.switchTab({
  60. url: `/pages/person/index`
  61. })
  62. },
  63. handleTabChange({
  64. value
  65. }) {
  66. this.activeTab = value;
  67. }
  68. },
  69. }
  70. </script>
  71. <style lang="scss" scoped>
  72. .uTabsWrap{
  73. background-color: #fff;
  74. }
  75. .header_wrap {
  76. box-sizing: border-box;
  77. padding: 10rpx;
  78. background: #fff;
  79. .header_top_wrap {
  80. display: flex;
  81. justify-content: space-between;
  82. align-items: center;
  83. .header_info_left {
  84. display: flex;
  85. align-items: center;
  86. // image {
  87. // width: 100rpx;
  88. // height: 100rpx;
  89. // margin-right: 30rpx;
  90. // border-radius: 50%;
  91. // }
  92. .info_wrap {
  93. margin-left: 20rpx;
  94. .follow_name {
  95. font-size: 32rpx;
  96. color: #202020;
  97. font-weight: bold;
  98. margin-right: 20rpx;
  99. }
  100. .deptName{
  101. font-size: 28rpx;
  102. color: #666666;
  103. }
  104. }
  105. }
  106. .header_info_right {
  107. ::v-deep .u-icon__icon {
  108. font-size: 30rpx !important;
  109. }
  110. }
  111. }
  112. .parson_menu_wrap {
  113. background: #ffffff;
  114. border-radius: 20px;
  115. box-shadow: 0px 4px 20px 0px rgba(16, 140, 255, 0.10);
  116. margin-top: 58rpx;
  117. .parson_menu_list {
  118. display: flex;
  119. padding: 40rpx 0;
  120. .menu_item {
  121. width: 33%;
  122. display: flex;
  123. flex-direction: column;
  124. align-items: center;
  125. image {
  126. width: 48rpx;
  127. height: 48rpx;
  128. margin-bottom: 24rpx;
  129. }
  130. text {
  131. font-size: 28rpx;
  132. color: #202020;
  133. }
  134. }
  135. }
  136. }
  137. }
  138. .sticky_wrap {
  139. position: relative;
  140. }
  141. .hidden {
  142. padding: 0;
  143. height: 0;
  144. overflow: hidden;
  145. }
  146. .personClue {
  147. background-color: #fff;
  148. display: flex;
  149. justify-content: flex-start;
  150. }
  151. .main_warp {
  152. padding-top: 20rpx;
  153. padding-bottom: 100rpx;
  154. }
  155. </style>