deviceInfo.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <view class="device-info-main">
  3. <view class="device-name">{{list.car_name}}</view>
  4. <view class="block-card">
  5. <view class="info-view">
  6. <view class="info-title">车架号</view>
  7. <view class="info-value">{{list.frame_no}}</view>
  8. </view>
  9. <view class="info-view">
  10. <view class="info-title">设备编号</view>
  11. <view class="info-value">{{car_sn}}</view>
  12. </view>
  13. <view class="info-view">
  14. <view class="info-title">车辆总里程</view>
  15. <view class="info-value">{{(list.total_mil / 1000).toFixed(0)}}km</view>
  16. </view>
  17. </view>
  18. <view class="flex-row">
  19. <view class="block-card-1" style="margin-right: 18rpx;">
  20. <img class="info-icon" src="https://qiniu.bms16.com/FoyFReERWQ5jmqQIk0Aj9V7SWGR2" alt="">
  21. <view class="info-text">中控硬件</view>
  22. <view class="info-vosion">{{list.control_hardware}}</view>
  23. </view>
  24. <view class="block-card-1">
  25. <img class="info-icon" src="https://qiniu.bms16.com/Fvf3btY0699U2P65cRxYGDBADNHr" alt="">
  26. <view class="info-text">中控软件</view>
  27. <view class="info-vosion">{{list.control_software}}</view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. var config = require('../../common/config.js');
  34. var common = require('../../common/common.js');
  35. var request = require('../../common/request');
  36. export default {
  37. data() {
  38. return {
  39. car_sn:"",
  40. list:{}
  41. };
  42. }
  43. /**
  44. * 生命周期函数--监听页面加载
  45. */
  46. ,
  47. onLoad: function(options) {
  48. this.car_sn = uni.getStorageSync('car_info').car_sn || ''
  49. this.loadCarDetailFn()
  50. },
  51. methods: {
  52. async loadCarDetailFn() {
  53. let {
  54. data
  55. } = await request.postApi(config.API_FLK_CAR_DETAIL, {
  56. car_sn:this.car_sn
  57. })
  58. if(data.code == 200){
  59. this.list = data.data
  60. }
  61. }
  62. }
  63. };
  64. </script>
  65. <style>
  66. @import './deviceInfo.css';
  67. </style>