admin.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <template>
  2. <view class="body">
  3. <view class="background"></view>
  4. <view class="content">
  5. <view class="userInfo">
  6. <view class="userInfo-box">
  7. <view class="userInfo-img">
  8. <image class="portrait" :src="userInfo.avatar || '../../static/error/missing-face.png'"></image>
  9. </view>
  10. <view class="userInfo-xinxi">
  11. <view class="title clamp">
  12. {{userInfo.nickname}}
  13. </view>
  14. <!-- <view class="phone">
  15. 好评总数:10251
  16. </view> -->
  17. </view>
  18. <view class="balance" @click="navTo('/pages/user/award')">当前佣金:{{userInfo.brokerage_price}}</view>
  19. </view>
  20. <view class="user-money flex" v-if="userInfo && agent && agent.count">
  21. <view class="user-money-item" >
  22. <view class="user-money-num">{{ agent.count.cashback_sum*1 || 0 }}</view>
  23. <view class="user-money-font"> 累计金额</view>
  24. </view>
  25. <view class="user-xian"></view>
  26. <view class="user-money-item" >
  27. <view class="user-money-num">{{ agent.count.status_count_0*1 || 0 }}</view>
  28. <view class="user-money-font">待处理单数</view>
  29. </view>
  30. <view class="user-xian"></view>
  31. <view class="user-money-item" >
  32. <view class="user-money-num">{{ agent.count.status_count_2*1 || 0 }}</view>
  33. <view class="user-money-font">完成单数</view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="userInfoList">
  38. <view class="userInfoList-bottom" @click="navTo('/pages/order/orderAdmin')">
  39. <image src="../../static/icon/admin3.png" mode="" class="bottom">
  40. 家政维修
  41. </view>
  42. <view class="userInfoList-bottom" @click="navTo('/pages/order/wuyouAdmin')">
  43. <image src="../../static/icon/admin4.png" mode="" class="bottom">
  44. 洗衣订单
  45. </view>
  46. <view class="userInfoList-bottom" @click="navTo('/pages/user/award')">
  47. <image src="../../static/icon/admin1.png" mode="" class="bottom">
  48. 佣金管理
  49. </view>
  50. <view class="userInfoList-bottom" @click="navTo('/pages/user/spread')">
  51. <image src="../../static/icon/admin2.png" mode="" class="bottom">
  52. 我的推广
  53. </view>
  54. <view class="userInfoList-bottom" @click="navTo('/pages/user/team')">
  55. <image src="../../static/icon/admin5.png" mode="" class="bottom">
  56. 我的团队
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. import {
  64. mapState,
  65. mapMutations
  66. } from 'vuex';
  67. import {agentInfo} from '@/api/user.js'
  68. export default {
  69. data() {
  70. return {
  71. type: '',
  72. image: '',
  73. name: '',
  74. phone: '',
  75. address: '',
  76. code: '',
  77. agent:{}
  78. };
  79. },
  80. onLoad() {
  81. this.agentInfo()
  82. },
  83. computed: {
  84. ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
  85. },
  86. methods: {
  87. //跳转
  88. navTo(url) {
  89. uni.navigateTo({
  90. url
  91. });
  92. },
  93. agentInfo() {
  94. agentInfo().then(res=> {
  95. console.log(res);
  96. this.agent = res.data
  97. })
  98. }
  99. }
  100. };
  101. </script>
  102. <style lang="scss">
  103. page {
  104. height: 100%;
  105. background-color: #eeeded;
  106. padding: 0;
  107. margin: 0;
  108. }
  109. .content {
  110. background-color: #eeeded;
  111. margin: 0 30rpx;
  112. display: flex;
  113. flex-direction: column;
  114. }
  115. .background {
  116. width: 100%;
  117. height: 220rpx;
  118. background-color: $base-color;
  119. }
  120. .userInfo {
  121. margin-top: -110rpx;
  122. display: flex;
  123. flex-direction: column;
  124. align-items: center;
  125. background-color: #f9f9f9;
  126. border-radius: 19rpx;
  127. width: 100%;
  128. margin-bottom: 20rpx;
  129. padding-bottom: 30rpx;
  130. .userInfo-box {
  131. display: flex;
  132. flex-direction: column;
  133. align-items: center;
  134. .userInfo-img {
  135. margin: -65rpx 0 0 0;
  136. width: 130rpx;
  137. height: 130rpx;
  138. border: 5rpx solid #fff;
  139. border-radius: 50%;
  140. image {
  141. border-radius: 50%;
  142. width: 100%;
  143. height: 100%;
  144. background: #fff;
  145. }
  146. }
  147. .userInfo-xinxi {
  148. .title {
  149. margin: 20rpx 0;
  150. font-size: 32rpx;
  151. font-weight: bold;
  152. color: #333333;
  153. text-align: center;
  154. }
  155. .phone {
  156. font-size: 28rpx;
  157. font-weight: 500;
  158. color: #666666;
  159. }
  160. }
  161. .balance {
  162. margin-top: 10rpx;
  163. text-align: center;
  164. width: 500rpx;
  165. background: $base-color;
  166. border-radius: 30rpx;
  167. font-size: 28rpx;
  168. font-weight: 500;
  169. color: #ffffff;
  170. line-height: 60rpx;
  171. }
  172. }
  173. }
  174. .userInfoList {
  175. display: flex;
  176. flex-wrap: wrap;
  177. justify-content: space-between;
  178. .userInfoList-bottom {
  179. margin-bottom: 15rpx;
  180. width: 340rpx;
  181. height: 250rpx;
  182. background: #f9f9f9;
  183. border-radius: 20rpx;
  184. display: flex;
  185. flex-direction: column;
  186. justify-content: center;
  187. align-items: center;
  188. .bottom {
  189. margin-bottom: 20rpx;
  190. width: 68rpx;
  191. height: 68rpx;
  192. }
  193. }
  194. }
  195. .user-money {
  196. width: 100%;
  197. margin-top: 50rpx;
  198. justify-content: center;
  199. .user-money-item {
  200. width: 50%;
  201. display: flex;
  202. flex-direction: column;
  203. justify-content: center;
  204. align-items: center;
  205. .user-money-num {
  206. font-size: 36rpx;
  207. font-weight: bold;
  208. }
  209. .user-money-font {
  210. margin-top: 20rpx;
  211. font-size: 24rpx;
  212. font-weight: 500;
  213. }
  214. }
  215. .user-xian {
  216. width: 1px;
  217. height: 77rpx;
  218. background: #eeeeee;
  219. }
  220. }
  221. </style>