修改页面

This commit is contained in:
2026-03-18 19:16:37 +08:00
parent f2e32a9afa
commit 9c46b3996a
8 changed files with 571 additions and 177 deletions

View File

@@ -1,10 +1,14 @@
<template>
<view
class="page" :class="{'h5-pc-page': isH5}"
style="
background-image: url(../../../packageRc/static/pageBg.png);
"
>
<view class="custom-nav" :style="{paddingTop: statusBarHeight + 'px'}">
<view class="nav-content">
<view class="nav-back" @click="back"><text class="iconfont"><</text></view>
<view class="nav-title">高校毕业生智慧就业</view>
<view class="nav-placeholder"></view>
</view>
</view>
<view
class="input-outer-part"
style="padding: 24rpx 32rpx 0; max-height: unset"
@@ -17,7 +21,7 @@
border="none"
/>
<img
src="https://rc.jinan.gov.cn/qcwjyH5/static/images/person/search.png"
src="/packageRc/static/dmsc/ss.png"
class="search-icon"
@click="search()"
/>
@@ -53,33 +57,22 @@
@scrolltolower="getBottomList"
:show-scrollbar="false"
>
<view
style="margin-bottom: 24rpx; border-radius: 16rpx"
class="policy-list"
v-for="(item, index) in tableData"
:key="index"
@click="goPolicyDetail(item)"
>
<view class="title">
<image src="../../../packageRc/static/zcLeft.png" />
{{ item.zcmc }}</view
>
<view class="infos">
<view v-if="item.zcLevel">{{ item.zcLevel }}</view>
<view v-if="item.sourceUnit">{{ item.sourceUnit }}</view>
<view v-for="(item, index) in tableData" :key="index" class="policy-list-card" @click="toPolicyDetail(item)">
<view class="card-left">
<image class="clock-icon" src="../../../packageRc/static/dmsc/sj.png" />
<view class="date-md">{{ formatMD(item.publishTime || item.createTime) }}</view>
<view class="date-year">{{ formatYear(item.publishTime || item.createTime) }}</view>
</view>
<view class="bottom-line">
<view>
<uni-icons color="#A2A2A2" type="info" :size="uniIconSize"></uni-icons>
发文日期{{ item.publishTime }}
</view>
<view>
<uni-icons color="#A2A2A2" type="eye" :size="uniIconSize"></uni-icons>
浏览量{{ item.viewNum || 0 }}
<view class="card-right">
<view class="card-title">{{ item.zcmc }}</view>
<view class="card-infos">
<view v-if="item.zcLevel" class="info-tag">{{ item.zcLevel }}</view>
<view v-if="item.sourceUnit" class="info-tag">{{ item.sourceUnit }}</view>
</view>
</view>
</view>
<view style="padding-bottom: 24rpx">
<view style="padding-bottom: 24px">
<img
v-if="!total && !loading"
src="https://rc.jinan.gov.cn/qcwjyH5/static/images/person/empty.png"
@@ -90,11 +83,11 @@
</view>
<view
v-else-if="showMorePage"
style="text-align: center; color: #1a62ce; font-size: 24rpx"
style="text-align: center; color: #1a62ce; font-size: 24px"
>加载更多
</view>
<view
style="text-align: center; color: #8e8e8e; font-size: 24rpx"
style="text-align: center; color: #8e8e8e; font-size: 24px"
v-else
>没有更多数据了~</view
> </view
@@ -212,6 +205,11 @@ export default {
},
];
},
back() {
uni.navigateBack({
delta: 1
})
},
popupSearch(data) {
// 获取此次提交前,旧的政策类型值
const oldTypeL = this.queryParams.policyTypeL || "";
@@ -291,20 +289,31 @@ export default {
this.total = res.total;
} else {
this.loading = false;
// #ifdef H5 || APP-PLUS
// 接口返回非 200 或失败时展示测试数据 (条件编译)
this.tableData = [
{ id: '1', zcmc: '测试政策001关于进一步支持人才发展的若干措施条件编译测试数据', publishTime: '2026-03-10', viewNum: 888, zcLevel: '省级', sourceUnit: '模拟测试部' },
{ id: '2', zcmc: '测试政策002高校毕业生创业补贴申请指南条件编译测试数据', publishTime: '2026-03-10', viewNum: 666, zcLevel: '市级', sourceUnit: '人力资源局' }
];
this.total = 2;
// #endif
uni.showToast({
title: res.msg || '获取列表失败',
icon: "none",
});
}
},
formatMD(dateStr) {
if (!dateStr) return '--';
const parts = dateStr.split('-').length > 1 ? dateStr.split('-') : dateStr.split(' ');
// 处理 YYYY-MM-DD 或 YYYY-MM-DD HH:mm:ss
let d = parts[0].includes('-') ? parts[0].split('-') : parts;
if (d.length >= 3) {
return `${d[1]}-${d[2].substring(0,2)}`;
}
return dateStr;
},
formatYear(dateStr) {
if (!dateStr) return '';
const parts = dateStr.split('-');
if (parts.length >= 1) {
return parts[0].substring(0, 4);
}
return '';
}
},
};
</script>
@@ -330,7 +339,7 @@ export default {
background: #ffffff;
box-sizing: border-box;
border: 1px solid #107afd;
height: 64rpx;
height: 120rpx;
border-radius: 32rpx;
padding: 0 32rpx;
display: flex;
@@ -340,8 +349,10 @@ export default {
margin-top: 24rpx;
.search-icon {
width: 40rpx;
height: 40rpx;
width: 40px;
background: #107afd;
padding: 10px;border-radius: 40px;
height: 40px;
}
}
@@ -718,7 +729,10 @@ export default {
height: 48px !important;
}
.search-line {
height: 80rpx !important;
height: 80px !important;
border-radius: 40px;
padding: 0 20px!important;
input{font-size: 24px!important;}
}
.policy-list .title image {
width: 56rpx !important;
@@ -726,8 +740,119 @@ export default {
margin-right: 16rpx !important;
}
.loading-text {
font-size: 20px !important;
font-size: 26px !important;
}
}
/* #endif */
/* 自定义导航栏 */
.custom-nav {
background: #107AFD;
width: 100%;
.nav-content {
height: 200rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 40rpx;
.nav-back {
width: 120rpx;
height: 200rpx;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-weight: 300;
.iconfont{
font-size: 40px!important;
}
}
.nav-title {
color: #fff;
font-size: 72rpx;
font-weight: bold;
}
.nav-placeholder {
width: 120rpx;
}
}
}
.policy-list-card {
width: 100%;
margin: 0 auto;
color: #333333;
/* 政策卡片大边距与内边距 */
margin-bottom: 48rpx;
box-sizing: border-box;
display: flex;
background: linear-gradient(180deg, #F0F8FF 0%, #FFFFFF 100%);
padding: 64rpx 48rpx;
border-radius: 16rpx;
border: 1px solid #D1E5FF;
box-shadow: 0px 4rpx 12rpx 0px rgba(16, 122, 253, 0.05);
.card-left {
/* 加宽左侧保护不再折行 */
width: 220rpx;
flex-shrink: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-right: 1px solid #E5EEFA;
/* 增大左右空隙 */
margin-right: 48rpx;
.clock-icon {
width: 52rpx;
height: 52rpx;
margin-bottom: 12rpx;
}
.date-md {
font-size: 60rpx;
font-weight: bold;
color: #107afd;
line-height: 1;
margin-bottom: 12rpx;
}
.date-year {
font-size: 40rpx;
color: #107afd;
line-height: 1;
}
}
.card-right {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
.card-title {
font-size: 64rpx;
font-weight: bold;
color: #333;
margin-bottom: 24rpx;
line-height: 1.4;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.card-infos {
display: flex;
flex-wrap: wrap;
.info-tag {
font-size: 48rpx;
color: #999;
margin-right: 24rpx;
}
}
}
}
</style>