From bea00772724c889a22e628e1d2070bbcb346ee61 Mon Sep 17 00:00:00 2001 From: zhouyanli <593579392@qq.com> Date: Tue, 16 Jun 2026 08:49:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=89=A9=E4=B8=9A=E8=B4=B9?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=A1=B5=E9=9D=A2=E3=80=81=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=8A=A5=E5=90=8D=E6=98=BE=E7=A4=BA=E3=80=81?= =?UTF-8?q?=E8=BD=A6=E4=BD=8D=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activity-list/activityList.vue | 6 +- .../pageSubPack/my/addCar.vue | 6 +- .../payment-list/addHydropower.vue | 54 +- .../payment-list/arrearsPayment.vue | 16 +- .../pageSubPack/payment-list/paymentIndex.vue | 60 +- .../payment-list/propertyFeePayment.vue | 633 ++++++++++++++++++ property-uniapp-project/pages.json | 7 + .../pages/myIndex/myIndex.vue | 2 +- 8 files changed, 719 insertions(+), 65 deletions(-) create mode 100644 property-uniapp-project/pageSubPack/payment-list/propertyFeePayment.vue diff --git a/property-uniapp-project/pageSubPack/activity-list/activityList.vue b/property-uniapp-project/pageSubPack/activity-list/activityList.vue index 7db8f68..a00d642 100644 --- a/property-uniapp-project/pageSubPack/activity-list/activityList.vue +++ b/property-uniapp-project/pageSubPack/activity-list/activityList.vue @@ -130,7 +130,7 @@ import { getActivityList,getMyActivityList} from '../api/api.js' // ===================== 响应式数据 ===================== const activeTab = ref('list') // 'list' 或 'my' -const myFilter = ref('') // 我的活动筛选条件:''审核中, '0'未开始, '1'进行中, '2'已结束 +const myFilter = ref('') // 我的活动筛选条件:''全部, '0'未开始, '1'进行中, '2'已结束 const isLoading = ref(false) const hasMoreData = ref(true) const currentPage = ref(1) @@ -241,7 +241,7 @@ const getActivityListData = async (pageNum = 1) => { if (pageNum === 1) displayedActivities.value = [] } } catch (err) { - uni.showToast({ title: "网络异常", icon: 'none' }) + uni.showToast({ title: err.msg || "网络异常", icon: 'none' }) if (pageNum === 1) displayedActivities.value = [] } finally { isLoading.value = false @@ -285,7 +285,7 @@ const getMyActivityListData = async (pageNum = 1) => { if (pageNum === 1) displayedActivities.value = [] } } catch (err) { - uni.showToast({ title: '网络异常', icon: 'none' }) + uni.showToast({ title: err.msg || '网络异常', icon: 'none' }) if (pageNum === 1) displayedActivities.value = [] } finally { isLoading.value = false diff --git a/property-uniapp-project/pageSubPack/my/addCar.vue b/property-uniapp-project/pageSubPack/my/addCar.vue index ad447fe..1dce18d 100644 --- a/property-uniapp-project/pageSubPack/my/addCar.vue +++ b/property-uniapp-project/pageSubPack/my/addCar.vue @@ -137,7 +137,7 @@ } catch (err) { uni.showToast({ - title: `${err}`, + title: err.msg || '网络异常', icon: 'none' }) console.error('列表接口报错:', err) @@ -237,8 +237,8 @@ carModel: formData.value.carModel, carColor: formData.value.carColor, carImageUrl: imageUrl, - villageId:uni.getStorageSync('currentVillageId') - // residentId: uni.getStorageSync('userId') + // villageId:uni.getStorageSync('currentVillageId') + residentId: uni.getStorageSync('userId') } diff --git a/property-uniapp-project/pageSubPack/payment-list/addHydropower.vue b/property-uniapp-project/pageSubPack/payment-list/addHydropower.vue index b5f8972..19e0f93 100644 --- a/property-uniapp-project/pageSubPack/payment-list/addHydropower.vue +++ b/property-uniapp-project/pageSubPack/payment-list/addHydropower.vue @@ -102,33 +102,35 @@ onMounted(() => {}) // 扫码 - const scanCode = async () => { - try { - uni.showLoading({ - title: '扫码中...', - mask: true - }) + const scanCode = () => { + // uni.showLoading({ + // title: '扫码中...', + // mask: true + // }) - const res = await uni.scanCode({ - onlyFromCamera: false, - scanType: ['qrCode', 'barCode'] - }) - - // 扫码成功,赋值 - deviceNo.value = res.result - uni.hideLoading() - uni.showToast({ - title: '扫码成功', - icon: 'success' - }) - } catch (err) { - uni.hideLoading() - console.log('扫码失败', err) - uni.showToast({ - title: '扫码取消/失败', - icon: 'none' - }) - } + uni.scanCode({ + onlyFromCamera: false, + scanType: ['qrCode', 'barCode'], + success: (res) => { + // uni.hideLoading() + console.log('扫码成功', res) + // 过滤模拟器/调试模式返回的 mock 数据 + if (!res.result || res.result.toUpperCase() === 'TEST') { + uni.showToast({ title: '扫码识别失败,请手动输入设备号', icon: 'none' }) + return + } + deviceNo.value = res.result + uni.showToast({ title: '扫码成功', icon: 'success' }) + }, + fail: (err) => { + // uni.hideLoading() + console.log('扫码失败', err) + uni.showToast({ title: '扫码取消/失败', icon: 'none' }) + }, + complete: () => { + // uni.hideLoading() + } + }) } // 提交缴费 diff --git a/property-uniapp-project/pageSubPack/payment-list/arrearsPayment.vue b/property-uniapp-project/pageSubPack/payment-list/arrearsPayment.vue index e2e1cf7..1db9aa2 100644 --- a/property-uniapp-project/pageSubPack/payment-list/arrearsPayment.vue +++ b/property-uniapp-project/pageSubPack/payment-list/arrearsPayment.vue @@ -1,7 +1,7 @@