userManagement.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view class="">
  3. <navBar :name="$t('用车人管理')" />
  4. <view class="user-card">
  5. <view class="flex-row align-center user-card-heard">
  6. <img style="width: 48rpx;height: 48rpx;" src="https://qiniu.bms16.com/FieeNq75ybyjIzQO6fmNcdTlRsp5" alt="">
  7. <text style="margin-left: 16rpx;">{{ $t('共享用户') }}</text>
  8. </view>
  9. <view class="user-card-text">{{ $t('家人、朋友长期共用车辆,授权账户可以使用感应解锁,寻车定位,查看设置等功能;') }}</view>
  10. <!-- <view v-for="(item,index) in userList" :key="index"> -->
  11. <view @click="srcFn(`/pages/powerSetting/powerSetting?id=${item.target_user_id}`)" v-for="(item,index) of list" :key="index" class="user-list flex-row align-center">
  12. <image class="user-heard-img" :src="item.headimg" mode="aspectFill"></image>
  13. <view class="user-name-view">
  14. <view class="user-name">{{item.nickname}}</view>
  15. <view class="user-email">{{item.email}}</view>
  16. </view>
  17. <img class="user-nav-img" src="https://qiniu.bms16.com/FqnbZ2iKHmzCGJA8XD30sf5g_CAm" alt="">
  18. </view>
  19. <view @click="addUser" class="flex-row user-card-btn align-center">
  20. <img style="width: 20rpx;height: 20rpx;" src="https://qiniu.bms16.com/FvP_5VTgawzExIHW3kJahXAvE04z" alt="">
  21. <text style="margin-left: 6rpx;">{{ $t('添加成员') }}</text>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. var config = require('../../common/config_gyq.js');
  28. var http = require('../../common/request.js');
  29. export default {
  30. data() {
  31. return {
  32. list:[],
  33. car_info:{}
  34. };
  35. }
  36. /**
  37. * 生命周期函数--监听页面加载
  38. */
  39. ,
  40. onLoad: function(options) {
  41. // this.listFn()
  42. this.car_info = uni.getStorageSync('car_info') || {};
  43. },
  44. onShow() {
  45. this.listFn()
  46. },
  47. methods: {
  48. srcFn(url){
  49. uni.navigateTo({
  50. url
  51. })
  52. },
  53. addUser(){
  54. if(this.car_info.car_sn){
  55. uni.navigateTo({
  56. url:`/pages/addUser/addUser`
  57. })
  58. return
  59. }
  60. this.$msg('您还未绑定车辆!')
  61. },
  62. async listFn(){
  63. let {data} = await http.postApi(config.API_FLK_CAR_SHARE_LIST,{
  64. car_sn:this.car_info.car_sn
  65. })
  66. if(data.code == 200){
  67. this.list = data.data.list || []
  68. }
  69. }
  70. }
  71. };
  72. </script>
  73. <style>
  74. .user-card{
  75. background: #FFFFFF;
  76. border-radius: 40rpx;
  77. border: 4rpx solid #FFFFFF;
  78. margin: 24rpx;
  79. padding: 32rpx 32rpx 48rpx ;
  80. }
  81. .align-center{
  82. align-items: center;
  83. }
  84. .user-card-heard{
  85. font-weight: 600;
  86. font-size: 40rpx;
  87. color: #060809;
  88. margin-bottom: 16rpx;
  89. }
  90. .user-card-text{
  91. font-weight: 400;
  92. font-size: 28rpx;
  93. color: #060809;
  94. margin-bottom: 40rpx;
  95. opacity: 0.4;
  96. }
  97. .user-card-btn{
  98. justify-content: center;
  99. font-weight: 600;
  100. font-size: 32rpx;
  101. color: #060809;
  102. }
  103. .user-heard-img{
  104. width: 112rpx;
  105. height: 112rpx;
  106. border-radius: 50%;
  107. }
  108. .user-name-view{
  109. margin-bottom: 48rpx;
  110. display: flex;
  111. flex-direction: column;
  112. flex-grow: 1;
  113. margin-left: 24rpx;
  114. padding: 0 18rpx;
  115. }
  116. .user-name{
  117. font-weight: 600;
  118. font-size: 32rpx;
  119. color: #060809;
  120. padding-bottom:20rpx ;
  121. }
  122. .user-email{
  123. font-weight: 500;
  124. font-size: 24rpx;
  125. color: #060809;
  126. opacity: 0.6;
  127. }
  128. .user-nav-img{
  129. width: 28rpx;
  130. height: 28rpx;
  131. }
  132. </style>