From 71188572109a2fa5b42e0ee9986bde1111cb1764 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Sun, 20 Apr 2025 23:04:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=85=85=E5=80=BC=E9=A1=B5=E9=9D=A2):=20?= =?UTF-8?q?=E5=B0=86=E8=BE=93=E5=85=A5=E6=A1=86=E7=B1=BB=E5=9E=8B=E6=94=B9?= =?UTF-8?q?=E4=B8=BAdigit=E5=B9=B6=E6=9B=B4=E6=96=B0=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将充值页面的输入框类型从`text`改为`digit`,以确保用户只能输入数字。同时,将支付接口从`cashIn`替换为`teacherPayPrice`,并更新相关参数以匹配新的接口要求。 --- api/amount/index.js | 60 +++++++++++++++++++------------- otherPages/myOrdersManage/bond/index.vue | 12 +++---- 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/api/amount/index.js b/api/amount/index.js index fa3acb7..a52a692 100644 --- a/api/amount/index.js +++ b/api/amount/index.js @@ -3,36 +3,48 @@ import request from '@/utils/request' // 小程序-金额流水信息列表数据查询 export const amountLogList = (params) => { - return request({ - url: '/applet/amount/amountLogList', - headers: { - isToken: true - }, - method: "get", - params - }) + return request({ + url: '/applet/amount/amountLogList', + headers: { + isToken: true + }, + method: "get", + params + }) } // 小程序-充值 export const cashIn = (data) => { - return request({ - url: '/applet/amount/cashIn', - headers: { - isToken: true - }, - method: "post", - data - }) + return request({ + url: '/applet/amount/cashIn', + headers: { + isToken: true + }, + method: "post", + data + }) } // 小程序-提现 export const cashOut = (data) => { - return request({ - url: '/applet/amount/cashOut', - headers: { - isToken: true - }, - method: "post", - data - }) + return request({ + url: '/applet/amount/cashOut', + headers: { + isToken: true + }, + method: "post", + data + }) +} + +// 小程序-缴纳保证金 +export const teacherPayPrice = (data) => { + return request({ + url: '/applet/UserTeacher/payPrice', + headers: { + isToken: true + }, + method: "post", + data + }) } \ No newline at end of file diff --git a/otherPages/myOrdersManage/bond/index.vue b/otherPages/myOrdersManage/bond/index.vue index f2d46dd..e6145c5 100644 --- a/otherPages/myOrdersManage/bond/index.vue +++ b/otherPages/myOrdersManage/bond/index.vue @@ -18,7 +18,7 @@ ¥ - + 去充值 @@ -43,7 +43,8 @@ computed } from 'vue' import { - cashIn + cashIn, + teacherPayPrice, } from '@/api/amount/index.js' import { useStore @@ -78,10 +79,9 @@ icon: "none" }) } - let response = await cashIn({ + let response = await teacherPayPrice({ money: money.value, - type: 1, - userId: userInfo.value.userId + memberId: userInfo.value.userId }) if (response.code == 200) { uni.showToast({ @@ -92,7 +92,7 @@ } onShow(() => { - money.value = Number(configList.value.pet_money.pet_money_text) + // money.value = Number(configList.value.pet_money.pet_money) })