Pārlūkot izejas kodu

feature: 调整首页UI

Damon 6 mēneši atpakaļ
vecāks
revīzija
635e6884ec
2 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 1 0
      pages/index/index.js
  2. 2 2
      pages/index/index.wxml

+ 1 - 0
pages/index/index.js

@@ -216,6 +216,7 @@ Page({
     var deviceList = store.getStore("deviceList");
 
     if (!strings.isEmpty(deviceList)) {
+      // deviceList = deviceList.concat(deviceList);
       that.updateDeviceList(deviceList, true, false);
     }
 

+ 2 - 2
pages/index/index.wxml

@@ -33,10 +33,10 @@
         <view style="color: white; margin-left: 8rpx; font-size: 32rpx;">添加设备</view>
       </view>
 
-      <scroll-view scroll-y="true" style="height: calc(100vh - 152rpx - 296rpx - 46rpx - 105rpx - {{safeBottomHeight}}rpx - 5rpx - {{navBarHeight}}px); padding-top: 10rpx; padding-bottom: 10rpx;">
+      <scroll-view scroll-y="true" style="height: calc(100vh - 152rpx - 296rpx - 46rpx - 105rpx - {{safeBottomHeight}}rpx - 5rpx - {{navBarHeight}}px);">
         <block wx:key="key" wx:for-item="item" wx:for-index="index" wx:for="{{deviceList}}">
 
-          <view class="item_public" style="border: {{item.state && item.state === 'online'&&deviceListSelect === index  ? '6rpx solid #6546A3' : item.state && item.state === 'online'?'2rpx solid #6546A3':'2rpx solid #F2F5F7'}};  flex-direction: row; display: flex;" data-item="{{item}}" data-index="{{index}}" bind:tap="onTapItem">
+          <view class="item_public" style="border: {{item.state && item.state === 'online'&&deviceListSelect === index  ? '6rpx solid #6546A3' : item.state && item.state === 'online'?'2rpx solid #6546A3':'2rpx solid #F2F5F7'}};  flex-direction: row; display: flex; margin-top: 10rpx; margin-bottom: {{index==0?deviceList.length-1:0}}rpx; " data-item="{{item}}" data-index="{{index}}" bind:tap="onTapItem">
 
             <view style="width: 264rpx; height: 200rpx;">
               <image class="item_public_image" src="{{item.imageUrl}}" style="opacity: {{item.state && item.state === 'online' ? '1' : '0.5'}};" mode="aspectFit" lazy-load="true" webp="true"></image>