After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 34 KiB |
@ -1,5 +1,5 @@ |
|||
{ |
|||
"usingComponents": { |
|||
}, |
|||
"navigationBarTitleText": "通知详情" |
|||
"navigationBarTitleText": "" |
|||
} |
@ -0,0 +1,8 @@ |
|||
Component({ |
|||
data: { |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
}) |
@ -0,0 +1,3 @@ |
|||
{ |
|||
"component": true |
|||
} |
@ -0,0 +1,3 @@ |
|||
<view class="preload-archives-detail"> |
|||
<view class="detail-item" wx:for="{{[1,2,3,4,5,6]}}"></view> |
|||
</view> |
@ -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% |
|||
} |
|||
} |
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 192 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 586 B |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 130 KiB |
After Width: | Height: | Size: 1.2 KiB |
@ -1,113 +1,113 @@ |
|||
// subpages/understandJs/pages/archives/archives.js
|
|||
const api = require('../../../../utils/understandJs') |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
searchContent: '', |
|||
pageIndex: 1, |
|||
pageSize: 10, |
|||
deptList: [], |
|||
nodata: false, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.archivedepts() |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
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.archivedepts() |
|||
} |
|||
}, |
|||
|
|||
bindInputValue (e) { |
|||
this.setData({ |
|||
searchContent: e.detail.value |
|||
}) |
|||
}, |
|||
|
|||
searchFile () { |
|||
console.log(this.data.searchContent) |
|||
if(!this.data.searchContent.length) { |
|||
wx.showToast({ |
|||
title: '不能为空', |
|||
icon: 'loading', |
|||
duration: 2000 |
|||
}) |
|||
return; |
|||
} |
|||
let that = this |
|||
wx.navigateTo({ |
|||
url: `../archivesDept/archivesDept?dept=锦水档案&deptId=&searchContent=${that.data.searchContent}` |
|||
}) |
|||
}, |
|||
|
|||
archivedepts () { |
|||
const parmas = { |
|||
pageIndex:this.data.pageIndex, |
|||
pageSize:this.data.pageSize |
|||
} |
|||
api.archivedepts(parmas).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) |
|||
}) |
|||
}, |
|||
/** |
|||
* 跳转到档案归属部门 |
|||
*/ |
|||
navigateToDept (e) { |
|||
this.setData({ |
|||
searchContent: '' |
|||
}) |
|||
let that = this |
|||
wx.navigateTo({ |
|||
url: `../archivesDept/archivesDept?dept=${e.currentTarget.dataset.dept}&deptId=${e.currentTarget.dataset.deptId}&searchContent=${that.data.searchContent}` |
|||
}) |
|||
} |
|||
// subpages/understandJs/pages/archives/archives.js
|
|||
const api = require('../../../../utils/understandJs') |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
searchContent: '', |
|||
pageIndex: 1, |
|||
pageSize: 10, |
|||
deptList: [], |
|||
nodata: false, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.archivedepts() |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
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.archivedepts() |
|||
} |
|||
}, |
|||
|
|||
bindInputValue (e) { |
|||
this.setData({ |
|||
searchContent: e.detail.value |
|||
}) |
|||
}, |
|||
|
|||
searchFile () { |
|||
console.log(this.data.searchContent) |
|||
if(!this.data.searchContent.length) { |
|||
wx.showToast({ |
|||
title: '不能为空', |
|||
icon: 'loading', |
|||
duration: 2000 |
|||
}) |
|||
return; |
|||
} |
|||
let that = this |
|||
wx.navigateTo({ |
|||
url: `../archivesDept/archivesDept?dept=锦水档案&deptId=&searchContent=${that.data.searchContent}` |
|||
}) |
|||
}, |
|||
|
|||
archivedepts () { |
|||
const parmas = { |
|||
pageIndex:this.data.pageIndex, |
|||
pageSize:this.data.pageSize |
|||
} |
|||
api.archivedepts(parmas).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) |
|||
}) |
|||
}, |
|||
/** |
|||
* 跳转到档案归属部门 |
|||
*/ |
|||
navigateToDept (e) { |
|||
this.setData({ |
|||
searchContent: '' |
|||
}) |
|||
let that = this |
|||
wx.navigateTo({ |
|||
url: `../archivesDept/archivesDept?dept=${e.currentTarget.dataset.dept}&deptId=${e.currentTarget.dataset.deptId}&searchContent=${that.data.searchContent}` |
|||
}) |
|||
} |
|||
}) |
@ -1,30 +1,30 @@ |
|||
<view class="top"> |
|||
<image class="topbk" src="../../images/archivesbk.png"/> |
|||
<view class="search"> |
|||
<view class="item-all"> |
|||
<view class="item-left"> |
|||
<image src="../../images/search.png"></image> |
|||
<input placeholder-class="placeholder-style" placeholder="输入档案关键字" bindinput="bindInputValue" value="{{searchContent}}"></input> |
|||
</view> |
|||
<button class="item-right" bindtap="searchFile" hover-class="none">搜索</button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<view class="dept-list"> |
|||
<view |
|||
wx:for="{{deptList}}" |
|||
wx:for-index="index" |
|||
wx:for-item="item" |
|||
wx:key="index" |
|||
class="list-item" bindtap="navigateToDept" data-dept-id="{{item.deptId}}" data-dept="{{item.dept}}"> |
|||
<view class="list-name">{{item.dept}}</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> |
|||
|
|||
<view class="top"> |
|||
<image class="topbk" src="../../images/archivesbk.png"/> |
|||
<view class="search"> |
|||
<view class="item-all"> |
|||
<view class="item-left"> |
|||
<image src="../../images/search.png"></image> |
|||
<input placeholder-class="placeholder-style" placeholder="输入档案关键字" bindinput="bindInputValue" value="{{searchContent}}"></input> |
|||
</view> |
|||
<button class="item-right" bindtap="searchFile" hover-class="none">搜索</button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<view class="dept-list"> |
|||
<view |
|||
wx:for="{{deptList}}" |
|||
wx:for-index="index" |
|||
wx:for-item="item" |
|||
wx:key="index" |
|||
class="list-item" bindtap="navigateToDept" data-dept-id="{{item.deptId}}" data-dept="{{item.dept}}"> |
|||
<view class="list-name">{{item.dept}}</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,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 () { |
|||
|
|||
} |
|||
}) |
@ -0,0 +1,7 @@ |
|||
{ |
|||
"navigationBarTitleText": "一键直通", |
|||
"usingComponents": { |
|||
"load-more": "../../../../components/loadMore/loadMore", |
|||
"no-data":"../../../../components/nodata/nodata" |
|||
} |
|||
} |
@ -0,0 +1,24 @@ |
|||
<view class="list-item" |
|||
hover-class="none" |
|||
hover-stop-propagation="false" |
|||
wx:if="{{deptinfolist.length > 0}}" |
|||
wx:for-index="index" |
|||
wx:for-item="item" |
|||
wx:key="index" |
|||
wx:for="{{deptinfolist}}"> |
|||
<view class="top" hover-class="none" hover-stop-propagation="false"> |
|||
{{item.deptName}} |
|||
</view> |
|||
|
|||
<view class="bottom" hover-class="none" hover-stop-propagation="false"> |
|||
<view class="name"> |
|||
{{item.mobile}} |
|||
</view> |
|||
<image bindtap="mobile" |
|||
data-mobile="{{item.mobile}}" class="" src="../../images/phone.png" /> |
|||
</view> |
|||
</view> |
|||
<!--加载更多提示--> |
|||
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> |
|||
|
|||
<no-data isShow="{{nodata}}"></no-data> |
@ -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; |
|||
} |
After Width: | Height: | Size: 1.2 KiB |
@ -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}` |
|||
}) |
|||
} |
|||
} |
|||
}) |
@ -0,0 +1,3 @@ |
|||
{ |
|||
"navigationBarTitleText": "一键服务" |
|||
} |
@ -0,0 +1,13 @@ |
|||
<button class="index top" |
|||
hover-class="hover-btn" |
|||
bindtap="goDetails" |
|||
wx:for-item="item" |
|||
wx:key="index" |
|||
wx:for-index="index" |
|||
wx:for="{{modulelist}}" |
|||
data-moduleCode="{{item.moduleCode}}"> |
|||
<image class="img-bj" src="{{item.imgUrl}}"></image> |
|||
<!-- <view class="shadow"> |
|||
<image class="img-name" src="../../images/jsyx.png"></image> |
|||
</view> --> |
|||
</button> |
@ -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; |
|||
} |
@ -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 () { |
|||
|
|||
} |
|||
}) |
@ -0,0 +1,4 @@ |
|||
{ |
|||
"usingComponents": {}, |
|||
"navigationBarTitleText": "锦水" |
|||
} |
@ -0,0 +1,25 @@ |
|||
<wxs module="filter" src="../../../../utils/filter.wxs"></wxs> |
|||
<view class="notice-detail"> |
|||
<view class="selfContent" wx:if="{{!preloadVisible}}"> |
|||
<view class="detail-title">{{noticeObj.noticeTitle}}</view> |
|||
<view class="detail-subtitle"> |
|||
<view class="left"> |
|||
<span>{{noticeObj.deptName}}</span> |
|||
<span>{{filter.formatTime(noticeObj.newsStartTime, '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"> |
|||
<rich-text space="nbsp" nodes="{{noticeObjContent}}"></rich-text> |
|||
</view> |
|||
</view> |
|||
<view class="preload" wx:else> |
|||
<view class="preload-title"></view> |
|||
<view class="preload-content"></view> |
|||
</view> |
|||
</view> |
@ -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 */ |
@ -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 }) |
|||
} |
|||
}) |
@ -0,0 +1,7 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"load-more": "../../../../components/loadMore/loadMore", |
|||
"no-data":"../../../../components/nodata/nodata" |
|||
}, |
|||
"navigationBarTitleText": "" |
|||
} |
@ -0,0 +1,25 @@ |
|||
<!-- tabbar --> |
|||
<!-- <view class="tab-bar"> |
|||
<view class="tab tab1 {{selectTab === 'tab1' ? 'select-tab' : ''}}" data-tab="tab1" bindtap="onTabChange">最热政策 |
|||
</view> |
|||
<view class="tab tab2 {{selectTab === 'tab2' ? 'select-tab' : ''}}" data-tab="tab2" bindtap="onTabChange">最新通知 |
|||
</view> |
|||
<view class="select-bar {{selectTab === 'tab1' ? 'tab1' : 'tab2'}}"></view> |
|||
</view> --> |
|||
<!-- 列表 --> |
|||
<view class="list-lu" wx:if="{{noticelist.length > 0}}"> |
|||
<view class="list-li" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{noticelist}}" |
|||
bindtap="toDetail" data-id="{{item.id}}"> |
|||
<view class="item-name">{{item.noticeTitle}}</view> |
|||
<view class="item-info"> |
|||
<image src="../../images/ic_zhengce.png" /> |
|||
<view class="street">{{item.deptName}}</view> |
|||
<view class="time">{{item.noticeTime}}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<!--加载更多提示--> |
|||
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> |
|||
|
|||
<no-data isShow="{{nodata}}"></no-data> |
@ -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); |
|||
} |
@ -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 () { |
|||
|
|||
} |
|||
}) |
@ -0,0 +1,5 @@ |
|||
{ |
|||
"usingComponents": { |
|||
}, |
|||
"navigationBarTitleText": "搜索" |
|||
} |
@ -0,0 +1,22 @@ |
|||
<!--subpages/oneKeyService/pages/search/search.wxml--> |
|||
<view class="top"> |
|||
<view class="search"> |
|||
<view class="item-all"> |
|||
<view class="item-left"> |
|||
<image src="../../images/search.png"></image> |
|||
<input placeholder-class="placeholder-style" placeholder="输入档案关键字" bindinput="bindInputValue" value="{{searchContent}}"></input> |
|||
</view> |
|||
<button class="item-right" bindtap="searchFile" hover-class="none">搜索</button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="history"> |
|||
<view |
|||
class="history-label {{item.hot?'hot-label':''}}" |
|||
wx:for="{{historylist}}" |
|||
wx:for-index="index" |
|||
wx:for-item="item" |
|||
wx:key="index"> |
|||
{{item.label}} |
|||
</view> |
|||
</view> |
@ -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; |
|||
} |
@ -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(/<img/gi, '<img style="display:none" '); |
|||
noticelistItem.push(noticelistObj) |
|||
} |
|||
that.setData({ |
|||
noticelist: that.data.noticelist.concat(noticelistItem), |
|||
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) |
|||
}) |
|||
}, |
|||
|
|||
//跳转倒详情页面
|
|||
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}`
|
|||
// })
|
|||
// }
|
|||
//}
|
|||
}) |
@ -0,0 +1,7 @@ |
|||
{ |
|||
"navigationBarTitleText": "锦水警事", |
|||
"usingComponents": { |
|||
"load-more": "../../../../components/loadMore/loadMore", |
|||
"no-data":"../../../../components/nodata/nodata" |
|||
} |
|||
} |
@ -0,0 +1,44 @@ |
|||
<!-- banner swiperBannerList --> |
|||
<view class="banner"> |
|||
<view class="page-section page-section-spacing swiper"> |
|||
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" circular="{{circular}}" interval="{{interval}}" duration="{{duration}}" bindchange="swiperChange"> |
|||
<block wx:for="{{swiperBannerList}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
|||
<swiper-item> |
|||
<view data-banner="{{item}}"> |
|||
<view class="swiper-item" data-id="{{item.id}}"> |
|||
<!-- <view class="altitle"> |
|||
<view class="altitle-name">{{item.title}}</view> |
|||
</view> --> |
|||
<image class="banner" src='{{item.imgUrl}}' mode="aspectFill" /> |
|||
</view> |
|||
</view> |
|||
</swiper-item> |
|||
</block> |
|||
</swiper> |
|||
<!-- 重置小圆点的样式 --> |
|||
<view class="dots"> |
|||
<block wx:for="{{ swiperBannerList }}" wx:key="index"> |
|||
<view class="dot {{index == currentSwiper ? ' active' : '' }}"></view> |
|||
</block> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="list-item" |
|||
wx:if="{{noticelist.length > 0}}" |
|||
wx:for-index="index" |
|||
wx:for-item="item" |
|||
wx:key="index" |
|||
wx:for="{{noticelist}}" |
|||
bindtap="toDetail" |
|||
data-id="{{item.id}}"> |
|||
<view class="name">{{item.noticeTitle}}</view> |
|||
<view class="info"> |
|||
<rich-text space="nbsp" nodes="{{item.noticeContentNew}}"></rich-text> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<!--加载更多提示--> |
|||
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> |
|||
|
|||
<no-data isShow="{{nodata}}"></no-data> |
@ -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 */ |
@ -1,3 +1,3 @@ |
|||
{ |
|||
"navigationBarTitleText": "了解锦水" |
|||
"navigationBarTitleText": "解码锦水" |
|||
} |
@ -1,4 +1,4 @@ |
|||
{ |
|||
"usingComponents": {}, |
|||
"navigationBarTitleText": "锦水" |
|||
"navigationBarTitleText": "" |
|||
} |
@ -1,24 +1,19 @@ |
|||
<view class="list-item" |
|||
hover-class="none" |
|||
hover-stop-propagation="false" |
|||
wx:if="{{deptinfolist.length > 0}}" |
|||
wx:for-index="index" |
|||
wx:for-item="item" |
|||
wx:key="index" |
|||
wx:for="{{deptinfolist}}"> |
|||
<view class="top" hover-class="none" hover-stop-propagation="false"> |
|||
{{item.deptName}} |
|||
</view> |
|||
|
|||
<view class="bottom" hover-class="none" hover-stop-propagation="false"> |
|||
<view class="name"> |
|||
{{item.mobile}} |
|||
<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"> |
|||
<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> |
|||
<image bindtap="mobile" |
|||
data-mobile="{{item.mobile}}" class="" src="../../images/phone.png" /> |
|||
<image src="{{item.imgUrl}}"></image> |
|||
</view> |
|||
</view> |
|||
<!--加载更多提示--> |
|||
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> |
|||
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> |
|||
|
|||
<no-data isShow="{{nodata}}"></no-data> |