Browse Source

fix(充值页面): 将输入框类型改为digit并更新支付接口

将充值页面的输入框类型从`text`改为`digit`,以确保用户只能输入数字。同时,将支付接口从`cashIn`替换为`teacherPayPrice`,并更新相关参数以匹配新的接口要求。
master
前端-胡立永 1 month ago
parent
commit
7118857210
2 changed files with 42 additions and 30 deletions
  1. +36
    -24
      api/amount/index.js
  2. +6
    -6
      otherPages/myOrdersManage/bond/index.vue

+ 36
- 24
api/amount/index.js View File

@ -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
})
}

+ 6
- 6
otherPages/myOrdersManage/bond/index.vue View File

@ -18,7 +18,7 @@
<view class="level Recharge">
<view class="money level">
<text>¥</text>
<input v-model="money" type="text" />
<input v-model="money" type="digit" />
</view>
<view class="text2" :style="{ borderRadius: '23.5rpx' }" @click="onPay">
去充值
@ -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)
})
</script>


Loading…
Cancel
Save