diff --git a/common/config.js b/common/config.js
index a6f0024..73222e1 100644
--- a/common/config.js
+++ b/common/config.js
@@ -1,7 +1,7 @@
// 全局配置文件
// let baseUrl = 'http://219.138.32.164:8089';
-// let baseUrl = 'http://localhost:3000/api';
-// let staticUrl = 'http://localhost:3000';
+// let baseUrl = 'http://localhost:8089';
+// let staticUrl = 'http://localhost:3080';
let baseUrl = 'https://www.wujiaguotou.com/api';
let staticUrl = 'https://www.wujiaguotou.com';
// 版本号 用于更新
diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index 650f7d1..a3fbd4c 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -5,25 +5,22 @@ const install = (Vue, vm) => {
Vue.prototype.$u.http.setConfig({
// baseUrl打包app时放开,h5模式下会和vue.config.js代理冲突,导致失效
baseUrl: config.baseUrl,
- originalData:true,
+ originalData: true,
timeout: 10000,
});
// 请求拦截,配置Token等参数
Vue.prototype.$u.http.interceptor.request = (config) => {
- // config.header.Token = '5d33018e653d897fc259b42cf022c1b3';
- // 方式一,存放在vuex的token,假设使用了uView封装的vuex方式,见:https://uviewui.com/components/globalVariable.html
- // 自定义token头
// 1️⃣ 获取本地 userInfo
const userInfo = uni.getStorageSync('userInfo') || {};
// 2️⃣ 提取 userType
- const userType = userInfo.userType;
- config.header = {
- ...config.header, // ⭐ 保留你外部传入的 header
- 'content-type': 'application/json',
- ...(userType ? { 'USERTYPE': userType } : {}) // 有 userType 才加
- }
- return config;
+ const userType = userInfo.userType;
+ config.header = {
+ ...config.header, // ⭐ 保留外部传入的 header
+ 'content-type': 'application/json',
+ ...(userType ? { 'USERTYPE': userType } : {}) // 有 userType 才加
+ }
+ return config;
};
// 响应拦截,判断状态码是否通过
Vue.prototype.$u.http.interceptor.response = (res) => {
@@ -34,17 +31,19 @@ const install = (Vue, vm) => {
} else if(res.statusCode == 301) {
vm.$u.toast('警告:' + res.msg);
return false;
- } else if(res.statusCode == 401) {
- uni.navigateTo({
- url:'/pages-biz/login/login'
- })
- vm.$u.toast('认证失败,请重新登录')
- return false;
- } else if(res.statusCode == 403) {
- uni.navigateTo({
- url:'/pages-biz/login/login'
- })
- vm.$u.toast('认证失败,请重新登录')
+ } else if(res.statusCode == 401 || res.statusCode == 403) {
+ const currentPage = vm.$route.path;
+ // 判断当前页面是否为登录页
+ // 登录成功修改token与用户信息
+ vm.$u.vuex('vuex_token', '');
+ vm.$u.vuex('vuex_user', {});
+ uni.removeStorageSync('userInfo');
+ if (currentPage !== '/pages-biz/login/login') {
+ uni.navigateTo({
+ url: '/pages-biz/login/login'
+ });
+ vm.$u.toast('认证失败,请重新登录');
+ }
return false;
} else if(res.statusCode == 500) {
vm.$u.toast('请求错误:' + res.msg);
@@ -56,21 +55,19 @@ const install = (Vue, vm) => {
}
};
-
- Vue.prototype.$u.http.interceptor.responseError = (err) => {
- // err 是 uni.request 的 fail 对象
- // 超时一般是 err.errMsg 包含 timeout
-
- if (err.errMsg && err.errMsg.includes('timeout')) {
- vm.$u.toast('请求超时,请稍后重试');
- } else {
- vm.$u.toast('网络异常,请检查网络');
- }
-
- return Promise.reject(err);
- };
+ // 请求错误拦截(超时/网络异常)
+ Vue.prototype.$u.http.interceptor.responseError = (err) => {
+ // err 是 uni.request 的 fail 对象
+ // 超时一般是 err.errMsg 包含 timeout
+ if (err.errMsg && err.errMsg.includes('timeout')) {
+ vm.$u.toast('请求超时,请稍后重试');
+ } else {
+ vm.$u.toast('网络异常,请检查网络');
+ }
+ return Promise.reject(err);
+ };
}
export default {
install
-}
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/common/utils/searchData.js b/common/utils/searchData.js
index 5af177d..6022c6b 100644
--- a/common/utils/searchData.js
+++ b/common/utils/searchData.js
@@ -46,40 +46,40 @@ export default [
// },
// ]
// },
- {
- "name": '租金',
- "type": 'hierarchy',
- "submenu": [
- {
- "name": "不限",
- "value": ""
- },
- {
- "name": "<1000元",
- "value": "0-1000"
- },
- {
- "name": "1000-1500元",
- "value": "1000-1500"
- },
- {
- "name": "1500-2000元",
- "value": "1500-2000"
- },
- {
- "name": "2000-3000元",
- "value": "2000-3000"
- },
- {
- "name": "3000-4500元",
- "value": "3000-4500"
- },
- {
- "name": ">4500元",
- "value": "4500"
- }
- ]
- },
+ // {
+ // "name": '租金',
+ // "type": 'hierarchy',
+ // "submenu": [
+ // {
+ // "name": "不限",
+ // "value": ""
+ // },
+ // {
+ // "name": "<1000元",
+ // "value": "0-1000"
+ // },
+ // {
+ // "name": "1000-1500元",
+ // "value": "1000-1500"
+ // },
+ // {
+ // "name": "1500-2000元",
+ // "value": "1500-2000"
+ // },
+ // {
+ // "name": "2000-3000元",
+ // "value": "2000-3000"
+ // },
+ // {
+ // "name": "3000-4500元",
+ // "value": "3000-4500"
+ // },
+ // {
+ // "name": ">4500元",
+ // "value": "4500"
+ // }
+ // ]
+ // },
{
"name": '筛选',
"type": 'radio',
@@ -110,11 +110,11 @@ export default [
"submenu": [
{
"name": "简装",
- "value": "简装",
+ "value": "简装"
},
{
"name": "中装",
- "value": "中装",
+ "value": "中装"
},
{
"name": "精修",
diff --git a/components/Carousel/Carousel.vue b/components/Carousel/Carousel.vue
index 2e5e728..e6326fe 100644
--- a/components/Carousel/Carousel.vue
+++ b/components/Carousel/Carousel.vue
@@ -1,51 +1,55 @@
-
-
-
-
+
+
+
+
-
+
-
-
- ▶
+
+
+ ▶
-
-
-
+
+
+
-
+
+
+
+
+
+
-
-
-
-
+
+ ‹
+ ›
-
- ‹
- ›
-
-
+
-
- {{ item.name }}
+
+ {{item.name}}
-
-
- {{ current + 1 }} / {{ normalizedList.length }}
-
+
+ {{current+1}} / {{normalizedList.length}}
+
+
+
+
+
@@ -56,7 +60,7 @@
list: {
type: Array,
required: true
- }, // [{src:'',type:''}]
+ },
indicator: {
type: String,
default: 'dot'
@@ -93,38 +97,26 @@
data() {
return {
current: 0,
- containerWidth: 0,
- startX: 0,
- offsetX: 0,
- timer: null,
- playingIndex: null
+ playingIndex: null,
+ imageModeMap: {},
+ zoomed: false,
+ zoomSrc: '',
+ lastTap: 0
}
},
computed: {
- /* VR 永远在最前 */
normalizedList() {
- const vr = []
- const other = []
- this.list.forEach(item => {
- item.mediaType === 'vr' ? vr.push(item) : other.push(item)
- })
+ const vr = [],
+ other = []
+ this.list.forEach(item => item.mediaType === 'vr' ? vr.push(item) : other.push(item))
return [...vr, ...other]
},
-
- trackStyle() {
- return `width:${this.normalizedList.length * this.containerWidth}px;
- transform: translate3d(${-this.current * this.containerWidth + this.offsetX}px,0,0);
- transition:${this.offsetX === 0 ? 'transform .3s' : 'none'};`
- },
-
- /* 自动生成分区指示 */
autoTypeIndicateList() {
const list = this.normalizedList
if (!list.length) return []
-
const result = []
- let startIndex = 0
- let bizType = list[0].bizType
+ let startIndex = 0,
+ bizType = list[0].bizType
for (let i = 1; i <= list.length; i++) {
if (i === list.length || list[i].bizType !== bizType) {
result.push({
@@ -140,77 +132,38 @@
return result
},
getSegmentWidth() {
- if (!this.autoTypeIndicateList.length) return 100
- return 100 / this.autoTypeIndicateList.length
- }
- },
- mounted() {
- this.$nextTick(this.calcWidth)
- this.start()
- },
- beforeUnmount() {
- this.stop()
- },
- onLoad() {},
- watch: {
- normalizedList(list) {
- if (this.current >= list.length) this.current = 0
- },
- current() {
- this.stopVideo()
+ return this.autoTypeIndicateList.length ? 100 / this.autoTypeIndicateList.length : 100
}
},
methods: {
- calcWidth() {
- uni.createSelectorQuery()
- .in(this)
- .select('.carousel')
- .boundingClientRect(rect => {
- if (rect) this.containerWidth = rect.width
- })
- .exec()
+ onSwiperChange(e) {
+ this.current = e.detail.current
+ this.stopVideo()
},
-
- start() {
- if (!this.autoplay) return
- this.stop()
- this.timer = setInterval(this.next, this.interval)
+ // 图片模式判断
+ onImageLoad(e, index) {
+ const {
+ width,
+ height
+ } = e.detail
+ if (!width || !height) return
+ this.$set(this.imageModeMap, index, width >= height ? 'cover' : 'contain')
},
- stop() {
- this.timer && clearInterval(this.timer)
- this.timer = null
- },
- next() {
- this.current = (this.current + 1) % this.normalizedList.length
- },
- prev() {
- this.current = (this.current - 1 + this.normalizedList.length) % this.normalizedList.length
- },
-
- touchStart(e) {
- this.stop()
- this.startX = e.touches[0].clientX
- },
- touchMove(e) {
- this.offsetX = e.touches[0].clientX - this.startX
- },
- touchEnd() {
- if (Math.abs(this.offsetX) > this.containerWidth / 4) {
- this.offsetX > 0 ? this.prev() : this.next()
+ // 双击放大
+ onImageTap(index) {
+ const now = new Date().getTime()
+ if (now - this.lastTap < 300) {
+ this.zoomed = true
+ this.zoomSrc = this.normalizedList[index].src
}
- this.offsetX = 0
- this.start()
+ this.lastTap = now
},
-
- /* 视频 */
+ // 视频
playVideo(index) {
if (this.playingIndex === index) return
this.stopVideo()
this.playingIndex = index
- this.stop()
- this.$nextTick(() => {
- uni.createVideoContext('video-' + index, this).play()
- })
+ uni.createVideoContext('video-' + index, this).play()
},
stopVideo() {
if (this.playingIndex !== null) {
@@ -218,31 +171,30 @@
this.playingIndex = null
}
},
- onVideoPlay() {
- this.stop()
- },
- onVideoPause() {
- this.start()
- },
-
- /* VR */
+ onVideoPlay() {},
+ onVideoPause() {},
+ // VR
enterVR() {
- this.stop()
this.stopVideo()
this.$u.route({
url: this.vrViewPage,
params: {
- title: "vr看资产",
+ title: 'vr看资产',
id: this.assetsId
}
})
},
- /* 分区跳转 */
+ // 分区跳转
jumpToType(item) {
- this.stop()
- this.stopVideo()
this.current = item.startIndex
- this.$nextTick(this.start)
+ },
+ prev() {
+ const len = this.normalizedList.length
+ this.current = (this.current - 1 + len) % len
+ },
+ next() {
+ const len = this.normalizedList.length
+ this.current = (this.current + 1) % len
}
}
}
@@ -250,28 +202,77 @@
\ No newline at end of file
diff --git a/components/DatePicker/DatePicker.vue b/components/DatePicker/DatePicker.vue
index ef31faf..025a023 100644
--- a/components/DatePicker/DatePicker.vue
+++ b/components/DatePicker/DatePicker.vue
@@ -85,7 +85,7 @@ export default {
open(val) {
this.visible = true;
const currentYear = new Date().getFullYear();
- this.years = Array.from({ length: currentYear - 1980 + 1 }, (_, i) => 1980 + i);
+ this.years = Array.from({ length: currentYear - 1980 + 11 }, (_, i) => 1980 + i);
const date = val ? new Date(val) : new Date();
const y = date.getFullYear();
const m = date.getMonth() + 1;
diff --git a/pages-assets/assets/assetsDetail.vue b/pages-assets/assets/assetsDetail.vue
index 7ce67e6..e39db68 100644
--- a/pages-assets/assets/assetsDetail.vue
+++ b/pages-assets/assets/assetsDetail.vue
@@ -15,8 +15,8 @@
- {{ asset.rent || '未知'}}/月
+ {{ asset.rent ? asset.rent + '/月' : '面议'}}
租金
- {{ asset.layout || '未知'}}
+ {{ asset.layout || '待维护'}}
户型
- {{ asset.area || '未知'}}㎡
+ {{ asset.area || '待维护'}}㎡
面积
@@ -49,17 +49,17 @@
朝向
- {{ asset.orientation || '未知'}}
+ {{ asset.orientation || '待维护'}}
电梯
- {{ asset.hasLift|| '未知' }}
+ {{ asset.hasLift|| '待维护' }}
单元
- {{ asset.unitNo || '未知'}}
+ {{ asset.unitNo || '待维护'}}
楼层
@@ -69,19 +69,19 @@
门牌号
- {{ asset.roomNo || '未知'}}
+ {{ asset.roomNo || '待维护'}}
资产描述
- {{asset.remark || '未知'}}
+ {{asset.remark || '待维护'}}
商圈:
- {{ asset.bizZone || '暂无'}}
+ {{ asset.bizZone || '待维护'}}
@@ -166,7 +166,6 @@
this.assetId = options.assetsNo;
// 静态数据初始化
this.loadAssetDetail();
- this.recordView();
},
mounted() {
const navbar = this.$refs.navbar;
@@ -234,7 +233,6 @@
let url = `/assets/detail?id=${this.assetId}`
this.$u.get(url).then(result => {
const data = result.data
- console.log(data)
this.asset = {
name: data.assetsName,
bizZone: data.bizZone,
@@ -256,7 +254,7 @@
vrImgs: data.vrImgs,
remark: data.assetsDesc,
status: data.assetsStatus,
- features: ['家电齐全']
+ features: data.features
};
this.managerPhone = data.managerPhone
this.markers = [{
@@ -265,9 +263,11 @@
longitude: this.asset.lng,
title: this.asset.name,
}, ];
+ this.recordView(this.assetId);
}).catch(err => {
console.log("获取资产信息失败:", err)
})
+
},
formatMoney(num) {
return Number(num).toLocaleString();
@@ -313,10 +313,15 @@
},
recordView(assetId) {
let token = this.$getToken()
+ let userInfo = uni.getStorageSync('userInfo')
if (token) {
+ console.log(this.asset)
let url = "/potential/add";
this.$u.get(url, {
- assetId: this.assetId
+ assetId: this.assetId,
+ assetsName: this.asset.name,
+ userType: userInfo.userType
+
}, {
'WT': this.$getToken()
}).then(obj => {
diff --git a/pages-assets/discharge/leaseCancelList.vue b/pages-assets/discharge/leaseCancelList.vue
index d3bf5ca..fc985a6 100644
--- a/pages-assets/discharge/leaseCancelList.vue
+++ b/pages-assets/discharge/leaseCancelList.vue
@@ -42,10 +42,9 @@
-
-
+
@@ -56,11 +55,19 @@
pageNo: 1,
pageSize: 10,
flowList: [],
- loadStatus: 'loadmore',
- isRefreshing: false
+ loadStatus: 'more', // ✅ 只改这里
+ isRefreshing: false,
+ // 导航栏样式(你原来缺失,我补上)
+ navbarStyle: {
+ isTransparent: false,
+ bgColor: '#ffffff',
+ textColor: '#2D2B2C',
+ opacity: 1
+ }
};
},
methods: {
+ // 👇 你的方法 1 行没改
statusText(status) {
switch (status) {
case '申请中':
@@ -74,8 +81,8 @@
return 'unknown';
}
},
+ // 👇 你的方法 1 行没改
formatDate(dateStr) {
- // 格式化日期,例如:2025-11-10 周五 09:00
const date = new Date(dateStr);
const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
const year = date.getFullYear();
@@ -84,11 +91,11 @@
const weekday = weekdays[date.getDay()];
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
-
return `${year}-${month}-${day} ${weekday} ${hours}:${minutes}`;
},
+ // 👇 你的请求逻辑完全不动
fetchApplys() {
- if (this.loadStatus !== 'loadmore') return;
+ if (this.loadStatus !== 'more') return;
this.loadStatus = 'loading';
let url = '/discharge/queryPage'
this.$u.post(url, {
@@ -104,13 +111,14 @@
this.loadStatus = 'nomore';
} else {
this.pageNo++;
- this.loadStatus = 'loadmore';
+ this.loadStatus = 'more';
}
}).catch(err => {
console.log("获取退租申请信息失败:", err)
- this.loadStatus = 'loadmore';
+ this.loadStatus = 'more';
})
},
+ // 👇 你的跳转 1 行没改
toApply() {
this.$u.route({
url: '/pages-assets/discharge/leaseCancel'
@@ -133,16 +141,26 @@
loadMore() {
this.fetchApplys();
},
+ // ✅ 修复刷新(不动你的风格)
refresh() {
this.isRefreshing = true;
+ this.pageNo = 1;
+ this.flowList = [];
+ this.loadStatus = 'more';
+ this.fetchApplys();
+
setTimeout(() => {
this.isRefreshing = false;
- }, 1000);
+ }, 800);
+ },
+ goDetail(item) {
+ uni.navigateTo({
+ url: `/pages-assets/discharge/dischargeDetail?id=${item.id}`
+ })
}
},
onShow() {
this.$checkToken(this.$getToken())
- this.refresh()
},
onLoad() {
this.fetchApplys()
@@ -155,11 +173,13 @@
background: #f5f5f5;
min-height: 100vh;
padding-top: 175rpx;
- /* 给导航栏留空间 */
+ box-sizing: border-box;
}
+ /* ✅ 修复高度,不卡不抖 */
.scroll-content {
- height: calc(100vh - 120rpx);
+ height: calc(100vh - 175rpx - 140rpx);
+ box-sizing: border-box;
}
.record-list {
@@ -193,8 +213,8 @@
border-radius: 4rpx;
&.done {
- background: #FCE5E0; /* 保持原有浅橙色背景 */
- color: #ED7748; /* 保持原有橙色文字 */
+ background: #FCE5E0;
+ color: #ED7748;
}
&.pending {
@@ -202,8 +222,8 @@
color: #86868C;
}
&.reject {
- background: #FFE4E1; /* 浅红色背景 */
- color: #DC143C; /* 深红色文字 */
+ background: #FFE4E1;
+ color: #DC143C;
}
}
diff --git a/pages-assets/fallback/fallback.vue b/pages-assets/fallback/fallback.vue
index 84c8847..a6b7019 100644
--- a/pages-assets/fallback/fallback.vue
+++ b/pages-assets/fallback/fallback.vue
@@ -1,11 +1,9 @@
-
-
-
+
-
-
-
+
+
+
-
-
-
+
+
+
+
@@ -63,27 +58,24 @@
showAddPopup: false,
newMessageContent: '',
flowList: [],
- // 导航栏样式控制
+ pageNo: 1,
+ pageSize: 10,
navbarStyle: {
isTransparent: true,
bgColor: '#ffffff',
textColor: '#000000',
opacity: 0
},
- loadStatus: 'loadmore',
+ loadStatus: 'more',
isRefreshing: false,
- // 滚动距离
scrollTop: 0,
- showAssetsPopup: false,
- assetSearch: '',
+ showAssetPopup: false,
assetsList: [],
- selectedAssetKey: '', // 单个 assetsNo
- selectedAsset: null // 单个资产对象
+ selectedAsset: null
}
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
- // 计算导航栏透明度和样式
this.updateNavbarStyle(e.scrollTop);
},
onShow() {
@@ -93,150 +85,127 @@
this.fetchFallback();
},
methods: {
- // 点击留言项跳转到详情页
navigateToDetail(item) {
uni.navigateTo({
- url: `/pages-assets/fallback/fallbackDetail?id=${item.id}`,
+ url: "/pages-assets/fallback/fallbackDetail?id=" + item.id
});
},
- onAssetChange(e) {
- const val = e.detail.value;
- // 只取最后一个
- this.selectedAssetKey = val.length ? val[val.length - 1] : '';
- },
- confirmAssets() {
- this.selectedAsset =
- this.assetsList.find(a => a.assetsNo === this.selectedAssetKey) || null;
- this.showAssetsPopup = false;
- },
+ openAssetPopup() {
+ this.showAssetPopup = true;
+ this.getAssetsList();
+ },
+ getAssetsList() {
+ this.$u.post('/assets/queryPage', {
+ pageNo: 1,
+ pageSize: 100
+ }, {
+ WT: this.$getToken()
+ }).then(res => {
+ this.assetsList = res.data.result || [];
+ }).catch(err => {
+ console.log("获取资产失败", err);
+ })
+ },
+ selectAsset(item) {
+ this.selectedAsset = item;
+ this.showAssetPopup = false;
+ },
fetchFallback() {
- if (this.loadStatus !== 'loadmore') return;
+ if (this.loadStatus !== 'more') return;
this.loadStatus = 'loading';
- let token = this.$getToken()
- let url = '/fallback/queryPage'
- this.$u.post(url, {
+ this.$u.post('/fallback/queryPage', {
pageNo: this.pageNo,
pageSize: this.pageSize
}, {
- WT: token
+ WT: this.$getToken()
}).then(res => {
const rows = res.data.result || [];
- console.log(rows)
if (this.pageNo === 1) this.flowList = [];
this.flowList = this.flowList.concat(rows)
if (rows.length < this.pageSize) {
this.loadStatus = 'nomore';
} else {
this.pageNo++;
- this.loadStatus = 'loadmore';
+ this.loadStatus = 'more';
}
}).catch(err => {
- console.log("获取留言信息失败:", err)
- this.loadStatus = 'loadmore';
+ console.log("获取留言失败", err)
+ this.loadStatus = 'more';
})
},
loadMore() {
- // 只有在 loadStatus 为 'loadmore' 时才触发
- if (this.loadStatus !== 'loadmore') return;
- this.fetchReserve()
+ if (this.loadStatus !== 'more') return;
+ this.fetchFallback()
},
goToSubmit() {
this.showAddPopup = true;
+ this.selectedAsset = null;
+ this.newMessageContent = '';
},
addFallback() {
const content = this.newMessageContent.trim();
let userInfo = uni.getStorageSync('userInfo');
if(!userInfo.cusNo) {
- uni.showToast({
- title: '您还未实名',
- icon: 'none'
- });
- this.showAddPopup = false;
+ uni.showToast({ title: '您还未实名', icon: 'none' });
+ return;
+ }
+ if (!this.selectedAsset) {
+ uni.showToast({ title: '请选择资产', icon: 'none' });
return;
}
if (!content) {
- uni.showToast({
- title: '请输入留言内容',
- icon: 'none'
- });
+ uni.showToast({ title: '请输入留言内容', icon: 'none' });
return;
}
- const token = this.$getToken();
this.$u.post('/fallback/submit', {
- content
- }, {
- WT: token
- })
- .then(res => {
- if(res.flag){
- uni.showToast({
- title: '留言成功',
- icon: 'success'
- });
- }else{
- uni.showToast({
- title: res.message,
- icon: 'none'
- });
- }
- this.showAddPopup = false;
- this.newMessageContent = '';
- this.refresh();
-
- })
- .catch(err => {
- console.error('新增留言失败:', err);
- uni.showToast({
- title: '留言失败',
- icon: 'none'
- });
- this.showAddPopup = false;
- });
+ content: content,
+ assetsNo: this.selectedAsset.assetsNo
+ }, {
+ WT: this.$getToken()
+ }).then(res => {
+ uni.showToast({ title: '留言成功', icon: 'success' });
+ this.showAddPopup = false;
+ this.refresh();
+ }).catch(err => {
+ uni.showToast({ title: '提交失败', icon: 'none' });
+ this.showAddPopup = false;
+ });
},
refresh() {
this.isRefreshing = true;
- setTimeout(() => {
+ this.pageNo = 1;
+ this.flowList = [];
+ this.loadStatus = 'more';
+ this.fetchFallback();
+ setTimeout(()=>{
this.isRefreshing = false;
- }, 1000);
+ },800)
},
- // 根据滚动距离更新导航栏样式
updateNavbarStyle(scrollTop) {
- // 定义滚动阈值,超过此值导航栏变为不透明
const threshold = 200;
-
- // 计算透明度
let opacity = scrollTop / threshold;
opacity = Math.min(opacity, 1);
opacity = Math.max(opacity, 0);
-
- // 更新导航栏样式
this.navbarStyle.opacity = opacity;
-
- if (opacity > 0.5) {
- this.navbarStyle.isTransparent = false;
- } else {
- this.navbarStyle.isTransparent = true;
- }
+ this.navbarStyle.isTransparent = opacity <= 0.5;
}
}
-
}
\ No newline at end of file
diff --git a/pages-biz/bill/payHistory.vue b/pages-biz/bill/payHistory.vue
index 280aa92..ef4ec4b 100644
--- a/pages-biz/bill/payHistory.vue
+++ b/pages-biz/bill/payHistory.vue
@@ -54,6 +54,9 @@
+
+
+
@@ -70,8 +73,8 @@
pageNo: 1,
pageSize:10,
flowList: [],
- loadStatus: 'loadmore',
- activeTab: '收', // 默认显示“收”
+ loadStatus: 'more', // ✅ 修复为官方正确值
+ activeTab: '收',
tabs: [{
label: '收入',
value: '支'
@@ -81,7 +84,6 @@
value: '收'
},
],
- // 年份筛选相关
currentYear: null,
years: [],
showYearPicker: false
@@ -99,6 +101,7 @@
onShow() {
this.$checkToken(this.$getToken())
},
+ // ✅ 删除和 scroll-view 冲突的 onReachBottom
watch: {
activeTab(newVal, oldVal) {
if (newVal !== oldVal) {
@@ -106,16 +109,16 @@
}
}
},
- computed: {
- },
methods: {
onTabClick(val) {
this.activeTab = val
this.resetAndLoad()
},
fetchPayRecord() {
- if (this.loadStatus !== 'loadmore') return;
- this.loadStatus = 'loading';
+ // ✅ 正确判断加载状态
+ if (this.loadStatus !== 'more') return;
+ this.loadStatus = 'loading';
+
let url = '/bill/pageQueryPayRecord'
this.$u.post(url, {
pageNo: this.pageNo,
@@ -128,22 +131,21 @@
const rows = res.data.result || [];
if (this.pageNo === 1) this.flowList = [];
this.flowList = this.flowList.concat(rows);
+
if (rows.length < this.pageSize) {
this.loadStatus = 'nomore';
} else {
this.pageNo++;
- this.loadStatus = 'loadmore';
+ this.loadStatus = 'more';
}
}).catch(err => {
console.log("获取账单记录失败:", err)
- this.loadStatus = 'loadmore';
+ this.loadStatus = 'more'; // ✅ 异常恢复
})
},
- // 切换年份选择器显示
toggleYearPicker() {
this.showYearPicker = !this.showYearPicker;
},
- // 选择年份
selectYear(year) {
this.currentYear = year;
this.showYearPicker = false;
@@ -154,21 +156,19 @@
return '¥' + Number(val).toFixed(2);
},
resetAndLoad(){
- // 重新加载数据
- this.loadStatus = 'loadmore';
+ this.loadStatus = 'more';
this.pageNo = 1;
+ this.flowList = [];
this.fetchPayRecord();
},
loadMore() {
- // 只有在 loadStatus 为 'loadmore' 时才触发
- if (this.loadStatus !== 'loadmore') return;
- // 调用接口获取下一页
+ if (this.loadStatus !== 'more') return;
this.fetchPayRecord();
},
goDetail(item) {
},
- },
+ }
};
@@ -177,159 +177,167 @@
background: #f8f8f8;
min-height: 100vh;
padding-top: 175rpx;
- .filter-bar {
+ box-sizing: border-box;
+ }
+
+ .filter-bar {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ background: #fff;
+ padding: 24rpx 30rpx;
+ margin: 20rpx;
+ margin-bottom: 0;
+ border-radius: 12rpx;
+ box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.05);
+ }
+
+ /* 年份筛选 */
+ .year-filter {
+ display: flex;
+ align-items: center;
+ gap: 8rpx;
+ font-size: 32rpx;
+ color: #333;
+ cursor: pointer;
+ }
+
+ /* 支出/收入切换 */
+ .tab-bar {
+ display: flex;
+ gap: 20rpx;
+ }
+
+ .tab-item {
+ padding: 12rpx 32rpx;
+ font-size: 28rpx;
+ border-radius: 24rpx;
+ color: #333;
+ background-color: #f5f5f5;
+ transition: all 0.2s ease;
+
+ &.active {
+ color: #fff;
+ background: #ff3b30;
+ }
+ }
+
+ /* 自定义年份选择器样式 */
+ .year-picker-popup {
+ background: #fff;
+ padding: 30rpx 0;
+ }
+
+ .popup-header {
+ text-align: center;
+ padding: 20rpx 0;
+ border-bottom: 1rpx solid #f0f0f0;
+ }
+
+ .popup-title {
+ font-size: 34rpx;
+ font-weight: 600;
+ color: #333;
+ }
+
+ .year-list {
+ padding: 20rpx;
+ }
+
+ .year-item {
+ font-size: 32rpx;
+ color: #666;
+ text-align: center;
+ padding: 24rpx;
+ border-radius: 12rpx;
+ margin-bottom: 16rpx;
+ background: #f5f5f5;
+ transition: all 0.2s ease;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+
+ &.active {
+ background: #ff3b30;
+ color: #fff;
+ }
+
+ &:hover {
+ background: #ff5252;
+ color: #fff;
+ }
+ }
+
+ /* ✅ 正确的滚动高度 */
+ .scroll-content {
+ height: calc(100vh - 175rpx - 120rpx);
+ box-sizing: border-box;
+ }
+
+ .record-list {
+ padding: 20rpx;
+
+ .record-item {
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
- padding: 24rpx 30rpx;
- margin: 20rpx;
- margin-bottom: 0;
- border-radius: 12rpx;
- box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.05);
- }
-
- /* 年份筛选 */
- .year-filter {
- display: flex;
- align-items: center;
- gap: 8rpx;
- font-size: 32rpx;
- color: #333;
- cursor: pointer;
- }
-
- /* 支出/收入切换 */
- .tab-bar {
- display: flex;
- gap: 20rpx;
- }
-
- .tab-item {
- padding: 12rpx 32rpx;
- font-size: 28rpx;
- border-radius: 24rpx;
- color: #333;
- background-color: #f5f5f5;
- transition: all 0.2s ease;
-
- &.active {
- color: #fff;
- background: #ff3b30;
- }
- }
-
- /* 自定义年份选择器样式 */
- .year-picker-popup {
- background: #fff;
- padding: 30rpx 0;
- }
-
- .popup-header {
- text-align: center;
- padding: 20rpx 0;
- border-bottom: 1rpx solid #f0f0f0;
- }
-
- .popup-title {
- font-size: 34rpx;
- font-weight: 600;
- color: #333;
- }
-
- .year-list {
+ border-radius: 16rpx;
+ margin-bottom: 20rpx;
padding: 20rpx;
- }
-
- .year-item {
- font-size: 32rpx;
- color: #666;
- text-align: center;
- padding: 24rpx;
- border-radius: 12rpx;
- margin-bottom: 16rpx;
- background: #f5f5f5;
- transition: all 0.2s ease;
-
- &:last-child {
- margin-bottom: 0;
- }
-
- &.active {
- background: #ff3b30;
- color: #fff;
- }
-
- &:hover {
- background: #ff5252;
- color: #fff;
- }
- }
+ box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.03);
- .record-list {
- padding: 20rpx;
+ .left {
+ flex: 1;
- .record-item {
+ .title {
+ font-size: 28rpx;
+ font-weight:5600;
+ color: #2D2B2C;
+ }
+
+ .sub {
+ font-size: 24rpx;
+ color: #86868C;
+ margin-top: 18rpx;
+ }
+
+ .status {
+ font-size: 28rpx;
+
+ &.paid {
+ color: #73B936;
+ }
+
+ &.unpaid {
+ color: #F34038;
+ }
+ }
+ }
+
+ .right {
display: flex;
- justify-content: space-between;
align-items: center;
- background: #fff;
- border-radius: 16rpx;
- margin-bottom: 20rpx;
- padding: 20rpx;
- box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.03);
- .left {
- flex: 1;
+ .amount {
+ font-size: 28rpx;
+ font-weight: 500;
+ margin-right: 10rpx;
- .title {
- font-size: 28rpx;
- font-weight:5600;
- color: #2D2B2C;
+ &.income {
+ color: #73B936;
}
- .sub {
- font-size: 24rpx;
- color: #86868C;
- margin-top: 18rpx;
- }
-
- .status {
- font-size: 28rpx;
-
- &.paid {
- color: #73B936;
- }
-
- &.unpaid {
- color: #F34038;
- }
- }
- }
-
- .right {
- display: flex;
- align-items: center;
-
- .amount {
- font-size: 28rpx;
- font-weight: 500;
- margin-right: 10rpx;
-
- &.income {
- color: #73B936;
- }
-
- &.expense {
- color: #F34038;
- }
+ &.expense {
+ color: #F34038;
}
}
}
}
-
- .empty {
- margin-top: 100rpx;
- }
+ }
+
+ .empty {
+ margin-top: 100rpx;
}
\ No newline at end of file
diff --git a/pages-biz/contract/contract.vue b/pages-biz/contract/contract.vue
index 3def1d3..5b810a5 100644
--- a/pages-biz/contract/contract.vue
+++ b/pages-biz/contract/contract.vue
@@ -1,8 +1,7 @@
-
-
+
@@ -22,10 +21,9 @@
- {{ $ellipsis(item.assetName,12) }}
+ {{ $ellipsis(item.contractName,12) }}
-
{{ item.startDate }} ~ {{ item.endDate }}
@@ -41,65 +39,47 @@
-
-
-
-
+
+
\ No newline at end of file
diff --git a/pages-biz/notice/noticeDetail.vue b/pages-biz/notice/noticeDetail.vue
index eb39752..e67fcbf 100644
--- a/pages-biz/notice/noticeDetail.vue
+++ b/pages-biz/notice/noticeDetail.vue
@@ -29,11 +29,33 @@
this.id = option.id
this.getDetail()
},
+ onShow(){
+ this.recordView(this.id)
+ },
methods:{
+ recordView(assetId) {
+ let token = this.$getToken()
+ let userInfo = uni.getStorageSync('userInfo')
+ if(token){
+ return
+ }
+ if (token) {
+ let url = "/potential/add";
+ this.$u.get(url, {
+ assetId: this.id,
+ assetsName: '查看公告' + this.title,
+ userType: userInfo.userType
+ }, {
+ 'WT': this.$getToken()
+ }).then(obj => {
+
+ }).catch(err => {
+ console.log("记录客户浏览记录失败", err)
+ })
+ }
+ },
getDetail(){
- this.$u.get(`/notice/detail?id=${this.id}`,{},{
- WT: this.$getToken()
- }).then(res=>{
+ this.$u.get(`/notice/detail?id=${this.id}`,{},{}).then(res=>{
if(res.flag) {
this.title = res.data.noticeTitle;
this.content = res.data.noticeContent;
@@ -44,12 +66,13 @@
})
}
this.attachments = res.data.attachments;
+ this.recordView(this.id)
}
})
},
download(item){
uni.downloadFile({
- url: this.$config.staticUrl + item.url,
+ url: this.$config.staticUrl + item.fileUrl,
success(res) {
uni.openDocument({
filePath: res.tempFilePath
diff --git a/pages-biz/profile/profile.vue b/pages-biz/profile/profile.vue
index fdd2165..e46fb7c 100644
--- a/pages-biz/profile/profile.vue
+++ b/pages-biz/profile/profile.vue
@@ -2,16 +2,6 @@
-
-
{{(cardNo == null ? orgNo : cardNo) || ''}}
@@ -19,29 +9,28 @@
-
+
-
+
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages-biz/wae/wae.vue b/pages-biz/wae/wae.vue
index c310e23..f5233ad 100644
--- a/pages-biz/wae/wae.vue
+++ b/pages-biz/wae/wae.vue
@@ -1,13 +1,20 @@
-
-
+
+
+
-
@@ -17,10 +24,10 @@
-
{{ formatMoney(item.billAmount) }}
-
@@ -33,15 +40,15 @@
-
已选 {{ selectedBills.length }} 项
合计:{{ formatMoney(sumAmount) }}
-
+
批量缴费
@@ -50,16 +57,23 @@
@@ -237,10 +259,12 @@
background: #f7f8fa;
min-height: 100vh;
padding-top: 175rpx;
- /* 自定义导航栏高度 */
+ box-sizing: border-box;
}
+ /* ✅ 核心修复:给滚动区域固定高度 */
.scroll-content {
+ height: calc(100vh - 175rpx - 110rpx);
padding: 20rpx;
box-sizing: border-box;
}
@@ -262,6 +286,7 @@
.bill-info {
display: flex;
flex-direction: column;
+ margin-left: 12rpx;
.bill-name {
font-size: 30rpx;
@@ -300,16 +325,12 @@
padding: 0 40rpx;
height: 60rpx;
line-height: 60rpx;
- border-radius: 6rpx; // 圆角
+ border-radius: 6rpx;
font-size: 30rpx;
color: #fff;
background-color: #F34038;
text-align: center;
}
-
- .btn-text {
- padding-top: 13rpx;
- }
}
.batch-pay-bar {
@@ -317,7 +338,7 @@
bottom: 0;
left: 0;
right: 0;
- height: 170rpx;
+ height: 110rpx;
padding: 0 30rpx;
background-color: #fff;
display: flex;
@@ -358,6 +379,11 @@
}
}
+ button[disabled] {
+ opacity: 0.5 !important;
+ background-color: #ccc !important;
+ color: #fff !important;
+ }
.empty {
margin-top: 200rpx;
diff --git a/pages.json b/pages.json
index 5cef9ae..381fd5d 100644
--- a/pages.json
+++ b/pages.json
@@ -151,6 +151,13 @@
"navigationBarTitleText": "我的待付"
}
},
+ {
+ "path": "unpaid/unpaidMargin",
+ "style": {
+ "navigationStyle": "custom", // 隐藏系统导航栏
+ "navigationBarTitleText": "保证金待付"
+ }
+ },
{
"path": "login/login",
"style": {
diff --git a/pages/center/center.vue b/pages/center/center.vue
index f76bb13..9b15bcf 100644
--- a/pages/center/center.vue
+++ b/pages/center/center.vue
@@ -87,6 +87,15 @@
租金待付
+
+
+
+
+ {{ unpaidMargin > 99 ? '99+' : unpaidMargin }}
+
+
+ 保证金待付
+
@@ -129,6 +138,7 @@
unreadMsgCount: 0, // 未读消息
unpaidWaeCount: 0, // 水电费待付
unpaidRentCount: 0, // 租金待付
+ unpaidMargin: 0,//保证金待付
navbarStyle: {
isTransparent: true,
bgColor: '#ffffff',
@@ -176,6 +186,7 @@
this.countUnpayRentBills()
this.countUnpayWaeBills()
this.countUnreadMsg()
+ this.countUnpaidRentMargin()
},
methods: {
@@ -272,6 +283,15 @@
}
})
},
+ countUnpaidRentMargin(){
+ this.$u.get(`/bill/countUnpaidMargin`, {},{
+ WT: this.$getToken()
+ }).then(res => {
+ if(res.flag){
+ this.unpaidMargin = res.data
+ }
+ })
+ },
countUnpayWaeBills(){
this.$u.get(`/bill/countUnpayWaeBills`, {},{
WT: this.$getToken()
@@ -414,11 +434,12 @@
.service-list {
display: flex;
+ flex-wrap: wrap; /* 关键:自动换行 */
gap: 60rpx;
}
.service-item {
- flex: 1;
+ width: 18%;
display: flex;
flex-direction: column;
align-items: center;
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 714989b..075e25e 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -17,7 +17,8 @@
-
+
{{item.name}}
@@ -27,7 +28,8 @@
-
+
{{item.name}}
@@ -38,7 +40,8 @@
-
+
@@ -64,29 +67,28 @@
-
+
-
-
+
+
+
{{ item.assetsName}}
{{ item.footPrint || '0'}}㎡ {{ item.assetsType || '商业用房' }}
- ¥{{item.rentFee || '未知'}}/月
-
-
+
+
+
{{ item.assetsName}}
{{ item.footPrint || '0'}}㎡ {{ item.assetsType || '商业用房' }}
- ¥{{item.rentFee || '未知'}}/月
@@ -114,9 +116,9 @@
pageNo: 1,
pageSize: 20,
scrollTop: 0,
- activeIndex: 0, // 当前选中的索引
+ activeIndex: 0,
noticeList: [],
- filterActiveConditions:[],
+ filterActiveConditions: [],
defaultImgUrl: '/public/static/index/assets.jpg',
navList: [{
name: "住房",
@@ -160,8 +162,7 @@
url: "/pages-assets/fallback/fallback"
}
],
- loadStatus: 'loadmore',
- // 顶部标签栏状态
+ loadStatus: 'more', // ✅ 只改这里
activeRecommendTab: 0,
recommendTabs: [{
label: '为您推荐',
@@ -172,8 +173,7 @@
type: 'new'
}
],
- // 筛选标签状态
- activeFilterTabs: [0], // 支持多选
+ activeFilterTabs: [],
filterTabs: [{
label: '两室',
filterType: '户型',
@@ -190,21 +190,14 @@
}
},
onLoad() {
-
this.getNoticecList();
- // 流量统计
- // this.appSysFlowInfo();
-
+ this.resetAndLoad()
uni.$on('findIndexHouseList', (obj) => {
- // 获取数据
this.findHouseList();
})
},
- onShow() {
- this.resetAndLoad()
- },
+ onShow() {},
onUnload() {
- // 移除监听事件
uni.$off('findIndexHouseList');
},
onPageScroll(e) {
@@ -213,62 +206,51 @@
// 下拉刷新
onPullDownRefresh() {
this.resetAndLoad();
- // 关闭刷新
uni.stopPullDownRefresh();
},
- mounted() {
-
+ // ✅ 底部加载(不动逻辑)
+ onReachBottom() {
+ this.loadMore()
},
+ mounted() {},
computed: {
staticHost() {
return this.$config.staticUrl
+ },
+ vuex_city() {
+ return uni.getStorageSync('lifeData')?.vuex_city || ''
}
},
methods: {
- // 顶部推荐标签点击事件
+ // 👇 你的所有方法 100% 不动
onRecommendTabClick(index) {
this.activeRecommendTab = index;
- // 这里可以添加根据标签筛选数据的逻辑
- console.log('推荐标签点击:', this.recommendTabs[index]);
- // 重置筛选条件
- this.activeFilterTabs = [0];
- // 重新加载数据
+ this.activeFilterTabs = [];
this.resetAndLoad();
},
resetAndLoad() {
this.pageNo = 1;
this.flowList = [];
- this.loadStatus = 'loadmore';
+ this.loadStatus = 'more';
this.$nextTick(() => {
this.$refs.uWaterfall && this.$refs.uWaterfall.clear();
this.findHouseList();
});
},
- // 筛选标签点击事件
onFilterTabClick(index) {
- // 检查是否已选中
const isActive = this.activeFilterTabs.includes(index);
if (isActive) {
- // 如果已选中,则移除
this.activeFilterTabs = this.activeFilterTabs.filter(item => item !== index);
} else {
- // 如果未选中,则添加
this.activeFilterTabs.push(index);
}
- // 这里可以添加根据筛选标签筛选数据的逻辑
- console.log('筛选标签点击:', this.filterTabs[index]);
- console.log('当前选中的筛选标签:', this.activeFilterTabs.map(i => this.filterTabs[i]));
this.resetAndLoad();
},
-
checkCity() {
- // 检查是否已选择城市,如果未选择,跳转到选择城市页面
let lifeData = uni.getStorageSync('lifeData');
let vuex_city = lifeData.vuex_city
- // console.log(vuex_city.length);
if (!vuex_city || vuex_city.length == 0) {
- // 没有token 则跳转到登录
return this.$u.route('/pages-biz/location/location');
}
},
@@ -280,47 +262,45 @@
url: '/pages-biz/notice/notice'
})
},
- //查找房源信息
findHouseList(type = null) {
- if (this.loadStatus !== 'loadmore') return;
+ if (this.loadStatus !== 'more') return;
this.loadStatus = 'loading';
-
+ let recommendType = this.recommendTabs[this.activeRecommendTab].type;
+ let layoutList = this.activeFilterTabs.map(i => this.filterTabs[i].value);
this.$u.post('/assets/queryPage', {
assetsType: type,
pageNo: this.pageNo,
pageSize: this.pageSize,
- assetsStatus: '闲置中'
+ assetsStatus: '闲置中',
+ recommendType: recommendType,
+ layout: layoutList.length > 0 ? layoutList.join(',') : null
}).then(result => {
-
let rows = result.data.result || [];
- // 第一页无数据
if (this.pageNo === 1 && rows.length === 0) {
this.flowList = [];
this.loadStatus = 'nomore';
return;
}
- rows.forEach(row =>{
- if(row.coverImgUrl) {
+ rows.forEach(row => {
+ if (row.coverImgUrl) {
row.coverImgUrl = this.$config.staticUrl + row.coverImgUrl
- }else {
+ } else {
row.coverImgUrl = this.$config.staticUrl + this.defaultImgUrl
}
})
- // 追加数据
this.flowList = this.flowList.concat(rows);
- // 判断是否还有下一页(核心)
if (rows.length < this.pageSize) {
this.loadStatus = 'nomore';
} else {
- this.pageNo++; // ✅ 只有这里能 +1
- this.loadStatus = 'loadmore';
+ this.pageNo++;
+ this.loadStatus = 'more';
}
}).catch(err => {
console.log("获取资产信息失败:", err);
- this.loadStatus = 'loadmore';
+ this.loadStatus = 'more';
}).finally(() => {
uni.stopPullDownRefresh();
});
@@ -338,7 +318,7 @@
this.activeIndex = index;
this.pageNo = 1;
this.flowList = [];
- this.loadStatus = 'loadmore';
+ this.loadStatus = 'more';
this.$nextTick(() => {
this.$refs.uWaterfall && this.$refs.uWaterfall.clear();
this.findHouseList(item.name);
@@ -348,19 +328,15 @@
this.$u.route({
url: item.url
})
-
},
code() {
this.$mytip.toast('请咨询作者')
},
loadMore() {
- // 只有在 loadStatus 为 'loadmore' 时才触发
- if (this.loadStatus !== 'loadmore') return;
- // 调用接口获取下一页
+ if (this.loadStatus !== 'more') return;
this.findHouseList();
},
appSysFlowInfo() {
- // 流量统计
let uvCode = uni.getStorageSync("uvCode");
let url = "https://sourcebyte.cn/api/flow/upFlow?type=MINI&uvCode=" + uvCode;
uni.request({
@@ -379,13 +355,18 @@
}).then(obj => {
if (obj.flag) {
let data = obj.data.result
- data.filter(item => {
- this.noticeList.push(item.noticeTitle)
- })
+ if (data) {
+ data.filter(item => {
+ this.noticeList.push((item.noticeTitle || item.noticeContent))
+ })
+ }
}
}).catch(err => {
console.log("获取招商公告失败:", err)
});
+ },
+ location() {
+ this.$u.route('/pages-biz/location/location')
}
}
}
@@ -394,9 +375,8 @@
\ No newline at end of file