diff --git a/app.json b/app.json index b4fbde0..30ced87 100644 --- a/app.json +++ b/app.json @@ -110,7 +110,8 @@ "pages/volunteer/volunteer", "pages/signed/signed", "pages/refusedOrEndedDetail/refusedOrEndedDetail", - "pages/cancelDetail/cancelDetail" + "pages/cancelDetail/cancelDetail", + "pages/noticeDetail/noticeDetail" ] }, { @@ -134,7 +135,9 @@ "pages/warning/warning", "pages/policyList/policyList", "pages/noticeDetail/noticeDetail", - "pages/search/search" + "pages/search/search", + "pages/laobingzaixian/laobingzaixian", + "pages/laobingzaixianDict/laobingzaixianDict" ] } ], diff --git a/pages/toRegister/toRegister.js b/pages/toRegister/toRegister.js index 195c7dc..32e7c8e 100644 --- a/pages/toRegister/toRegister.js +++ b/pages/toRegister/toRegister.js @@ -21,7 +21,7 @@ Page({ // } // }) let that = this - const versionNum = "1.4.40" + const versionNum = "1.4.41" api.getScanSwitch(versionNum).then(function (res) { console.log(res.data) let state = res.data.scanFlag diff --git a/project.config.json b/project.config.json index 02ca678..2e9e0fe 100644 --- a/project.config.json +++ b/project.config.json @@ -43,15 +43,12 @@ "simulatorPluginLibVersion": {}, "condition": { "search": { - "current": -1, "list": [] }, "conversation": { - "current": -1, "list": [] }, "plugin": { - "current": -1, "list": [] }, "game": { @@ -59,11 +56,9 @@ "list": [] }, "gamePlugin": { - "current": -1, "list": [] }, "miniprogram": { - "current": -1, "list": [ { "id": 0, diff --git a/subpages/heart/pages/noticeDetail/noticeDetail.js b/subpages/heart/pages/noticeDetail/noticeDetail.js new file mode 100644 index 0000000..11ec711 --- /dev/null +++ b/subpages/heart/pages/noticeDetail/noticeDetail.js @@ -0,0 +1,14 @@ +// const api = require('../../../../utils/home') +// import util from '../../../../utils/util' +// import { getTimestamp } from '../../../../utils/common' +Page({ + data: { + noticeObj: {} + }, + onLoad (options) { + this.data.noticeObj = {...options} + this.setData({ + noticeObj:this.data.noticeObj + }) + } +}) \ No newline at end of file diff --git a/subpages/heart/pages/noticeDetail/noticeDetail.json b/subpages/heart/pages/noticeDetail/noticeDetail.json new file mode 100644 index 0000000..55ae250 --- /dev/null +++ b/subpages/heart/pages/noticeDetail/noticeDetail.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "parser": "../../../../components/parser/parser" + }, + "navigationBarTitleText": "通知详情" +} \ No newline at end of file diff --git a/subpages/heart/pages/noticeDetail/noticeDetail.wxml b/subpages/heart/pages/noticeDetail/noticeDetail.wxml new file mode 100644 index 0000000..c713640 --- /dev/null +++ b/subpages/heart/pages/noticeDetail/noticeDetail.wxml @@ -0,0 +1,23 @@ + + + + {{noticeObj.title}} + + + {{noticeObj.content}} + + + + + \ No newline at end of file diff --git a/subpages/heart/pages/noticeDetail/noticeDetail.wxss b/subpages/heart/pages/noticeDetail/noticeDetail.wxss new file mode 100644 index 0000000..250e916 --- /dev/null +++ b/subpages/heart/pages/noticeDetail/noticeDetail.wxss @@ -0,0 +1,75 @@ +.notice-detail { + width: 100%; + height: 100%; + box-sizing: border-box; + padding: 20rpx; + background: #f7f7f7; +} +.selfContent { + width: 100%; + display: table; + background: #ffffff; + border-radius: 16rpx; + box-sizing: border-box; + padding: 0 25rpx 38rpx; +} +.detail-title { + font-family: PingFang-SC-Bold; + font-size: 48rpx; + font-weight: bold; + line-height: 68rpx; + color: #333333; + padding-top: 40rpx; +} +.detail-subtitle { + display: flex; + width: 100%; + justify-content: space-between; + font-size: 22rpx; + color: #999999; + margin-top:45rpx; +} +.detail-subtitle .left span:nth-child(1){ + margin-right: 32rpx; +} +.detail-subtitle .right{ + display: flex; + height: 32rpx; + line-height: 32rpx; +} + +.detail-subtitle .right .readNum { + /* display: inline-block; */ + width: 32rpx; + height: 32rpx; + margin-right: 10rpx; +} +.detail-subtitle .right .readNum image{ + width: 100%; + height: 100%; + float:left; + object-fit: cover; +} +.banner { + width: 100%; + height: 400rpx; + margin: 39rpx 0 19rpx 0; +} +.banner image{ + width: 100%; + height: 100%; + float:left; + object-fit: cover; + border-radius: 16rpx; + overflow: hidden; +} +.paragraph { + font-size: 38rpx; + line-height: 58rpx; + color: #333333; + text-indent: 76rpx; + margin-top:22rpx; +} +.richContent { + margin-top: 50rpx; +} \ No newline at end of file diff --git a/subpages/home/pages/info/info.js b/subpages/home/pages/info/info.js index ba4bb6f..7711012 100644 --- a/subpages/home/pages/info/info.js +++ b/subpages/home/pages/info/info.js @@ -42,7 +42,7 @@ Page({ }, lookDetail (e) { console.log("item", e.currentTarget.dataset.item) - const { id: infoId, businessId: issueId, type, businessType, relBusinessContent } = e.currentTarget.dataset.item + const { id: infoId, businessId: issueId, type, businessType, relBusinessContent, title, content } = e.currentTarget.dataset.item console.log("businessType", businessType) let params = { informationId: infoId @@ -112,6 +112,10 @@ Page({ wx.navigateTo({ url: `/subpages/heart/pages/cancelDetail/cancelDetail?id=${issueId}` }) + } else if (businessType.indexOf('points') > -1) { + wx.navigateTo({ + url: `/subpages/heart/pages/noticeDetail/noticeDetail?title=${title}&content=${content}` + }) } } else if (type === "2") { if (businessType === "topicToIssuePass") { diff --git a/subpages/home/pages/info/info.wxml b/subpages/home/pages/info/info.wxml index 533c213..4a960dd 100644 --- a/subpages/home/pages/info/info.wxml +++ b/subpages/home/pages/info/info.wxml @@ -23,7 +23,8 @@ 互动通知 - 查看详情 + + 查看详情 {{item.title}} diff --git a/subpages/oneKeyService/pages/index/index.js b/subpages/oneKeyService/pages/index/index.js index 2e3b590..71b23d5 100644 --- a/subpages/oneKeyService/pages/index/index.js +++ b/subpages/oneKeyService/pages/index/index.js @@ -75,6 +75,10 @@ Page({ wx.navigateTo({ url: `../warning/warning?modulecode=${e.currentTarget.dataset.modulecode}` }) + } else if (e.currentTarget.dataset.modulecode == 'notice_yjfu_lbzx') { + wx.navigateTo({ + url: `../laobingzaixian/laobingzaixian?modulecode=${e.currentTarget.dataset.modulecode}` + }) } } }) \ No newline at end of file diff --git a/subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.js b/subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.js new file mode 100644 index 0000000..ddad79a --- /dev/null +++ b/subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.js @@ -0,0 +1,84 @@ +// subpages/understandJs/pages/archives/archives.js +const api = require('../../../../utils/understandJs') +Page({ + + /** + * 页面的初始数据 + */ + data: { + pageIndex: 1, + pageSize: 10, + deptList: [], + nodata: false, + loadMoreType: 'none', + loadMoreVisible: false + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getFullDictInfo() + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + this.setData({ + searchContent: '' + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + this.setData({ + loadMoreVisible: true + }) + if (this.data.loadMoreType === 'loading') { + this.setData({ + pageIndex: this.data.pageIndex + 1, + pageSize: this.data.pageSize, + }) + this.getFullDictInfo() + } + }, + + getFullDictInfo () { + const dictType = 'notice_yjfu_lbzx' + api.getFullDictInfo(dictType).then(res => { + console.log(res) + this.setData({ + deptList: [...this.data.deptList,...res.data], + loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none', + loadMoreVisible: res.data.length === this.data.pageSize ? false : true + }) + if (this.data.deptList.length == 0) { + this.setData({ + nodata: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + } + }).catch(err => { + this.setData({ + deptList: [], + nodata: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + console.log(err) + }) + }, + /** + * 跳转页面 + */ + navigateToDict (e) { + console.log(e.currentTarget.dataset.dict) + wx.navigateTo({ + url: `../laobingzaixianDict/laobingzaixianDict?dictName=${e.currentTarget.dataset.dict.dictName}&dictType=${e.currentTarget.dataset.dict.dictType}&dictValue=${e.currentTarget.dataset.dict.dictValue}` + }) + } +}) \ No newline at end of file diff --git a/subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.json b/subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.json new file mode 100644 index 0000000..60b95d2 --- /dev/null +++ b/subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "老兵在线", + "usingComponents": { + "load-more": "../../../../components/loadMore/loadMore", + "no-data":"../../../../components/nodata/nodata" + } +} \ No newline at end of file diff --git a/subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.wxml b/subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.wxml new file mode 100644 index 0000000..15029e4 --- /dev/null +++ b/subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.wxml @@ -0,0 +1,16 @@ + + + {{item.dictName}} + + + + + + + + diff --git a/subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.wxss b/subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.wxss new file mode 100644 index 0000000..e805071 --- /dev/null +++ b/subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.wxss @@ -0,0 +1,121 @@ +page { + background: #f7f7f7; + height: auto; +} + +/* .top { + margin-top: 3rpx; + width: 100%; + height: 94rpx; + background: #fff; + display: flex; + justify-content: center; +} +.topbk { + position: absolute; + width: 100%; + height: 376rpx; + top: 0rpx; +} +.search { + width: calc(100% - 60rpx); + height: 66rpx; + background: rgba(255, 255, 255, 1); + border-radius: 33rpx; + display: flex; + align-items: center; + justify-content: center; + position: absolute; +} + +.search .item-all { + height: 30rpx; + width: 100%; + width: calc(100% - 60rpx); + display: flex; + align-items: center; + justify-content: space-between; +} + +.search .item-all .item-left { + width: calc(100% - 73rpx); + height: 30rpx; + border-right: 1rpx solid #BFBFBF; + display: flex; + align-items: center; + justify-content: space-between; +} + +.search .item-all .item-left image { + width: 30rpx; + height: 28rpx; +} + +.search .item-all .item-left input { + width: calc(100% - 41rpx); + height: 30rpx; + font-size: 28rpx; + color: #333; +} + +.placeholder-style { + font-size: 28rpx; + font-weight: 500; + color: rgba(168, 168, 168, 1); +} + +.search .item-all .item-right { + font-size: 28rpx; + font-weight: 500; + color: rgba(51, 51, 51, 1); + background-color: #fff; +} + +button { + width: 100rpx; + height: 58rpx; + padding: 0; + border-radius: 0; + line-height: 58rpx; +} + +button::after { + border-radius: 0px; + border: none; +} */ + +/* 列表 */ +.dept-list { + display: grid; + grid-template-columns: 1fr; + place-items: center; + gap: 20rpx 0; + width: 690rpx; + padding: 20rpx 0; + margin: 50rpx auto 0rpx; + position: relative; + z-index: 999; +} +.list-item { + width: 100%; + height: 130rpx; + background: #fff; + display: flex; + justify-content: space-between; + align-items: center; + border-radius: 14rpx; +} + +.list-item .list-name { + font-size:32rpx; + font-family:PingFang SC; + font-weight:bold; + color:rgba(51,51,51,1); + margin-left: 40rpx; +} +.list-item .list-arrow { + width: 16rpx; + height: 26rpx; + margin-right: 42rpx; +} + diff --git a/subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.js b/subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.js new file mode 100644 index 0000000..1e0b135 --- /dev/null +++ b/subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.js @@ -0,0 +1,85 @@ +// subpages/understandJs/pages/sclerotia/sclerotia.js +const api = require("../../../../utils/understandJs") +Page({ + + /** + * 页面的初始数据 + */ + data: { + pageIndex: 1, + pageSize: 10, + sclerotialist: [], + nodata: false, + loadMoreType: "none", + loadMoreVisible: false, + dictType: '', + dictValue: '', + dictName: '', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + wx.setNavigationBarTitle({ + title: options.dictName + }) + this.setData({ + dictName: options.dictName, + dictType: options.dictType, + dictValue: options.dictValue + }) + this.getSclerotiaList() + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + this.setData({ + loadMoreVisible: true + }) + if (this.data.loadMoreType === 'loading') { + this.setData({ + pageIndex: this.data.pageIndex + 1, + pageSize: this.data.pageSize, + }) + this.getSclerotiaList() + } + }, + + getSclerotiaList: function() { + let that = this + let para = { + pageIndex: this.data.pageIndex, + pageSize: this.data.pageSize, + noticeCategory: this.data.dictValue + } + api.noticelist(para).then(function(res) { + that.setData({ + sclerotialist: that.data.sclerotialist.concat(res.data), + loadMoreType: res.data.length === that.data.pageSize ? 'loading' : 'none', + }) + if (that.data.sclerotialist.length == 0) { + that.setData({ + nodata: true, + loadMoreType: 'none', + loadMoreVisible: false + }) + } + }).catch(() => { + that.setData({ + nodata: true, + loadMoreType: "none", + loadMoreVisible: false, + sclerotialist: [] + }) + }) + }, + + toDetail (e) { + wx.navigateTo({ + url: `../noticeDetail/noticeDetail?modulename=${this.data.dictName}&modulecode=${this.data.dictType}&modulevalue=${this.data.dictValue}&id=${e.currentTarget.dataset.id}` + }) + } +}) \ No newline at end of file diff --git a/subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.json b/subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.json new file mode 100644 index 0000000..8db8a6b --- /dev/null +++ b/subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "", + "usingComponents": { + "load-more": "../../../../components/loadMore/loadMore", + "no-data":"../../../../components/nodata/nodata" + } +} \ No newline at end of file diff --git a/subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.wxml b/subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.wxml new file mode 100644 index 0000000..a44cd86 --- /dev/null +++ b/subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.wxml @@ -0,0 +1,19 @@ + + + + + + + {{item.noticeTitle}} + + + {{item.deptName}} + {{filter.formatTime(item.noticeTime, 'yyyy-MM-dd')}} + + + + + + + + \ No newline at end of file diff --git a/subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.wxss b/subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.wxss new file mode 100644 index 0000000..84488fe --- /dev/null +++ b/subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.wxss @@ -0,0 +1,86 @@ +page { + background: #f7f7f7; +} + +/* 列表样式 */ + +.list-all { + /* width: calc(100% - 48rpx); + margin-left: 21rpx; + margin-top: 50rpx;*/ + width: 100%; + background-color: #fff; + } + + .list-all .list-item { + border-bottom: 1rpx solid #eaeaea; + margin-top: 16rpx; + padding: 40rpx 18rpx 30rpx 16rpx; + display: flex; + /* align-items: center; */ + } + + .list-all .list-item:first-child { + border-top: 1rpx solid #eaeaea; + } + + .list-all .list-item:last-child { + border-bottom: none; + } + + .list-all .list-item .item-info { + width: calc(100% - 220rpx); + height: 146rpx; + position: relative; + } + + .list-all .list-item .item-info .item-info-name { + width: calc(100% - 47rpx); + font-size: 32rpx; + font-weight: 500; + color: rgba(63, 63, 63, 1); + line-height: 50rpx; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + margin: 0 auto; + } + + .list-all .list-item .item-info .item-info-time { + width: calc(100% - 47rpx); + height: 22rpx; + position: absolute; + bottom: 5rpx; + display: flex; + flex-direction: row; + justify-content: space-between; + left: 22rpx; + } + + .list-all .list-item .item-info .item-info-time text { + font-size: 22rpx; + font-weight: 500; + color: rgba(170, 170, 170, 1); + line-height: 22rpx; + } + + .list-all .list-item image { + width: 220rpx; + height: 146rpx; + border-radius: 10rpx; + } + + .list-all .list-item .label { + position: absolute; + z-index: 999; + width: 34rpx; + height: 34rpx; + right: 45rpx; + } + + .list-all .list-item .label image { + position: absolute; + width: 100%; + height: 100%; + } \ No newline at end of file diff --git a/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js index c4b55f1..151a779 100644 --- a/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js +++ b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js @@ -46,6 +46,11 @@ Page({ title: '居务公开' }) this.noticeDetail(options.id) + } else if(options.modulecode == 'notice_yjfu_lbzx'){ + wx.setNavigationBarTitle({ + title: options.modulename + }) + this.noticeDetail(options.id) } }, diff --git a/utils/understandJs.js b/utils/understandJs.js index 62fb0bb..9576f8b 100644 --- a/utils/understandJs.js +++ b/utils/understandJs.js @@ -8,7 +8,8 @@ module.exports = { archivelist:archivelist, archiveDetail:archiveDetail, bannerList:bannerList, - videoBannerList:videoBannerList + videoBannerList:videoBannerList, + getFullDictInfo:getFullDictInfo } // 了解锦水-模块管理接口 function modulelist(moduleCategory='') { @@ -51,4 +52,9 @@ function videoBannerList(position) { return fly.get('news/banner/list', { position }) +} + +// 老兵在线 +function getFullDictInfo (dictType) { + return fly.get(`dic/getFullDictInfo/${dictType}`) } \ No newline at end of file