Przeglądaj źródła

feature: 调整首页UI

332777428@qq.com 6 miesięcy temu
rodzic
commit
0f4a6006c0
3 zmienionych plików z 37 dodań i 5 usunięć
  1. 14 3
      pages/index/index.wxml
  2. 22 1
      pages/index/index.wxss
  3. 1 1
      pages/login/login.wxml

+ 14 - 3
pages/index/index.wxml

@@ -8,7 +8,18 @@
       <view style="font-size: 32rpx; color: #333333; margin-top: 14rpx;">{{greeting}}</view>
 
       <!-- banner -->
-      <view wx:if="{{bannerList.length>0}}" class="banner_container" style="width: calc(100vw - 64rpx);   border-radius: 16rpx;">
+      <view wx:if="{{bannerList.length>0}}" class="banner_container">
+        <swiper class="swiper" indicator-dots="{{bannerList.length>1}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}" indicator-active-color="#FFFFFF" indicator-color="#999999">
+          <block wx:for="{{bannerList}}" wx:key="index">
+            <swiper-item>
+              <image mode="widthFix" class="swiper_image" src="{{item.pic}}" data-item="{{item}}" bind:tap="onTapBanner" />
+            </swiper-item>
+          </block>
+        </swiper>
+      </view>
+
+      <!-- banner -->
+      <!-- <view wx:if="{{bannerList.length>0}}" class="banner_container" style="width: calc(100vw - 64rpx);   border-radius: 16rpx;">
         <swiper style="width: calc(100vw - 64rpx);   border-radius: 16rpx;" indicator-dots="{{bannerList.length>1}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}" indicator-active-color="#FFFFFF" indicator-color="#999999">
           <block wx:for="{{bannerList}}" wx:key="index">
             <swiper-item style="width: calc(100vw - 64rpx); border-radius: 16rpx;">
@@ -16,7 +27,7 @@
             </swiper-item>
           </block>
         </swiper>
-      </view>
+      </view> -->
 
       <view class="add_device_public" bind:tap="jumpToAddDevice">
         <image mode="heightFix" src="./../../img/add_device.png" style="width: 48rpx;height: 48rpx;"></image>
@@ -68,7 +79,7 @@
     <view wx:else>
 
       <!-- 频道 -->
-      <view wx:if="{{deviceListSelect!=null&&deviceList.length>deviceListSelect&&deviceList[deviceListSelect].connectType===3}}" class="mair" style="height: calc(100vh - 105rpx - {{safeBottomHeight}}rpx - 22rpx - {{navBarHeight}}px);">
+      <view wx:if="{{indexPage==1&&deviceListSelect!=null&&deviceList.length>deviceListSelect&&deviceList[deviceListSelect].connectType===3}}" class="mair" style="height: calc(100vh - 105rpx - {{safeBottomHeight}}rpx - 22rpx - {{navBarHeight}}px);">
         <view class="play-info">
           <view class="info">
             <image src="./../../img/blak.png" class="black" mode="scaleToFill"></image>

+ 22 - 1
pages/index/index.wxss

@@ -727,7 +727,28 @@
 }
 
 /************************ banner ************************/
+
 .banner_container {
+  width: 100%;
+  height: 264rpx;
+  margin-top: 32rpx;
+  /* 根据需要调整高度 */
+  overflow: hidden;
+  position: relative;
+  border-radius: 16rpx;
+}
+
+.swiper {
+  width: 100%;
+  height: 264rpx;
+}
+
+.swiper_image {
+  width: 100%;
+  display: block;
+}
+
+/* .banner_container {
   margin-top: 24rpx;
   height: 270rpx;
   background-color: transparent;
@@ -736,7 +757,7 @@
 .banner_item {
   height: 270rpx;
   background-color: transparent;
-}
+} */
 
 /* 设置指示点的大小和颜色 */
 .swiper_dot {

+ 1 - 1
pages/login/login.wxml

@@ -6,7 +6,7 @@
     <image mode="widthFix" src="./../../img/k.png"></image>
     <view class="loginbut">
       <view class="mode" wx:if="{{!isAgree}}" catchtap="notlogin"></view>
-      <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">微信手机号快速登录</button>
+      <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">手机号快速登录</button>
     </view>
     <view class="ys">
       <image bindtap="egree" mode="aspectFill" src="./../../img/{{isAgree ? 'h' : 'j'}}.png"></image>