暂时提交
This commit is contained in:
@@ -83,8 +83,8 @@
|
||||
},
|
||||
async onShow() {
|
||||
try {
|
||||
await this.$checkToken(this.$getToken())
|
||||
this.checkOaAuth()
|
||||
// await this.$checkToken(this.$getToken())
|
||||
// this.checkOaAuth()
|
||||
this.fetchFallback()
|
||||
} catch (e) {
|
||||
return
|
||||
@@ -135,25 +135,55 @@
|
||||
fetchFallback() {
|
||||
if (this.loadStatus !== 'more') return;
|
||||
this.loadStatus = 'loading';
|
||||
this.$u.post('/fallback/queryPage', {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize
|
||||
}, {
|
||||
WT: this.$getToken()
|
||||
}).then(res => {
|
||||
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 = 'more';
|
||||
|
||||
// TODO: 接口联调时取消注释,删除 mock 数据
|
||||
// this.$u.post('/fallback/queryPage', {
|
||||
// pageNo: this.pageNo,
|
||||
// pageSize: this.pageSize
|
||||
// }, {
|
||||
// WT: this.$getToken()
|
||||
// }).then(res => {
|
||||
// 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 = 'more';
|
||||
// }
|
||||
// }).catch(err => {
|
||||
// console.log("获取留言失败", err)
|
||||
// this.loadStatus = 'more';
|
||||
// })
|
||||
|
||||
// Mock 静态数据
|
||||
const mockData = [
|
||||
{
|
||||
id: '1',
|
||||
content: '小区路灯损坏,晚上出行不方便,希望尽快维修',
|
||||
status: 'processed',
|
||||
statusText: '已处理',
|
||||
summitDate: '2026-06-20'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
content: '楼道卫生需要加强清洁,垃圾桶经常满溢',
|
||||
status: 'processing',
|
||||
statusText: '处理中',
|
||||
summitDate: '2026-06-18'
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
content: '建议增加小区健身设施,方便居民锻炼身体',
|
||||
status: 'pending',
|
||||
statusText: '待处理',
|
||||
summitDate: '2026-06-15'
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log("获取留言失败", err)
|
||||
this.loadStatus = 'more';
|
||||
})
|
||||
];
|
||||
if (this.pageNo === 1) this.flowList = [];
|
||||
this.flowList = this.flowList.concat(mockData);
|
||||
this.loadStatus = 'nomore';
|
||||
},
|
||||
loadMore() {
|
||||
if (this.loadStatus !== 'more') return;
|
||||
@@ -225,7 +255,6 @@
|
||||
padding-top: 175rpx;
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
background: linear-gradient(0deg, #F3F1ED 43%, #F5E9DB 100%);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.scroll-view {
|
||||
@@ -236,9 +265,9 @@
|
||||
.message-item {
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
padding: 32rpx;
|
||||
padding-left: 95rpx;
|
||||
width: 92%;
|
||||
padding: 50rpx;
|
||||
padding-left: 120rpx;
|
||||
width: 100%;
|
||||
margin: auto;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
@@ -255,16 +284,17 @@
|
||||
margin-right: 20rpx;
|
||||
color: #ffffff;
|
||||
position: absolute;
|
||||
top: 60rpx;
|
||||
left: 10rpx;
|
||||
}
|
||||
.status-tag.processed {
|
||||
background: linear-gradient(90deg, #F34038 0%, #FF7C76 100%);
|
||||
background: linear-gradient(90deg, #6ca3eb 0%, #156bf4 100%);
|
||||
}
|
||||
.status-tag.processing {
|
||||
background: linear-gradient(90deg, #FEAF04 0%, #FFC145 100%);
|
||||
}
|
||||
.status-tag.pending {
|
||||
background: linear-gradient(90deg, #6688FC 0%, #809BFB 100%);
|
||||
background: linear-gradient(90deg, #F34038 0%, #FF7C76 100%);
|
||||
}
|
||||
.message-title {
|
||||
font-size: 30rpx;
|
||||
@@ -316,7 +346,7 @@
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
background: #FF6F63;
|
||||
background: #0088FE;
|
||||
color: #fff;
|
||||
border-radius: 8rpx;
|
||||
font-size: 30rpx;
|
||||
@@ -354,7 +384,7 @@
|
||||
.add-btn {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
background: linear-gradient(90deg, #FF6F63 0%, #FB392A 100%);
|
||||
background: #0088FE;
|
||||
border-radius: 10rpx;
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
|
||||
Reference in New Issue
Block a user