first commit

This commit is contained in:
2024-01-06 10:35:41 +08:00
commit bf3a62d426
61 changed files with 1464 additions and 0 deletions

86
pages/policy/policy.js Normal file
View File

@@ -0,0 +1,86 @@
// pages/policy/policy.js
Page({
/**
* 页面的初始数据
*/
data: {
policies: [
{ title: "政策标题1", date: "2024-01-01" },
{ title: "政策标题2", date: "2023-01-02" },
{ title: "政策标题3", date: "2022-01-02" },
{ title: "政策标题4", date: "2023-01-02" },
{ title: "政策标题5", date: "2022-01-02" },
{ title: "政策标题6", date: "2023-01-02" },
{ title: "政策标题7", date: "2021-01-02" },
{ title: "政策标题8", date: "2021-01-02" },
{ title: "政策标题9", date: "2024-02-02" },
{ title: "政策标题10", date: "2024-03-02" },
{ title: "政策标题11", date: "2024-04-02" },
{ title: "政策标题12", date: "2024-01-02" },
{ title: "政策标题13", date: "2024-01-02" },
{ title: "政策标题14", date: "2024-01-02" },
{ title: "政策标题15", date: "2024-01-02" },
{ title: "政策标题16", date: "2024-01-02" },
{ title: "政策标题17", date: "2024-01-02" },
// 更多政策数据...
]
// 更多数据...
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

5
pages/policy/policy.json Normal file
View File

@@ -0,0 +1,5 @@
{
"usingComponents": {},
"navigationBarTextStyle": "white",
"navigationBarTitleText": "政策查询"
}

21
pages/policy/policy.wxml Normal file
View File

@@ -0,0 +1,21 @@
<view class="policy-page">
<!-- 搜索框 -->
<view class="search-bar">
<input type="text" placeholder="请输入关键字搜索" confirm-type="search" />
</view>
<!-- 政策列表 -->
<view class="policy-list">
<!-- 循环遍历政策数据 -->
<block wx:for="{{policies}}" wx:key="unique">
<!-- 每项政策使用圆角矩形卡片展示 -->
<view class="policy-card">
<view class="policy-item">
<view class="title">{{item.title}}
</view>
<view class="date">发布时间:{{item.date}}</view>
</view>
</view>
</block>
</view>
</view>

36
pages/policy/policy.wxss Normal file
View File

@@ -0,0 +1,36 @@
.policy-page {
display: flex;
flex-direction: column;
}
.search-bar input {
width: 90%;
padding: 10px;
border: 1px solid #ccc; /* 轻微边框 */
border-radius: 5px; /* 圆角 */
margin:0 auto; /* 上下保持0左右自动实现水平居中 */
}
.policy-list .policy-item {
padding: 10px;
}
.policy-item .title {
font-size: 18px;
color: #333;
}
.policy-item .date {
font-size: 14px; /* 日期字体大小 */
color: #666; /* 日期颜色 */
margin-top: 5px;
}
.policy-card {
background-color: white; /* 卡片背景色 */
border-radius: 10px; /* 圆角 */
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */
margin: 10px; /* 外边距,根据需要调整 */
padding: 15px; /* 内边距,根据需要调整 */
}