machine.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <view>
  3. <view class="top-box">
  4. <view class="top-title">
  5. <view @click="showPop=true" 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. <left-pop v-if="showPop" :showPop="showPop" :btnColor="'#11BB8B'" :showBtn='false' title="解除提醒" width="460rpx"
  44. @closePop="closePop()" @popSubmit="popSubmit()">
  45. <view class="" style="height: 100%;flex-direction: column;display: flex;">
  46. <view @click="closePop()" class="pop-title ddflex" :style="'height: '+ systems.navigationHeight + 'rpx;padding-top:' + systems.ktxStatusHeight + 'rpx;'+'line-height: '+ systems.navigationHeight + 'rpx;'">
  47. <view>白云科技门店</view>
  48. <image class="change-ssicon" src="../../static/pages/images/change.png"></image>
  49. </view>
  50. <view class="pop-content fflex">
  51. <view :class="'pop-content-item '+(index==0?'pop-content-active':'')" v-for="(item,index) in 10">
  52. <view class="pop-content-name">白云科技门店</view>
  53. <image class="pop-content-icon" src=""></image>
  54. </view>
  55. </view>
  56. </view>
  57. </left-pop>
  58. <foot channel="machine" :isUpdate="isUpdate"></foot>
  59. </view>
  60. </template>
  61. <script>
  62. const app = getApp();
  63. const req = require("../../utils/request.js");
  64. import foot from "../../components/nav-bar/index";
  65. import leftPop from "../../components/left-pop/index";
  66. export default {
  67. components: {
  68. foot,
  69. leftPop
  70. },
  71. props: {},
  72. data() {
  73. return {
  74. systems: {},
  75. isTop:0,
  76. isUpdate: false,
  77. showPop: false,
  78. tempData: null,
  79. }
  80. },
  81. onLoad(options) {
  82. },
  83. onShow() {
  84. this.setData({
  85. isUpdate: !this.isUpdate
  86. });
  87. },
  88. methods: {
  89. jumpUrl(url){
  90. if(req.isLogins(true)){
  91. uni.navigateTo({
  92. url:url
  93. })
  94. }
  95. },
  96. // 弹窗弹出
  97. openPop(item) {
  98. this.tempData = JSON.parse(JSON.stringify(item))
  99. this.showPop = true
  100. },
  101. // 弹窗关闭
  102. closePop() {
  103. this.showPop = false
  104. this.tempData = null
  105. },
  106. // 弹窗确认
  107. popSubmit() {
  108. this.closePop()
  109. },
  110. },
  111. mounted() {
  112. const systemInfo = uni.getSystemInfoSync();
  113. // px转换到rpx的比例
  114. let pxToRpxScale = 750 / systemInfo.windowWidth;
  115. let systems = {
  116. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  117. navigationHeight: 44 * pxToRpxScale // 导航栏的高度
  118. };
  119. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  120. this.systems = systems;
  121. },
  122. onPageScroll: function(e) {
  123. if (e.scrollTop > this.systems.barHeight) {
  124. this.isTop = 1;
  125. } else {
  126. this.isTop = 0;
  127. }
  128. }
  129. }
  130. </script>
  131. <style>
  132. @import "./machine.css";
  133. </style>