my.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <view class="page" :style="{'height':sysHeight}">
  3. <view class="useInfo flex-row">
  4. <view class="profileView">
  5. <image class="profile" :src="userInfo.avatar"></image>
  6. </view>
  7. <view class="usermsg flex-col">
  8. <view class="name">
  9. <text>{{userInfo.nickName}}</text>
  10. </view>
  11. <view class="other flex-row">
  12. <text>脱离老师脱离老师脱离老师脱离</text>
  13. <u-icon name="arrow-right" color="#333333" size="18"></u-icon>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="statistics flex-col">
  18. <view class="statisticsTitle">
  19. <text >今日业绩统计</text>
  20. </view>
  21. <view class="flex-row justify-center ">
  22. <view class="statisticsItem flex-col ">
  23. <view class="flex-row justify-center">
  24. <u-icon name="/static/my/fuwuNmber.png" size="28"></u-icon>
  25. </view>
  26. <view class="flex-row justify-center statisticsKey">
  27. <text>服务次数(次)</text>
  28. </view>
  29. <view class="flex-row justify-center statisticsValue">
  30. <text>{{staticsData.serviceTotal}}</text>
  31. </view>
  32. </view>
  33. <view class="statisticsItem flex-col ">
  34. <view class="flex-row justify-center">
  35. <u-icon name="/static/my/fuwuTimeLong.png" size="28"></u-icon>
  36. </view>
  37. <view class="flex-row justify-center statisticsKey">
  38. <text>服务时长(分)</text>
  39. </view>
  40. <view class="flex-row justify-center statisticsValue">
  41. <text>{{staticsData.avgServiceTime}}</text>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="list">
  47. <uni-list>
  48. <uni-list-item :to="item.to" :title="item.title" showArrow :thumb="item.thumb" thumb-size="medium" :rightText="item.rightText" v-for="(item,index) in group1" :key="index"/>
  49. </uni-list>
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. export default {
  55. data() {
  56. return {
  57. userInfo:'',
  58. staticsData:'',
  59. sysHeight:'',
  60. group1: [
  61. {thumb: '/static/my/idcard.png', title: '个人信息', rightText: '', to: '/myPages/aboutOur/index'}
  62. ],
  63. }
  64. },
  65. onLoad(){
  66. let sysInfo = uni.getSystemInfoSync()
  67. this.sysHeight = sysInfo.windowHeight + 'px'
  68. console.log(this.sysHeight)
  69. },
  70. show(){
  71. this.getUserInfo()
  72. this.statics()
  73. },
  74. methods: {
  75. getUserInfo(){
  76. this.$api.user.getUserInfo().then(res=>{
  77. this.userInfo = res.data.data.user
  78. })
  79. },
  80. statics(){
  81. this.$api.service.statics({
  82. storeId:this.storeId
  83. }).then(res=>{
  84. this.staticsData = res.data.data
  85. })
  86. },
  87. }
  88. }
  89. </script>
  90. <style lang="scss" scoped>
  91. @import './index.rpx.css';
  92. </style>