my.vue 4.3 KB

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