Browse Source

修改体验问题

lex-xin 1 month ago
parent
commit
c1f0ae97b7

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

@@ -606,7 +606,7 @@ Page({
           icon: 'none'
         })
 
-        prevPage?.setData({ backParams: { userBeneficiaryId: data.data.id, name: params.name, phone: params.phone, schoolInfo: params.schoolAreaName + params.schoolAreaName + params.currentGradeClassTxt } });
+        prevPage?.setData({ backParams: { userBeneficiaryId: data.data.id, name: params.name, phone: params.phone, schoolInfo: params.schoolAreaName + params.currentGradeClassTxt } });
       }
 
       this.onSetCatch(params)

+ 2 - 0
miniprogram/pages/orders/order-detail.ts

@@ -350,6 +350,8 @@ Page({
             title: data.message,
             icon: 'none'
           })
+        } else if([5435, 5436, 5437, 5439, 5442, 5443, 5408, 5427, 5432].includes(data.code)) {
+          wx.navigateBack()
         } else {
           this.onPayError()
         }

+ 152 - 150
miniprogram/pages/orders/order-detail.wxml

@@ -1,45 +1,46 @@
 <!-- pages/orders/order-detail.wxml -->
-<view class="container">
-  <navigation-bar title="{{ status === 'WAIT_PAY' ? '待支付' : '确认购买信息' }}"></navigation-bar>
-  <scroll-view class="record-list" type="list" scroll-y>
-    <view class="order-content">
-      <view class="goods-title">价格明细</view>
-      <view class="item-content" wx:for="{{ goodsInfo.goodsList }}" wx:key="index">
-        <image class='goods-icon' src="{{ item.pic }}" mode="" />
-        <view class="goods-desc">
-          <view class="goodsInfo">
-            <view class="goods-name">{{ item.name }}</view>
-          </view>
-          <view class="goods-type">
-            <view class="goods-price">
-              <text class="stuff">¥</text>
-              <text class="priceZ">{{ item.integerPart }}</text>
-              <text class="priceF">.{{ item.decimalPart }}</text>
+<page-meta page-style="{{ addressListShow || addressShow || showArea ? 'overflow: hidden;' : '' }}" style="height: 100vh;">
+  <view class="container">
+    <navigation-bar title="{{ status === 'WAIT_PAY' ? '待支付' : '确认购买信息' }}"></navigation-bar>
+    <scroll-view class="record-list" type="list" scroll-y>
+      <view class="order-content">
+        <view class="goods-title">价格明细</view>
+        <view class="item-content" wx:for="{{ goodsInfo.goodsList }}" wx:key="index">
+          <image class='goods-icon' src="{{ item.pic }}" mode="" />
+          <view class="goods-desc">
+            <view class="goodsInfo">
+              <view class="goods-name">{{ item.name }}</view>
+            </view>
+            <view class="goods-type">
+              <view class="goods-price">
+                <text class="stuff">¥</text>
+                <text class="priceZ">{{ item.integerPart }}</text>
+                <text class="priceF">.{{ item.decimalPart }}</text>
+              </view>
+              <view class="origin-price">|日常价 ¥ {{item.originalPrice}}</view>
             </view>
-            <view class="origin-price">|日常价 ¥ {{item.originalPrice}}</view>
           </view>
         </view>
-      </view>
 
-      <view class="goodsInfos">
-        <view class="qrcode-line"></view>
-        <view class="goodsInfo-item">
-          <text class="title">合计</text>
+        <view class="goodsInfos">
+          <view class="qrcode-line"></view>
+          <view class="goodsInfo-item">
+            <text class="title">合计</text>
 
-          <view class="goods-price">
-            <text class="stuff">¥</text>
-            <text class="priceZ">{{ goodsInfo.integerPart }}</text>
-            <text class="priceF">.{{ goodsInfo.decimalPart }}</text>
+            <view class="goods-price">
+              <text class="stuff">¥</text>
+              <text class="priceZ">{{ goodsInfo.integerPart }}</text>
+              <text class="priceF">.{{ goodsInfo.decimalPart }}</text>
+            </view>
           </view>
-        </view>
 
-        <view class="goodsInfo-item" wx:if="{{ goodsInfo.allOriginPrice > goodsInfo.allSalePrice }}">
-          <text class="title">已省</text>
+          <view class="goodsInfo-item" wx:if="{{ goodsInfo.allOriginPrice > goodsInfo.allSalePrice }}">
+            <text class="title">已省</text>
 
-          <view class="calc-price">¥ {{ goodsInfo.allDiscountPrice }}</view>
-        </view>
+            <view class="calc-price">¥ {{ goodsInfo.allDiscountPrice }}</view>
+          </view>
 
-        <!-- <view class="qrcode-line"></view>
+          <!-- <view class="qrcode-line"></view>
 
         <view class="goodsInfo-count">
           <view class="goods-price">
@@ -49,56 +50,56 @@
             <text class="priceF">.{{ goodsInfo.decimalPart }}</text>
           </view>
         </view> -->
-      </view>
-
-    </view>
-    <view class="select-section" bind:tap="onTagAddress" wx:if="{{ !receiveAddress && hasInstrument }}" wx:key="receiveAddress">
-      <view class="name">请选择收货地址</view>
-      <image src="./images/icon-arrow.png" class="icon-arrow" />
-    </view>
-    <view class="select-section select-address" bind:tap="onTagAddress" wx:if="{{ receiveAddress }}" wx:key="receiveAddress">
-      <view class="address-info">
-        <view class="address-text">
-          {{ receiveAddressInfo.addressDetail }}
         </view>
-        <view class="address-user">
-          <text>{{ receiveAddressInfo.name }}</text>
-          <text>{{ receiveAddressInfo.phoneNumber }}</text>
+
+      </view>
+      <view class="select-section" bind:tap="onTagAddress" wx:if="{{ !receiveAddress && hasInstrument }}" wx:key="receiveAddress">
+        <view class="name">请选择收货地址</view>
+        <image src="./images/icon-arrow.png" class="icon-arrow" />
+      </view>
+      <view class="select-section select-address" bind:tap="onTagAddress" wx:if="{{ receiveAddress }}" wx:key="receiveAddress">
+        <view class="address-info">
+          <view class="address-text">
+            {{ receiveAddressInfo.addressDetail }}
+          </view>
+          <view class="address-user">
+            <text>{{ receiveAddressInfo.name }}</text>
+            <text>{{ receiveAddressInfo.phoneNumber }}</text>
+          </view>
         </view>
+        <image src="./images/icon-arrow.png" wx:if="{{ !goodsInfo.orderNo }}" class="icon-arrow" />
       </view>
-      <image src="./images/icon-arrow.png" wx:if="{{ !goodsInfo.orderNo }}" class="icon-arrow" />
-    </view>
 
 
-    <view class="select-section" wx:if="{{ !userBeneficiaryId }}" wx:key="userBeneficiaryId">
-      <view class="name">添加购买人</view>
-      <button class="add-buy-btn" bind:tap="onAddBuyer">添加</button>
-    </view>
-
-    <view class="select-section select-buy-user" wx:else wx:key="userBeneficiaryId">
-      <view class="title">
-        <view class="name">购买人信息</view>
-        <button class="add-buy-btn" bind:tap="onAddBuyer"  wx:if="{{ !goodsInfo.orderNo }}" data-type="update">修改</button>
+      <view class="select-section" wx:if="{{ !userBeneficiaryId }}" wx:key="userBeneficiaryId">
+        <view class="name">添加购买人</view>
+        <button class="add-buy-btn" bind:tap="onAddBuyer">添加</button>
       </view>
 
-      <view class="user-list">
-        <view class="user-item">
-          <view class="left-label">学生姓名</view>
-          <view class="right-value">{{ userBeneficiaryInfo.name }}</view>
+      <view class="select-section select-buy-user" wx:else wx:key="userBeneficiaryId">
+        <view class="title">
+          <view class="name">购买人信息</view>
+          <button class="add-buy-btn" bind:tap="onAddBuyer" wx:if="{{ !goodsInfo.orderNo }}" data-type="update">修改</button>
         </view>
-        <view class="user-item">
-          <view class="left-label">联系方式</view>
-          <view class="right-value">{{ userBeneficiaryInfo.phoneNumber }}</view>
-        </view>
-        <view class="user-item">
-          <view class="left-label">学校信息</view>
-          <view class="right-value">{{ userBeneficiaryInfo.schoolInfo }}</view>
+
+        <view class="user-list">
+          <view class="user-item">
+            <view class="left-label">学生姓名</view>
+            <view class="right-value">{{ userBeneficiaryInfo.name }}</view>
+          </view>
+          <view class="user-item">
+            <view class="left-label">联系方式</view>
+            <view class="right-value">{{ userBeneficiaryInfo.phoneNumber }}</view>
+          </view>
+          <view class="user-item">
+            <view class="left-label">学校信息</view>
+            <view class="right-value">{{ userBeneficiaryInfo.schoolInfo }}</view>
+          </view>
         </view>
       </view>
-    </view>
-  </scroll-view>
-  <view class="order-btn">
-    <!-- <view class="price">
+    </scroll-view>
+    <view class="order-btn">
+      <!-- <view class="price">
       <view class="desc">商品总价:</view>
       <view class="currentPrice">
         <text class="stuff">¥</text>
@@ -106,105 +107,106 @@
         <text class="priceF">.{{ goodsInfo.decimalPart }}</text>
       </view>
     </view> -->
-    <view class="btnGroup">
-      <button type="primary" bind:tap="onSubmit">
-        <view class="currentPrice">
-          <text class="before">合计</text>
-          <text class="stuff">¥</text>
-          <text class="priceZ">{{ goodsInfo.integerPart }}</text>
-          <text class="priceF">.{{ goodsInfo.decimalPart }}</text>
-          <text class="after">去支付</text>
-        </view>
-        <!-- {{ goodsInfo.orderNo ? '继续支付' : '立即支付' }} -->
+      <view class="btnGroup">
+        <button type="primary" bind:tap="onSubmit">
+          <view class="currentPrice">
+            <text class="before">合计</text>
+            <text class="stuff">¥</text>
+            <text class="priceZ">{{ goodsInfo.integerPart }}</text>
+            <text class="priceF">.{{ goodsInfo.decimalPart }}</text>
+            <text class="after">去支付</text>
+          </view>
+          <!-- {{ goodsInfo.orderNo ? '继续支付' : '立即支付' }} -->
 
-      </button>
-      <!-- <view class="btnInnerFree" wx:if="{{ goodsInfo.giftFlag }}">
+        </button>
+        <!-- <view class="btnInnerFree" wx:if="{{ goodsInfo.giftFlag }}">
         当天激活
         <text>赠{{goodsInfo.giftLongTime}}</text>
       </view> -->
+      </view>
     </view>
-  </view>
-  <service wx:if="{{serviceShow}}"></service>
+    <service wx:if="{{serviceShow}}"></service>
 
 
-  <van-popup show="{{ addressShow }}" safe-area-inset-bottom="{{false}}" lock-scroll="{{true}}" bind:close="onCloseAddress" position="bottom" round z-index="101">
-    <view class="top-bg"></view>
-    <image src="./images/icon-close1.png" class="icon-close" bind:tap="onCloseAddress" />
-    <view class="pop-address-title">
-      {{ id ? '修改收货地址' : '新增收货地址' }}
-    </view>
-
-    <van-cell-group border="{{ false }}" class="cell-group">
-      <van-field required model:value="{{ name }}" label="收货人姓名" placeholder="请输入收货人姓名" input-align="right" />
-      <van-field required model:value="{{ phoneNumber }}" label="联系方式" type="number" placeholder="请输入手机号码" input-align="right" maxlength="11" />
-      <van-field required value="{{ provinceName ? provinceName + ' ' + cityName + ' ' + regionName : '' }}" label="收货地区" placeholder="请选择地区" input-align="right" readonly is-link bind:tap="onShowAreaList" />
-      <van-field border="{{ false }}" model:value="{{ detailAddress }}" required label="详细地址" type="textarea" placeholder="请输入详细地址" input-align="right" input-class="textarea" />
-    </van-cell-group>
+    <van-popup show="{{ addressShow }}" safe-area-inset-bottom="{{false}}" lock-scroll="{{true}}" bind:close="onCloseAddress" position="bottom" round z-index="101">
+      <view class="top-bg"></view>
+      <image src="./images/icon-close1.png" class="icon-close" bind:tap="onCloseAddress" />
+      <view class="pop-address-title">
+        {{ id ? '修改收货地址' : '新增收货地址' }}
+      </view>
 
-    <view class="pop-btn-group">
-      <button class="submit-btn" bind:tap="onOperationAddress">确认</button>
-    </view>
-  </van-popup>
+      <van-cell-group border="{{ false }}" class="cell-group">
+        <van-field required model:value="{{ name }}" label="收货人姓名" placeholder="请输入收货人姓名" input-align="right" />
+        <van-field required model:value="{{ phoneNumber }}" label="联系方式" type="number" placeholder="请输入手机号码" input-align="right" maxlength="11" />
+        <van-field required value="{{ provinceName ? provinceName + ' ' + cityName + ' ' + regionName : '' }}" label="收货地区" placeholder="请选择地区" input-align="right" readonly is-link bind:tap="onShowAreaList" />
+        <van-field border="{{ false }}" model:value="{{ detailAddress }}" required label="详细地址" type="textarea" placeholder="请输入详细地址" input-align="right" input-class="textarea" />
+      </van-cell-group>
 
-  <van-popup show="{{ addressListShow }}" safe-area-inset-bottom="{{false}}" lock-scroll="{{true}}" bind:close="onCloseAddressList" position="bottom" round>
-    <view class="top-bg"></view>
-    <image src="./images/icon-close1.png" class="icon-close" bind:tap="onCloseAddressList" />
-    <view class="pop-address-title">
-      选择收货地址
-    </view>
+      <view class="pop-btn-group">
+        <button class="submit-btn" bind:tap="onOperationAddress">确认</button>
+      </view>
+    </van-popup>
 
-    <view class="address-list">
-      <view class="empty-box" wx:if="{{ addressList.length <= 0 }}">
-        <image src="https://oss.dayaedu.com/ktyq/1732182740363.png"></image>
-        <view class="empty-text">暂无收货地址</view>
+    <van-popup show="{{ addressListShow }}" safe-area-inset-bottom="{{false}}" lock-scroll="{{true}}" bind:close="onCloseAddressList" position="bottom" round catch:touchstart>
+      <view class="top-bg"></view>
+      <image src="./images/icon-close1.png" class="icon-close" bind:tap="onCloseAddressList" />
+      <view class="pop-address-title">
+        选择收货地址
       </view>
-      <view wx:for="{{ addressList }}" wx:key="index">
-        <view class="address-item {{ item.id === receiveAddress ? 'active' : '' }}" bind:tap="onSelectAddress" data-id="{{ item.id }}">
-          <view class="item-title">
-            {{ item.provinceName }}{{ item.cityName }}{{ item.regionName }}{{ item.detailAddress }}
-          </view>
 
-          <view class="item-users">
-            <view class="item-user">
-              <text>{{ item.name }}</text>
-              <text>{{ item.phoneNumber }}</text>
+      <view class="address-list">
+        <view class="empty-box" wx:if="{{ addressList.length <= 0 }}">
+          <image src="https://oss.dayaedu.com/ktyq/1732182740363.png"></image>
+          <view class="empty-text">暂无收货地址</view>
+        </view>
+        <view wx:for="{{ addressList }}" wx:key="index">
+          <view class="address-item {{ item.id === receiveAddress ? 'active' : '' }}" bind:tap="onSelectAddress" data-id="{{ item.id }}">
+            <view class="item-title">
+              {{ item.provinceName }}{{ item.cityName }}{{ item.regionName }}{{ item.detailAddress }}
             </view>
 
-            <view class="item-btn-group">
-              <button class="btn del-btn" catch:tap="onRemoveAddress" data-id="{{ item.id }}">删除</button>
-              <button class="btn update-btn" catch:tap="onUpdateAddress" data-id="{{ item.id }}">修改</button>
+            <view class="item-users">
+              <view class="item-user">
+                <text>{{ item.name }}</text>
+                <text>{{ item.phoneNumber }}</text>
+              </view>
+
+              <view class="item-btn-group">
+                <button class="btn del-btn" catch:tap="onRemoveAddress" data-id="{{ item.id }}">删除</button>
+                <button class="btn update-btn" catch:tap="onUpdateAddress" data-id="{{ item.id }}">修改</button>
+              </view>
             </view>
           </view>
         </view>
       </view>
-    </view>
 
 
-    <view class="pop-btn-group pop-btn-list">
-      <button class="submit-btn" bind:tap="onShowAddress">新增地址</button>
-    </view>
-  </van-popup>
+      <view class="pop-btn-group pop-btn-list">
+        <button class="submit-btn" bind:tap="onShowAddress">新增地址</button>
+      </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">
-    <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 }}" />
-    <view class="pop-btn-group">
-      <button class="submit-btn" bindtap="submitArea">确认</button>
-    </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">
+      <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 }}" />
+      <view class="pop-btn-group">
+        <button class="submit-btn" bindtap="submitArea">确认</button>
+      </view>
+    </van-popup>
 
-  <van-popup round lock-scroll="{{true}}" z-index="{{102}}" show="{{showDialog}}">
-    <view class="dialog-section">
-      <view class="dialog-title">是否确认删除该地址?</view>
+    <van-popup round lock-scroll="{{true}}" z-index="{{102}}" show="{{showDialog}}">
+      <view class="dialog-section">
+        <view class="dialog-title">是否确认删除该地址?</view>
 
-      <view class="dialog-btn-group">
-        <view class="btn" bind:tap="onDialogClose">取消</view>
-        <view class="btn del-btn" bind:tap="onDialogConfirm">删除</view>
+        <view class="dialog-btn-group">
+          <view class="btn" bind:tap="onDialogClose">取消</view>
+          <view class="btn del-btn" bind:tap="onDialogConfirm">删除</view>
+        </view>
       </view>
-    </view>
-  </van-popup>
-</view>
+    </van-popup>
+  </view>
+</page-meta>