machine.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view>
  3. <view class="top-box">
  4. <view class="top-title">
  5. <view class="ddflex" :style="'height: '+ systems.navigationHeight + 'rpx;padding-top:' + systems.ktxStatusHeight + 'rpx;'+'line-height: '+ systems.navigationHeight + 'rpx;'">
  6. <view>白云科技门店</view>
  7. <image class="dow-ssicon" src="../../static/pages/images/dow-ssicon.png"></image>
  8. </view>
  9. </view>
  10. <view class="search-box ddflex">
  11. <image class="search-saoma" src="../../static/pages/images/saoma.png"></image>
  12. <view class="search-input ddflex fflex">
  13. <image class="search-input-icon" src="../../static/pages/images/search.png"></image>
  14. <input class="fflex" placeholder="请输入编号查询"/>
  15. <view class="search-btn">搜索</view>
  16. </view>
  17. </view>
  18. </view>
  19. <view :style="'height: '+ (systems.navigationHeight+systems.ktxStatusHeight+134) + 'rpx;'"></view>
  20. <!-- 机柜 -->
  21. <view class="machine-item" v-for="item in 10" @click="jumpUrl('/machineAndCell/machineInfo/machineInfo')">
  22. <view class="ddflex" style="justify-content: space-between;">
  23. <view class="machine-title fflex tover">创业2街站</view>
  24. <view class="state">在线</view>
  25. </view>
  26. <view class="machine-number">机柜编号:CHZD04TTCC200329109</view>
  27. <view class="machine-info ddflex">
  28. <view class="ddflex">
  29. <view class="margin-r40">温度:29℃</view>
  30. <view class="margin-r40">仓门数:6</view>
  31. <view class="margin-r40">电池数:4</view>
  32. </view>
  33. <view class="fflex tover" style="color: #2A82E4;text-align: right;">
  34. 白云科技
  35. </view>
  36. </view>
  37. <view class="address-box ddflex">
  38. <image class="address-icon" src="../../static/pages/images/address-icon.png"></image>
  39. <view class="fflex tover">朝阳区金台路道家园1号</view>
  40. <image class="daohang" src="../../static/pages/images/daohang.png"></image>
  41. </view>
  42. </view>
  43. <foot channel="machine" :isUpdate="isUpdate"></foot>
  44. </view>
  45. </template>
  46. <script>
  47. const app = getApp();
  48. const req = require("../../utils/request.js");
  49. import foot from "../../components/nav-bar/index";
  50. export default {
  51. components: {
  52. foot
  53. },
  54. props: {},
  55. data() {
  56. return {
  57. systems: {},
  58. isTop:0,
  59. isUpdate: false,
  60. }
  61. },
  62. onLoad(options) {
  63. },
  64. onShow() {
  65. this.setData({
  66. isUpdate: !this.isUpdate
  67. });
  68. },
  69. methods: {
  70. jumpUrl(url){
  71. if(req.isLogins(true)){
  72. uni.navigateTo({
  73. url:url
  74. })
  75. }
  76. },
  77. },
  78. mounted() {
  79. const systemInfo = uni.getSystemInfoSync();
  80. // px转换到rpx的比例
  81. let pxToRpxScale = 750 / systemInfo.windowWidth;
  82. let systems = {
  83. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  84. navigationHeight: 44 * pxToRpxScale // 导航栏的高度
  85. };
  86. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  87. this.systems = systems;
  88. },
  89. onPageScroll: function(e) {
  90. if (e.scrollTop > this.systems.barHeight) {
  91. this.isTop = 1;
  92. } else {
  93. this.isTop = 0;
  94. }
  95. }
  96. }
  97. </script>
  98. <style>
  99. @import "./machine.css";
  100. </style>