diff --git a/property-uniapp-project/manifest.json b/property-uniapp-project/manifest.json index 4ffa9d7..cabc741 100644 --- a/property-uniapp-project/manifest.json +++ b/property-uniapp-project/manifest.json @@ -25,7 +25,8 @@ "Gallery" : {}, "Push" : {}, "Barcode" : {}, - "Payment" : {} + "Payment" : {}, + "Bluetooth" : {} }, /* 应用发布信息 */ "distribute" : { @@ -83,7 +84,7 @@ "offline" : true, "icons" : { "small" : { - "mdpi" : "D:/图片文档/logo-app.png" + "mdpi" : "unpackage/res/icons/logo-app.png" } } } diff --git a/property-uniapp-project/pageSubPack/activity-list/activityList.vue b/property-uniapp-project/pageSubPack/activity-list/activityList.vue index 91dbb5d..7db8f68 100644 --- a/property-uniapp-project/pageSubPack/activity-list/activityList.vue +++ b/property-uniapp-project/pageSubPack/activity-list/activityList.vue @@ -83,7 +83,10 @@ - 活动名额{{ activity.quota }}人,已报名{{ activity.appliedCount }}人 + + 活动名额{{ activity.quota }}, + 已报名{{ activity.appliedCount }}人 + @@ -91,7 +94,7 @@ - diff --git a/property-uniapp-project/pageSubPack/activity-list/activityListDetails.vue b/property-uniapp-project/pageSubPack/activity-list/activityListDetails.vue index 61c5814..45af430 100644 --- a/property-uniapp-project/pageSubPack/activity-list/activityListDetails.vue +++ b/property-uniapp-project/pageSubPack/activity-list/activityListDetails.vue @@ -344,7 +344,7 @@ const confirmRegist = async () =>{ } }catch(err){ uni.showToast({ - title: "网络异常", + title: err.msg ||"网络异常", icon:"none" }) // console.error('报名失败:', err) @@ -393,7 +393,7 @@ const cancelActivityData = async () =>{ } }catch(err){ uni.showToast({ - title: "网络异常", + title: err.msg ||"网络异常", icon:"none" }) } @@ -415,7 +415,7 @@ const getLiveActivityList = async () =>{ } }catch(err){ uni.showToast({ - title: "网络异常", + title: err.msg ||"网络异常", icon:"none" }) } diff --git a/property-uniapp-project/pageSubPack/activity-list/live-add.vue b/property-uniapp-project/pageSubPack/activity-list/live-add.vue index 6679dfc..d45b06d 100644 --- a/property-uniapp-project/pageSubPack/activity-list/live-add.vue +++ b/property-uniapp-project/pageSubPack/activity-list/live-add.vue @@ -233,10 +233,10 @@ const submitStatus = async () => { uni.showToast({ title: '请输入实况描述', icon: 'none' }); return; } - // if (!activityId.value) { - // uni.showToast({ title: '活动ID缺失', icon: 'none' }); - // return; - // } + if (!location.value) { + uni.showToast({ title: '请先签到', icon: 'none' }); + return; + } uni.showLoading({ title: '提交中...', mask: true }); diff --git a/property-uniapp-project/pageSubPack/api/apiSub.js b/property-uniapp-project/pageSubPack/api/apiSub.js index c2ba05b..4e61519 100644 --- a/property-uniapp-project/pageSubPack/api/apiSub.js +++ b/property-uniapp-project/pageSubPack/api/apiSub.js @@ -134,6 +134,18 @@ export const getTopUpSelectByResident = (data) => { console.log(data); return get(`/api/topUp/selectByResident/${data.residentUserId}`, data) } + + + +// Zy ------------- +// 账单明细列表 +export const getTopUpDetails = (data) => { + return post(`/api/topUp/billDetails/list`, data) +} +// Zy -------------- + + + // 绑定设备 export const getTopUpBindDevice = (data) => { return post(`/api/topUp/bindDevice/${data.deviceCode}/${data.residentUserId}/${data.deviceType}`, data) diff --git a/property-uniapp-project/pageSubPack/my/addCar.vue b/property-uniapp-project/pageSubPack/my/addCar.vue index 5bd83bd..ad447fe 100644 --- a/property-uniapp-project/pageSubPack/my/addCar.vue +++ b/property-uniapp-project/pageSubPack/my/addCar.vue @@ -221,7 +221,7 @@ } catch (err) { uni.hideLoading() uni.showToast({ - title: err.msg || '上传失败', + title: err.msg || '网络异常', icon: 'none' }) } @@ -237,7 +237,8 @@ carModel: formData.value.carModel, carColor: formData.value.carColor, carImageUrl: imageUrl, - residentId: uni.getStorageSync('userId') + villageId:uni.getStorageSync('currentVillageId') + // residentId: uni.getStorageSync('userId') } diff --git a/property-uniapp-project/pageSubPack/my/myHouseIndex.vue b/property-uniapp-project/pageSubPack/my/myHouseIndex.vue index fde07e2..f010865 100644 --- a/property-uniapp-project/pageSubPack/my/myHouseIndex.vue +++ b/property-uniapp-project/pageSubPack/my/myHouseIndex.vue @@ -5,7 +5,7 @@ - + @@ -52,6 +52,10 @@ + + 没有更多了 + + @@ -75,40 +79,28 @@ const houseList = ref([]) - const loadingMore = ref(false) - const noMoreData = ref(false) - const isRefreshing = ref(false) - + const loading = ref(false) const pageNum = ref(1) const pageSize = ref(10) + const noMoreData = ref(false) // ==================== 获取列表数据 ==================== const getList = async () => { - // 防重复请求 - - if (loadingMore.value || noMoreData.value) return - - loadingMore.value = true + if (loading.value) return + loading.value = true try { const res = await getMyHouseList({ pageNum: pageNum.value, pageSize: pageSize.value }) - - const data = res - const newList = data.rows || [] - - // 第一页 → 覆盖数据 + const newList = res.rows || [] if (pageNum.value === 1) { houseList.value = newList } else { - // 后续页 → 追加数据 houseList.value = [...houseList.value, ...newList] } - // 判断是否没有更多数据 + // 不足一页说明没有更多数据了 if (newList.length < pageSize.value) { noMoreData.value = true - } else { - pageNum.value++ } } catch (err) { uni.showToast({ @@ -117,26 +109,21 @@ }) console.error('列表接口报错:', err) } finally { - loadingMore.value = false - // 关闭 refresher 下拉刷新状态 - if (isRefreshing.value) { - isRefreshing.value = false - } + loading.value = false } } - // ==================== 下拉刷新 ==================== - const onRefresh = () => { - isRefreshing.value = true - pageNum.value = 1 - noMoreData.value = false - houseList.value = [] - loadingMore.value = false + // ==================== 加载更多 ==================== + const loadMore = () => { + if (loading.value || noMoreData.value) return + pageNum.value++ getList() } // 页面加载时请求第一页 onMounted(() => { + pageNum.value = 1 + noMoreData.value = false getList() }) @@ -155,7 +142,7 @@ const data = res if (data.code === 200) { // uni.hideLoading(); - loadingMore.value = false + pageNum.value = 1 noMoreData.value = false getList() uni.setStorageSync('houseIsDefault', e.detail.value) @@ -173,7 +160,7 @@ } catch (err) { // uni.hideLoading(); uni.showToast({ - title: `${err}`, + title: err.msg, icon: 'none' }) console.error('列表接口报错:', err) @@ -253,6 +240,33 @@ margin-bottom: 10rpx; } + .no-more { + text-align: center; + padding: 30rpx 0; + color: #999; + font-size: 24rpx; + } + + .load-more-wrap { + padding: 20rpx 0 40rpx; + } + + .load-more-btn { + width: 100%; + height: 80rpx; + line-height: 80rpx; + background: #ffffff; + color: #007aff; + border: 1rpx solid #007aff; + border-radius: 12rpx; + font-size: 28rpx; + text-align: center; + } + + .load-more-btn::after { + border: none; + } + /* 底部按钮 */ .bottom-btn { padding: 20rpx 30rpx 40rpx; diff --git a/property-uniapp-project/pageSubPack/my/myParkingSpaceIndex.vue b/property-uniapp-project/pageSubPack/my/myParkingSpaceIndex.vue index dd4698a..4784cd3 100644 --- a/property-uniapp-project/pageSubPack/my/myParkingSpaceIndex.vue +++ b/property-uniapp-project/pageSubPack/my/myParkingSpaceIndex.vue @@ -103,7 +103,7 @@ const res = await getCarList({ pageNum: pageNum.value, pageSize: pageSize.value, - residentId: uni.getStorageSync('userId') + // residentId: uni.getStorageSync('userId') }) const data = res diff --git a/property-uniapp-project/pageSubPack/notice-list/noticeList.vue b/property-uniapp-project/pageSubPack/notice-list/noticeList.vue index 9733427..cec3b5e 100644 --- a/property-uniapp-project/pageSubPack/notice-list/noticeList.vue +++ b/property-uniapp-project/pageSubPack/notice-list/noticeList.vue @@ -174,7 +174,8 @@ page { .title { font-size: 32rpx; font-weight: bold; - width: 500rpx; + flex: 1; + min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -197,6 +198,19 @@ page { margin: 20rpx 0; background-color: #f9f9f9; padding: 24rpx; + word-break: break-all; + /* 按高度截断,避免 line-clamp 导致文字重叠 */ + max-height: 160rpx; + overflow: hidden; + + + /* 富文本里的图片不超出屏幕 */ + :deep(img), + :deep(image) { + max-width: 100% !important; + height: auto !important; + display: block; + } } .detail { display: flex; diff --git a/property-uniapp-project/pageSubPack/notice-list/noticeListDetails.vue b/property-uniapp-project/pageSubPack/notice-list/noticeListDetails.vue index 5efc773..c32ce99 100644 --- a/property-uniapp-project/pageSubPack/notice-list/noticeListDetails.vue +++ b/property-uniapp-project/pageSubPack/notice-list/noticeListDetails.vue @@ -21,8 +21,8 @@ - - + + @@ -279,6 +279,15 @@ margin-bottom: 20px; text-align: justify; text-indent: 2em; + + /* 富文本里的图片不超出屏幕 */ + :deep(img), + :deep(image) { + max-width: 100% !important; + height: auto !important; + display: block; + margin: 10px 0; + } } .bullet-list { diff --git a/property-uniapp-project/pageSubPack/payment-list/paymentIndex.vue b/property-uniapp-project/pageSubPack/payment-list/paymentIndex.vue index b7dbbc5..8e986c9 100644 --- a/property-uniapp-project/pageSubPack/payment-list/paymentIndex.vue +++ b/property-uniapp-project/pageSubPack/payment-list/paymentIndex.vue @@ -11,7 +11,6 @@ - @@ -27,6 +26,25 @@ + + + + + + + + {{switchStatus(item.type)}} + 已欠费 + + + {{item.name}} + + + + + @@ -81,7 +99,8 @@ import { getTopUpSelectByResident, postInsertOpenId, - postSubscribeAuth + postSubscribeAuth, + getTopUpDetails, } from '/pageSubPack/api/apiSub.js' // 响应式数据 const statusBarHeight = ref(20) @@ -102,13 +121,13 @@ // address: '山东省日照市东港区桂花园(别墅)2号楼2层', // icon: "https://wuyeadmin.bugtc.com/images/propertyImgs/heating.png", // }, - // { - // id: 3, - // name: '电费', - // status: '已欠费', - // address: '山东省日照市东港区桂花园(别墅)2号楼2层', - // icon: "https://wuyeadmin.bugtc.com/images/propertyImgs/electric.png", - // } + { + id: 3, + name: '电费', + status: '已欠费', + address: '山东省日照市东港区桂花园(别墅)2号楼2层', + icon: "https://wuyeadmin.bugtc.com/images/propertyImgs/electric.png", + } ]) const addList = ref([ @@ -168,6 +187,11 @@ } } onShow(() => { + + // Zy -------------- + getBillDetails() + // Zy -------------- + // 不再自动请求订阅消息,改为用户点击触发 }) // 生命周期 @@ -250,6 +274,30 @@ } uni.removeStorageSync('sourcePage') } + + + +// Zy -------------- + const detailslist = ref([]) + const getBillDetails = ()=>{ + getTopUpDetails({ + userId:uni.getStorageSync('userId'), + villageId:uni.getStorageSync('currentVillageId'), + }).then(res=>{ + console.log(res) + detailslist.value = res.data; + }) + } + const switchStatus= (type)=>{ + if(type === '0'){ + return "物业费" + }else if(type === '1'){ + return '车位费' + }else if(type === '2'){ + return '垃圾处理费' + } + } + // Zy --------------