Browse Source

样式修改

黄琪勇 5 tháng trước cách đây
mục cha
commit
753c0603aa

+ 6 - 0
miniprogram/pages/address/addAddress.ts

@@ -171,6 +171,10 @@ Component({
           })
           return
         }
+        wx.showLoading({
+          mask: true,
+          title: "",
+        });
         // 编辑
         let id
         if (params.editId) {
@@ -207,9 +211,11 @@ Component({
             icon: 'none'
           })
         }
+        wx.hideLoading()
         this.triggerEvent('addAddress', { addressInfo: { id, name: params.name, phoneNumber: params.phoneNumber, addressDes: params.provinceName + params.cityName + params.regionName + params.detailAddress } }, {})
         this.onDialogClose()
       } catch {
+        wx.hideLoading()
         // 
       }
     },

+ 1 - 1
miniprogram/pages/address/addAddress.wxml

@@ -13,7 +13,7 @@
       <view class="fromCon">
         <text class="fromTit">联系电话</text>
         <view class="fromIpt">
-          <van-field model:value="{{ phoneNumber }}" type="{{ 'number' }}" input-align="right" placeholder="请输入联系电话" border="{{ false }}" />
+          <van-field maxlength="11" model:value="{{ phoneNumber }}" type="{{ 'number' }}" input-align="right" placeholder="请输入联系电话" border="{{ false }}" />
         </view>
       </view>
       <view class="fromCon">

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

@@ -246,6 +246,7 @@ page {
           font-size: 26rpx;
           color: #777777;
           line-height: 36rpx;
+          width: 100%;
           white-space: nowrap;
           overflow: hidden;
           text-overflow: ellipsis;

+ 21 - 0
miniprogram/pages/member/addMember.less

@@ -259,4 +259,25 @@
       margin-right: 8rpx;
     }
   }
+  .empty-box{
+    width: 100%;
+    height: 528rpx;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    image {
+      width: 225rpx;
+      height: 150rpx;
+    }
+  
+    .empty-text {
+      font-weight: 400;
+      font-size: 28rpx;
+      color: #AAAAAA;
+      line-height: 40rpx;
+      text-align: center;
+      padding-top: -24rpx;
+    }
+  }
 }

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

@@ -565,6 +565,10 @@ Page({
 
       const pages = getCurrentPages();
       const prevPage = pages[pages.length - 2]; // 获取上一个页面实例
+      wx.showLoading({
+        mask: true,
+        title: "",
+      });
       // 编辑
       if (params.id) {
         await api_userBeneficiaryUpdate({
@@ -591,7 +595,7 @@ Page({
           "schoolAreaId": params.schoolAreaId,
           defaultStatus: false
         })
-        if(this.data.redirectUrl === "index"){
+        if (this.data.redirectUrl === "index") {
           prevPage.setData({ memberInfo: { id: data.data.id, name: params.name, phone: params.phone, schoolInfo: params.provinceName + params.cityName + params.regionName + params.schoolAreaName + params.gradeName + params.className } });
         }
         wx.showToast({
@@ -599,8 +603,10 @@ Page({
           icon: 'none'
         })
       }
+      wx.hideLoading()
       wx.navigateBack()
     } catch {
+      wx.hideLoading()
       // 
     }
   },

+ 6 - 2
miniprogram/pages/member/addMember.wxml

@@ -13,7 +13,7 @@
       <view class="fromCon">
         <text class="fromTit">联系电话</text>
         <view class="fromIpt">
-          <van-field model:value="{{ phone }}" input-align="right" type="{{ 'number' }}" placeholder="请输入联系电话" border="{{ false }}" />
+          <van-field maxlength="11" model:value="{{ phone }}" input-align="right" type="{{ 'number' }}" placeholder="请输入联系电话" border="{{ false }}" />
         </view>
       </view>
       <view class="fromCon">
@@ -81,8 +81,12 @@
         <view slot="action" class="searchBtn" bind:tap="onSearch">搜索</view>
       </van-search>
     </view>
-    <van-picker loading="{{ schoolLoading }}" columns="{{ schoolAreaList }}" bind:change="onChangeSchool" visible-item-count="6" default-index="{{ schoolAreaIndex }}">
+    <van-picker wx:if="{{schoolAreaList.length}}" loading="{{ schoolLoading }}" columns="{{ schoolAreaList }}" bind:change="onChangeSchool" visible-item-count="6" default-index="{{ schoolAreaIndex }}">
     </van-picker>
+    <view wx:else class="empty-box">
+      <image src="https://oss.dayaedu.com/ktyq/1739278149891.png"></image>
+      <view class="empty-text">暂无数据</view>
+    </view>
   </van-popup>
   <!-- 年级 -->
   <van-popup round="{{true}}" lock-scroll="{{true}}" z-index="{{102}}" show="{{showGrade}}" position="bottom" safe-area-inset-bottom="{{false}}" bind:close="onCloseGrade">