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/project.config.json b/project.config.json index 4564423..eca3e4b 100644 --- a/project.config.json +++ b/project.config.json @@ -108,6 +108,13 @@ "pathName": "subpages/associationNew/pages/eventlist/eventlist", "query": "partyGroupId=4048a5a044a047d9a3dc135a0d756eee&topicType=1", "scene": null + }, + { + "id": -1, + "name": "锦水档案", + "pathName": "subpages/understandJs/pages/archives/archives", + "query": "", + "scene": null } ] } 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/archivesbk.png b/subpages/understandJs/images/archivesbk.png new file mode 100644 index 0000000..dd0648f Binary files /dev/null and b/subpages/understandJs/images/archivesbk.png differ 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.js b/subpages/understandJs/pages/archives/archives.js index 3420686..a04dff5 100644 --- a/subpages/understandJs/pages/archives/archives.js +++ b/subpages/understandJs/pages/archives/archives.js @@ -65,7 +65,7 @@ Page({ } let that = this wx.navigateTo({ - url: `../archivesDept/archivesDept?dept=搜索&deptId=&searchContent=${that.data.searchContent}` + url: `../archivesDept/archivesDept?dept=锦水档案&deptId=&searchContent=${that.data.searchContent}` }) }, diff --git a/subpages/understandJs/pages/archives/archives.json b/subpages/understandJs/pages/archives/archives.json index 5f80f23..b30c509 100644 --- a/subpages/understandJs/pages/archives/archives.json +++ b/subpages/understandJs/pages/archives/archives.json @@ -1,5 +1,7 @@ { "navigationBarTitleText": "锦水档案", + "navigationBarBackgroundColor": "#D22E29", + "navigationBarTextStyle": "white", "usingComponents": { "load-more": "../../../../components/loadMore/loadMore", "no-data":"../../../../components/nodata/nodata" diff --git a/subpages/understandJs/pages/archives/archives.wxml b/subpages/understandJs/pages/archives/archives.wxml index 307848d..a88613b 100644 --- a/subpages/understandJs/pages/archives/archives.wxml +++ b/subpages/understandJs/pages/archives/archives.wxml @@ -1,11 +1,12 @@ + - + @@ -19,6 +20,7 @@ wx:key="index" class="list-item" bindtap="navigateToDept" data-dept-id="{{item.deptId}}" data-dept="{{item.dept}}"> {{item.dept}} + diff --git a/subpages/understandJs/pages/archives/archives.wxss b/subpages/understandJs/pages/archives/archives.wxss index b4bf3d9..261705e 100644 --- a/subpages/understandJs/pages/archives/archives.wxss +++ b/subpages/understandJs/pages/archives/archives.wxss @@ -8,19 +8,24 @@ page { 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 { @@ -82,25 +88,36 @@ button::after { /* 列表 */ .dept-list { display: grid; - grid-template-columns: repeat(2, 1fr); + 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 { - width: 300rpx; - height: 200rpx; + width: 100%; + height: 130rpx; background: #fff; display: flex; - justify-content: center; + justify-content: space-between; align-items: center; + border-radius: 14rpx; } .list-item .list-name { - font-size: 34rpx; - font-weight: 500; - color: rgba(51, 51, 51, 1); + 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/understandJs/pages/archivesDept/archivesDept.js b/subpages/understandJs/pages/archivesDept/archivesDept.js index a3cffbd..f89c571 100644 --- a/subpages/understandJs/pages/archivesDept/archivesDept.js +++ b/subpages/understandJs/pages/archivesDept/archivesDept.js @@ -5,14 +5,16 @@ Page({ * 页面的初始数据 */ data: { - pageindex: 1, - pagesize: 10, + pageIndex: 1, + pageSize: 10, searchContent: '', deptId:'', archivesList: [], nodata: false, loadMoreType: 'none', - loadMoreVisible: false + loadMoreVisible: false, + deptName: '', + listType: 0 //档案列表样式 1-搜索样式 0-无搜索样式 }, /** @@ -22,7 +24,9 @@ Page({ console.log(options) this.setData({ searchContent: options.searchContent, - deptId: options.deptId + deptId: options.deptId, + deptName: options.dept, + listType: options.searchContent.length }) wx.setNavigationBarTitle({ title: options.dept @@ -37,22 +41,14 @@ Page({ }, searchFile () { - console.log(this.data.searchContent) - if(!this.data.searchContent.length) { - wx.showToast({ - title: '不能为空', - icon: 'loading', - duration: 2000 - }) - return; - } + this.data.archivesList = [] this.search(this.data.deptId, this.data.searchContent) }, search(deptId, keywords) { let params = { - pageindex: this.data.pageindex, - pagesize: this.data.pagesize, + pageIndex: this.data.pageIndex, + pageSize: this.data.pageSize, deptId, searchContent: keywords } @@ -60,6 +56,7 @@ Page({ 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 }) @@ -69,6 +66,16 @@ Page({ 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({ diff --git a/subpages/understandJs/pages/archivesDept/archivesDept.wxml b/subpages/understandJs/pages/archivesDept/archivesDept.wxml index 3bc30f5..f337133 100644 --- a/subpages/understandJs/pages/archivesDept/archivesDept.wxml +++ b/subpages/understandJs/pages/archivesDept/archivesDept.wxml @@ -6,24 +6,37 @@ - + -{{dept}} - +{{deptName}}档案 + + + + + + + + + - 档号:{{item.archivesNum}} - 题名:{{item.title}} - 归档时间:{{item.archiveTime}} + + + + - diff --git a/subpages/understandJs/pages/archivesDept/archivesDept.wxss b/subpages/understandJs/pages/archivesDept/archivesDept.wxss index 3d5b04b..45f83f4 100644 --- a/subpages/understandJs/pages/archivesDept/archivesDept.wxss +++ b/subpages/understandJs/pages/archivesDept/archivesDept.wxss @@ -65,14 +65,15 @@ page { font-size: 28rpx; font-weight: 500; color: rgba(51, 51, 51, 1); + background-color: rgba(242, 242, 242, 1); } button { - width: 53rpx; - height: 28rpx; + width: 100rpx; + height: 58rpx; padding: 0; border-radius: 0; - line-height: 28rpx; + line-height: 58rpx; } button::after { @@ -81,12 +82,80 @@ button::after { } .archives-list { - width: 690rpx; - margin: 0 auto; + width: 100%; + margin: 16rpx 0rpx auto; display: flex; flex-direction: column; } -.archives-list .archives-item { - border: 1px solid #BFBFBF; - margin-top: 10rpx; +.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/archivesDetail/archivesDetail.js b/subpages/understandJs/pages/archivesDetail/archivesDetail.js index b506e9e..cd1cdb1 100644 --- a/subpages/understandJs/pages/archivesDetail/archivesDetail.js +++ b/subpages/understandJs/pages/archivesDetail/archivesDetail.js @@ -7,7 +7,8 @@ Page({ */ data: { archiveId: '', - archiveContent: '' + archiveContent: '', + preloadVisible: true }, /** @@ -25,7 +26,8 @@ Page({ api.archiveDetail(this.data.archiveId).then(res => { console.log('档案详情', res); this.setData({ - archiveContent:res.data + archiveContent: res.data, + preloadVisible: false }); }) }, diff --git a/subpages/understandJs/pages/archivesDetail/archivesDetail.json b/subpages/understandJs/pages/archivesDetail/archivesDetail.json index f8e8404..5c63958 100644 --- a/subpages/understandJs/pages/archivesDetail/archivesDetail.json +++ b/subpages/understandJs/pages/archivesDetail/archivesDetail.json @@ -1,4 +1,6 @@ { - "usingComponents": {}, + "usingComponents": { + "preload-archives-detail": "../../compontents/preLoadArchivesDetail/preLoadArchivesDetail" + }, "navigationBarTitleText": "档案内容" } \ No newline at end of file diff --git a/subpages/understandJs/pages/archivesDetail/archivesDetail.wxml b/subpages/understandJs/pages/archivesDetail/archivesDetail.wxml index d8787ea..53bdf57 100644 --- a/subpages/understandJs/pages/archivesDetail/archivesDetail.wxml +++ b/subpages/understandJs/pages/archivesDetail/archivesDetail.wxml @@ -1,2 +1,20 @@ -{{archiveContent}} + + + 档号: {{archiveContent.archivesNum||'无'}} + + 文号: {{archiveContent.docNum||'无'}} + + 责任人: {{archiveContent.responsible||'无'}} + + 题名: {{archiveContent.title||'无'}} + + 日期: {{filter.formatTime(archiveContent.archiveTime,'yyyyMMdd')||'无'}} + + 页数: {{archiveContent.pageSize||'无'}} + + 备注: {{archiveContent.remark||'无'}} + + + + diff --git a/subpages/understandJs/pages/archivesDetail/archivesDetail.wxss b/subpages/understandJs/pages/archivesDetail/archivesDetail.wxss index 5293e7e..2a4ec74 100644 --- a/subpages/understandJs/pages/archivesDetail/archivesDetail.wxss +++ b/subpages/understandJs/pages/archivesDetail/archivesDetail.wxss @@ -1 +1,15 @@ -/* subpages/understandJs/pages/archivesDetail/archivesDetail.wxss */ \ No newline at end of file +/* 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/utils/config.js b/utils/config.js index 8ce72dc..c5c7d4c 100644 --- a/utils/config.js +++ b/utils/config.js @@ -6,13 +6,13 @@ module.exports = { }; function BASEURL() { - // return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境 + 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://10.10.10.64:9094/epdc-api/api/' }