4 files added
4 files modified
| | |
| | | "pages/zhgk/zhgk", |
| | | "pages/zhdt/zhdt", |
| | | "pages/zhdtInfo/zhdtInfo", |
| | | "pages/dxalInfo/dxalInfo", |
| | | "pages/me/me", |
| | | "pages/wdjb/wdjb", |
| | | "pages/wdjbInfo/wdjbInfo", |
| | |
| | | // pages/dxal/dxal.js |
| | | import { |
| | | $startWuxRefresher, |
| | | $stopWuxRefresher, |
| | | $stopWuxLoader |
| | | } from '../../templeteDist/wuxDist/index'; |
| | | |
| | | var app = getApp(); |
| | | |
| | |
| | | dongtai3_1: app.globalData.imgUrl + '/image/dongtai3-1.jpg', |
| | | inputShowed: false, |
| | | inputVal: "", |
| | | |
| | | page:1, |
| | | content: '------加载中------', |
| | | items: [], |
| | | count: 0, |
| | | scrollTop: 0, |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad: function(options) { |
| | | $startWuxRefresher(); |
| | | }, |
| | | onPageScroll(e) { |
| | | this.setData({ |
| | | scrollTop: e.scrollTop |
| | | }) |
| | | }, |
| | | onRefresh() { |
| | | console.log('onRefresh') |
| | | |
| | | this.setData({ |
| | | count: 10 |
| | | }) |
| | | |
| | | setTimeout(() => { |
| | | this.setData({ |
| | | items: this.getList() |
| | | }) |
| | | $stopWuxRefresher() |
| | | }, 1000) |
| | | }, |
| | | onLoadmore() { |
| | | console.log('onLoadmore') |
| | | setTimeout(() => { |
| | | this.setData({ |
| | | items: [...this.data.items, ...this.getList(10, this.data.count)], |
| | | count: this.data.count + 10, |
| | | }) |
| | | |
| | | if (this.data.items.length < 30) { |
| | | $stopWuxLoader() |
| | | } else { |
| | | console.log('没有更多数据') |
| | | $stopWuxLoader('#wux-refresher', this, true) |
| | | var that = this; |
| | | wx.showLoading(); |
| | | wx.request({ |
| | | url: app.globalData.url + '/api/article/publicMsgQuery', |
| | | data: { |
| | | page: that.data.page, |
| | | size: 10, |
| | | flag: '典型案例', |
| | | }, |
| | | success: function(res) { |
| | | wx.hideLoading(); |
| | | console.log('res', res); |
| | | if (res.data.code == 0) { |
| | | let content = res.data.data.result.content.map(({ |
| | | createTime, |
| | | ...i |
| | | }) => ({ |
| | | ...i, |
| | | createTime: app.formatDate(createTime), |
| | | })); |
| | | console.log(content) |
| | | if (content.length < 10) { |
| | | that.setData({ |
| | | items: [...that.data.items, ...content], |
| | | hasMoreData: false, |
| | | content: '------我是有底线的------' |
| | | }) |
| | | } else { |
| | | that.setData({ |
| | | items: [...that.data.items, ...content], |
| | | hasMoreData: true, |
| | | content: '------加载更多------', |
| | | page: that.data.page + 1 |
| | | }) |
| | | } |
| | | } else { |
| | | wx.showToast({ |
| | | title: res.data.msg, |
| | | }) |
| | | } |
| | | } |
| | | }, 1000) |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | getList: (count = 10, step = 0) => [...new Array(count)].map((n, i) => ({ |
| | | title: `Pull down ${i + step}`, |
| | | content: 'Wux Weapp' |
| | |
| | | </view> |
| | | </view> --> |
| | | |
| | | <wux-refresher id="wux-refresher" bind:pulling="onPulling" bind:refresh="onRefresh" bind:loadmore="onLoadmore" scrollTop="{{scrollTop}}"> |
| | | <view class="weui-panel weui-panel_access"> |
| | | <view class="weui-panel__bd"> |
| | | <view class="weui-media-box weui-media-box_text" wx:for="{{ items }}" wx:key=""> |
| | | <!-- <view class="weui-media-box__title weui-media-box__title_in-text">{{ item.title }}</view> |
| | | <view class="weui-media-box__desc">{{ item.content }}</view> --> |
| | | <view class="zhwj-b-main" data-str="zhdtInfo" data-id="1" bindtap='linkFunction'> |
| | | <view class="zhwj-b-head-l"> |
| | | <view class="zhwj-b-head-l-title text-black">南沙区院召开2019“沙鸥”法治宣讲团年度总结暨课件评选会</view> |
| | | <view class="text-grey">检察宣传部 60阅读</view> |
| | | </view> |
| | | <!-- <view class="zhwj-b-head-r"> |
| | | <image mode='widthFix' src="{{dongtai1_1}}"></image> |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | <view class="zhwj-b"> |
| | | <view class="zhwj-b-main" wx:for="{{ items }}" data-str="dxalInfo" data-Id="{{item.id}}" bindtap='linkFunction'> |
| | | <view class="zhwj-b-head-l"> |
| | | <view class="zhwj-b-head-l-title text-black">{{item.title}}</view> |
| | | <view class="text-grey">{{item.createTime}} |
| | | <text decode="{{true}}" space="{{true}}"> </text>{{item.readCount}}阅读</view> |
| | | </view> |
| | | <!-- <view class="zhwj-b-head-r"> |
| | | <image mode='widthFix' src="{{item.attList[0].path}}"></image> |
| | | </view> --> |
| | | </view> |
| | | </wux-refresher> |
| | | <div class="businessSchedule-load">------{{content}}------</div> |
| | | </view> |
| | |
| | | /* pages/dxal/dxal.wxss */ |
| | | /* pages/zhdt/zhdt.wxss */ |
| | | @import '../../weui.wxss'; |
| | | |
| | | .weui-media-box{ |
| | | padding: 0 15px; |
| | | } |
| | | |
| | | .zhwj-b-main { |
| | | display: flex; |
| | | /* border-bottom: 1px solid #ebf2fa; */ |
| | | border-bottom: 1px solid #ebf2fa; |
| | | } |
| | | |
| | | .zhwj-b-head-l { |
| | |
| | | width: 100%; |
| | | } |
| | | |
| | | .businessSchedule-load { |
| | | display: flex; |
| | | justify-content: center; |
| | | color: #999; |
| | | font-size: 14px; |
| | | margin-bottom: 4vh; |
| | | } |
| | | |
| | | .zhwj-b-head-r { |
| | | margin: 6px; |
| | | } |
New file |
| | |
| | | // pages/zhdtInfo/zhdtInfo.js |
| | | var app = getApp(); |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | id: '', |
| | | swiperList: [], |
| | | data: {}, |
| | | attList: {}, |
| | | excelSrc: app.globalData.imgUrl + '/image/fileIcon/excel.svg', |
| | | fileSrc: app.globalData.imgUrl + '/image/fileIcon/file.svg', |
| | | mp3Src: app.globalData.imgUrl + '/image/fileIcon/mp3.svg', |
| | | mp4Src: app.globalData.imgUrl + '/image/fileIcon/mp4.svg', |
| | | pdfSrc: app.globalData.imgUrl + '/image/fileIcon/pdf.svg', |
| | | pictureSrc: app.globalData.imgUrl + '/image/fileIcon/picture.svg', |
| | | pptSrc: app.globalData.imgUrl + '/image/fileIcon/ppt.svg', |
| | | wordSrc: app.globalData.imgUrl + '/image/fileIcon/word.svg', |
| | | zipSrc: app.globalData.imgUrl + '/image/fileIcon/zip.svg', |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad: function(options) { |
| | | console.log(options.id) |
| | | var that = this; |
| | | wx.request({ |
| | | url: app.globalData.url + '/api/article/publicMsgDetails?msgId=' + options.id, |
| | | success: function(res) { |
| | | wx.hideLoading(); |
| | | console.log(res) |
| | | if (res.data.code == 0) { |
| | | var attList = res.data.data.maps || []; |
| | | var attList21 = app.where(attList, { |
| | | type: 21 |
| | | }) || []; |
| | | attList21.forEach(e => { |
| | | e.iconSrc = that.data.mp4Src |
| | | }) |
| | | var attList22 = app.where(attList, { |
| | | type: 22 |
| | | }) || []; |
| | | attList22.forEach(e => { |
| | | e.iconSrc = that.data.pictureSrc |
| | | }) |
| | | var attList23 = app.where(attList, { |
| | | type: 23 |
| | | }) || []; |
| | | attList23.forEach(e => { |
| | | e.iconSrc = that.data.wordSrc |
| | | }) |
| | | var attList24 = app.where(attList, { |
| | | type: 24 |
| | | }) || []; |
| | | attList24.forEach(e => { |
| | | e.iconSrc = that.data.excelSrc |
| | | }) |
| | | var attList25 = app.where(attList, { |
| | | type: 25 |
| | | }) || []; |
| | | attList25.forEach(e => { |
| | | e.iconSrc = that.data.pptSrc |
| | | }) |
| | | var attList26 = app.where(attList, { |
| | | type: 26 |
| | | }) || []; |
| | | attList26.forEach(e => { |
| | | e.iconSrc = that.data.pdfSrc |
| | | }) |
| | | var attList27 = app.where(attList, { |
| | | type: 27 |
| | | }) || []; |
| | | attList27.forEach(e => { |
| | | e.iconSrc = that.data.zipSrc |
| | | }) |
| | | var attList28 = app.where(attList, { |
| | | type: 28 |
| | | }) || []; |
| | | attList28.forEach(e => { |
| | | e.iconSrc = that.data.fileSrc |
| | | }) |
| | | var attList99 = app.where(attList, { |
| | | type: 99 |
| | | }) || []; |
| | | attList99.forEach(e => { |
| | | e.iconSrc = that.data.fileSrc |
| | | }) |
| | | var attList = { |
| | | attList21, |
| | | attList22, |
| | | attList23, |
| | | attList24, |
| | | attList25, |
| | | attList26, |
| | | attList27, |
| | | attList28, |
| | | attList99 |
| | | }; |
| | | |
| | | console.log(attList) |
| | | that.setData({ |
| | | data: { |
| | | ...res.data.data, |
| | | createTime: app.formatDate(res.data.data.createTime), |
| | | } |
| | | }) |
| | | } else { |
| | | wx.showModal({ |
| | | title: '提示', |
| | | content: "请求失败!" |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "典型案例详情", |
| | | "backgroundTextStyle": "light", |
| | | "navigationBarBackgroundColor": "#fff", |
| | | "navigationBarTextStyle": "black" |
| | | } |
New file |
| | |
| | | <!--pages/zhdtInfo/zhdtInfo.wxml--> |
| | | <view class="zhgk-Info-main"> |
| | | <view class=" text-lg" style="padding:30rpx 30rpx 0;"> |
| | | <text class="zhgk-Info-main-title text-black">{{data.title}}</text> |
| | | </view> |
| | | <view class=' text-df padding'> |
| | | <rich-text nodes="{{data.content}}"></rich-text> |
| | | </view> |
| | | </view> |
| | | |
| | | <div class="boxshadow"> |
| | | <div class="PetitionLetters-message1"> |
| | | <span></span> |
| | | <span>相关附件</span> |
| | | </div> |
| | | <div class="detail-img"> |
| | | <view class="educt_hasupload_pic" wx:for="{{attList.attList22}}" wx:key="{{key}}"> |
| | | <image src="{{item.path}}" class="upload" bindtap="previewImage" data-src="{{item.path}}"></image> |
| | | </view> |
| | | <view class="educt_hasupload_pic" wx:for="{{attList.attList23}}" wx:key="{{key}}"> |
| | | <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image> |
| | | <div class="detail-img-bottom">{{item.name}}</div> |
| | | </view> |
| | | <view class="educt_hasupload_pic" wx:for="{{attList.attList24}}" wx:key="{{key}}"> |
| | | <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image> |
| | | <div class="detail-img-bottom">{{item.name}}</div> |
| | | </view> |
| | | <view class="educt_hasupload_pic" wx:for="{{attList.attList25}}" wx:key="{{key}}"> |
| | | <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image> |
| | | <div class="detail-img-bottom">{{item.name}}</div> |
| | | </view> |
| | | <view class="educt_hasupload_pic" wx:for="{{attList.attList26}}" wx:key="{{key}}"> |
| | | <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image> |
| | | <div class="detail-img-bottom">{{item.name}}</div> |
| | | </view> |
| | | <view class="educt_hasupload_pic" wx:for="{{attList.attList27}}" wx:key="{{key}}"> |
| | | <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image> |
| | | <div class="detail-img-bottom">{{item.name}}</div> |
| | | </view> |
| | | <view class="educt_hasupload_pic" wx:for="{{attList.attList28}}" wx:key="{{key}}"> |
| | | <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image> |
| | | <div class="detail-img-bottom">{{item.name}}</div> |
| | | </view> |
| | | <view class="educt_hasupload_pic" wx:for="{{attList.attList99}}" wx:key="{{key}}"> |
| | | <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image> |
| | | <div class="detail-img-bottom">{{item.name}}</div> |
| | | </view> |
| | | </div> |
| | | </div> |
New file |
| | |
| | | /* pages/zhdtInfo/zhdtInfo.wxss */ |
| | | |
| | | .zhgk-Info-main { |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .zhgk-Info-main-title { |
| | | color: #249eff; |
| | | } |
| | | |
| | | .detail-img { |
| | | display: flex; |
| | | flex-direction: columns; |
| | | align-items: center; |
| | | padding: 2vh; |
| | | } |
| | | |
| | | .PetitionLetters-message1 { |
| | | display: flex; |
| | | padding: 2vh; |
| | | } |
| | | |
| | | .PetitionLetters-message1 span:nth-child(1) { |
| | | border-left: 3px solid #2195ff; |
| | | } |
| | | |
| | | .PetitionLetters-message1 span:nth-child(2) { |
| | | padding-left: 1vh; |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .detail-img-top { |
| | | width: 48px; |
| | | height: 48px; |
| | | } |
| | | |
| | | .detail-img-bottom { |
| | | font-size: 12px; |
| | | color: #333; |
| | | width: 70px; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | text-align: center; |
| | | } |