diff --git a/app.json b/app.json
index 523d09a..5c7e403 100644
--- a/app.json
+++ b/app.json
@@ -25,6 +25,7 @@
"pages/webview/webview",
"pages/agreement/agreement",
"pages/notice/notice",
+ "pages/noticeNew/noticeNew",
"pages/info/info",
"pages/noticeDetail/noticeDetail",
"pages/newsDetail/newsDetail",
diff --git a/pages/indexNew/indexNew.js b/pages/indexNew/indexNew.js
index 3312266..18805d7 100644
--- a/pages/indexNew/indexNew.js
+++ b/pages/indexNew/indexNew.js
@@ -363,7 +363,7 @@ Page({
// 点击-更多,跳转通知列表
moreNotice() {
wx.navigateTo({
- url: '/subpages/home/pages/notice/notice'
+ url: '/subpages/home/pages/noticeNew/noticeNew'
})
// wx.miniProgram.navigateTo({ url: '/pages/detail/detail?weburl=' + encodeURIComponent(global.baseURL + 'notice?departmentName=' + sessionStorage.getItem('departmentName')) })
},
diff --git a/subpages/home/images/ic_zhengce.png b/subpages/home/images/ic_zhengce.png
new file mode 100644
index 0000000..26eb97d
Binary files /dev/null and b/subpages/home/images/ic_zhengce.png differ
diff --git a/subpages/home/pages/noticeNew/noticeNew.js b/subpages/home/pages/noticeNew/noticeNew.js
new file mode 100644
index 0000000..def5922
--- /dev/null
+++ b/subpages/home/pages/noticeNew/noticeNew.js
@@ -0,0 +1,140 @@
+// subpages/home/pages/noticeNew/noticeNew.js
+const api = require('../../../../utils/understandJs')
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ pageIndex: 1,
+ pageSize: 10,
+ noticeCategory: '5',//模块编码(1-印象,2-味道,5-政策导航最新,6-政策导航最热)
+ noticelist: [],
+ selectTab: 'tab1',
+ nodata: false,
+ loadMoreType: 'none',
+ loadMoreVisible: false,
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.noticelist();
+ },
+
+ // 加载网格长管辖的网格列表
+ noticelist() {
+ let that = this
+ let params = {
+ pageIndex: that.data.pageIndex,
+ pageSize: that.data.pageSize,
+ noticeCategory: that.data.noticeCategory
+ }
+
+ api.noticelist(params).then(res => {
+ that.setData({
+ noticelist: that.data.noticelist.concat(res.data),
+ loadMoreType: res.data.length === that.data.pageSize ? 'loading' : 'none',
+ loadMoreVisible: res.data.length === that.data.pageSize ? false : true
+ })
+ if (that.data.noticelist.length == 0) {//没有值
+ that.setData({
+ nodata: true,
+ loadMoreType: 'none',
+ loadMoreVisible: false,
+ })
+ }
+ }).catch(err => {
+ that.setData({
+ noticelist: [],
+ nodata: true,
+ loadMoreType: 'none',
+ loadMoreVisible: false,
+ })
+ console.log(err)
+ })
+ },
+
+ // tab 切换
+ onTabChange(e) {
+ if (e.currentTarget.dataset.tab == 'tab1') {//最新政策
+ this.setData({//模块编码(1-印象,2-味道,5-政策导航最新,6-政策导航最热)
+ noticeCategory: '5',
+ })
+ } else {//最新通知
+ this.setData({
+ noticeCategory: '6',
+ })
+ }
+ this.setData({
+ selectTab: e.currentTarget.dataset.tab,
+ noticelist: [],
+ loadMoreType: 'loading',
+ loadMoreVisible: true,
+ })
+
+ this.noticelist();
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.setData({
+ loadMoreVisible: true
+ })
+ if (this.data.loadMoreType === 'loading') {
+ this.setData({
+ pageIndex: this.data.pageIndex + 1,
+ pageSize: this.data.pageSize,
+ })
+ this.deptinfolist();
+ }
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+ toDetail(e) {
+ console.log(e.currentTarget.dataset.id)
+ wx.navigateTo({ url: '/subpages/home/pages/noticeDetail/noticeDetail?id=' + e.currentTarget.dataset.id })
+ }
+})
\ No newline at end of file
diff --git a/subpages/home/pages/noticeNew/noticeNew.json b/subpages/home/pages/noticeNew/noticeNew.json
new file mode 100644
index 0000000..97c5fb1
--- /dev/null
+++ b/subpages/home/pages/noticeNew/noticeNew.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "load-more": "../../../../components/loadMore/loadMore",
+ "no-data":"../../../../components/nodata/nodata"
+ },
+ "navigationBarTitleText": "政策导航"
+}
\ No newline at end of file
diff --git a/subpages/home/pages/noticeNew/noticeNew.wxml b/subpages/home/pages/noticeNew/noticeNew.wxml
new file mode 100644
index 0000000..30c7c3b
--- /dev/null
+++ b/subpages/home/pages/noticeNew/noticeNew.wxml
@@ -0,0 +1,25 @@
+
+
+ 最新政策
+
+ 最新通知
+
+
+
+
+
+
+ {{item.noticeTitle}}
+
+
+ {{item.deptName}}
+ {{item.noticeTime}}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/subpages/home/pages/noticeNew/noticeNew.wxss b/subpages/home/pages/noticeNew/noticeNew.wxss
new file mode 100644
index 0000000..23ab170
--- /dev/null
+++ b/subpages/home/pages/noticeNew/noticeNew.wxss
@@ -0,0 +1,95 @@
+page {
+ background: #f7f7f7;
+}
+
+.tab-bar {
+ width: 100%;
+ height: 80rpx;
+ background: #fff;
+ display: flex;
+ justify-content: space-around;
+ position: relative;
+}
+
+.tab-bar .tab {
+ flex: 1;
+ height: 80rpx;
+ line-height: 80rpx;
+ text-align: center;
+ width: 50%;
+ font-size: 32rpx;
+ font-weight: 500;
+ color: rgba(153, 153, 153, 1);
+}
+
+.tab-bar .select-tab {
+ color: #b20004;
+ font-size: 32rpx;
+ font-weight: bold;
+}
+
+.tab-bar .select-bar {
+ width: 40rpx;
+ height: 8rpx;
+ border-radius: 5rpx;
+ background: #b20004;
+ position: absolute;
+ bottom: 0rpx;
+}
+
+.tab-bar .select-bar.tab1 {
+ left: calc(25% - 15rpx);
+ transition: left linear 0.4s;
+}
+
+.tab-bar .select-bar.tab2 {
+ left: calc(75% - 15rpx);
+ transition: left linear 0.4s;
+}
+
+/* 列表样式 */
+.list-lu .list-li:first-child {
+ margin-top: 27rpx;
+}
+
+.list-li {
+ width: 100%;
+ background: #fff;
+ padding: 38rpx 30rpx;
+ margin-top: 16rpx;
+}
+
+.list-li .item-name {
+ width: calc(100% - 60rpx);
+ font-size: 34rpx;
+ font-weight: 500;
+ color: rgba(51, 51, 51, 1);
+ line-height: 52rpx;
+}
+
+.list-li .item-info {
+ width: calc(100% - 60rpx);
+ height: 28rpx;
+ margin-top: 30rpx;
+ display: flex;
+ align-items: center;
+}
+
+.list-li .item-info image {
+ width: 28rpx;
+ height: 28rpx;
+}
+
+.list-li .item-info .street {
+ margin-left: 11rpx;
+ font-size: 24rpx;
+ font-weight: 500;
+ color: rgba(153, 153, 153, 1);
+}
+
+.list-li .item-info .time {
+ margin-left: 22rpx;
+ font-size: 24rpx;
+ font-weight: 500;
+ color: rgba(153, 153, 153, 1);
+}
\ No newline at end of file
diff --git a/subpages/understandJs/pages/impression/impression.js b/subpages/understandJs/pages/impression/impression.js
index bb336db..06f7e50 100644
--- a/subpages/understandJs/pages/impression/impression.js
+++ b/subpages/understandJs/pages/impression/impression.js
@@ -13,6 +13,7 @@ Page({
loadMoreType: 'none',
loadMoreVisible: false,
noticeCategory: '1',//模块编码(0-政策导航,1-印象,2-味道)
+ noticeContentNew:'',
},
/**
@@ -29,9 +30,16 @@ Page({
noticeCategory: that.data.noticeCategory
}
api.noticelist(params).then(function (res) { //了解锦水-模块管理接口
- console.log(JSON.stringify(res))
+ let noticelistObj = {}
+ let noticelistItem = []
+ for(var i = 0; i < res.data.length; i++){
+ noticelistObj= res.data[i]
+ noticelistObj.noticeContentNew = res.data[i].noticeContent.replace(/
{{item.noticeTitle}}
- 我们城市建设在转变城市功能的同时,更加关注于群众的生活质量的提升,给予百姓以更多的关心和方便我们城市建设在转变城市功能的同时,更加关注于群众的生活质量的提升,给予百姓以更多的关心和方便
+
+
+
diff --git a/subpages/understandJs/pages/impression/impression.wxss b/subpages/understandJs/pages/impression/impression.wxss
index 14e486a..860c0ed 100644
--- a/subpages/understandJs/pages/impression/impression.wxss
+++ b/subpages/understandJs/pages/impression/impression.wxss
@@ -7,10 +7,11 @@ page {
padding: 40rpx 28rpx;
margin-top: 16rpx;
background: #fff;
+ box-sizing: border-box;
}
.list-item .name {
- width: calc(100% - 56rpx);
+ /* width: calc(100% - 56rpx); */
font-size: 34rpx;
font-weight: 500;
color: rgba(51, 51, 51, 1);
@@ -18,7 +19,7 @@ page {
}
.list-item .info {
- margin-top: 15rpx;
+ /* margin-top: 15rpx;
width: calc(100% - 56rpx);
font-size: 28rpx;
font-weight: 500;
@@ -27,5 +28,25 @@ page {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
+ overflow: hidden; */
+
+ margin-top: 15rpx;
+ /* width: calc(100% - 56rpx); */
+ height: 75rpx;
+ font-size: 28rpx;
+ font-family: PingFang SC;
+ font-weight: 500;
+ color: rgba(153, 153, 153, 1);
+}
+
+.list-item .info rich-text {
+ /* width:100%; */
+ line-height: 44rpx;
+ display: -webkit-box;
overflow: hidden;
+ text-overflow: ellipsis;
+ word-wrap: break-word;
+ white-space: normal !important;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
}
\ No newline at end of file