openDoorList.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <!-- 解锁记录 -->
  2. <!-- 一键开门 -->
  3. <template>
  4. <view class="">
  5. <image src="../../static/history_top_bgimage@2x.png" style="width: 100%;height: 278rpx;"></image>
  6. <view class="main">
  7. <!-- <view class="infoBox" style="margin-top: 40rpx;"> -->
  8. <!-- <view class="title">
  9. 番茄小区
  10. </view> -->
  11. <view class="item" v-for="(item,index) in data" :key="index">
  12. <view class="leftIcon">
  13. <image src="../../static/open_icon@2x.png" style="width: 100%;height: 100%;"></image>
  14. </view>
  15. <view class="" style="position: absolute;left: 100rpx;">
  16. <view class="name">{{item.deviceName}}</view>
  17. <view class="dec">
  18. 解锁时间:{{item.createTime}}
  19. </view>
  20. </view>
  21. </view>
  22. <!-- </view> -->
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. data() {
  29. return {
  30. data:[]
  31. }
  32. },
  33. mounted() {
  34. this.getList()
  35. },
  36. methods: {
  37. // 获取列表数据
  38. getList() {
  39. uni.showLoading({
  40. mask:true,
  41. title:'加载中'
  42. })
  43. this.http.httpRequest('/wxapplet/owner/openDoor/list', 'get', {
  44. phoneNum:uni.getStorageSync('phoneNumber')
  45. }, true).then((res) => {
  46. console.log(res)
  47. if (res.code == 0) {
  48. uni.hideLoading()
  49. this.data=res.data.rows
  50. } else {
  51. uni.hideLoading()
  52. uni.showToast({
  53. title: res.msg,
  54. 'icon': 'none'
  55. })
  56. }
  57. }).catch(()=>{
  58. uni.hideLoading()
  59. })
  60. },
  61. // 查看解锁记录
  62. seeList() {
  63. uni.navigateTo({
  64. url: ""
  65. })
  66. }
  67. }
  68. }
  69. </script>
  70. <style scoped>
  71. .title {
  72. width: 100%;
  73. height: 44rpx;
  74. font-size: 32rpx;
  75. font-family: PingFang SC;
  76. font-weight: bold;
  77. color: rgba(41, 138, 253, 1);
  78. }
  79. .btn {
  80. width: 702rpx;
  81. height: 90rpx;
  82. background: rgba(41, 138, 253, 1);
  83. opacity: 1;
  84. border-radius: 18rpx;
  85. position: fixed;
  86. bottom: 56rpx;
  87. left: 24rpx;
  88. font-size: 32rpx;
  89. font-family: PingFang SC;
  90. font-weight: bold;
  91. color: rgba(255, 255, 255, 1);
  92. }
  93. .dec {
  94. width: 356rpx;
  95. height: 40rpx;
  96. font-size: 24rpx;
  97. font-family: PingFang SC;
  98. font-weight: 400;
  99. color: rgba(153, 153, 153, 1);
  100. margin-top: 12rpx;
  101. }
  102. .name {
  103. width: 262rpx;
  104. height: 44rpx;
  105. font-size: 30rpx;
  106. font-family: PingFang SC;
  107. font-weight: 400;
  108. color: rgba(51, 51, 51, 1);
  109. margin-top: 38rpx;
  110. }
  111. .item {
  112. width: 702rpx;
  113. height: 170rpx;
  114. border-bottom: 2px solid rgba(247, 247, 247, 1);
  115. ;
  116. display: flex;
  117. position: relative;
  118. }
  119. .infoBox {
  120. width: 702rpx;
  121. margin: 0 auto;
  122. }
  123. .leftIcon {
  124. width: 60rpx;
  125. height: 60rpx;
  126. position: absolute;
  127. left: 24rpx;
  128. bottom: 60rpx;
  129. }
  130. .rightIcon {
  131. width: 80rpx;
  132. height: 80rpx;
  133. position: absolute;
  134. right: 24rpx;
  135. bottom: 44rpx;
  136. }
  137. .main {
  138. width: 100%;
  139. position: absolute;
  140. top: 0rpx;
  141. }
  142. </style>