20 changed files with 572 additions and 11 deletions
@ -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 |
|||
}) |
|||
} |
|||
}) |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"parser": "../../../../components/parser/parser" |
|||
}, |
|||
"navigationBarTitleText": "通知详情" |
|||
} |
@ -0,0 +1,23 @@ |
|||
<!-- <wxs module="filter" src="../../../../utils/filter.wxs"></wxs> --> |
|||
<view class="notice-detail"> |
|||
<view class="selfContent"> |
|||
<view class="detail-title">{{noticeObj.title}}</view> |
|||
<!-- <view class="detail-subtitle"> |
|||
<view class="left"> |
|||
<span>{{noticeObj.deptName}}</span> |
|||
<span>{{filter.formatTime(noticeObj.noticeTime, 'yyyy-MM-dd')}}</span> |
|||
</view> |
|||
<view class="right"> |
|||
<view class="readNum"> |
|||
<image src="../../images/ic_yueduliang.png" /> |
|||
</view> |
|||
<view class="num">{{noticeObj.readingAmount}}</view> |
|||
</view> |
|||
</view> --> |
|||
<view class="richContent"> |
|||
<view class="content">{{noticeObj.content}}</view> |
|||
<!-- <rich-text nodes="{{noticeObjContent}}"></rich-text> --> |
|||
<!-- <parser html="{{noticeObjContent}}"></parser> --> |
|||
</view> |
|||
</view> |
|||
</view> |
@ -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; |
|||
} |
@ -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}` |
|||
}) |
|||
} |
|||
}) |
@ -0,0 +1,7 @@ |
|||
{ |
|||
"navigationBarTitleText": "老兵在线", |
|||
"usingComponents": { |
|||
"load-more": "../../../../components/loadMore/loadMore", |
|||
"no-data":"../../../../components/nodata/nodata" |
|||
} |
|||
} |
@ -0,0 +1,16 @@ |
|||
<view class="dept-list"> |
|||
<view |
|||
wx:for="{{deptList}}" |
|||
wx:for-index="index" |
|||
wx:for-item="item" |
|||
wx:key="index" |
|||
class="list-item" bindtap="navigateToDict" data-dict="{{item}}"> |
|||
<view class="list-name">{{item.dictName}}</view> |
|||
<image src="../../images/right.png" class="list-arrow"></image> |
|||
</view> |
|||
</view> |
|||
|
|||
<!-- <load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> --> |
|||
|
|||
<no-data isShow="{{nodata}}"></no-data> |
|||
|
@ -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; |
|||
} |
|||
|
@ -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}` |
|||
}) |
|||
} |
|||
}) |
@ -0,0 +1,7 @@ |
|||
{ |
|||
"navigationBarTitleText": "", |
|||
"usingComponents": { |
|||
"load-more": "../../../../components/loadMore/loadMore", |
|||
"no-data":"../../../../components/nodata/nodata" |
|||
} |
|||
} |
@ -0,0 +1,19 @@ |
|||
<wxs module="filter" src="../../../../utils/filter.wxs"></wxs> |
|||
<!-- 列表 --> |
|||
<view class="list-all"> |
|||
<view class="list-item" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{sclerotialist}}" data-id="{{item.id}}" bindtap="toDetail"> |
|||
<image src="{{item.imgUrl}}"></image> |
|||
<view class="item-info"> |
|||
<view class="item-info-name">{{item.noticeTitle}} |
|||
</view> |
|||
<view class="item-info-time"> |
|||
<text>{{item.deptName}}</text> |
|||
<text>{{filter.formatTime(item.noticeTime, 'yyyy-MM-dd')}}</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!--加载更多提示--> |
|||
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> |
|||
|
|||
<no-data isShow="{{nodata}}"></no-data> |
@ -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%; |
|||
} |
Loading…
Reference in new issue