修复已知bug

This commit is contained in:
zhouyanli
2026-07-21 09:41:54 +08:00
parent 7b1864f439
commit e68579a5d3
15 changed files with 1143 additions and 839 deletions

View File

@@ -55,7 +55,6 @@
<view style="border-bottom: 2rpx solid #ededed;margin:10rpx 0rpx;"></view> -->
<view class="arrears-row" v-if="outstandingPayment==true">
<text class="arrears-text">当前欠费金额¥{{ arrearsAmount }}</text>
<text class="auto-fill-btn" @click="handleAutoFill">点击自动填入</text>
</view>
<!-- <view class="arrears-row" v-if="outstandingPayment==false">
<text class="arrears-text">暂未查询到欠费</text>
@@ -76,7 +75,7 @@
<!-- 提示文案 -->
<view class="desc">
成功缴纳{{ switchStatus(paymentItem.type) || '' }}费用 ¥{{ payNum || payAmount }}
成功缴纳{{ switchStatus(paymentItem.type) || '' }}费用 ¥{{ arrearsAmount || payAmount }}
</view>
@@ -123,7 +122,6 @@
const currentStep = ref(1)
const payAmount = ref('0.00')
const arrearsAmount = ref('0.00')
const payNum = ref('')
// 页面加载时初始化数据
onLoad(() => {
@@ -165,13 +163,6 @@
}
}
// 自动填充欠费金额
const handleAutoFill = () => {
payNum.value = arrearsAmount.value
uni.vibrateShort({
type: 'light'
})
}
// 返回
const goBack = () => {
@@ -189,6 +180,7 @@
// })
// return
// }
const amount = arrearsAmount.value
try {
uni.showLoading({ title: '加载中...' })
@@ -200,7 +192,8 @@
const res = await getBankMiniProgramParams({
acct: uni.getStorageSync('userId'),
orderType: '20',
orderAmount: String(Math.round(Number(payNum.value) * 100)),
orderAmount: String(Math.round(Number(amount) * 100)),
// orderAmount: String(Math.round(Number(arrearsAmount.value) * 100)),
deviceCode: paymentItem.deviceCode || '',
deviceType: mappedDeviceType,
billId: paymentItem.billId || '',
@@ -215,7 +208,7 @@
return
}
console.log('resres返回数据', res)
console.log('resres', res.data)
// console.log('resres', res.data)
const { appId, path, extraData } = res.data
console.log('navigateToMiniProgram参数:', { appId, path, extraData })
@@ -228,19 +221,19 @@
}
// 解析 extraData后端返回可能是字符串或对象
// ' let extraDataObj = extraData
// if (typeof extraData === 'string') {
// try {
// extraDataObj = JSON.parse(extraData)
// } catch (e) {
// console.error('extraData JSON解析失败使用空对象', e)
// extraDataObj = {}
// }
// }
// if (!extraDataObj || typeof extraDataObj !== 'object') {
// extraDataObj = {}
// }'
/* let extraDataObj = extraData
if (typeof extraData === 'string') {
try {
extraDataObj = JSON.parse(extraData)
} catch (e) {
console.error('extraData JSON解析失败使用空对象', e)
extraDataObj = {}
}
}
if (!extraDataObj || typeof extraDataObj !== 'object') {
extraDataObj = {}
}
console.log('解析-----extraDataObj', extraDataObj) */
// #ifdef APP-PLUS
// 原生App通过微信SDK拉起小程序
plus.share.getServices((services) => {
@@ -253,12 +246,17 @@
uni.showToast({ title: '当前微信版本太低,不支持拉起小程序', icon: 'none' })
return
}
weixin.launchMiniProgram({
id: appId,
id: 'gh_4ba5e4fdaa83',
// appId:'00004951',
type: 1, // 0=正式版 1=测试版 2=预览版
path: path || '',
path: path,
// extMsg: JSON.stringify({ extraData: extraData })
extraData: extraData
}, (res) => {
console.log('ress-------------',res)
if (res.retCode === 'SUCCESS') {
console.log('成功拉起日照银行小程序App', res.retCode)
} else {
@@ -271,24 +269,24 @@
uni.showToast({ title: '拉起支付小程序失败', icon: 'none' })
})
})
// #endif
// #endif
// #ifdef MP-WEIXIN
// 微信小程序直接navigateToMiniProgram
uni.navigateToMiniProgram({
appId: appId,
path: path || '',
extraData: extraData,
envVersion: 'develop',
success: () => {
console.log('成功拉起日照银行小程序(微信)')
},
fail: (err) => {
console.error('拉起日照银行小程序失败(微信)', JSON.stringify(err))
uni.showToast({ title: err.errMsg || err.msg || '拉起支付小程序失败', icon: 'none' })
}
})
// #endif
// // #ifdef MP-WEIXIN
// // 微信小程序直接navigateToMiniProgram
// uni.navigateToMiniProgram({
// appId: appId,
// path: path || '',
// extraData: extraData,
// envVersion: 'develop',
// success: () => {
// console.log('成功拉起日照银行小程序(微信)')
// },
// fail: (err) => {
// console.error('拉起日照银行小程序失败(微信)', JSON.stringify(err))
// uni.showToast({ title: err.errMsg || err.msg || '拉起支付小程序失败', icon: 'none' })
// }
// })
// // #endif
} catch (err) {
uni.hideLoading()
console.error('获取支付参数异常', err)
@@ -304,7 +302,7 @@
userId: userId,
channel: 'resident',
title: '缴费成功',
content: `您已成功缴纳${switchStatus(paymentItem.type) || ''}费用 ¥${payNum.value || payAmount.value}`
content: `您已成功缴纳${switchStatus(paymentItem.type) || ''}费用 ¥${arrearsAmount.value || payAmount.value}`
}).catch(err => {
console.log('推送发送失败', err)
})