Browse Source

添加样式

lex-xin 7 months ago
parent
commit
b05c38f286

+ 1 - 0
.cloudbase/container/debug.json

@@ -0,0 +1 @@
+{"containers":[],"config":{}}

+ 1 - 0
miniprogram/pages/address/index.less

@@ -261,6 +261,7 @@ toolbar-confirm {
     .van-cell {
       padding: 36rpx 40rpx;
       font-size: 30rpx;
+      --cell-line-height: 48rpx!important;
     }
 
     .van-field__label {

+ 14 - 6
miniprogram/pages/index/index.less

@@ -14,6 +14,7 @@
 
   .fistSwiperSection {
     height: 1142rpx;
+    // height: 750rpx;
     padding-top: 48rpx;
 
     swiper-item {
@@ -44,8 +45,8 @@
     image {
       display: block;
       margin: 0 auto;
-      height: 100%;
-      width: 100%;
+      height: 100% !important;
+      width: 100% !important;
       // background: #FFFFFF;
       // border-radius: 32rpx;
     }
@@ -744,6 +745,7 @@ page {
     font-size: 30rpx !important;
     line-height: 42rpx;
     background-color: transparent !important;
+    --cell-line-height: 48rpx!important;
 
     .van-field__label {
       color: #666666 !important;
@@ -812,7 +814,7 @@ page {
 .van-picker__cancel,
 .van-picker__confirm,
 .toolbar-cancel,
-toolbar-confirm {
+.toolbar-confirm {
   font-size: 32rpx !important;
   padding: 28rpx 0 !important;
   color: #777777 !important;
@@ -833,6 +835,7 @@ toolbar-confirm {
   .van-cell {
     padding: 32rpx 40rpx;
     font-size: 32rpx;
+    --cell-line-height: 42rpx!important;
 
     .van-icon-arrow {
       color: #BBBBBB;
@@ -855,6 +858,7 @@ toolbar-confirm {
     background: #F6F6F6 !important;
     border-radius: 35rpx !important;
     border: 1rpx solid #FFFFFF !important;
+    --cell-line-height: 48rpx!important;
   }
 
   .van-search__content {
@@ -888,6 +892,10 @@ toolbar-confirm {
   padding: 28 0rpx !important;
   margin: 0 26rpx !important;
 }
+.van-action-sheet__cancel {
+  font-size: 32rpx!important;
+  line-height: 44rpx!important;
+}
 
 
 .one-gender,
@@ -921,7 +929,7 @@ toolbar-confirm {
 
 .van-picker-column__item--selected {
   font-weight: 600;
-  font-size: 32rpx;
+  font-size: 16px;
   color: #000 !important;
 }
 
@@ -955,8 +963,8 @@ toolbar-confirm {
   }
 
   image {
-    width: 364rpx;
-    height: 190rpx;
+    // width: 364rpx;
+    height: 190rpx !important;
   }
 
   .empty-text {

+ 11 - 1
miniprogram/pages/index/index.ts

@@ -156,6 +156,8 @@ Page({
     showClassAfterLeave: false, // 离开后
     buyerLoading: false,
     // currentIndex: 0,
+
+    timer: null as any
   },
 
   /**
@@ -987,8 +989,16 @@ Page({
     this.getSchools(this.data.searchName);
   },
   onSearchChange(e: any) {
-    this.setData({
+    const that = this
+    that.setData({
       searchName: e.detail
+    }, () => {
+      // 防抖
+       clearTimeout(that.data.timer); // 清除之前的定时器
+        that.data.timer = setTimeout(() => {
+          that.getSchools(that.data.searchName);
+          // 这里写业务逻辑
+        }, 500); // 1秒后执行
     })
   },
   /** 选择年级班级 */

+ 2 - 2
miniprogram/pages/index/index.wxml

@@ -6,7 +6,7 @@
       <swiper indicator-dots="{{false}}" class="fistSwiperSection" previous-margin="78rpx" next-margin="78rpx" bindchange="onFirstChange">
         <swiper-item wx:for="{{firstImgList}}" wx:key="index">
           <view class="swiper-item {{ firstCurrent == index ? 'current' : '' }}">
-            <image data-src="{{ item }}" mode="widthFix" src="{{ item }}"></image>
+            <image data-src="{{ item }}" mode="heightFix" src="{{ item }}"></image>
           </view>
         </swiper-item>
       </swiper>
@@ -229,7 +229,7 @@
     <view class="empty_loading" wx:if="{{ schoolLoading }}">
       <van-loading color="#1989fa" />
     </view>
-    <image mode="widthFix" src="https://oss.dayaedu.com/ktyq/1731839238916.png"></image>
+    <image mode="heightFix" src="https://oss.dayaedu.com/ktyq/1731839238916.png"></image>
     <view class="empty-text">暂无数据</view>
   </view>
 </van-popup>