lex-xin 4 ماه پیش
والد
کامیت
840e70e9a2

+ 3 - 3
miniprogram/pages/buyerInformation/index.less

@@ -88,7 +88,7 @@
 }
 
 .btnGroup {
-  box-shadow: inset 0rpx 2rpx 0rpx 0rpx #F0F0F0;
+  // box-shadow: inset 0rpx 2rpx 0rpx 0rpx #F0F0F0;
   padding: 22rpx 32rpx 56rpx;
   background-color: #fff;
 
@@ -183,7 +183,7 @@ toolbar-confirm {
 .empty-box {
   padding-top: 12rpx;
   box-sizing: border-box;
-  height: 176px;
+  height: 220px;
   text-align: center;
   font-size: 32rpx;
   font-family: PingFangSC-Regular, PingFang SC;
@@ -211,7 +211,7 @@ toolbar-confirm {
 
   .empty-text {
     font-size: 28rpx;
-    color: #777777;
+    color: #AAA;
     line-height: 40rpx;
     text-align: center;
     padding-top: 36rpx;

+ 63 - 16
miniprogram/pages/buyerInformation/index.ts

@@ -59,6 +59,7 @@ Page({
     regionCode: null,
     regionName: "",
 
+    cacheArea: [] as { cityCode: string, shiftCityCode: string }[], // 临时存储的对应关系
     userBeneficiaryId: '', // 选中用户的编号
     showArea: false,
     areaList: [] as any,
@@ -79,6 +80,7 @@ Page({
     gradeClassIndexs: [0, 0],
     showGradeClass: false,
     showGradeClassAfterLeave: false, // 离开后
+    showAreaAfterLeave: false, // 所在地区
   },
 
   /**
@@ -169,12 +171,22 @@ Page({
       province_list[item.code] = item.name;
     });
     area.forEach((item: any) => {
-      item.areas && item.areas.forEach((city: any) => {
-        // console.log(city.code, city.code.toString().split(''))
-        city_list[city.code] = city.name;
+      item.areas && item.areas.forEach((city: any, index: number) => {
+        let code = city.code + ""
+        // 某些数据不标准 这里需要转换一下
+        if (code[4] !== "0" || code[5] !== "0") {
+          // 现在把区域的数据改为市的
+          const newCode = code.substring(0, 2) + (index < 10 ? `a${index}` : index < 20 ? `b${index - 10}` : index < 30 ? `c${index - 20}` : `d${index - 30}`) + "00";
+          this.data.cacheArea.push({
+            cityCode: code,
+            shiftCityCode: newCode
+          })
+          code = newCode
+        }
+        city_list[code] = city.name;
       });
     });
-    area.forEach((item: any) => { 
+    area.forEach((item: any) => {
       item.areas && item.areas.forEach((city: any) => {
         city.areas && city.areas.forEach((county: any) => {
           county_list[county.code] = county.name;
@@ -187,6 +199,16 @@ Page({
       county_list
     };
   },
+  // 转换
+  formateCityCode(reverse?: boolean) {
+    if (!this.data.regionCode && this.data.cityCode) {
+      const cityCodeObj = this.data.cacheArea.find((item: any) => {
+        return item[reverse ? "cityCode" : "shiftCityCode"] == this.data.cityCode
+      })
+      return cityCodeObj ? cityCodeObj[reverse ? "shiftCityCode" : "cityCode"] : ""
+    }
+    return this.data.cityCode
+  },
   /** 获取学校列表 */
   async getSchools(name?: string) {
     this.setData({
@@ -194,14 +216,16 @@ Page({
     })
     try {
       // 判断是否有地区信息
-      if (!this.data.provinceCode || !this.data.cityCode || !this.data.regionCode) {
+      if (!this.data.provinceCode || !this.data.cityCode) {
         return
       }
+      const citycode = this.formateCityCode()
       const { data } = await api_schoolAreaList({
         name,
         testFlag: true,
         provinceCode: this.data.provinceCode,
-        cityCode: this.data.cityCode,
+        // cityCode: this.data.cityCode,
+        cityCode: citycode,
         regionCode: this.data.regionCode
       })
       const result = data.data || []
@@ -302,9 +326,9 @@ Page({
           // 排序班级
           list.classList.sort((a: any, b: any) => a.value - b.value);
           lastGradeList.push(list);
+          
         });
         lastGradeList.sort((a: any, b: any) => a.value - b.value);
-        // console.log(lastGradeList, 'lastGradeList')
         gradeClassList = [{
           values: lastGradeList,
           defaultIndex: this.data.gradeClassIndexs[0]
@@ -345,12 +369,15 @@ Page({
     if ((tempGradeList?.values?.length || 0) - 1 < grade[0] || (tempClassList?.values?.length || 0) - 1 < grade[1]) {
       gradeClassList[0].defaultIndex = 0
       gradeClassList[1].defaultIndex = 0
+
+      // 初始化班级数据
+      gradeClassList[1].values = gradeClassList[0]?.values[0]?.classList || []
       this.setData({
         gradeClassList,
         gradeClassIndexs: [0, 0],
-        currentClass: null,
-        currentGradeNum: null,
-        currentGradeClassTxt: '',
+        // currentClass: null,
+        // currentGradeNum: null,
+        // currentGradeClassTxt: '',
         schoolInstrumentSetType
       })
     } else {
@@ -360,7 +387,7 @@ Page({
       })
     }
 
-    
+    console.log(this.data.gradeClassList, "data")
   },
   /** 选择男女 */
   onCheckGender(e: any) {
@@ -381,8 +408,15 @@ Page({
       showArea: false
     })
   },
-  onChangeAreaList(e: any) {
-    // console.log(e, '3')
+  onAreaBeforeEnter() {
+    this.setData({
+      showAreaAfterLeave: false
+    })
+  },
+  onAreaAfterLeave() {
+    this.setData({
+      showAreaAfterLeave: true
+    })
   },
   /** 确定选择地区 */
   submitArea(e: any) {
@@ -441,6 +475,7 @@ Page({
       showSchool: true
     })
   },
+  
   /** 确定选择学校 */
   onSubmitSchool() {
     const detail = this.data.schoolAreaList.find((item: any) => item.value === this.data.tempChangeSchoolAreaId)
@@ -541,6 +576,18 @@ Page({
       }
     }
   },
+  messageName(value: string) {
+    const nameReg = /^[\u4E00-\u9FA5]+$/
+    if (!value) {
+      return '请填写享用者姓名';
+    } else if (!nameReg.test(value)) {
+      return '享用者姓名必须为中文';
+    } else if (value.length < 2 || value.length > 14) {
+      return '享用者姓名必须为2~14个字';
+    } else {
+      return ''
+    }
+  },
   /** 最终提交 */
   async onSubmit() {
     try {
@@ -553,15 +600,15 @@ Page({
         return
       }
 
-      if (!params.name) {
+      if (this.messageName(params.name)) {
         wx.showToast({
-          title: '请输入学生姓名',
+          title: this.messageName(params.name),
           icon: "none"
         })
         return
       }
 
-      if (!params.provinceCode || !params.cityCode || !params.regionCode) {
+      if (!params.provinceCode || !params.cityCode) {
         wx.showToast({
           title: '请选择地区',
           icon: "none"

+ 6 - 6
miniprogram/pages/buyerInformation/index.wxml

@@ -10,7 +10,7 @@
         <van-field model:value="{{ phone }}" maxlength="11" type="number" placeholder="请输入手机号码" input-align="right" >
           <view class="required" slot="label"><text>*</text>联系方式</view>
         </van-field>
-        <van-field model:value="{{ name }}" placeholder="请输入学生姓名" input-align="right" >
+        <van-field model:value="{{ name }}" placeholder="请输入学生姓名" input-align="right" maxlength="15">
           <view class="required" slot="label"><text>*</text>学生姓名</view>
         </van-field>
         <van-field border="{{ false }}" input-align="right">
@@ -26,7 +26,7 @@
     <view class="section">
       <view class="section-content">
         <image src="./images/title2.png" class="section-title" />
-        <van-field value="{{ provinceName ? provinceName + ' ' + cityName + ' ' + regionName : '' }}" bind:tap="onShowAreaList" placeholder="请选择地区" input-align="right" is-link readonly >
+        <van-field value="{{ provinceName ? (provinceName || '') + ' ' + (cityName || '') + ' ' + (regionName || '') : '' }}" bind:tap="onShowAreaList" placeholder="请选择地区" input-align="right" is-link readonly >
           <view class="required" slot="label"><text>*</text>所在地区</view>
         </van-field>
         <van-field model:value="{{ schoolAreaName }}" placeholder="请选择学校" input-align="right" is-link readonly bind:tap="onSelectSchool" >
@@ -46,8 +46,8 @@
   </view>
 
   <!-- 地区 -->
-  <van-popup round="{{true}}" lock-scroll="{{true}}" z-index="{{102}}" show="{{showArea}}" position="bottom" safe-area-inset-bottom="{{false}}" bind:close="onCloseAreaList">
-    <van-area id='area1' areaList="{{areaList}}" visible-item-count="5" item-height="46" value="{{ regionCode || cityCode }}" bind:cancel="onCloseAreaList" bind:confirm="submitArea" bind:change="onChangeAreaList" />
+  <van-popup round="{{true}}" lock-scroll="{{true}}" z-index="{{102}}" show="{{showArea}}" position="bottom" safe-area-inset-bottom="{{false}}" bind:close="onCloseAreaList" bind:after-leave="onAreaAfterLeave" bind:before-enter="onAreaBeforeEnter">
+    <van-area wx:if="{{ !showAreaAfterLeave }}" id='area1' areaList="{{areaList}}" visible-item-count="6" item-height="46" value="{{  regionCode || cityCode }}" bind:cancel="onCloseAreaList" bind:confirm="submitArea" />
   </van-popup>
 
   <!-- 学校 -->
@@ -62,7 +62,7 @@
         <view slot="action" class="searchBtn" bind:tap="onSearch">搜索</view>
       </van-search>
     </view>
-    <van-picker loading="{{ schoolLoading }}" wx:if="{{ !showSchoolAfterLeave && schoolAreaList.length > 0 }}" columns="{{ schoolAreaList }}" bind:change="onChangeSchool" visible-item-count="4" default-index="{{ schoolAreaIndex }}">
+    <van-picker loading="{{ schoolLoading }}" wx:if="{{ !showSchoolAfterLeave && schoolAreaList.length > 0 }}" columns="{{ schoolAreaList }}" bind:change="onChangeSchool" visible-item-count="5" default-index="{{ schoolAreaIndex }}">
     </van-picker>
     <view class="empty-box" wx:if="{{ schoolAreaList.length <= 0 }}">
       <view class="empty_loading" wx:if="{{ schoolLoading }}">
@@ -76,7 +76,7 @@
 
   <!-- 年级班级 -->
   <van-popup round="{{true}}" lock-scroll="{{true}}" z-index="{{102}}" show="{{showGradeClass}}" position="bottom" safe-area-inset-bottom="{{false}}" bind:close="onCloseGradeClass" bind:after-leave="onGradeClassAfterLeave" bind:before-enter="onGradeClassBeforeEnter">
-    <van-picker wx:if="{{ !showGradeClassAfterLeave }}" columns="{{ gradeClassList }}" visible-item-count="6" show-toolbar bind:cancel="onCloseGradeClass" bind:confirm="onSubmitGradeClass" bind:change="onGradeClassChange">
+    <van-picker wx:if="{{ !showGradeClassAfterLeave }}" columns="{{ gradeClassList }}" visible-item-count="6" item-height="46" show-toolbar bind:cancel="onCloseGradeClass" bind:confirm="onSubmitGradeClass" bind:change="onGradeClassChange">
     </van-picker>
   </van-popup>
 </view>

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

@@ -238,6 +238,7 @@ page {
     height: 84rpx;
     background: #f8f8f8;
     padding-left: 10rpx;
+    padding-right: 10rpx;
     margin-right: 16rpx;
     font-size: 28rpx;
     color: #131415;

+ 5 - 0
miniprogram/pages/index/index.ts

@@ -185,6 +185,11 @@ Page({
     try {
       const result = await api_shopInstruments({ appId: app.globalData.appId })
       const instrumentList = result.data.data || []
+      instrumentList.forEach((item: any) => {
+        item.showSalePrice = formatPrice(item.salePrice || 0, 'ALL')
+        item.showOriginalPrice = formatPrice(item.originalPrice || 0, 'ALL')
+      })
+
       const { data } = await api_shopProduct({ appId: app.globalData.appId });
       const list = data.data || [];
       let selected: any = {};

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

@@ -75,7 +75,7 @@
             <image src="./images/title1.png" class="title"></image>
             <view class="topSection">
               <view class="content1">
-                音乐数字课堂已赢得超过100万名注册师生的喜爱与赞誉,成为学生乐器学习旅程中的得力伙伴,更是一路陪伴他们从初探音乐世界走向精通乐器。为学生带来极佳的学习体验。
+                音乐数字AI已赢得超过100万名注册师生的喜爱与赞誉,成为学生乐器学习旅程中的得力伙伴,更是一路陪伴他们从初探音乐世界走向精通乐器。为学生带来极佳的学习体验。
               </view>
               <view class="titleVideoSection">
                 <view class="video-section">
@@ -176,8 +176,8 @@
                 <image src="./images/check-good.png" wx:if="{{ item.id === selectInstrumentId  }}" class="check-good" />
                 <image class="combo-item-img" src="{{ item.pic }}"></image>
                 <view class="combo-item-name">{{ item.name }}</view>
-                <view class="combo-item-price">¥ {{ item.salePrice }}</view>
-                <view class="combo-item-origin">日常价 ¥ {{ item.originalPrice }}</view>
+                <view class="combo-item-price">¥ {{ item.showSalePrice }}</view>
+                <view class="combo-item-origin">日常价 ¥ {{ item.showOriginalPrice }}</view>
               </view>
             </view>
           </view>
@@ -190,7 +190,7 @@
             ,合计:
             <text>¥ {{ formatSelectGood.showSalePrice }}</text>
             <block wx:if="{{ formatSelectGood.originalPrice > formatSelectGood.salePrice }}">
-              ,已省<text>¥ {{ formatSelectGood.discountPrice }}</text>
+              ,已省 <text>¥ {{ formatSelectGood.discountPrice }}</text>
             </block>
           </view>
           <view class="btnGroup">

+ 69 - 30
miniprogram/pages/orders/order-detail.less

@@ -234,35 +234,6 @@ page {
   }
 }
 
-.order-time {
-  margin: 24rpx 26rpx 0;
-  border-radius: 20rpx;
-  padding: 36rpx 24rpx;
-  background-color: #ffffff;
-
-  .order-item {
-    display: flex;
-    justify-content: space-between;
-    padding-bottom: 36rpx;
-
-    &:last-child {
-      padding-bottom: 0;
-    }
-
-    .title {
-      font-size: 28rpx;
-      color: #131415;
-      line-height: 40rpx;
-    }
-
-    .value {
-      font-size: 28rpx;
-      color: #777777;
-      line-height: 40rpx;
-    }
-  }
-}
-
 .select-section {
   margin: 24rpx 26rpx 0;
   background: #ffffff;
@@ -304,6 +275,7 @@ page {
   .address-info {
     padding-right: 36rpx;
   }
+
   .address-text {
     font-weight: 600;
     font-size: 30rpx;
@@ -379,6 +351,61 @@ page {
   }
 }
 
+.order-time {
+  margin: 24rpx 26rpx 0;
+  border-radius: 20rpx;
+  // padding: 36rpx 24rpx;
+  background-color: #FFFFFF;
+
+  .order-item {
+    display: flex;
+    justify-content: space-between;
+    // padding-bottom: 36rpx;
+    padding: 36rpx 0;
+    margin: 0 24rpx;
+    border-bottom: 2rpx solid #F0F0F0;
+
+    &:last-child {
+      border-bottom: none;
+    }
+
+    .title {
+      font-weight: 500;
+      font-size: 30rpx;
+      color: #131415;
+      line-height: 42rpx;
+    }
+
+    .value {
+      font-size: 30rpx;
+      color: #777777;
+      line-height: 42rpx;
+      display: flex;
+
+      &.red {
+        color: #FE2451;
+      }
+
+      .copy {
+        font-size: 30rpx;
+        color: #131415;
+        line-height: 42rpx;
+        display: flex;
+        align-items: center;
+
+        &::before {
+          content: '';
+          display: block;
+          width: 2rpx;
+          height: 22rpx;
+          background: #DCDCDC;
+          margin: 0 16rpx;
+        }
+      }
+    }
+  }
+}
+
 .order-btn {
   margin-top: 24rpx;
   // position: fixed;
@@ -558,6 +585,7 @@ page {
   .required {
     font-weight: 600;
     color: #666666;
+
     text {
       color: #FF5A56;
     }
@@ -634,10 +662,20 @@ page {
       font-size: 28rpx;
       color: #333333;
       line-height: 40rpx;
+      display: flex;
+      align-items: center;
 
       text {
         padding-right: 8rpx;
 
+        &:first-child {
+          max-width: 200rpx;
+          white-space: nowrap;
+          overflow: hidden;
+          display: block;
+          text-overflow: ellipsis;
+        }
+
         &:last-child {
           color: #777;
         }
@@ -666,6 +704,7 @@ page {
         background: linear-gradient(90deg, #544F4A 0%, #302F2B 100%);
         color: #FBEAC9;
         border: none !important;
+        line-height: 46rpx;
       }
     }
   }
@@ -724,7 +763,7 @@ page {
 
   .empty-text {
     font-size: 28rpx;
-    color: #777777;
+    color: #AAA;
     line-height: 40rpx;
     text-align: center;
     padding-top: 36rpx;

+ 60 - 13
miniprogram/pages/orders/order-detail.ts

@@ -45,12 +45,14 @@ Page({
     addressShow: false, // 添加/修改收货地址
     addressListShow: false, // 收货地址列表
     addressList: [] as any, // 收货地址列表
+    showAreaAfterLeave: false, // 所在地区
+    cacheArea: [] as { cityCode: string, shiftCityCode: string }[], // 临时存储的对应关系
     // 添加地址表单信息
     id: "",
     name: '',
     phoneNumber: '',
     detailAddress: '',
-    cityCode: 0,
+    cityCode: null,
     cityName: "",
     provinceCode: 0,
     provinceName: "",
@@ -169,6 +171,7 @@ Page({
           phoneNumber: beneficiary.phone,
           schoolInfo: tempSchoolAddress.join('')
         },
+        'goodsInfo.createTime': result.createTime
       })
     } catch {
       // 
@@ -240,8 +243,19 @@ Page({
       province_list[item.code] = item.name;
     });
     area.forEach((item: any) => {
-      item.areas && item.areas.forEach((city: any) => {
-        city_list[city.code] = city.name;
+      item.areas && item.areas.forEach((city: any, index: number) => {
+        let code = city.code + ""
+        // 某些数据不标准 这里需要转换一下
+        if (code[4] !== "0" || code[5] !== "0") {
+          // 现在把区域的数据改为市的
+          const newCode = code.substring(0, 2) + (index < 10 ? `a${index}` : index < 20 ? `b${index - 10}` : index < 30 ? `c${index - 20}` : `d${index - 30}`) + "00";
+          this.data.cacheArea.push({
+            cityCode: code,
+            shiftCityCode: newCode
+          })
+          code = newCode
+        }
+        city_list[code] = city.name;
       });
     });
     area.forEach((item: any) => {
@@ -257,6 +271,17 @@ Page({
       county_list
     };
   },
+  // 转换
+  formateCityCode(reverse?: boolean) {
+    if (!this.data.regionCode && this.data.cityCode) {
+      const cityCodeObj = this.data.cacheArea.find((item: any) => {
+        return item[reverse ? "cityCode" : "shiftCityCode"] == this.data.cityCode
+      })
+      console.log(this.data.cacheArea, 'this.data.cacheArea', reverse ? "shiftCityCode" : "cityCode", cityCodeObj)
+      return cityCodeObj ? cityCodeObj[reverse ? "shiftCityCode" : "cityCode"] : ""
+    }
+    return this.data.cityCode
+  },
   // 获取后台配置的支付方式
   async queryPayType() {
     try {
@@ -507,19 +532,40 @@ Page({
       showArea: false
     })
   },
+  onAreaBeforeEnter() {
+    this.setData({
+      showAreaAfterLeave: false
+    })
+  },
+  onAreaAfterLeave() {
+    this.setData({
+      showAreaAfterLeave: true
+    })
+  },
   /** 确定选择地区 */
   submitArea() {
     const selectedOptions = this.data.currentValues
     this.setData({
       provinceCode: selectedOptions[0].code,
       cityCode: selectedOptions[1].code,
-      regionCode: selectedOptions[2].code,
-      provinceName: selectedOptions[0].name,
-      cityName: selectedOptions[1].name,
-      regionName: selectedOptions[2].name,
+      regionCode: selectedOptions[2]?.code,
+      provinceName: selectedOptions[0].name || '',
+      cityName: selectedOptions[1].name || '',
+      regionName: selectedOptions[2]?.name || '',
       showArea: false
     })
   },
+  onCopy(e: { currentTarget: any }) {
+    wx.setClipboardData({
+      data: e.currentTarget.dataset.orderno,
+      success: () => {
+        wx.showToast({ title: '复制成功', icon: 'none' })
+      },
+      fail: () => {
+        wx.showToast({ title: '复制失败,请稍后再试', icon: 'none' })
+      }
+    })
+  },
   // cancelArea() {
   //   this.setData({ showArea: false })
   // },
@@ -547,7 +593,6 @@ Page({
   //   // }}
   // },
   changeArea(e: any) {
-    console.log(e.detail.values, 'e.detail.values')
     this.setData({
       currentValues: e.detail.values
     })
@@ -570,7 +615,7 @@ Page({
         })
         return
       }
-      if (!addressForm.provinceCode || !addressForm.cityCode || !addressForm.regionCode) {
+      if (!addressForm.provinceCode || !addressForm.cityCode) {
         wx.showToast({
           title: '请选择地区',
           icon: "none"
@@ -585,25 +630,27 @@ Page({
         return
       }
       if (addressForm.id) {
+        const citycode = this.formateCityCode()
         await api_userReceiveAddressUpdate({
           id: addressForm.id,
           name: addressForm.name,
           phoneNumber: addressForm.phoneNumber,
           province: addressForm.provinceCode,
-          city: addressForm.cityCode,
-          region: addressForm.regionCode,
+          city: citycode,
+          region: addressForm.regionCode || '',
           detailAddress: addressForm.detailAddress
         })
 
         this.getAddresss()
         this.onCloseAddress()
       } else {
+        const citycode = this.formateCityCode()
         const { data } = await api_userReceiveAddressSave({
           name: addressForm.name,
           phoneNumber: addressForm.phoneNumber,
           province: addressForm.provinceCode,
-          city: addressForm.cityCode,
-          region: addressForm.regionCode,
+          city: citycode,
+          region: addressForm.regionCode || '',
           detailAddress: addressForm.detailAddress
         })
 

+ 18 - 11
miniprogram/pages/orders/order-detail.wxml

@@ -96,17 +96,24 @@
             <view class="right-value">{{ userBeneficiaryInfo.schoolInfo }}</view>
           </view>
         </view>
+
       </view>
+
+      <view class="order-time" wx:if="{{ goodsInfo.createTime }}">
+          <view class="order-item">
+            <view class="title">订单编号</view>
+            <view class="value">
+              {{ goodsInfo.orderNo }}
+              <view class="copy" bind:tap="onCopy" data-orderno="{{goodsInfo.orderNo}}">复制</view>
+            </view>
+          </view>
+          <view class="order-item">
+            <view class="title">下单时间</view>
+            <view class="value">{{ goodsInfo.createTime }}</view>
+          </view>
+        </view>
     </scroll-view>
     <view class="order-btn">
-      <!-- <view class="price">
-      <view class="desc">商品总价:</view>
-      <view class="currentPrice">
-        <text class="stuff">¥</text>
-        <text class="priceZ">{{ goodsInfo.integerPart }}</text>
-        <text class="priceF">.{{ goodsInfo.decimalPart }}</text>
-      </view>
-    </view> -->
       <view class="btnGroup">
         <button type="primary" bind:tap="onSubmit">
           <view class="currentPrice">
@@ -145,7 +152,7 @@
         <van-field value="{{ provinceName ? provinceName + ' ' + cityName + ' ' + regionName : '' }}" placeholder="请选择地区" input-align="right" readonly is-link bind:tap="onShowAreaList" >
           <view class="required" slot="label"><text>*</text>收货地区</view>
         </van-field>
-        <van-field border="{{ false }}" model:value="{{ detailAddress }}" type="textarea" placeholder="请输入详细地址" input-align="right" input-class="textarea" >
+        <van-field border="{{ false }}" model:value="{{ detailAddress }}" type="textarea" placeholder="请输入详细地址" input-align="right" input-class="textarea" maxlength="100">
           <view class="required" slot="label"><text>*</text>详细地址</view>
         </van-field>
       </van-cell-group>
@@ -194,13 +201,13 @@
       </view>
     </van-popup>
 
-    <van-popup round="{{true}}" lock-scroll="{{true}}" z-index="{{102}}" show="{{showArea}}" position="bottom" safe-area-inset-bottom="{{false}}" bind:close="onCloseAreaList">
+    <van-popup round="{{true}}" lock-scroll="{{true}}" z-index="{{102}}" show="{{showArea}}" position="bottom" safe-area-inset-bottom="{{false}}" bind:close="onCloseAreaList" bind:after-leave="onAreaAfterLeave" bind:before-enter="onAreaBeforeEnter">
       <view class="top-bg"></view>
       <image src="./images/icon-close1.png" class="icon-close" bind:tap="onCloseAreaList" />
       <view class="pop-address-title">
         选择地区
       </view>
-      <van-area id='area1' areaList="{{areaList}}" visible-item-count="5" show-toolbar="{{false}}" bind:change="changeArea" item-height="46" value="{{ regionCode }}" />
+      <van-area wx:if="{{ !showAreaAfterLeave }}" id='area1' areaList="{{areaList}}" visible-item-count="5" show-toolbar="{{false}}" bind:change="changeArea" item-height="46" value="{{ regionCode || cityCode }}" />
       <view class="pop-btn-group">
         <button class="submit-btn" bindtap="submitArea">确认</button>
       </view>

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

@@ -276,7 +276,7 @@ page {
 
   .empty-text {
     font-size: 28rpx;
-    color: #777777;
+    color: #AAA;
     line-height: 40rpx;
     text-align: center;
     padding-top: 36rpx;

+ 30 - 0
miniprogram/pages/orders/orders.ts

@@ -270,6 +270,21 @@ Page({
       if (data.code === 200) {
         const { paymentConfig, paymentType, orderNo } = data.data.paymentConfig
         this.onExecutePay(paymentConfig, paymentType, orderNo)
+      } else if ([5435, 5436, 5437, 5439, 5442, 5443, 5408, 5427, 5432].includes(data.code)) {
+        wx.hideLoading()
+        wx.showToast({
+          title: data.message,
+          icon: 'none'
+        })
+        setTimeout(() => {
+          this.setData({
+            page: 1,
+            maxPage: 1,
+            recordList: [],
+          }, () => {
+            this.getList(false)
+          })
+        }, 1000)
       } else {
         this.onPayError()
       }
@@ -291,6 +306,21 @@ Page({
         wx.hideLoading()
         if (res.data.code === 200) {
           this.onPaying(paymentType, res.data.data.reqParams, orderNo)
+        } else if ([5435, 5436, 5437, 5439, 5442, 5443, 5408, 5427, 5432].includes(res.data.code)) {
+          wx.hideLoading()
+          wx.showToast({
+            title: res.data.message,
+            icon: 'none'
+          })
+          setTimeout(() => {
+            this.setData({
+              page: 1,
+              maxPage: 1,
+              recordList: [],
+            }, () => {
+              this.getList(false)
+            })
+          }, 1000)
         } else {
           this.onPayError(res.data.message)
         }