Browse Source

添加样式

lex-xin 2 months ago
parent
commit
e7d2a9229c

+ 3 - 3
miniprogram/app.less

@@ -13,7 +13,7 @@ page {
   --picker-cancel-action-color: #777777;
   --picker-confirm-action-color: #0AAF20;
   --picker-option-text-color: #000000;
-  --picker-option-font-size: 32rpx;
+  --picker-option-font-size: 16px;
 }
 
 .van-picker__cancel {
@@ -27,6 +27,6 @@ page {
 }
 
 .van-picker__toolbar {
-  margin: 0 26rpx;
-  border-bottom: 2rpx solid #F2F2F2;
+  margin: 0 13px;
+  border-bottom: 1px solid #F2F2F2;
 }

+ 2 - 2
miniprogram/components/navigation-bar/navigation-bar.less

@@ -48,8 +48,8 @@
 
 .weui-navigation-bar__btn_goback {
   font-size: 12px;
-  width: 36rpx;
-  height: 40rpx;
+  width: 18px;
+  height: 20px;
   -webkit-mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E  %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%;
   mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E  %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%;
   -webkit-mask-size: cover;

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

@@ -372,7 +372,7 @@ page {
     }
     .goodsInfo {
       padding: 0 40rpx;
-      max-height: 578rpx;
+      max-height: 36vh;
       overflow-x: hidden;
       overflow-y: auto;
       &::-webkit-scrollbar {

+ 26 - 26
miniprogram/pages/member/addMember.less

@@ -201,51 +201,51 @@
     .toolbar-cancel{
       color: var(--picker-cancel-action-color);
       line-height: 44px;
-      padding: 0 14rpx
+      padding: 0 7px
     }
     .toolbar-confirm{
       color: var(--picker-confirm-action-color);
       line-height: 44px;
-      padding: 0 14rpx
+      padding: 0 7px
     }
   }
   .areaListOpen{
     display: flex;
     justify-content: space-between;
     align-items: center;
-    height: 56rpx;
-    margin: 20rpx 40rpx ;
+    height: 28px;
+    margin: 10px 20px ;
     overflow: hidden;
     text{
-      margin-right: 20rpx;
+      margin-right: 10px;
       font-weight: 400;
-      font-size: 32rpx;
+      font-size: 16px;
       color: #000000;
-      line-height: 44rpx;
+      line-height: 22px;
       white-space: nowrap;
       overflow: hidden;
       text-overflow: ellipsis;
     }
     image{
       flex-shrink: 0;
-      width: 32rpx;
-      height: 32rpx;
+      width: 16px;
+      height: 16px;
     }
   }
   .searchList {
     .icon-search {
-      width: 32rpx;
-      height: 32rpx;
+      width: 16px;
+      height: 16px;
       margin: auto 10rpx auto auto;
     }
   
     .van-search {
-      margin: 26rpx !important;
+      margin: 13px !important;
       padding: 0 !important;
-      height: 72rpx !important;
+      height: 36px !important;
       background: #F6F6F6 !important;
-      border-radius: 35rpx !important;
-      border: 1rpx solid #FFFFFF !important;
+      border-radius: 18px !important;
+      border: 1px solid #FFFFFF !important;
     }
   
     .van-search__content {
@@ -254,41 +254,41 @@
     }
   
     .van-cell {
-      font-size: 26rpx !important;
+      font-size: 13px !important;
     }
   
     .searchBtn {
-      width: 112rpx;
-      line-height: 54rpx !important;
+      width: 56px;
+      line-height: 27px !important;
       padding: 0 !important;
       text-align: center;
       background-color: #000000;
       font-weight: 500;
-      font-size: 28rpx;
+      font-size: 14px;
       color: #FFFFFF;
       border-radius: 35rpx;
-      margin-right: 8rpx;
+      margin-right: 4px;
     }
   }
   .empty-box{
     width: 100%;
-    height: 528rpx;
+    height: 264px;
     display: flex;
     flex-direction: column;
     justify-content: center;
     align-items: center;
     image {
-      width: 225rpx;
-      height: 150rpx;
+      width: 112.5px;
+      height: 75px;
     }
   
     .empty-text {
       font-weight: 400;
-      font-size: 28rpx;
+      font-size: 14px;
       color: #AAAAAA;
-      line-height: 40rpx;
+      line-height: 20px;
       text-align: center;
-      padding-top: -24rpx;
+      padding-top: -12px;
     }
   }
 }

+ 10 - 1
miniprogram/pages/member/addMember.ts

@@ -86,6 +86,7 @@ Page({
     className: "",
     classIndex: 0,
 
+    timer: null as any,
     isSaveDisable: false
   },
   async onLoad(options: any) {
@@ -303,8 +304,16 @@ Page({
     })
   },
   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);
     })
   },
   onSearch() {