lex-xin 1 день назад
Родитель
Сommit
876f7fd664

+ 7 - 0
miniprogram/api/login.ts

@@ -47,6 +47,13 @@ export const api_executeOrder = (params: any) => {
     data: params,
   } as any);
 };
+export const api_executeOrderV2 = (params: any) => {
+  return request({
+    url: `/edu-app/userPaymentOrder/miniProgramExecuteOrderV2`,
+    method: "post",
+    data: params,
+  } as any);
+};
 
 /** 用户下单 */
 export const api_executePayment = (params: any) => {

+ 52 - 38
miniprogram/pages/orders/order-detail.less

@@ -3,7 +3,7 @@ page {
   height: 100vh;
   display: flex;
   flex-direction: column;
-  background: #F4F4F4;
+  background: #f4f4f4;
 }
 
 .container {
@@ -17,7 +17,6 @@ page {
   box-sizing: border-box;
 }
 
-
 .order-content {
   margin: 24rpx 26rpx 0;
   border-radius: 20rpx;
@@ -28,7 +27,7 @@ page {
   .goods-title {
     font-weight: 600;
     font-size: 30rpx;
-    color: #502F00;
+    color: #502f00;
     line-height: 42rpx;
     padding: 0 0 32rpx;
   }
@@ -38,7 +37,7 @@ page {
   display: flex;
   width: 100%;
 
-  &+.item-content {
+  & + .item-content {
     padding-top: 60rpx;
   }
 
@@ -99,7 +98,7 @@ page {
   .origin-price {
     font-weight: 400;
     font-size: 24rpx;
-    color: #6D4718;
+    color: #6d4718;
     line-height: 1;
 
     text {
@@ -137,20 +136,25 @@ page {
 
   .qrcode-line {
     position: relative;
-    background: linear-gradient(to right, transparent 50%, rgba(242, 242, 242, 1) 50%) repeat-x; // 设置水平方向的线性渐变,透明与半透明色交替,模拟虚线线段
+    background: linear-gradient(
+        to right,
+        transparent 50%,
+        rgba(242, 242, 242, 1) 50%
+      )
+      repeat-x; // 设置水平方向的线性渐变,透明与半透明色交替,模拟虚线线段
     background-size: 6px 1px; // 设置背景大小,控制虚线的线段长度和粗细,这里线段长度为10px,粗细为1px
     height: 2rpx; // 元素高度,可根据实际需求调整,用于展示虚线效果的高度范围
     // margin: 42rpx 0 32rpx;
 
     &::before,
     &::after {
-      content: '';
+      content: "";
       position: absolute;
       top: -20rpx;
       display: block;
       width: 40rpx;
       height: 40rpx;
-      background-color: #F4F4F4;
+      background-color: #f4f4f4;
       border-radius: 50%;
     }
 
@@ -201,7 +205,7 @@ page {
   .calc-price {
     font-weight: bold;
     font-size: 28rpx;
-    color: #FF0047;
+    color: #ff0047;
     line-height: 32rpx;
   }
 }
@@ -278,6 +282,15 @@ page {
 
 .addPhone {
   padding: 12rpx;
+  .van-field__label {
+    font-weight: 600;
+    color: #666666;
+    width: 200rpx;
+  }
+  .van-cell__title {
+    max-width: 5em !important;
+    min-width: 5em !important;
+  }
 }
 
 .select-address {
@@ -337,10 +350,10 @@ page {
     width: 100%;
     justify-content: space-between;
     padding-bottom: 32rpx;
-    border-bottom: 2rpx solid #F2F2F2;
+    border-bottom: 2rpx solid #f2f2f2;
 
     .name {
-      color: #502F00;
+      color: #502f00;
     }
   }
 
@@ -380,7 +393,7 @@ page {
   margin: 24rpx 26rpx 0;
   border-radius: 20rpx;
   // padding: 36rpx 24rpx;
-  background-color: #FFFFFF;
+  background-color: #ffffff;
 
   .order-item {
     display: flex;
@@ -388,7 +401,7 @@ page {
     // padding-bottom: 36rpx;
     padding: 36rpx 0;
     margin: 0 24rpx;
-    border-bottom: 2rpx solid #F0F0F0;
+    border-bottom: 2rpx solid #f0f0f0;
 
     &:last-child {
       border-bottom: none;
@@ -408,7 +421,7 @@ page {
       display: flex;
 
       &.red {
-        color: #FE2451;
+        color: #fe2451;
       }
 
       .copy {
@@ -419,11 +432,11 @@ page {
         align-items: center;
 
         &::before {
-          content: '';
+          content: "";
           display: block;
           width: 2rpx;
           height: 22rpx;
-          background: #DCDCDC;
+          background: #dcdcdc;
           margin: 0 16rpx;
         }
       }
@@ -516,7 +529,7 @@ page {
 
     .currentPrice {
       font-weight: bold;
-      color: #FBEAC9;
+      color: #fbeac9;
       font-family: DINAlternate, DINAlternate;
       display: flex;
       align-items: flex-end;
@@ -575,7 +588,7 @@ page {
   left: 0;
   width: 100%;
   height: 49px;
-  background: linear-gradient(180deg, #FBEAD0 0%, #FFFFFF 100%);
+  background: linear-gradient(180deg, #fbead0 0%, #ffffff 100%);
   border-radius: 16px 16px 0rpx 0rpx;
 }
 
@@ -606,7 +619,7 @@ page {
     padding: 13px 14px !important;
     font-size: 15px !important;
     // line-height: 42rpx !important;
-    --cell-line-height: 21px!important;
+    --cell-line-height: 21px !important;
   }
 
   .required {
@@ -614,7 +627,7 @@ page {
     color: #666666;
 
     text {
-      color: #FF5A56;
+      color: #ff5a56;
     }
   }
 
@@ -624,7 +637,7 @@ page {
   }
 
   .van-icon-arrow {
-    color: #CCCCCC;
+    color: #cccccc;
     font-weight: 600;
   }
 
@@ -636,7 +649,7 @@ page {
 .van-picker-column__item--selected {
   font-weight: 600;
   font-size: 16px;
-  color: #6D4718 !important;
+  color: #6d4718 !important;
 }
 
 .pop-btn-group {
@@ -648,11 +661,11 @@ page {
   margin: 0 !important;
   padding: 0 !important;
   line-height: 44px;
-  background: linear-gradient(90deg, #544F4A 0%, #302F2B 100%);
+  background: linear-gradient(90deg, #544f4a 0%, #302f2b 100%);
   border-radius: 44px;
   font-weight: 500;
   font-size: 16px;
-  color: #FBEAC9;
+  color: #fbeac9;
 }
 
 .address-list {
@@ -664,13 +677,13 @@ page {
 
 .address-item {
   padding: 24rpx;
-  background: #FFFFFF;
+  background: #ffffff;
   border-radius: 20rpx;
-  border: 2px solid #F2F2F2;
+  border: 2px solid #f2f2f2;
   margin-bottom: 22rpx;
 
   &.active {
-    border: 2px solid #855F2E;
+    border: 2px solid #855f2e;
   }
 
   .item-title {
@@ -725,13 +738,13 @@ page {
         font-weight: 600;
         font-size: 12px;
         color: #333333;
-        border: 2rpx solid #DCDCDC;
+        border: 2rpx solid #dcdcdc;
         background-color: #fff;
       }
 
       .update-btn {
-        background: linear-gradient(90deg, #544F4A 0%, #302F2B 100%);
-        color: #FBEAC9;
+        background: linear-gradient(90deg, #544f4a 0%, #302f2b 100%);
+        color: #fbeac9;
         border: none !important;
         line-height: 24px;
       }
@@ -741,7 +754,7 @@ page {
 
 .pop-btn-list {
   padding-top: 20rpx;
-  box-shadow: inset 0rpx 2rpx 0rpx 0rpx #F0F0F0;
+  box-shadow: inset 0rpx 2rpx 0rpx 0rpx #f0f0f0;
 }
 
 .dialog-section {
@@ -757,7 +770,7 @@ page {
   }
 
   .dialog-btn-group {
-    border-top: 2rpx solid #F2F2F2;
+    border-top: 2rpx solid #f2f2f2;
     display: flex;
     align-items: center;
 
@@ -770,17 +783,18 @@ page {
     }
 
     .del-btn {
-      color: #6D4718;
-      border-left: 2rpx solid #F2F2F2;
+      color: #6d4718;
+      border-left: 2rpx solid #f2f2f2;
     }
   }
 }
 
-
 .empty-box {
   text-align: center;
   font-size: 32rpx;
-  font-family: PingFangSC-Regular, PingFang SC;
+  font-family:
+    PingFangSC-Regular,
+    PingFang SC;
   font-weight: 400;
   color: #999999;
   padding-bottom: 32rpx;
@@ -792,9 +806,9 @@ page {
 
   .empty-text {
     font-size: 28rpx;
-    color: #AAA;
+    color: #aaa;
     line-height: 40rpx;
     text-align: center;
     padding-top: 36rpx;
   }
-}
+}

+ 3 - 3
miniprogram/pages/orders/order-detail.ts

@@ -1,5 +1,5 @@
 // pages/orders/order-detail.ts
-import { api_executeOrder, api_executePayment, api_queryByParamName, api_userPaymentOrderDetail, api_userPaymentOrderUnpaid } from "../../api/login";
+import { api_executeOrder, api_executeOrderV2, api_executePayment, api_queryByParamName, api_userPaymentOrderDetail, api_userPaymentOrderUnpaid } from "../../api/login";
 import { api_sysAreaQueryAllProvince, api_trackPointLog, api_userReceiveAddressPage, api_userReceiveAddressRemove, api_userReceiveAddressSave, api_userReceiveAddressUpdate } from "../../api/new";
 import { formatPrice, formatTime, GRADE_ENUM } from "../../utils/util";
 
@@ -382,7 +382,7 @@ Page({
           this.onPayError()
         }
       } else {
-        const { data } = await api_executeOrder({
+        const { data } = await api_executeOrderV2({
           "orderType": "WECHAT_MINI",
           "paymentType": this.data.paymentType,
           "paymentCashAmount": allSalePrice,
@@ -396,7 +396,7 @@ Page({
           "orderName": name,
           "orderDesc": name
         })
-        
+
         if (data.code === 200) {
           const { paymentConfig, paymentType, orderNo } = data.data
           this.onExecutePay(paymentConfig, paymentType, orderNo)

+ 2 - 1
miniprogram/pages/orders/order-detail.wxml

@@ -71,7 +71,8 @@
       </view>
 
       <view class="select-section addPhone" wx:if="{{!goodsInfo.orderNo}}">
-        <van-field style="width: 100%" border="{{false}}" model:value="{{ userNote }}" maxlength="11" type="number" placeholder="请输入购买人手机号" >
+        <van-field border="{{false}}" model:value="{{ userNote }}" maxlength="11" type="number" placeholder="请输入购买人手机号" >
+          <view class="required" slot="label">手机号</view>
         </van-field>
       </view>
       <!-- <view class="select-section" wx:if="{{ !userBeneficiaryId }}" wx:key="userBeneficiaryId">