6 Commits fab7f03f62 ... 23c5115801

Author SHA1 Message Date
  lex-wxl fab7f03f62 1 6 months ago
  lex-wxl 8dd886a78b Update index.less 6 months ago
  lex-wxl 120797e757 Update index.less 6 months ago
  lex-wxl 9430d3a8cf 优化样式 6 months ago
  lex-wxl 0433eb07c2 优化权益人手机号功能 6 months ago
  lex-wxl 5eff7d391c 优化图片地址 6 months ago

+ 0 - 9
miniprogram/api/login.ts

@@ -49,15 +49,6 @@ export const api_executeOrder = (params: any) => {
   } 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) => {
   return request({

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

@@ -990,26 +990,4 @@ page {
     text-align: center;
     padding-top: 18px;
   }
-}
-
-.addPhone {
-  margin: 24rpx 40rpx 24rpx;
-  border-bottom: 1px solid #F6F6F6;
-  border-radius: 20rpx;
-  overflow: hidden;
-
-  .van-cell {
-    padding-left: 0 !important;
-    padding-right: 0 !important;
-  }
-
-  .van-field__label {
-    font-size: 28rpx !important;
-    color: #131415 !important;
-    line-height: 40rpx;
-  }
-  .required {
-    font-size: 28rpx !important;
-    color: #131415 !important;
-  }
 }

+ 4 - 13
miniprogram/pages/index/index.ts

@@ -124,7 +124,6 @@ Page({
       value: '0',
       className: 'two-gender cancel-gender'
     }],
-    userNote: '', // 存储用户手机号
     userBeneficiaryId: '', // 选中用户的编号
     userBeneficiaryInfo: {
       name: '',
@@ -424,17 +423,10 @@ Page({
   onSubmit() {
     // 判断是否登录
     const that = this
-    // if (!this.data.userBeneficiaryId) {
-    //   wx.showToast({
-    //     title: '请填写享用者的个人信息',
-    //     icon: 'none'
-    //   })
-    //   return
-    // }
-    if (!this.data.userNote || !/^1[3456789]\d{9}$/.test(this.data.userNote)) {
+    if (!this.data.userBeneficiaryId) {
       wx.showToast({
-        title: '请输入正确的手机号',
-        icon: "none"
+        title: '请填写享用者的个人信息',
+        icon: 'none'
       })
       return
     }
@@ -478,8 +470,7 @@ Page({
       info = encodeURIComponent(info);
 
       wx.navigateTo({
-        // url: `../orders/order-detail?orderInfo=${info}&userBeneficiaryId=${that.data.userBeneficiaryId}`,
-        url: `../orders/order-detail?orderInfo=${info}&userNote=${that.data.userNote}`,
+        url: `../orders/order-detail?orderInfo=${info}&userBeneficiaryId=${that.data.userBeneficiaryId}`,
         success: () => {
           that.setData({
             popupShow: false

+ 3 - 9
miniprogram/pages/index/index.wxml

@@ -104,15 +104,9 @@
     <scroll-view class="popup-container" bounces="{{ false }}" enhanced scroll-y type="list">
       <!-- <view class="popup-container"> -->
       <view class="popup-scroll">
-        <image src="https://oss.dayaedu.com/ktyq/01/1767886728137.png" mode="widthFix" class="top-vip-img"></image>
-        <!-- 添加手机号 -->
-        <view class="addPhone">
-          <van-field border="{{false}}" model:value="{{ userNote }}" maxlength="11" type="number" placeholder="请输入权益人手机号" >
-            <view class="required" slot="label">手机号码</view>
-          </van-field>
-        </view>
+        <image src="https://oss.dayaedu.com/ktyq/1739242193106.png" mode="widthFix" class="top-vip-img"></image>
         <!-- 添加权益人 -->
-        <!-- <view class="addBuyer" bind:tap="onSelectBuyer">
+        <view class="addBuyer" bind:tap="onSelectBuyer">
           <view class="addBuyer-left">
             <image src="./images/icon-man.png" class="icon-man"></image>
             <view class="info" wx:if="{{ userBeneficiaryId }}">
@@ -129,7 +123,7 @@
             </view>
           </view>
           <image src="./images/icon-arrow-right.png" class="arrow-right"></image>
-        </view> -->
+        </view>
 
         <view class="goodsInfo">
           <view class="desc">会员有效期</view>

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

@@ -1,5 +1,5 @@
 // pages/orders/order-detail.ts
-import { api_executeOrderV2, api_executePayment, api_queryByParamName, api_userPaymentOrderDetail, api_userPaymentOrderUnpaid } from "../../api/login";
+import { api_executeOrder, api_executePayment, api_queryByParamName, api_userPaymentOrderDetail, api_userPaymentOrderUnpaid } from "../../api/login";
 import { api_sysAreaQueryAllProvince, api_userReceiveAddressPage, api_userReceiveAddressSave } from "../../api/new";
 import { formatPrice, GRADE_ENUM } from "../../utils/util";
 
@@ -30,7 +30,6 @@ Page({
       phoneNumber: ''
     },
     userBeneficiaryId: '', // 添加购买人信息
-    userNote: '', // 购买人手机号
     userBeneficiaryInfo: {
       name: '',
       phoneNumber: '',
@@ -125,7 +124,6 @@ Page({
       this.setData({
         goodsInfo: infos,
         userBeneficiaryId: options.userBeneficiaryId,
-        userNote: options.userNote,
         status: options.status || '',
         hasInstrument
       }, () => {
@@ -153,7 +151,6 @@ Page({
           phoneNumber: addresses?.phoneNumber
         },
         userBeneficiaryId: beneficiary.schoolAreaId, // 添加购买人信息
-        userNote: beneficiary.userNote, // 添加购买人手机号
         userBeneficiaryInfo: {
           name: beneficiary.name,
           phoneNumber: beneficiary.phone,
@@ -254,7 +251,7 @@ Page({
           this.onPayError()
         }
       } else {
-        const { data } = await api_executeOrderV2({
+        const { data } = await api_executeOrder({
           orderType: "WECHAT_MINI",
           paymentType: this.data.paymentType,
           paymentCashAmount: allSalePrice,
@@ -263,8 +260,7 @@ Page({
           openId: app.globalData.userInfo?.liteOpenid,
           goodsInfos: goodsInfos,
           receiveAddress: this.data.receiveAddress,
-          // userBeneficiaryId: this.data.userBeneficiaryId,
-          userNote: this.data.userNote,
+          userBeneficiaryId: this.data.userBeneficiaryId,
           orderName: name,
           orderDesc: name
         })