my.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <view class="page" :style="{height:height}">
  3. <view class="flex-row use">
  4. <view class="avatar" @click="goUserInfo">
  5. <image :src="userInfo.selfPhotoUrl || '/static/ud4.png'"></image>
  6. </view>
  7. <view class="flex-col justify-evenly useMsg">
  8. <view class="flex-row">
  9. <text class="name">{{userInfo.name}}</text>
  10. <view class="tag">{{userInfo.isManager === 1? '拓客经理':'拓客专员'}}</view>
  11. </view>
  12. <view>
  13. <text class="phone">电话:{{userInfo.phone}}</text>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="statistics flex-col">
  18. <view class="flex-row justify-around" v-if="userInfo.isManager == '1'">
  19. <view class="flex-row justify-center out ">
  20. <view class="flex-col statisticsItem " @click="navigateTo('/pages/specialistsList/specialistsList')">
  21. <view>
  22. <image src="/static/my/fuwuNmber.png" class="statisticsImg"></image>
  23. </view>
  24. <text class="statisticsKey">我的专员(人)</text>
  25. <text class="statisticsValue">300</text>
  26. </view>
  27. </view>
  28. <view class="flex-row justify-center out leftBorder">
  29. <view class="flex-col statisticsItem " @click="navigateTo('/pages/cooperation/cooperation')">
  30. <view>
  31. <image src="/static/my/hezuohuoban.png" class="statisticsImg"></image>
  32. </view>
  33. <text class="statisticsKey">合作伙伴(人)</text>
  34. <text class="statisticsValue">300</text>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="flex-row justify-around " v-else>
  39. <view class="flex-row justify-center out ">
  40. <view class="flex-col statisticsItem " @click="navigateTo('/pages/directPromotionList/directPromotionList')">
  41. <view>
  42. <image src="/static/my/fuwuTimeLong.png" class="statisticsImg"></image>
  43. </view>
  44. <text class="statisticsKey">我的直推(人)</text>
  45. <text class="statisticsValue">300</text>
  46. </view>
  47. </view>
  48. <view class="flex-row justify-center out leftBorder">
  49. <view class="flex-col statisticsItem " @click="navigateTo('/pages/earningsList/earningsList')">
  50. <view>
  51. <image src="/static/my/benyuerenwu.png" class="statisticsImg"></image>
  52. </view>
  53. <text class="statisticsKey">推广收益(人)</text>
  54. <text class="statisticsValue">300</text>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. <view class="flex-col justify-start list">
  60. <uni-list :border="false">
  61. <uni-list-item v-if="userInfo.isManager == 1" :clickable="true" title="我的分组" to="/pages/myGroup/myGroup" showArrow thumb="/static/my/fenzu.png" thumb-size="sm" rightText=""/>
  62. </uni-list>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. export default {
  68. data() {
  69. return {
  70. staticsData:{},
  71. userInfo:{},
  72. height:''
  73. }
  74. },
  75. onLoad() {
  76. let sysInfo = uni.getSystemInfoSync()
  77. this.height = sysInfo.windowHeight + 'px'
  78. },
  79. onShow(){
  80. this.userInfo = uni.getStorageSync('spreadUserInfo')
  81. this.getImgUrlByOssId(this.userInfo.img)
  82. },
  83. methods: {
  84. navigateTo(url){
  85. uni.navigateTo({
  86. url:url
  87. })
  88. },
  89. getImgUrlByOssId(Id) {
  90. if (Id) {
  91. this.$api.service.getImage(Id).then(res => {
  92. this.userInfo.selfPhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
  93. this.$set(this.userInfo)
  94. });
  95. }
  96. },
  97. navigateTo(url){
  98. uni.navigateTo({
  99. url: url
  100. })
  101. },
  102. goUserInfo(){
  103. uni.navigateTo({
  104. url: '/pages/userInfo/userInfo'
  105. })
  106. },
  107. }
  108. }
  109. </script>
  110. <style lang="scss" scoped>
  111. @import './index.rpx.css';
  112. </style>