diff --git a/.vscode/settings.json b/.vscode/settings.json index 50d6220..d1d2bd5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,6 +3,6 @@ "*.cjson": "jsonc", "*.wxss": "css", "*.wxs": "javascript", - "*.wxml": "html" + "*.wxml": "wxml" } } \ No newline at end of file diff --git a/app.json b/app.json index 64810e6..b4fbde0 100644 --- a/app.json +++ b/app.json @@ -120,9 +120,22 @@ "pages/impression/impression", "pages/delicious/delicious", "pages/sclerotia/sclerotia", - "pages/archives/archives", "pages/noticeDetail/noticeDetail" ] + }, + { + "root": "subpages/oneKeyService", + "pages": [ + "pages/index/index", + "pages/directTo/directTo", + "pages/archives/archives", + "pages/archivesDept/archivesDept", + "pages/archivesDetail/archivesDetail", + "pages/warning/warning", + "pages/policyList/policyList", + "pages/noticeDetail/noticeDetail", + "pages/search/search" + ] } ], "preloadRule": { diff --git a/pages/indexNew/indexNew.js b/pages/indexNew/indexNew.js index c59941b..f52e880 100644 --- a/pages/indexNew/indexNew.js +++ b/pages/indexNew/indexNew.js @@ -226,8 +226,8 @@ Page({ getNewsList: function () { let that = this let para = { - pageIndex: 1, //this.data.pageNo, - pageSize: 5, //this.data.pageSize, + pageIndex: 1, + pageSize: 5, timestamp: getTimestamp() } api.newsList(para).then(function (res) { @@ -388,6 +388,12 @@ Page({ currentIndex: e.detail.current }) }, + //跳转到 一键服务页面(新) 2020.07.15 + toOneKeyService () { + wx.navigateTo({ + url: '/subpages/oneKeyService/pages/index/index' + }) + }, // 点击-更多,跳转通知列表 moreNotice () { wx.navigateTo({ @@ -441,8 +447,8 @@ Page({ }) } }, - // 我有事阅 6.22 - wysy () { + // 我有事阅 6.22 ->数据端 + wysy() { if(this.data.departmentId != this.data.leaderGridId){//领导网格处理 wx.showToast({ title: "无法使用该板块", @@ -507,6 +513,39 @@ Page({ }) } }, + // 我有事做 7.08 ->工作端 + wysz() { + if(this.data.departmentId != this.data.workGridId){//工作网格处理 + wx.showToast({ + title: '无法使用该板块', + icon: 'none', + duration: 3000 + }) + }else{ + if (this.verifyCompleteInfo()) { + return false + } + api.getScrip().then(res => { + if (res.code === 0 && res.msg === 'success') { + console.log('getScrip',res.data) + wx.navigateToMiniProgram({ + appId: 'wx826a8435db9e0947', + path: 'pages/login/login?scrip='+res.data, + extraData: { + scrip: res.data + }, + envVersion: 'release',//trial //develop + success(res) { + console.log(res) + }, + fail(err) { + console.log(err) + } + }) + } + }) + } + }, dqhd() { wx.navigateTo({ url: "../../subpages/associationNew/pages/associationlist/associationlist" diff --git a/pages/indexNew/indexNew.wxml b/pages/indexNew/indexNew.wxml index 0b0b4e5..89b3998 100644 --- a/pages/indexNew/indexNew.wxml +++ b/pages/indexNew/indexNew.wxml @@ -129,16 +129,16 @@ 积分排名 - - 政策导航 + 一键服务 - 了解锦水 + 解码锦水 + + + + + + + + {{item.dept}} + + + + + + + + diff --git a/subpages/understandJs/pages/archives/archives.wxss b/subpages/oneKeyService/pages/archives/archives.wxss similarity index 64% rename from subpages/understandJs/pages/archives/archives.wxss rename to subpages/oneKeyService/pages/archives/archives.wxss index 701c017..261705e 100644 --- a/subpages/understandJs/pages/archives/archives.wxss +++ b/subpages/oneKeyService/pages/archives/archives.wxss @@ -2,25 +2,30 @@ page { background: #f7f7f7; } -.mian { +.top { margin-top: 3rpx; width: 100%; height: 94rpx; background: #fff; display: flex; - align-items: center; + justify-content: center; +} +.topbk { + position: absolute; + width: 100%; + height: 376rpx; + top: 0rpx; } - .search { /* margin-top: 17rpx; */ width: calc(100% - 60rpx); height: 66rpx; - margin-left: 30rpx; - background: rgba(242, 242, 242, 1); + background: rgba(255, 255, 255, 1); border-radius: 33rpx; display: flex; align-items: center; justify-content: center; + position: absolute; } .search .item-all { @@ -64,14 +69,15 @@ page { font-size: 28rpx; font-weight: 500; color: rgba(51, 51, 51, 1); + background-color: #fff; } button { - width: 53rpx; - height: 28rpx; + width: 100rpx; + height: 58rpx; padding: 0; border-radius: 0; - line-height: 28rpx; + line-height: 58rpx; } button::after { @@ -80,38 +86,38 @@ button::after { } /* 列表 */ +.dept-list { + display: grid; + grid-template-columns: 1fr; + place-items: center; + gap: 30rpx 0; + width: 690rpx; + padding: 20rpx 0; + margin: 0 auto; + position: absolute; + top: 296rpx; + left: 30rpx; +} .list-item { - margin-top: 16rpx; - padding-top: 30rpx; width: 100%; - height: 170rpx; + height: 130rpx; background: #fff; + display: flex; + justify-content: space-between; + align-items: center; + border-radius: 14rpx; } .list-item .list-name { - width: calc(100% - 60rpx); - margin-left: 30rpx; - font-size: 34rpx; - font-weight: 500; - color: rgba(51, 51, 51, 1); -} -.list-item .list-position { - width: calc(100% - 60rpx); - margin-left: 30rpx; + 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-top: 35rpx; - display: flex; - align-items: center; -} -.list-item .list-position image{ - width: 30rpx; - height: 22rpx; -} -.list-item .list-position .list-position-name{ - margin-left: 10rpx; - font-size:26rpx; - font-weight:500; - color:rgba(170,170,170,1); - line-height:26rpx; + margin-right: 42rpx; } diff --git a/subpages/oneKeyService/pages/archivesDept/archivesDept.js b/subpages/oneKeyService/pages/archivesDept/archivesDept.js new file mode 100644 index 0000000..0629490 --- /dev/null +++ b/subpages/oneKeyService/pages/archivesDept/archivesDept.js @@ -0,0 +1,114 @@ +// subpages/understandJs/pages/archivesDept/archivesDept.js +const api = require('../../../../utils/understandJs') +Page({ + /** + * 页面的初始数据 + */ + data: { + pageIndex: 1, + pageSize: 10, + searchContent: '', + deptId:'', + archivesList: [], + nodata: false, + loadMoreType: 'none', + loadMoreVisible: false, + deptName: '', + listType: 0 //档案列表样式 1-搜索样式 0-无搜索样式 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + console.log(options) + this.setData({ + searchContent: options.searchContent, + deptId: options.deptId, + deptName: options.dept, + listType: options.searchContent.length + }) + wx.setNavigationBarTitle({ + title: options.dept + }) + this.search(this.data.deptId, this.data.searchContent) + }, + + bindInputValue (e) { + this.setData({ + searchContent: e.detail.value + }) + }, + + searchFile () { + this.data.archivesList = [] + this.search(this.data.deptId, this.data.searchContent) + }, + + search(deptId, keywords) { + let params = { + pageIndex: this.data.pageIndex, + pageSize: this.data.pageSize, + deptId, + searchContent: keywords + } + api.archivelist(params).then(res => { + console.log('搜索接口', res); + this.setData({ + archivesList: [...this.data.archivesList,...res.data], + nodata: false, + loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none', + loadMoreVisible: res.data.length === this.data.pageSize ? false : true + }) + if (this.data.archivesList.length == 0) {//没有值 + this.setData({ + nodata: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + } else if (keywords != '') { + let reg = new RegExp(keywords,'g') + this.data.archivesList.forEach(item => { + item.title = item.title.replace(reg,''+keywords+'') + // item.archivesNum = item.archivesNum.replace(reg,''+keywords+'') + }) + this.setData({ + archivesList: this.data.archivesList + }) + console.log(this.data.archivesList) + } + }).catch(err => { + this.setData({ + archivesList: [], + nodata: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + console.log(err) + }) + }, + /** + * 跳转到档案详情 + */ + goToArchivesDetail (e) { + console.log(e.currentTarget.dataset) + wx.navigateTo({ + url: `../archivesDetail/archivesDetail?archiveId=${e.currentTarget.dataset.archiveId}` + }) + }, + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + this.setData({ + loadMoreVisible: true + }) + if (this.data.loadMoreType === 'loading') { + this.setData({ + pageIndex: this.data.pageIndex + 1, + pageSize: this.data.pageSize, + }) + this.search(this.data.deptId, this.data.searchContent) + } + } +}) \ No newline at end of file diff --git a/subpages/oneKeyService/pages/archivesDept/archivesDept.json b/subpages/oneKeyService/pages/archivesDept/archivesDept.json new file mode 100644 index 0000000..6f1be8c --- /dev/null +++ b/subpages/oneKeyService/pages/archivesDept/archivesDept.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/oneKeyService/pages/archivesDept/archivesDept.wxml b/subpages/oneKeyService/pages/archivesDept/archivesDept.wxml new file mode 100644 index 0000000..29c978e --- /dev/null +++ b/subpages/oneKeyService/pages/archivesDept/archivesDept.wxml @@ -0,0 +1,42 @@ + + + + + + + + + + + + +{{deptName}}档案 + + + + + + + + + + + + + + + + + + + diff --git a/subpages/oneKeyService/pages/archivesDept/archivesDept.wxss b/subpages/oneKeyService/pages/archivesDept/archivesDept.wxss new file mode 100644 index 0000000..45f83f4 --- /dev/null +++ b/subpages/oneKeyService/pages/archivesDept/archivesDept.wxss @@ -0,0 +1,161 @@ +/* subpages/understandJs/pages/archivesDept/archivesDept.wxss */ +page { + background: #f7f7f7; +} + +.top { + margin-top: 3rpx; + width: 100%; + height: 94rpx; + background: #fff; + display: flex; + align-items: center; +} + +.search { + /* margin-top: 17rpx; */ + width: calc(100% - 60rpx); + height: 66rpx; + margin-left: 30rpx; + background: rgba(242, 242, 242, 1); + border-radius: 33rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.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 { + /* background: red; */ + 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: rgba(242, 242, 242, 1); +} + +button { + width: 100rpx; + height: 58rpx; + padding: 0; + border-radius: 0; + line-height: 58rpx; +} + +button::after { + border-radius: 0px; + border: none; +} + +.archives-list { + width: 100%; + margin: 16rpx 0rpx auto; + display: flex; + flex-direction: column; +} +.archives-list .search-archives-item { + margin-top: 16rpx; +} +.archives-dept { + height: 94rpx; + background-color: white; + line-height: 94rpx; + padding-left: 32rpx; + font-size:32rpx; + font-family:PingFang SC; + font-weight:bold; + color:rgba(51,51,51,1); +} + +.search-archives-id { + background-color: white; + height: 94rpx; + line-height: 94rpx; + font-size:32rpx; + font-family:PingFang SC; + font-weight:bold; + color:rgba(51,51,51,1); + padding: 0rpx 32rpx; + box-sizing: border-box; +} +.search-archives-title { + background-color: white; + line-height: 52rpx; + font-size:30rpx; + font-family:PingFang SC; + font-weight:400; + color:rgba(101,101,101,1); + padding: 28rpx 32rpx 32rpx; + box-sizing: border-box; + overflow: hidden; +} +.search-archives-line { + width:690rpx; + height:1px; + background:rgba(241,241,241,1); + border-radius:0px; + margin: 0 auto; +} +.archives-id { + background-color: white; + height: 94rpx; + line-height: 94rpx; + font-size:30rpx; + font-family:PingFang SC; + font-weight:400; + color:rgba(101,101,101,1); + padding: 0rpx 32rpx; + box-sizing: border-box; +} +.archives-title { + background-color: white; + line-height: 52rpx; + font-size:30rpx; + font-family:PingFang SC; + font-weight:400; + color:rgba(101,101,101,1); + padding: 0rpx 32rpx 32rpx; + box-sizing: border-box; + overflow: hidden; +} +.archives-line { + width:690rpx; + height:1px; + background:rgba(241,241,241,1); + border-radius:0px; + margin: 0 auto; +} \ No newline at end of file diff --git a/subpages/understandJs/pages/archives/archives.js b/subpages/oneKeyService/pages/archivesDetail/archivesDetail.js similarity index 59% rename from subpages/understandJs/pages/archives/archives.js rename to subpages/oneKeyService/pages/archivesDetail/archivesDetail.js index 014245e..cd1cdb1 100644 --- a/subpages/understandJs/pages/archives/archives.js +++ b/subpages/oneKeyService/pages/archivesDetail/archivesDetail.js @@ -1,20 +1,36 @@ -// subpages/understandJs/pages/archives/archives.js +// subpages/understandJs/pages/archivesDetail/archivesDetail.js +const api = require('../../../../utils/understandJs') Page({ /** * 页面的初始数据 */ data: { - + archiveId: '', + archiveContent: '', + preloadVisible: true }, /** * 生命周期函数--监听页面加载 */ - onLoad: function () { - + onLoad: function (options) { + console.log(options) + this.setData({ + archiveId: options.archiveId + }) + this.archiveDetail() }, + archiveDetail () { + api.archiveDetail(this.data.archiveId).then(res => { + console.log('档案详情', res); + this.setData({ + archiveContent: res.data, + preloadVisible: false + }); + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ @@ -62,13 +78,5 @@ Page({ */ onShareAppMessage: function () { - }, - - searchFile () { - wx.showToast({ - title: "未查询到相关档案", - icon: "none", - duration: 2000 - }) } }) \ No newline at end of file diff --git a/subpages/oneKeyService/pages/archivesDetail/archivesDetail.json b/subpages/oneKeyService/pages/archivesDetail/archivesDetail.json new file mode 100644 index 0000000..5c63958 --- /dev/null +++ b/subpages/oneKeyService/pages/archivesDetail/archivesDetail.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "preload-archives-detail": "../../compontents/preLoadArchivesDetail/preLoadArchivesDetail" + }, + "navigationBarTitleText": "档案内容" +} \ No newline at end of file diff --git a/subpages/oneKeyService/pages/archivesDetail/archivesDetail.wxml b/subpages/oneKeyService/pages/archivesDetail/archivesDetail.wxml new file mode 100644 index 0000000..4b964ce --- /dev/null +++ b/subpages/oneKeyService/pages/archivesDetail/archivesDetail.wxml @@ -0,0 +1,20 @@ + + + + 档号: {{archiveContent.archivesNum||'无'}} + + 文号: {{archiveContent.docNum||'无'}} + + 责任人: {{archiveContent.responsible||'无'}} + + 题名: {{archiveContent.title||'无'}} + + 日期: {{archiveContent.archiveTime||'无'}} + + 页数: {{archiveContent.pageSize||'无'}} + + 备注: {{archiveContent.remark||'无'}} + + + + diff --git a/subpages/oneKeyService/pages/archivesDetail/archivesDetail.wxss b/subpages/oneKeyService/pages/archivesDetail/archivesDetail.wxss new file mode 100644 index 0000000..2a4ec74 --- /dev/null +++ b/subpages/oneKeyService/pages/archivesDetail/archivesDetail.wxss @@ -0,0 +1,15 @@ +/* subpages/understandJs/pages/archivesDetail/archivesDetail.wxss */ +.archive-item { + font-size: 32rpx; + font-family: PingFang SC; + font-weight: 500; + color: rgba(51,51,51,1); + margin: 34rpx 32rpx; +} +.archive-line { + width:690rpx; + height:1px; + background:rgba(242,242,242,1); + border-radius:1px; + margin: 0 auto; +} \ No newline at end of file diff --git a/subpages/oneKeyService/pages/directTo/directTo.js b/subpages/oneKeyService/pages/directTo/directTo.js new file mode 100644 index 0000000..36e5228 --- /dev/null +++ b/subpages/oneKeyService/pages/directTo/directTo.js @@ -0,0 +1,127 @@ +const api = require('../../../../utils/understandJs') +Page({ + + /** + * 页面的初始数据 + */ + data: { + pageIndex: 1, + pageSize: 10, + deptinfolist: [], + nodata: false, + loadMoreType: 'none', + loadMoreVisible: false, + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.deptinfolist() + }, + //了解锦水-硬核管理接口 + deptinfolist() { + let that = this; + let params = { + pageIndex: that.data.pageIndex, + pageSize: that.data.pageSize, + } + api.deptinfolist(params).then(function (res) { //了解锦水-模块管理接口 + that.setData({ + deptinfolist: that.data.deptinfolist.concat(res.data), + loadMoreType: res.data.length === that.data.pageSize ? 'loading' : 'none', + loadMoreVisible: res.data.length === that.data.pageSize ? false : true + }) + if (that.data.deptinfolist.length == 0) {//没有值 + that.setData({ + nodata: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + } + }).catch(err => { + that.setData({ + deptinfolist: [], + nodata: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + console.log(err) + }) + }, + mobile(e) { + wx.showModal({ + title: '拨打电话', + content: `您确定拨打${e.currentTarget.dataset.mobile}`, + cancelColor: '#29B9A5', + confirmColor: '#29B9A5', + success: (res) => { + if (res.confirm) { + console.log('用户点击确定') + wx.makePhoneCall({ + phoneNumber: e.currentTarget.dataset.mobile + }) + } else if (res.cancel) { + console.log('用户点击取消') + } + } + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + 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 () { + + } +}) \ No newline at end of file diff --git a/subpages/oneKeyService/pages/directTo/directTo.json b/subpages/oneKeyService/pages/directTo/directTo.json new file mode 100644 index 0000000..4e70b63 --- /dev/null +++ b/subpages/oneKeyService/pages/directTo/directTo.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/directTo/directTo.wxml b/subpages/oneKeyService/pages/directTo/directTo.wxml new file mode 100644 index 0000000..2fa3bf5 --- /dev/null +++ b/subpages/oneKeyService/pages/directTo/directTo.wxml @@ -0,0 +1,24 @@ + + + {{item.deptName}} + + + + + {{item.mobile}} + + + + + + + + \ No newline at end of file diff --git a/subpages/oneKeyService/pages/directTo/directTo.wxss b/subpages/oneKeyService/pages/directTo/directTo.wxss new file mode 100644 index 0000000..738cd14 --- /dev/null +++ b/subpages/oneKeyService/pages/directTo/directTo.wxss @@ -0,0 +1,42 @@ +page { + background: #f7f7f7; +} + +.list-item { + margin-top: 16rpx; + background: #fff; + height: 196rpx; + width: 100%; + padding: 0 30rpx; +} + +.list-item .top { + width: calc(100% - 60rpx); + height: 90rpx; + border-bottom: 1rpx solid #f7f7f7; + font-size: 34rpx; + font-weight: bold; + color: rgba(51, 51, 51, 1); + line-height: 90rpx; +} + +.list-item .bottom { + width: calc(100% - 60rpx); + height: 106rpx; + display: flex; + align-items: center; + justify-content: space-between; +} + +.list-item .bottom .name { + height: 106rpx; + line-height: 106rpx; + font-size: 34rpx; + font-weight: 500; + color: rgba(119, 119, 119, 1); +} + +.list-item .bottom image { + width: 156rpx; + height: 56rpx; +} \ No newline at end of file diff --git a/subpages/oneKeyService/pages/images/ic_yueduliang.png b/subpages/oneKeyService/pages/images/ic_yueduliang.png new file mode 100644 index 0000000..7d6f21f Binary files /dev/null and b/subpages/oneKeyService/pages/images/ic_yueduliang.png differ diff --git a/subpages/oneKeyService/pages/index/index.js b/subpages/oneKeyService/pages/index/index.js new file mode 100644 index 0000000..e3e88f3 --- /dev/null +++ b/subpages/oneKeyService/pages/index/index.js @@ -0,0 +1,64 @@ +const api = require('../../../../utils/understandJs') +Page({ + + /** + * 页面的初始数据 + */ + data: { + moduleCategory: 'module_type_service', //module_type_jmjs (解码锦水) //module_type_service (一键服务) + modulelist: [] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.modulelist() + }, + modulelist() { + let that = this; + api.modulelist(that.data.moduleCategory).then(function (res) { + that.setData({ + modulelist: res.data, + }) + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + // wx.showToast({ + // title: '敬请期待', + // icon: 'none', + // duration: 1000 + // }) + //政策、通知 /subpages/home/pages/noticeNew/noticeNew + goDetails(e) {//模块编码(政策,通知,档案,警事,一键直通) + console.log(JSON.stringify(e.currentTarget.dataset) + e.currentTarget.dataset.modulecode) + if (e.currentTarget.dataset.modulecode == 'notice_navigation_hot') { + wx.navigateTo({ + url: `../policyList/policyList?modulecode=${e.currentTarget.dataset.modulecode}` + }) + } else if (e.currentTarget.dataset.modulecode == 'notice_navigation_new') { + wx.navigateTo({ + url: `../policyList/policyList?modulecode=${e.currentTarget.dataset.modulecode}` + }) + } else if (e.currentTarget.dataset.modulecode == 'module_file') { + wx.navigateTo({ + url: '../archives/archives' + }) + } else if (e.currentTarget.dataset.modulecode == 'notice_warning') { + wx.navigateTo({ + url: `../warning/warning?modulecode=${e.currentTarget.dataset.modulecode}` + }) + } else if (e.currentTarget.dataset.modulecode == 'module_hardcore') { + wx.navigateTo({ + url: `../directTo/directTo?modulecode=${e.currentTarget.dataset.modulecode}` + }) + } + } +}) \ No newline at end of file diff --git a/subpages/oneKeyService/pages/index/index.json b/subpages/oneKeyService/pages/index/index.json new file mode 100644 index 0000000..c7b6a21 --- /dev/null +++ b/subpages/oneKeyService/pages/index/index.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "一键服务" +} \ No newline at end of file diff --git a/subpages/oneKeyService/pages/index/index.wxml b/subpages/oneKeyService/pages/index/index.wxml new file mode 100644 index 0000000..38e9d13 --- /dev/null +++ b/subpages/oneKeyService/pages/index/index.wxml @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/subpages/oneKeyService/pages/index/index.wxss b/subpages/oneKeyService/pages/index/index.wxss new file mode 100644 index 0000000..54ff08f --- /dev/null +++ b/subpages/oneKeyService/pages/index/index.wxss @@ -0,0 +1,52 @@ +.index { + width: calc(100% - 60rpx); + /* margin-top: 28rpx; */ + height: 300rpx; + margin-left: 30rpx; + border-radius: 10rpx; + position: relative; + margin-bottom: 28rpx; + padding: 0; + background: #fff; +} + +button::after { + border: none; +} + +.hover-btn { + box-shadow: 0 0 10rpx rgba(63, 63, 63, 0.1); +} + +.index.top { + margin-top: 28rpx; +} + +.index .img-bj { + border-radius: 10rpx; + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + z-index: 10; +} + +.index .shadow { + border-radius: 10rpx; + position: relative; + width: 100%; + height: 100%; + z-index: 999; + /* background: rgba(0, 0, 0, 1); */ + background: rgba(0, 0, 0, 0.6); + display: flex; + align-items: center; + justify-content: center; +} + +.index .shadow .img-name { + width: 210rpx; + height: 58rpx; + opacity: 1; +} diff --git a/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js new file mode 100644 index 0000000..e557b32 --- /dev/null +++ b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js @@ -0,0 +1,107 @@ +const api = require('../../../../utils/understandJs') +import util from '../../../../utils/util' +Page({ + + /** + * 页面的初始数据 + */ + data: { + noticeObj: {}, + noticeObjContent: '', + pageIndex:1, + pageSize:10, + noticeCategory:'', + preloadVisible: true + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + noticeCategory:options.modulecode + }) + if(options.modulecode == 'notice_warning'){ + wx.setNavigationBarTitle({ + title: '锦水警事' + }) + this.noticeDetail(options.id) + } + }, + + noticelist() { + let that = this; + let params = { + pageIndex: that.data.pageIndex, + pageSize: that.data.pageSize, + noticeCategory: that.data.noticeCategory + } + api.noticelist(params).then(function (res) { + that.noticeDetail(res.data[0].id) + }).catch(err => { + console.log(err) + }) + }, + noticeDetail(noticeId){ + let that = this; + api.noticeDetail(noticeId).then(function (res) { + that.setData({ + noticeObj: res.data, + noticeObjContent: util.formatRichText(res.data.noticeContent), + preloadVisible: false + }) + console.log(that.data.noticeObj) + }).catch(err => { + console.log(err) + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/subpages/oneKeyService/pages/noticeDetail/noticeDetail.json b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.json new file mode 100644 index 0000000..b86ff26 --- /dev/null +++ b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "锦水" +} \ No newline at end of file diff --git a/subpages/oneKeyService/pages/noticeDetail/noticeDetail.wxml b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.wxml new file mode 100644 index 0000000..9c43ce3 --- /dev/null +++ b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.wxml @@ -0,0 +1,25 @@ + + + + {{noticeObj.noticeTitle}} + + + {{noticeObj.deptName}} + {{filter.formatTime(noticeObj.newsStartTime, 'yyyy-MM-dd')}} + + + + + + {{noticeObj.readingAmount}} + + + + + + + + + + + diff --git a/subpages/oneKeyService/pages/noticeDetail/noticeDetail.wxss b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.wxss new file mode 100644 index 0000000..82e108b --- /dev/null +++ b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.wxss @@ -0,0 +1,130 @@ +page{ + background: #f7f7f7; +} +.notice-detail { + width: 100%; + height: 100%; + box-sizing: border-box; + padding: 20rpx; + background: #f7f7f7; +} +.richContent img{ + width: 100%!important; + height: auto; +} +.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; +} + +.default { + border: 1px solid #eaeaea; +} +.default span { + color: #999999; +} +.active { + border: 1px solid #ffab00; +} +.active span { + color: #ffb700; +} + +/* preload start */ +.preload { + width: 100%; + background: #fff; + box-sizing: border-box; + border-radius: 16rpx; + padding: 0 24rpx; + overflow: hidden; + margin-bottom: 20rpx; +} +.preload-title { + width: 100%; + height: 80rpx; + border-radius: 8rpx; + background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%); + animation: loading 1.4s ease infinite; + background-size: 400% 100%; + margin-top: 20rpx; +} +.preload-content { + width: 100%; + height: 200rpx; + border-radius: 8rpx; + background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%); + animation: loading 1.4s ease infinite; + background-size: 400% 100%; + margin-top: 20rpx; +} +@keyframes loading { + 0% { + background-position: 100% 50% + } + + 100% { + background-position: 0 50% + } +} +/* preload end */ \ No newline at end of file diff --git a/subpages/oneKeyService/pages/policyList/policyList.js b/subpages/oneKeyService/pages/policyList/policyList.js new file mode 100644 index 0000000..9ef0a48 --- /dev/null +++ b/subpages/oneKeyService/pages/policyList/policyList.js @@ -0,0 +1,110 @@ +// subpages/home/pages/noticeNew/noticeNew.js +const api = require('../../../../utils/understandJs') +Page({ + + /** + * 页面的初始数据 + */ + data: { + pageIndex: 1, + pageSize: 10, + noticeCategory: 'notice_navigation_hot',// 通知:notice_navigation_new + noticelist: [], + // selectTab: 'tab1', + nodata: false, + loadMoreType: 'none', + loadMoreVisible: false, + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + noticeCategory: options.modulecode + }) + wx.setNavigationBarTitle({ + title: options.modulecode == 'notice_navigation_hot' ? '最热政策' : options.modulecode == 'notice_navigation_new' ? '最新通知' : '' + }) + 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 切换 + //模块编码(政策导航-最热政策:notice_navigation_hot、了解锦水-印象:notice_impression、了解锦水-味道:notice_taste、政策导航-最新通知: notice_navigation_new、了解锦水-警示:notice_warning) + // onTabChange(e) { + // if (e.currentTarget.dataset.tab == 'tab1') { + // this.setData({ + // noticeCategory: 'notice_navigation_hot', + // }) + // } else { + // this.setData({ + // noticeCategory: 'notice_navigation_new', + // }) + // } + // this.setData({ + // selectTab: e.currentTarget.dataset.tab, + // pageIndex: 1, + // pageSize: 10, + // noticelist: [], + // loadMoreType: 'loading', + // loadMoreVisible: true, + // nodata: false, + // }) + + // this.noticelist(); + // }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + this.setData({ + loadMoreVisible: true + }) + if (this.data.loadMoreType === 'loading') { + this.setData({ + pageIndex: this.data.pageIndex + 1, + pageSize: this.data.pageSize, + }) + this.noticelist(); + } + }, + + toDetail(e) { + console.log(e.currentTarget.dataset.id) + wx.navigateTo({ url: '/subpages/home/pages/noticeDetail/noticeDetail?id=' + e.currentTarget.dataset.id +'&code=' + this.data.noticeCategory }) + } +}) \ No newline at end of file diff --git a/subpages/oneKeyService/pages/policyList/policyList.json b/subpages/oneKeyService/pages/policyList/policyList.json new file mode 100644 index 0000000..6f1be8c --- /dev/null +++ b/subpages/oneKeyService/pages/policyList/policyList.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/oneKeyService/pages/policyList/policyList.wxml b/subpages/oneKeyService/pages/policyList/policyList.wxml new file mode 100644 index 0000000..43f43de --- /dev/null +++ b/subpages/oneKeyService/pages/policyList/policyList.wxml @@ -0,0 +1,25 @@ + + + + + + {{item.noticeTitle}} + + + {{item.deptName}} + {{item.noticeTime}} + + + + + + + + \ No newline at end of file diff --git a/subpages/oneKeyService/pages/policyList/policyList.wxss b/subpages/oneKeyService/pages/policyList/policyList.wxss new file mode 100644 index 0000000..23ab170 --- /dev/null +++ b/subpages/oneKeyService/pages/policyList/policyList.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/oneKeyService/pages/search/search.js b/subpages/oneKeyService/pages/search/search.js new file mode 100644 index 0000000..25d9f6b --- /dev/null +++ b/subpages/oneKeyService/pages/search/search.js @@ -0,0 +1,42 @@ +// subpages/oneKeyService/pages/search/search.js +const api = require('../../../../utils/understandJs') +Page({ + /** + * 页面的初始数据 + */ + data: { + searchContent: '', + deptId: '', + historylist: [ + { + label: '就业', + hot: true + }, + { + label: '创业', + hot: false + } + ] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + console.log(options) + this.setData({ + searchContent: options.searchContent, + deptId: options.deptId + }) + }, + + bindInputValue (e) { + this.setData({ + searchContent: e.detail.value + }) + }, + + searchFile () { + + } +}) \ No newline at end of file diff --git a/subpages/oneKeyService/pages/search/search.json b/subpages/oneKeyService/pages/search/search.json new file mode 100644 index 0000000..5b5073d --- /dev/null +++ b/subpages/oneKeyService/pages/search/search.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + }, + "navigationBarTitleText": "搜索" +} \ No newline at end of file diff --git a/subpages/oneKeyService/pages/search/search.wxml b/subpages/oneKeyService/pages/search/search.wxml new file mode 100644 index 0000000..36e55d8 --- /dev/null +++ b/subpages/oneKeyService/pages/search/search.wxml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + {{item.label}} + + diff --git a/subpages/oneKeyService/pages/search/search.wxss b/subpages/oneKeyService/pages/search/search.wxss new file mode 100644 index 0000000..4271104 --- /dev/null +++ b/subpages/oneKeyService/pages/search/search.wxss @@ -0,0 +1,96 @@ +/* subpages/oneKeyService/pages/search/search.wxss */ +page { + background: #fff; +} + +.top { + margin-top: 3rpx; + width: 100%; + height: 94rpx; + background: #fff; + display: flex; + align-items: center; +} + +.search { + /* margin-top: 17rpx; */ + width: calc(100% - 60rpx); + height: 66rpx; + margin-left: 30rpx; + background: rgba(242, 242, 242, 1); + border-radius: 33rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.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 { + /* background: red; */ + 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: rgba(242, 242, 242, 1); +} + +button { + width: 100rpx; + height: 58rpx; + padding: 0; + border-radius: 0; + line-height: 58rpx; +} + +button::after { + border-radius: 0px; + border: none; +} + +.history { + padding-left: 30rpx; +} +.history-label { + width: 100rpx; + border-radius: 25rpx; + text-align: center; + height: 50rpx; + background-color: lightgray; +} +.hot-label { + background-color: lightblue; +} \ No newline at end of file diff --git a/subpages/oneKeyService/pages/warning/warning.js b/subpages/oneKeyService/pages/warning/warning.js new file mode 100644 index 0000000..d09c359 --- /dev/null +++ b/subpages/oneKeyService/pages/warning/warning.js @@ -0,0 +1,146 @@ +// subpages/understandJs/pages/warning/warning.js +const api = require('../../../../utils/understandJs') +Page({ + + /** + * 页面的初始数据 + */ + data: { + pageIndex: 1, + pageSize: 10, + noticelist: [], + nodata: false, + loadMoreType: 'none', + loadMoreVisible: false, + noticeCategory: '',//模块编码(政策导航-最热政策:notice_navigation_hot、了解锦水-印象:notice_impression、了解锦水-味道:notice_taste、政策导航-最新通知: notice_navigation_new、了解锦水-警示:notice_warning) + noticeContentNew:'', + swiperBannerList: [], + indicatorDots: false, //指示点 + autoplay: true, //true,//自动播放 + circular: true, //衔接滑动 + interval: 3000, //自动播放间隔时长(ms) + duration: 500, //幻灯片切换时长(ms) + currentSwiper: 0, + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + noticeCategory:options.modulecode + }) + if(options.modulecode == 'notice_impression'){ + wx.setNavigationBarTitle({ + title: '锦水印象' + }) + }else{ + wx.setNavigationBarTitle({ + title: '锦水警事' + }) + } + + this.noticelist() + this.getBannerList() + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + this.setData({ + loadMoreVisible: true + }) + if (this.data.loadMoreType === 'loading') { + this.setData({ + pageIndex: this.data.pageIndex + 1, + pageSize: this.data.pageSize, + }) + this.noticelist(); + } + }, + + noticelist() { + let that = this; + let params = { + pageIndex: that.data.pageIndex, + pageSize: that.data.pageSize, + noticeCategory: that.data.noticeCategory, + } + api.noticelist(params).then(function (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(/ { + that.setData({ + noticelist: [], + nodata: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + console.log(err) + }) + }, + + //跳转倒详情页面 + toDetail(e){ + wx.navigateTo({ + url: `../noticeDetail/noticeDetail?id=${e.currentTarget.dataset.id}&modulecode=${this.data.noticeCategory}` + }) + }, + + getBannerList: function() { + let that = this + api.bannerList('2').then(function(res) { + // console.log('res==', res.data) + that.setData({ + swiperBannerList: res.data + }) + }) + }, + swiperChange: function(e) { + this.setData({ + currentSwiper: e.detail.current + }) + }, + // swiperChange2: function(e) { + // this.setData({ + // 'options2.currentSwiper': e.detail.current, + // currentIndex: e.detail.current + // }) + // }, + // 跳转到banner详情 + //navigatetoBannerDetail(e) { + // const { + // id, + // url, + // newsflag + // } = e.currentTarget.dataset + // console.log(id, url, newsflag) + // if (newsflag == '0') { + // wx.navigateTo({ + // url: `/subpages/home/pages/webview/webview?url=${url}` + // }) + // } else if (newsflag == '1') { + // wx.navigateTo({ + // url: `/subpages/home/pages/newsDetail/newsDetail?id=${id}` + // }) + // } + //} +}) \ No newline at end of file diff --git a/subpages/oneKeyService/pages/warning/warning.json b/subpages/oneKeyService/pages/warning/warning.json new file mode 100644 index 0000000..25bf808 --- /dev/null +++ b/subpages/oneKeyService/pages/warning/warning.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/warning/warning.wxml b/subpages/oneKeyService/pages/warning/warning.wxml new file mode 100644 index 0000000..090b059 --- /dev/null +++ b/subpages/oneKeyService/pages/warning/warning.wxml @@ -0,0 +1,44 @@ + + + + {{item.noticeTitle}} + + + + + + + + + + \ No newline at end of file diff --git a/subpages/oneKeyService/pages/warning/warning.wxss b/subpages/oneKeyService/pages/warning/warning.wxss new file mode 100644 index 0000000..ca7e46b --- /dev/null +++ b/subpages/oneKeyService/pages/warning/warning.wxss @@ -0,0 +1,169 @@ +page { + background: #f7f7f7; +} + +.list-item { + width: 100%; + padding: 40rpx 28rpx; + margin-top: 16rpx; + background: #fff; + box-sizing: border-box; +} + +.list-item .name { + /* width: calc(100% - 56rpx); */ + font-size: 34rpx; + font-weight: 500; + color: rgba(51, 51, 51, 1); + line-height: 50rpx; +} + +.list-item .info { + /* margin-top: 15rpx; + width: calc(100% - 56rpx); + font-size: 28rpx; + font-weight: 500; + color: rgba(153, 153, 153, 1); + line-height: 44rpx; + 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; +} + +/* 轮播图start */ + +.altitle { + position: absolute; + width: 100%; + height: 66rpx; + background-color: black; + margin-top: 237rpx; + border-bottom-right-radius: 16rpx; + border-bottom-left-radius: 16rpx; + opacity: 0.5; + font-size: 22rpx; + font-weight: 500; + color: rgba(255, 255, 255, 1); +} + +.altitle-name { + margin: 10rpx 20rpx; +} + +.container { + width: 100vw; +} + +.page-body { + padding-top: 30rpx; + background: #fff; + height: 300rpx; +} + +.page-section { + width: 100%; + margin-bottom: 60rpx; +} + +.page-section_center { + display: flex; + flex-direction: column; + align-items: center; +} + +.page-section:last-child { + margin-bottom: 0; +} + +.page-section-gap { + box-sizing: border-box; + padding: 0 30rpx; +} + +.page-section-spacing { + box-sizing: border-box; + padding: 0 20rpx; + height: 300rpx; + background-color: #fff; +} + +.page-section-title { + font-size: 28rpx; + color: #999; + margin-bottom: 10rpx; + padding-left: 30rpx; + padding-right: 30rpx; +} + +.page-section-gap .page-section-title { + padding-left: 0; + padding-right: 0; +} + +.swiper-item { + display: block; + height: 300rpx; +} + +.banner { + overflow: hidden; + height: 300rpx; + display: flex; + width: 100%; + border-radius: 16rpx; +} + +.dots { + display: flex; + justify-content: center; + margin-top: -16rpx; + z-index: 999; + position: relative; +} + +.dots .dot { + width: 8rpx; + height: 8rpx; + border-radius: 8rpx; + margin-left: 10rpx; + background: #d2d5da; + transition: all 0.3s; +} + +.dots .dot.active { + width: 24rpx; + background: #fff; +} + +.page-section-title { + margin-top: 60rpx; + position: relative; +} + +swiper { + height: 300rpx; + box-shadow: 0px 4px 29px 0px rgba(63, 63, 63, 0.1); +} + +/* 轮播图end */ \ No newline at end of file diff --git a/subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.js b/subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.js new file mode 100644 index 0000000..52adafe --- /dev/null +++ b/subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.js @@ -0,0 +1,8 @@ +Component({ + data: { + + }, + methods: { + + } +}) \ No newline at end of file diff --git a/subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.json b/subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.wxml b/subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.wxml new file mode 100644 index 0000000..282742a --- /dev/null +++ b/subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.wxml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.wxss b/subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.wxss new file mode 100644 index 0000000..51095f2 --- /dev/null +++ b/subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.wxss @@ -0,0 +1,30 @@ +.preload-archives-detail { + width: 100%; + background: #fff; + box-sizing: border-box; + border-radius: 16rpx; + padding: 0 24rpx; + overflow: hidden; + margin-bottom: 20rpx; +} + +.preload-archives-detail .detail-item { + width: 100%; + height: 80rpx; + border-radius: 8rpx; + background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%); + animation: loading 1.4s ease infinite; + background-size: 400% 100%; + margin-top: 20rpx; +} + + +@keyframes loading { + 0% { + background-position: 100% 50% + } + + 100% { + background-position: 0 50% + } +} \ No newline at end of file diff --git a/subpages/understandJs/images/right.png b/subpages/understandJs/images/right.png new file mode 100644 index 0000000..2af42d7 Binary files /dev/null and b/subpages/understandJs/images/right.png differ diff --git a/subpages/understandJs/pages/archives/archives.json b/subpages/understandJs/pages/archives/archives.json deleted file mode 100644 index 43aa612..0000000 --- a/subpages/understandJs/pages/archives/archives.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "navigationBarTitleText": "锦水档案" -} \ No newline at end of file diff --git a/subpages/understandJs/pages/archives/archives.wxml b/subpages/understandJs/pages/archives/archives.wxml deleted file mode 100644 index 7a7bb79..0000000 --- a/subpages/understandJs/pages/archives/archives.wxml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/subpages/understandJs/pages/index/index.js b/subpages/understandJs/pages/index/index.js index ad5803a..b946371 100644 --- a/subpages/understandJs/pages/index/index.js +++ b/subpages/understandJs/pages/index/index.js @@ -1,22 +1,23 @@ -const api = require("../../../../utils/understandJs") +const api = require('../../../../utils/understandJs') Page({ /** * 页面的初始数据 */ data: { + moduleCategory: 'module_type_jmjs', //module_type_jmjs (解码锦水) //module_type_service (一键服务) //'' (旧版) modulelist: [] }, /** * 生命周期函数--监听页面加载 */ - onLoad: function () { + onLoad: function (options) { this.modulelist() }, - modulelist () { + modulelist() { let that = this; - api.modulelist().then(function (res) { //了解锦水-模块管理接口 + api.modulelist(that.data.moduleCategory).then(function (res) { that.setData({ modulelist: res.data, }) @@ -70,29 +71,16 @@ Page({ onShareAppMessage: function () { }, - goDetails (e) {//模块编码(0-政策导航,1-印象,2-味道,3-硬核,4-档案) + goDetails(e) {//模块编码(印象,味道,硬核) console.log(JSON.stringify(e.currentTarget.dataset) + e.currentTarget.dataset.modulecode) - if (e.currentTarget.dataset.modulecode == "notice_warning") { //警事 - wx.navigateTo({ - url: `../impression/impression?modulecode=${e.currentTarget.dataset.modulecode}` - }) - } else if (e.currentTarget.dataset.modulecode == "notice_impression" || e.currentTarget.dataset.modulecode == "notice_taste") {//印象//味道 + if (e.currentTarget.dataset.modulecode == 'notice_impression' || e.currentTarget.dataset.modulecode == 'notice_taste') {//印象//味道 wx.navigateTo({ url: `../noticeDetail/noticeDetail?modulecode=${e.currentTarget.dataset.modulecode}` }) - } else if (e.currentTarget.dataset.modulecode == "module_hardcore") {//硬核 + } else if (e.currentTarget.dataset.modulecode == 'notice_yh') { wx.navigateTo({ url: `../sclerotia/sclerotia?modulecode=${e.currentTarget.dataset.modulecode}` }) - } else if (e.currentTarget.dataset.modulecode == "module_file") {//档案 - // wx.showToast({ - // title: '敬请期待', - // icon: 'none', - // duration: 1000 - // }) - wx.navigateTo({ - url: "../archives/archives" - }) } } }) \ No newline at end of file diff --git a/subpages/understandJs/pages/index/index.json b/subpages/understandJs/pages/index/index.json index afa02d1..c476201 100644 --- a/subpages/understandJs/pages/index/index.json +++ b/subpages/understandJs/pages/index/index.json @@ -1,3 +1,3 @@ { - "navigationBarTitleText": "了解锦水" + "navigationBarTitleText": "解码锦水" } \ No newline at end of file diff --git a/subpages/understandJs/pages/noticeDetail/noticeDetail.js b/subpages/understandJs/pages/noticeDetail/noticeDetail.js index 4567512..0b579a6 100644 --- a/subpages/understandJs/pages/noticeDetail/noticeDetail.js +++ b/subpages/understandJs/pages/noticeDetail/noticeDetail.js @@ -1,6 +1,5 @@ -const api = require("../../../../utils/understandJs") -const api_home = require("../../../../utils/home") -import util from "../../../../utils/util" +const api = require('../../../../utils/understandJs') +import util from '../../../../utils/util' Page({ /** @@ -11,7 +10,8 @@ Page({ noticeObjContent: "", pageIndex:1, pageSize:10, - noticeCategory:"" + noticeCategory:'', + preloadVisible: true }, /** @@ -21,7 +21,7 @@ Page({ this.setData({ noticeCategory:options.modulecode }) - if (options.modulecode == "notice_taste"){//味道 + if (options.modulecode == 'notice_taste'){ wx.setNavigationBarTitle({ title: "锦水味道" }) @@ -31,11 +31,15 @@ Page({ title: "锦水印象" }) this.noticelist() - } else if(options.modulecode == "notice_warning"){ + } else if(options.modulecode == 'notice_yh'){ + wx.setNavigationBarTitle({ + title: '锦水硬核' + }) + this.noticeDetail(options.id) + } else if(options.modulecode == 'notice_warning'){ wx.setNavigationBarTitle({ title: "锦水警事" }) - this.browseNotice(options.id) this.noticeDetail(options.id) } }, @@ -47,8 +51,7 @@ Page({ pageSize: that.data.pageSize, noticeCategory: that.data.noticeCategory } - api.noticelist(params).then(function (res) { //了解锦水-模块管理接口 - that.browseNotice(res.data[0].id) + api.noticelist(params).then(function (res) { that.noticeDetail(res.data[0].id) }).catch(err => { console.log(err) @@ -56,10 +59,11 @@ Page({ }, noticeDetail (noticeId){ let that = this; - api.noticeDetail(noticeId).then(function (res) { //了解锦水-模块管理接口 + api.noticeDetail(noticeId).then(function (res) { that.setData({ noticeObj: res.data, - noticeObjContent: util.formatRichText(res.data.noticeContent) + noticeObjContent: util.formatRichText(res.data.noticeContent), + preloadVisible: false }) console.log(that.data.noticeObj) @@ -67,16 +71,7 @@ Page({ console.log(err) }) }, - browseNotice (id) { - let para = { - noticeId: id - } - api_home.browseNotice(para).then(() => { - - }).catch(err => { - console.log(err) - }) - }, + /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/subpages/understandJs/pages/noticeDetail/noticeDetail.json b/subpages/understandJs/pages/noticeDetail/noticeDetail.json index b86ff26..d8bbc60 100644 --- a/subpages/understandJs/pages/noticeDetail/noticeDetail.json +++ b/subpages/understandJs/pages/noticeDetail/noticeDetail.json @@ -1,4 +1,4 @@ { "usingComponents": {}, - "navigationBarTitleText": "锦水" + "navigationBarTitleText": "" } \ No newline at end of file diff --git a/subpages/understandJs/pages/noticeDetail/noticeDetail.wxml b/subpages/understandJs/pages/noticeDetail/noticeDetail.wxml index 0db4be0..9c43ce3 100644 --- a/subpages/understandJs/pages/noticeDetail/noticeDetail.wxml +++ b/subpages/understandJs/pages/noticeDetail/noticeDetail.wxml @@ -1,6 +1,6 @@ - + {{noticeObj.noticeTitle}} @@ -18,4 +18,8 @@ + + + + diff --git a/subpages/understandJs/pages/noticeDetail/noticeDetail.wxss b/subpages/understandJs/pages/noticeDetail/noticeDetail.wxss index abc52be..82e108b 100644 --- a/subpages/understandJs/pages/noticeDetail/noticeDetail.wxss +++ b/subpages/understandJs/pages/noticeDetail/noticeDetail.wxss @@ -88,4 +88,43 @@ page{ } .active span { color: #ffb700; -} \ No newline at end of file +} + +/* preload start */ +.preload { + width: 100%; + background: #fff; + box-sizing: border-box; + border-radius: 16rpx; + padding: 0 24rpx; + overflow: hidden; + margin-bottom: 20rpx; +} +.preload-title { + width: 100%; + height: 80rpx; + border-radius: 8rpx; + background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%); + animation: loading 1.4s ease infinite; + background-size: 400% 100%; + margin-top: 20rpx; +} +.preload-content { + width: 100%; + height: 200rpx; + border-radius: 8rpx; + background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%); + animation: loading 1.4s ease infinite; + background-size: 400% 100%; + margin-top: 20rpx; +} +@keyframes loading { + 0% { + background-position: 100% 50% + } + + 100% { + background-position: 0 50% + } +} +/* preload end */ \ No newline at end of file diff --git a/subpages/understandJs/pages/sclerotia/sclerotia.js b/subpages/understandJs/pages/sclerotia/sclerotia.js index 2fc47cf..13eb6a6 100644 --- a/subpages/understandJs/pages/sclerotia/sclerotia.js +++ b/subpages/understandJs/pages/sclerotia/sclerotia.js @@ -8,7 +8,7 @@ Page({ data: { pageIndex: 1, pageSize: 10, - deptinfolist: [], + sclerotialist: [], nodata: false, loadMoreType: "none", loadMoreVisible: false, @@ -17,112 +17,58 @@ Page({ /** * 生命周期函数--监听页面加载 */ - onLoad: function () { - this.deptinfolist() + onLoad: function (options) { + this.getSclerotiaList() }, - //了解锦水-硬核管理接口 - deptinfolist () { - let that = this; - let params = { - pageIndex: that.data.pageIndex, - pageSize: that.data.pageSize, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + this.setData({ + loadMoreVisible: true + }) + if (this.data.loadMoreType === 'loading') { + this.setData({ + pageIndex: this.data.pageIndex + 1, + pageSize: this.data.pageSize, + }) + this.getSclerotiaList() } - api.deptinfolist(params).then(function (res) { //了解锦水-模块管理接口 + }, + + getSclerotiaList: function() { + let that = this + let para = { + pageIndex: this.data.pageIndex, + pageSize: this.data.pageSize, + noticeCategory: 'notice_yh' + } + api.noticelist(para).then(function(res) { that.setData({ - deptinfolist: that.data.deptinfolist.concat(res.data), - loadMoreType: res.data.length === that.data.pageSize ? "loading" : "none", - loadMoreVisible: res.data.length === that.data.pageSize ? false : true + sclerotialist: that.data.sclerotialist.concat(res.data), + loadMoreType: res.data.length === that.data.pageSize ? 'loading' : 'none', }) - if (that.data.deptinfolist.length == 0) {//没有值 + if (that.data.sclerotialist.length == 0) { that.setData({ nodata: true, - loadMoreType: "none", - loadMoreVisible: false, + loadMoreType: 'none', + loadMoreVisible: false }) } - }).catch(err => { + }).catch(() => { that.setData({ - deptinfolist: [], nodata: true, loadMoreType: "none", loadMoreVisible: false, + sclerotialist: [] }) - console.log(err) }) }, - mobile (e) { - wx.showModal({ - title: "拨打电话", - content: `您确定拨打${e.currentTarget.dataset.mobile}`, - cancelColor: "#29B9A5", - confirmColor: "#29B9A5", - success: (res) => { - if (res.confirm) { - console.log("用户点击确定") - wx.makePhoneCall({ - phoneNumber: e.currentTarget.dataset.mobile - }) - } else if (res.cancel) { - console.log("用户点击取消") - } - } - }) - }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - this.setData({ - loadMoreVisible: true + toDetail (e) { + wx.navigateTo({ + url: '../noticeDetail/noticeDetail?modulecode=notice_yh&id=' + e.currentTarget.dataset.id }) - if (this.data.loadMoreType === "loading") { - this.setData({ - pageIndex: this.data.pageIndex + 1, - pageSize: this.data.pageSize, - }) - this.deptinfolist(); - } - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - } }) \ No newline at end of file diff --git a/subpages/understandJs/pages/sclerotia/sclerotia.wxml b/subpages/understandJs/pages/sclerotia/sclerotia.wxml index 2fa3bf5..6d7e767 100644 --- a/subpages/understandJs/pages/sclerotia/sclerotia.wxml +++ b/subpages/understandJs/pages/sclerotia/sclerotia.wxml @@ -1,24 +1,19 @@ - - - {{item.deptName}} - - - - - {{item.mobile}} + + + + + + {{item.noticeTitle}} + + + {{item.deptName}} + {{filter.formatTime(item.noticeTime, 'yyyy-MM-dd')}} + - + - + \ No newline at end of file diff --git a/subpages/understandJs/pages/sclerotia/sclerotia.wxss b/subpages/understandJs/pages/sclerotia/sclerotia.wxss index 738cd14..55527f3 100644 --- a/subpages/understandJs/pages/sclerotia/sclerotia.wxss +++ b/subpages/understandJs/pages/sclerotia/sclerotia.wxss @@ -2,41 +2,83 @@ page { background: #f7f7f7; } -.list-item { - margin-top: 16rpx; - background: #fff; - height: 196rpx; - width: 100%; - padding: 0 30rpx; -} +/* 列表样式 */ -.list-item .top { - width: calc(100% - 60rpx); - height: 90rpx; - border-bottom: 1rpx solid #f7f7f7; - font-size: 34rpx; - font-weight: bold; - color: rgba(51, 51, 51, 1); - line-height: 90rpx; -} - -.list-item .bottom { - width: calc(100% - 60rpx); - height: 106rpx; +.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; + /* 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; + } + + .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; -} - -.list-item .bottom .name { - height: 106rpx; - line-height: 106rpx; - font-size: 34rpx; + } + + .list-all .list-item .item-info .item-info-time text { + font-size: 22rpx; font-weight: 500; - color: rgba(119, 119, 119, 1); -} - -.list-item .bottom image { - width: 156rpx; - height: 56rpx; -} \ No newline at end of file + 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/utils/config.js b/utils/config.js index dee0d7c..5986183 100644 --- a/utils/config.js +++ b/utils/config.js @@ -5,24 +5,25 @@ module.exports = { userId: "" }; -function BASEURL () { +function BASEURL() { // return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境 // return 'https://eug-test.elinkit.com.cn/epdc-api/api/' // 测试环境 接口地址 // return "http://219.146.91.110:9094/epdc-api/api/" // 测试环境 ip接口地址 // return "https://epdc.elinkservice.cn/epdc-api/api/" // 正式环境 接口地址 // return 'https://epdc-app.qingdaoshibei.cn/epdc-api/api/' // 电政办 正式环境 接口地址 // return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 电政办 正式环境 接口地址 - return "https://epdc-jinshui.elinkservice.cn/epdc-api/api/" // 锦水正式环境接口地址 + return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址 + // return 'http://192.168.43.19:9094/epdc-api/api/' } -function WEBROOT () { +function WEBROOT() { // return "http://10.10.10.117:8080/#/" // 本地 h5前端地址 - return "https://epdc-shibei.elinkit.com.cn/#/" // 测试环境 h5前端地址 + return 'https://epdc-shibei.elinkit.com.cn/#/' // 测试环境 h5前端地址 // return 'https://epdc.elinkservice.cn/#/' // 正式环境 h5前端地址 // return 'https://epdc-app.qingdaoshibei.cn/#/' // 电政办 正式环境 前端地址 // return 'https://epdc-shibei.elinkservice.cn/#/' // 电政办 正式环境 前端地址 } -function getToken () { +function getToken() { return wx.getStorageSync("token"); } diff --git a/utils/understandJs.js b/utils/understandJs.js index 952e09e..1d4ad19 100644 --- a/utils/understandJs.js +++ b/utils/understandJs.js @@ -3,11 +3,15 @@ module.exports = { modulelist: modulelist, deptinfolist:deptinfolist, noticelist: noticelist, - noticeDetail:noticeDetail + noticeDetail:noticeDetail, + archivedepts:archivedepts, + archivelist:archivelist, + archiveDetail:archiveDetail, + bannerList:bannerList } // 了解锦水-模块管理接口 -function modulelist () { - return fly.get("custom/module/list") +function modulelist(moduleCategory='') { + return fly.get(`custom/module/list/${moduleCategory}`) } //了解锦水-硬核管理接口 function deptinfolist (params) { @@ -20,4 +24,23 @@ function noticelist (params) { // 通知详情 function noticeDetail (noticeId) { return fly.get(`news/notice/detail/${noticeId}`) +} +// 了解锦水-锦水档案归属部门列表 +function archivedepts(params) { + return fly.get('custom/archive/depts', params) +} +// 了解锦水-锦水档案列表 +function archivelist(params) { + return fly.get('custom/archive/list', params) +} +// 了解锦水-锦水档案详情 +function archiveDetail(archiveId) { + return fly.get(`custom/archive/detail/${archiveId}`) +} + +//获取锦水警事banner列表 +function bannerList(position) { + return fly.get('news/banner/list', { + position + }) } \ No newline at end of file