This commit is contained in:
zpc 2025-12-02 14:05:38 +08:00
parent 566df7f3b9
commit 65696dff7c
2 changed files with 42 additions and 12 deletions

View File

@ -6,11 +6,11 @@
// 开发环境配置
const development = {
// API基础URL
baseUrl: 'https://sqqp.zpc-xy.com',
// baseUrl: 'https://sqqp.zpc-xy.com',
// baseUrl: 'http://1.15.21.245:2401',
host: ['https://sqqp.zpc-xy.com'],
// baseUrl: 'http://192.168.1.21:2016',
// host: ['http://192.168.1.21:2016'],
// host: ['https://sqqp.zpc-xy.com'],
baseUrl: 'http://192.168.1.21:2016',
host: ['http://192.168.1.21:2016'],
imageUrl: 'https://guyu-1308826010.cos.ap-shanghai.myqcloud.com',
};

View File

@ -96,9 +96,15 @@
<card-container marginTop="30rpx">
<label-slect-field label="鸽子费">
<com-appointment-radio-select :options="depositOptions" v-model="reservationInfo.deposit_fee" />
</label-slect-field>
<label-slect-field label="鸽子费">
<com-appointment-radio-select :options="depositOptions" v-model="reservationInfo.deposit_fee" />
</label-slect-field>
<view v-if="reservationInfo.deposit_fee === -1" :style="{ height: lineHeight }"></view>
<label-slect-field v-if="reservationInfo.deposit_fee === -1" label="金额">
<view class="input-wrapper">
<up-input type="number" placeholder="请输入0-50" v-model="customDeposit" @input="onCustomDepositInput"></up-input>
</view>
</label-slect-field>
<view :style="{ height: lineHeight }"></view>
<text class="note-text">鸽子费保证金参与人需缴纳鸽子费若有参与者在预约后没有赴约其鸽子费由在场的所有人平分组局成功或失败后鸽子费将全额返还</text>
</card-container>
@ -396,9 +402,21 @@ const depositOptions = ref([
{ value: 0, text: '0元' },
{ value: 5, text: '5元' },
{ value: 10, text: '10元' },
{ value: -1, text: '自定义' },
])
const currentValue = ref(0)
const customDeposit = ref('')
const onCustomDepositInput = (val) => {
//
let v = String(val).replace(/[^0-9]/g, '')
if (v === '') v = '0'
let n = Number(v)
if (n > 50) n = 50
if (n < 0) n = 0
customDeposit.value = String(n)
}
const increment = () => {
if (currentValue.value < 5) {
@ -522,7 +540,7 @@ const submitReservation = async () => {
}
try {
try {
var messageId = await getSubscribeMessage(reservationInfo.value.deposit_fee);
console.log("messageId", messageId);
var subscribeMessage = await requestSubscribeMessage(messageId);
@ -533,11 +551,23 @@ const submitReservation = async () => {
title: '提交中...'
})
//
const submitData = {
//
let finalDeposit = reservationInfo.value.deposit_fee
if (finalDeposit === -1) {
const n = Number(customDeposit.value || 0)
if (isNaN(n) || n < 0 || n > 50) {
uni.showToast({ title: '自定义金额需在0-50之间', icon: 'none' })
return
}
finalDeposit = n
}
//
const submitData = {
...reservationInfo.value,
//
credit_limit: currentValue.value,
credit_limit: currentValue.value,
deposit_fee: finalDeposit,
important_data: {}
}
@ -561,7 +591,7 @@ const submitReservation = async () => {
}
var resPay = null;
if (submitData.deposit_fee > 0) {
if (submitData.deposit_fee > 0) {
resPay = await usePay(submitData.deposit_fee);
if (resPay == null) {
uni.showToast({