index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <view class="content">
  3. <!-- 头部 -->
  4. <view class="head">
  5. <!-- 用户头像 -->
  6. <image :src="avatar" class="user" @click="userTo()">
  7. <text class="name">{{$store.state.user.name}}</text>
  8. </view>
  9. <!-- 司机报单 -->
  10. <view class="driverEntry" @click="driverClass('BD')">
  11. <!-- 图标 -->
  12. <span class="icon iconfont">&#xe509;</span>
  13. <view class="message">
  14. <text class="main">司机报单</text>
  15. <!-- <text class="assist">司机报单</text> -->
  16. </view>
  17. </view>
  18. <!-- 费用报销 -->
  19. <view class="driverEntry" @click="driverClass('BX')">
  20. <!-- 图标 -->
  21. <span class="icon iconfont">&#xe640;</span>
  22. <view class="message">
  23. <text class="main">费用报销</text>
  24. <!-- <text class="assist">费用报销</text> -->
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. }
  34. },
  35. computed: {
  36. avatar() {
  37. return this.$store.state.user.avatar
  38. }
  39. },
  40. onLoad() {},
  41. onReachBottom() {},
  42. methods: {
  43. driverClass(type) {
  44. //跳转列表
  45. uni.navigateTo({
  46. url: '/pages/listview?type=' + type
  47. });
  48. }
  49. },
  50. }
  51. </script>
  52. <style lang="scss">
  53. @import url("/font/iconfont.css");
  54. .content {
  55. // background-color: #f6f6f6;
  56. // 头部
  57. .head {
  58. width: 100%;
  59. height: 360rpx;
  60. background-color: #3c9cff;
  61. position: relative;
  62. // 用户头像
  63. .user {
  64. width: 200rpx;
  65. height: 200rpx;
  66. border-radius: 100rpx;
  67. position: absolute;
  68. top: 40rpx;
  69. left: calc(50% - 100rpx);
  70. border-radius: 200rpx;
  71. }
  72. // 用户名字
  73. .name {
  74. color: #fff;
  75. font-size: 40rpx;
  76. position: absolute;
  77. bottom: 40rpx;
  78. left: 50%;
  79. transform: translateX(-50%);
  80. border-radius: 200rpx;
  81. }
  82. }
  83. // 司机报单
  84. .driverEntry {
  85. width: 90%;
  86. height: 300rpx;
  87. border-radius: 20rpx;
  88. margin: 30rpx auto 0 auto;
  89. // margin-top: 30rpx;
  90. position: relative;
  91. background-color: #fff;
  92. border: 4rpx solid #e6e6e6;
  93. .icon {
  94. position: absolute;
  95. top: 50%;
  96. transform: translateY(-50%);
  97. left: 60rpx;
  98. color: #377bdc;
  99. font-size: 160rpx;
  100. }
  101. .message {
  102. width: 60%;
  103. height: 100%;
  104. position: absolute;
  105. right: 0;
  106. .main {
  107. position: absolute;
  108. font-size: 30rpx;
  109. font-weight: 600;
  110. color: #4d88de;
  111. top: 100rpx;
  112. }
  113. .assist {
  114. position: absolute;
  115. font-size: 30rpx;
  116. color: #a0a0a0;
  117. top: 160rpx;
  118. }
  119. }
  120. }
  121. }
  122. </style>