feat: 为政策详情、政策列表和首页页面增加H5/PC适配样式、隐藏滚动条,并为政策详情和列表接口失败时添加H5/APP-PLUS测试数据。
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view
|
||||
class="page"
|
||||
class="page h5-pc-page"
|
||||
style="
|
||||
background-image: url(../../../packageRc/static/pageBg.png);
|
||||
"
|
||||
@@ -34,6 +34,7 @@
|
||||
:scroll-y="true"
|
||||
style="height: calc(100vh - 232rpx); position: relative; z-index: 1"
|
||||
@scrolltolower="getBottomList"
|
||||
:show-scrollbar="false"
|
||||
>
|
||||
<view
|
||||
style="margin-bottom: 24rpx; border-radius: 16rpx"
|
||||
@@ -162,8 +163,16 @@ 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,
|
||||
title: res.msg || '获取列表失败',
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
@@ -173,6 +182,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 隐藏滚动条 */
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
-webkit-appearance: none;
|
||||
background: transparent;
|
||||
}
|
||||
.page {
|
||||
background-color: #f4f4f4 !important;
|
||||
height: 100vh;
|
||||
@@ -520,4 +537,32 @@ export default {
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/* #ifdef H5 */
|
||||
.h5-pc-page {
|
||||
width: 100% !important;
|
||||
|
||||
.input-outer-part {
|
||||
width: 80% !important;
|
||||
margin: 0 auto !important;
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
.title {
|
||||
font-size: 48rpx !important;
|
||||
margin-bottom: 24rpx !important;
|
||||
}
|
||||
.infos view {
|
||||
font-size: 36rpx !important;
|
||||
line-height: 56rpx !important;
|
||||
}
|
||||
.bottom-line {
|
||||
font-size: 34rpx !important;
|
||||
margin-top: 24rpx !important;
|
||||
}
|
||||
input {
|
||||
font-size: 36rpx !important;
|
||||
}
|
||||
}
|
||||
/* #endif */
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user