猫妈狗爸伴宠师小程序前端代码
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.

108 lines
2.9 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <view class="bind-user">
  3. <view class="bind-user-header">
  4. <view class="flex mb28">
  5. <up-image width="120rpx" height="120rpx" src="https://cdn.uviewui.com/uview/album/1.jpg"
  6. shape="circle"></up-image>
  7. <view class="header-name">
  8. <view class="font32 mb20" :style="{color:'#000',fontSize:'32rpx'}">猫小姐</view>
  9. <view class="flex-rowl">
  10. <view class="label1 mr20">
  11. 初级合伙人
  12. </view>
  13. <view class="size-22" style="color: #B97132;">
  14. 已加入合伙人:130
  15. </view>
  16. </view>
  17. <!-- <view class="flex font24">
  18. <view>当前分成比例
  19. <text>25%</text>
  20. </view>
  21. <view>晋级后分成比例
  22. <text>30%</text>
  23. </view>
  24. </view> -->
  25. </view>
  26. </view>
  27. </view>
  28. <view class="bind-main">
  29. <myData v-show="showFlag === 'data'"></myData>
  30. <levelInfo v-show="showFlag === 'level'"></levelInfo>
  31. </view>
  32. <view class="bind-user-foot flex-around">
  33. <view class="tab-bar flex-colc" @click="tabBarClick('data')">
  34. <up-image width="46rpx" height="46rpx" :src="tabBarList[dataNum]"></up-image>
  35. <view class="size-24 color-999" :class="{ activeColor:dataNum === 1 }">我的数据</view>
  36. </view>
  37. <view class="tab-bar flex-colc" @click="tabBarClick('level')">
  38. <up-image width="46rpx" height="46rpx" :src="tabBarList[levelNum]"></up-image>
  39. <view :class="['size-24', 'color-999', { activeColor:levelNum === 3 }]">等级信息</view>
  40. </view>
  41. </view>
  42. <!-- <view class="bind-main">
  43. <up-swiper
  44. :list="list3"
  45. previousMargin="30"
  46. nextMargin="30"
  47. circular
  48. :autoplay="false"
  49. radius="10"
  50. bgColor="#FFBF60"
  51. height="300rpx"
  52. ></up-swiper>
  53. </view> -->
  54. </view>
  55. </template>
  56. <script setup>
  57. import myData from './commponents/myData.vue'
  58. import levelInfo from './commponents/levelInfo.vue'
  59. import {
  60. reactive,
  61. ref
  62. } from "vue";
  63. const tabBarList = reactive([
  64. '/static/images/levelTabBar/data.png',
  65. '/static/images/levelTabBar/data_.png',
  66. '/static/images/levelTabBar/level.png',
  67. '/static/images/levelTabBar/level_.png',
  68. ])
  69. const dataNum = ref(1)
  70. const levelNum = ref(2)
  71. const showFlag = ref('data')
  72. // const list3 = reactive([
  73. // 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
  74. // 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
  75. // 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
  76. // ]);
  77. // const code = ref('asdasaadsdsa')
  78. // const url = ref('https://uview-plus.jiangruyi.com/components/button.html')
  79. const tabBarClick = (flag) => {
  80. showFlag.value = flag
  81. switch (flag) {
  82. case 'data':
  83. dataNum.value = 1
  84. levelNum.value = 2
  85. break;
  86. case 'level':
  87. dataNum.value = 0
  88. levelNum.value = 3
  89. break;
  90. default:
  91. break;
  92. }
  93. }
  94. </script>
  95. <style scoped lang="scss">
  96. @import "index";
  97. </style>