userManagement.vue 2.9 KB

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