powerSetting.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view class="power-setting-main">
  3. <view class="flex-row power-setting-head">
  4. <img class="head-img" src="https://qiniu.bms16.com/FprjgdYTzB9LDkHZT1F-p_kQKNty" alt="">
  5. <view class="head-name">名字</view>
  6. <text class="head-email">1007929522@Mail.com</text>
  7. </view>
  8. <view class="setting-card" style="margin-bottom: 20rpx;">
  9. <view class="setting-card-name">权限设置</view>
  10. <view class="setting-card-list flex-row">
  11. <img src="https://qiniu.bms16.com/FgFEr3CUA43kd7yVCDcK4F7v9_zx" alt="">
  12. <view class="setting-list-text flex-row flex-between">
  13. <text>查看实时位置</text>
  14. <img class="setting-list-arrow" src="https://qiniu.bms16.com/FrA97op1dwM9XWH1ocqnF5FFlqoY" alt="">
  15. </view>
  16. </view>
  17. <view class="setting-card-list flex-row">
  18. <img src="https://qiniu.bms16.com/FmcZqGTnt64_v2xpgNbqS9Fa-fwy" alt="">
  19. <view class="setting-list-text flex-row flex-between">
  20. <text>使用换电</text>
  21. <img class="setting-list-arrow" src="https://qiniu.bms16.com/FuA5w59wrvsisg3bGhe3hQ2dR3Bk" alt="">
  22. </view>
  23. </view>
  24. </view>
  25. <view class="setting-card" style="margin-bottom: 32rpx;">
  26. <view class="setting-card-name">默认设置</view>
  27. <view class="setting-card-list flex-row">
  28. <img src="https://qiniu.bms16.com/FsUxQz3DwHIj_vt3fY25Twmjfpek" alt="">
  29. <view class="setting-list-text flex-row">远程开关锁</view>
  30. </view>
  31. <view class="setting-card-list flex-row">
  32. <img src="https://qiniu.bms16.com/FuCNZSqsoMxn2ha-njRW3zC2ORTz" alt="">
  33. <view class="setting-list-text flex-row">座桶锁</view>
  34. </view>
  35. <view class="setting-card-list flex-row">
  36. <img src="https://qiniu.bms16.com/Fs7i3i_LBM7Zpxyj7Ad7_Kc_8z-J" alt="">
  37. <view class="setting-list-text flex-row">感应解锁</view>
  38. </view>
  39. </view>
  40. <view v-if="!isSet" @tap="addUserBtn" class="check-btn add-btn">确认添加</view>
  41. <view v-else @tap="delUserBtn" class="check-btn del-btn">删除成员</view>
  42. </view>
  43. </template>
  44. <script>
  45. import common from '../../common/common.js';
  46. var config = require('../../common/config.js');
  47. export default {
  48. data() {
  49. return {
  50. isSet:false,
  51. userInfo:{}
  52. };
  53. }
  54. /**
  55. * 生命周期函数--监听页面加载
  56. */
  57. ,
  58. onLoad: function(options) {
  59. if('params' in options ){
  60. const info=JSON.parse(options.params)
  61. this.setData({
  62. isSet:true,
  63. userInfo:info
  64. })
  65. }
  66. },
  67. methods: {
  68. addUserBtn(){
  69. //获取本地存储的车牌号
  70. const me = this
  71. http.postApi(config.API_FLK_ADD_SHARE_USER, {}, (resp) => {
  72. if (resp.data.code === 200) {
  73. common.successToast('添加成功!')
  74. } else {
  75. common.simpleToast(resp.data.msg);
  76. }
  77. })
  78. },
  79. addUserBtn(){
  80. //获取本地存储的车牌号
  81. const me = this
  82. http.postApi(config.API_FLK_REMOVE_SHARE_USER, {}, (resp) => {
  83. if (resp.data.code === 200) {
  84. common.successToast('删除成功')
  85. } else {
  86. common.simpleToast(resp.data.msg);
  87. }
  88. })
  89. },
  90. }
  91. };
  92. </script>
  93. <style>
  94. @import './powerSetting.css';
  95. </style>