diff --git a/property-uniapp-project/pages/activity-list/activityList.vue b/property-uniapp-project/pages/activity-list/activityList.vue index fbc086d..8972e17 100644 --- a/property-uniapp-project/pages/activity-list/activityList.vue +++ b/property-uniapp-project/pages/activity-list/activityList.vue @@ -330,12 +330,15 @@ // 返回 const narBack = () =>{ - // uni.navigateBack({ - // delta: 1 - // }) - uni.switchTab({ - url:"/pages/index/index" - }) + if(uni.getStorageSync('sourcePage') === "index"){ + uni.switchTab({ + url:"/pages/index/index" + }) + }else if(uni.getStorageSync('sourcePage') === "serviceIndex"){ + uni.switchTab({ + url:"/pages/serviceIndex/serviceIndex" + }) + } } // 切换选项卡 const switchTab = (tab) => { diff --git a/property-uniapp-project/pages/index/index.vue b/property-uniapp-project/pages/index/index.vue index e525a90..3606443 100644 --- a/property-uniapp-project/pages/index/index.vue +++ b/property-uniapp-project/pages/index/index.vue @@ -56,7 +56,7 @@ - + @@ -189,12 +189,13 @@ const activityList = ref([ const currentCommunity = ref('碧桂园小区') const bannerList = ref([ '/static/首页/banner.png', - '/static/bannar2.png' + ]) const noticeText = ref('公告公告本小区今天安装了摄像头') // =======方法======= const getNoticeMore = () =>{ + uni.setStorageSync('sourcePage',"index") uni.navigateTo({ url:"/pages/notice-list/noticeList" }) @@ -218,10 +219,18 @@ onUnload(() => { // 方法逻辑 const openDoorClick = () =>{ + uni.setStorageSync('sourcePage',"index") uni.navigateTo({ url:"/pages/notice-list/oneClickOpen" }) } +// 生活缴费 +const payMentClick =() =>{ + uni.setStorageSync('sourcePage',"index") + uni.navigateTo({ + url:"/pages/payment-list/paymentIndex" + }) +} const navigateToPage = () => { uni.navigateTo({ @@ -229,18 +238,21 @@ const navigateToPage = () => { }) } const onlineRepairClick = () =>{ + uni.setStorageSync('sourcePage',"index") uni.navigateTo({ url:'/pages/online-repair/onlineRepair' }) } // 访客邀请 const visitorClick = () =>{ + uni.setStorageSync('sourcePage',"index") uni.navigateTo({ url:"/pages/visitor/visitor-list" }) } // 活动列表的查看更多 const moreClick = () =>{ + uni.setStorageSync('sourcePage',"index") uni.navigateTo({ url:"/pages/activity-list/activityList" }) @@ -332,7 +344,7 @@ const moreClick = () =>{ } .noticeClass{ position: relative; - top: 167rpx; + top: 160rpx; left: 0; padding: 40rpx 36rpx; } @@ -349,7 +361,7 @@ const moreClick = () =>{ } .bg-card-open{ position: relative; - top: 102rpx; + top: 98rpx; left: 0; padding: 20rpx; background-color: #fff; @@ -382,7 +394,7 @@ const moreClick = () =>{ // margin-top: 30rpx; border-radius: 28rpx; position: relative; - top:50px; + top:45px; left: 0; .titleLeft{ text-align: left; @@ -400,7 +412,7 @@ const moreClick = () =>{ } .activity-card{ position: relative; - top: 45px; + top: 40px; left: 0; bottom: 20; } diff --git a/property-uniapp-project/pages/loginSub/pwd-login.vue b/property-uniapp-project/pages/loginSub/pwd-login.vue index 752013e..c7a65be 100644 --- a/property-uniapp-project/pages/loginSub/pwd-login.vue +++ b/property-uniapp-project/pages/loginSub/pwd-login.vue @@ -94,50 +94,6 @@ const checkForm = () => {}; onLoad(() =>{ }); -// const handleLogin = async () => { -// if (!canLogin.value) return; -// // 防止多次点击触发登录 -// // canLogin.value = false; - -// // // 2. 空值校验 -// if (!phoneNumber.value) { -// uni.showToast({ title: '请输入手机号', icon: 'none' }); -// // canLogin.value = true; -// return; -// } -// if (!password.value) { -// uni.showToast({ title: '请输入密码', icon: 'none' }); -// // canLogin.value = true; -// return; -// } - -// const params = { -// username: phoneNumber.value, -// password: password.value -// }; - -// try { -// // 3. 调用登录接口 -// const res = await getLoginPassword(params); - -// // 登录成功逻辑 -// // 如果后端返回token,这里保存 -// // uni.setStorageSync('token', res.token || ''); -// uni.showToast({ title: '登录成功', icon: 'success' }); -// // 登录成功后再跳转 -// setTimeout(() => { -// uni.switchTab({ url: '/pages/index/index' }); -// }, 1500); - -// } catch (err) { -// // 登录失败逻辑(所有错误:账号不存在/密码错/网络异常都走这里) -// uni.showToast({ title: `${err || '登录失败'}`, icon: 'none' }); - -// } finally { -// // 无论成功/失败,解锁按钮 -// canLogin.value = true; -// } -// }; // 登录逻辑 const handleLogin = () => { if (!canLogin.value) return @@ -145,16 +101,16 @@ const handleLogin = () => { username:phoneNumber.value, password:password.value } - if (!phoneNumber.value) { - uni.showToast({ title: '请输入手机号', icon: 'none' }); - // canLogin.value = true; - return; - } - if (!password.value) { - uni.showToast({ title: '请输入密码', icon: 'none' }); - // canLogin.value = true; - return; - } + // if (!phoneNumber.value) { + // uni.showToast({ title: '请输入手机号', icon: 'none' }); + // // canLogin.value = true; + // return; + // } + // if (!password.value) { + // uni.showToast({ title: '请输入密码', icon: 'none' }); + // // canLogin.value = true; + // return; + // } // getLoginPassword(params).then(res =>{ // // console.log('33333',res) // if(res.code === 200){ @@ -168,6 +124,9 @@ const handleLogin = () => { // } // }) + uni.showLoading({ + title: '登录中...' + }); setTimeout(() => { uni.switchTab({ url: '/pages/index/index' }); }, 1500); diff --git a/property-uniapp-project/pages/notice-list/noticeList.vue b/property-uniapp-project/pages/notice-list/noticeList.vue index 5c81f79..821cb76 100644 --- a/property-uniapp-project/pages/notice-list/noticeList.vue +++ b/property-uniapp-project/pages/notice-list/noticeList.vue @@ -122,12 +122,16 @@ } // 返回 const narBack = () =>{ - // uni.navigateBack({ - // delta: 1 - // }) - uni.switchTab({ - url:"/pages/index/index" - }) + if(uni.getStorageSync('sourcePage') === "index"){ + uni.switchTab({ + url:"/pages/index/index" + }) + }else if(uni.getStorageSync('sourcePage') === "serviceIndex"){ + uni.switchTab({ + url:"/pages/serviceIndex/serviceIndex" + }) + } + uni.removeStorageSync('sourcePage') } diff --git a/property-uniapp-project/pages/notice-list/oneClickOpen.vue b/property-uniapp-project/pages/notice-list/oneClickOpen.vue index 9966374..8132e6f 100644 --- a/property-uniapp-project/pages/notice-list/oneClickOpen.vue +++ b/property-uniapp-project/pages/notice-list/oneClickOpen.vue @@ -68,12 +68,17 @@ const selectDoor = (index) => { } // 返回 const narBack = () =>{ - // uni.navigateBack({ - // delta: 1 - // }) - uni.switchTab({ - url:"/pages/index/index" - }) + if(uni.getStorageSync('sourcePage') === "index"){ + uni.switchTab({ + url:"/pages/index/index" + }) + }else if(uni.getStorageSync('sourcePage') === "serviceIndex"){ + uni.switchTab({ + url:"/pages/serviceIndex/serviceIndex" + }) + } + uni.removeStorageSync('sourcePage') + } // 确认开门方法 const openDoor = () => { diff --git a/property-uniapp-project/pages/notice-list/selectHome.vue b/property-uniapp-project/pages/notice-list/selectHome.vue index 2a57810..4c7877b 100644 --- a/property-uniapp-project/pages/notice-list/selectHome.vue +++ b/property-uniapp-project/pages/notice-list/selectHome.vue @@ -164,7 +164,7 @@ const getCommunityList = () =>{ } onLoad(() =>{ - getCommunityList() + // getCommunityList() }) diff --git a/property-uniapp-project/pages/online-repair/onlineRepair.vue b/property-uniapp-project/pages/online-repair/onlineRepair.vue index 9b743ea..403f1ea 100644 --- a/property-uniapp-project/pages/online-repair/onlineRepair.vue +++ b/property-uniapp-project/pages/online-repair/onlineRepair.vue @@ -153,10 +153,17 @@ function personalClick(){ } // 返回上一页 const goBack = () => { - // uni.navigateBack() - uni.switchTab({ - url:"/pages/index/index" - }) + if(uni.getStorageSync('sourcePage') === "index"){ + uni.switchTab({ + url:"/pages/index/index" + }) + }else if(uni.getStorageSync('sourcePage') === "serviceIndex"){ + uni.switchTab({ + url:"/pages/serviceIndex/serviceIndex" + }) + } + uni.removeStorageSync('sourcePage') + } // 跳转报修详情 const goDetail = (item) => { diff --git a/property-uniapp-project/pages/online-repair/personalRepair.vue b/property-uniapp-project/pages/online-repair/personalRepair.vue index 332c672..adb6285 100644 --- a/property-uniapp-project/pages/online-repair/personalRepair.vue +++ b/property-uniapp-project/pages/online-repair/personalRepair.vue @@ -469,7 +469,7 @@ const submitForm = () => { } .time-value { - color: #007aff; + color: #000; } .input, .textarea { flex: 1; diff --git a/property-uniapp-project/pages/visitor/visitor-list.vue b/property-uniapp-project/pages/visitor/visitor-list.vue index 20f6d86..e1d41a2 100644 --- a/property-uniapp-project/pages/visitor/visitor-list.vue +++ b/property-uniapp-project/pages/visitor/visitor-list.vue @@ -123,10 +123,17 @@ const filterdList = computed(() => { }) // 返回上一页 const goBack = () => { - // uni.navigateBack() - uni.switchTab({ - url:"/pages/index/index" - }) + if(uni.getStorageSync('sourcePage') === "index"){ + uni.switchTab({ + url:"/pages/index/index" + }) + }else if(uni.getStorageSync('sourcePage') === "serviceIndex"){ + uni.switchTab({ + url:"/pages/serviceIndex/serviceIndex" + }) + } + uni.removeStorageSync('sourcePage') + } // 查看详情