Browse Source

一键服务中居务公开模块改版;

feature/optimise
ZhaoTongYao 5 years ago
parent
commit
fcd0a85351
  1. 5
      subpages/oneKeyService/pages/index/index.js
  2. 20
      subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.js
  3. 2
      subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.json
  4. 19
      subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.wxss
  5. 1
      subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.js
  6. 19
      subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.wxml
  7. 34
      subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.wxss
  8. 2
      subpages/oneKeyService/pages/noticeDetail/noticeDetail.js
  9. 4
      utils/config.js

5
subpages/oneKeyService/pages/index/index.js

@ -72,8 +72,11 @@ Page({
url: `../warning/warning?modulecode=${e.currentTarget.dataset.modulecode}` url: `../warning/warning?modulecode=${e.currentTarget.dataset.modulecode}`
}) })
} else if (e.currentTarget.dataset.modulecode == 'notice_jwgk') { } else if (e.currentTarget.dataset.modulecode == 'notice_jwgk') {
// wx.navigateTo({
// url: `../warning/warning?modulecode=${e.currentTarget.dataset.modulecode}`
// })
wx.navigateTo({ wx.navigateTo({
url: `../warning/warning?modulecode=${e.currentTarget.dataset.modulecode}` url: `../laobingzaixian/laobingzaixian?modulecode=${e.currentTarget.dataset.modulecode}`
}) })
} else if (e.currentTarget.dataset.modulecode == 'notice_yjfu_lbzx') { } else if (e.currentTarget.dataset.modulecode == 'notice_yjfu_lbzx') {
wx.navigateTo({ wx.navigateTo({

20
subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.js

@ -20,13 +20,27 @@ Page({
duration: 500, //幻灯片切换时长(ms) duration: 500, //幻灯片切换时长(ms)
currentSwiper: 0, currentSwiper: 0,
showTitle: true, //视频标题 showTitle: true, //视频标题
dictType: 'notice_yjfu_lbzx', // 居务公开,老兵在线
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
this.getBannerList('7') this.setData({
dictType: options.modulecode
})
if (options.modulecode == 'notice_jwgk') {
wx.setNavigationBarTitle({
title: '居务公开'
})
this.getBannerList('8')
} else if (options.modulecode == 'notice_yjfu_lbzx') {
wx.setNavigationBarTitle({
title: '老兵在线'
})
this.getBannerList('7')
}
this.getFullDictInfo() this.getFullDictInfo()
}, },
@ -56,7 +70,7 @@ Page({
}, },
getFullDictInfo () { getFullDictInfo () {
const dictType = 'notice_yjfu_lbzx' const dictType = this.data.dictType
api.modulelist(dictType).then(res => { api.modulelist(dictType).then(res => {
this.setData({ this.setData({
deptList: res.data, deptList: res.data,
@ -135,7 +149,7 @@ Page({
navigateToDict (e) { navigateToDict (e) {
console.log(e.currentTarget.dataset.dict) console.log(e.currentTarget.dataset.dict)
wx.navigateTo({ wx.navigateTo({
url: `../laobingzaixianDict/laobingzaixianDict?dictName=${e.currentTarget.dataset.dict.name}&dictType=notice_yjfu_lbzx&dictValue=${e.currentTarget.dataset.dict.moduleCode}` url: `../laobingzaixianDict/laobingzaixianDict?dictName=${e.currentTarget.dataset.dict.name}&dictType=${this.data.dictType}&dictValue=${e.currentTarget.dataset.dict.moduleCode}`
}) })
} }
}) })

2
subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.json

@ -1,5 +1,5 @@
{ {
"navigationBarTitleText": "老兵在线", "navigationBarTitleText": "",
"usingComponents": { "usingComponents": {
"load-more": "../../../../components/loadMore/loadMore", "load-more": "../../../../components/loadMore/loadMore",
"no-data":"../../../../components/nodata/nodata" "no-data":"../../../../components/nodata/nodata"

19
subpages/oneKeyService/pages/laobingzaixian/laobingzaixian.wxss

@ -89,7 +89,7 @@ button::after {
display: grid; display: grid;
grid-template-columns: 1fr; grid-template-columns: 1fr;
place-items: center; place-items: center;
gap: 20rpx 0; gap: 24rpx 0;
width: 690rpx; width: 690rpx;
padding: 20rpx 0; padding: 20rpx 0;
margin: 0rpx auto; margin: 0rpx auto;
@ -101,7 +101,7 @@ button::after {
} }
.list-item { .list-item {
width: 100%; width: 100%;
height: 130rpx; height: 160rpx;
background: #fff; background: #fff;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -114,7 +114,7 @@ button::after {
font-family:PingFang SC; font-family:PingFang SC;
font-weight:bold; font-weight:bold;
color:rgba(51,51,51,1); color:rgba(51,51,51,1);
margin-left: 40rpx; margin-left: 42rpx;
display: flex; display: flex;
align-items: center; align-items: center;
} }
@ -126,7 +126,7 @@ button::after {
.list-item .list-name .list-icon { .list-item .list-name .list-icon {
width: 106rpx; width: 106rpx;
height: 106rpx; height: 106rpx;
margin-right: 10rpx; margin-right: 14rpx;
} }
/* 轮播图start */ /* 轮播图start */
@ -156,7 +156,7 @@ button::after {
.page-body { .page-body {
padding-top: 30rpx; padding-top: 30rpx;
background: #fff; background: #fff;
height: 300rpx; height: 350rpx;
} }
.page-section { .page-section {
@ -182,7 +182,7 @@ button::after {
.page-section-spacing { .page-section-spacing {
box-sizing: border-box; box-sizing: border-box;
/* padding: 0 20rpx; */ /* padding: 0 20rpx; */
height: 300rpx; height: 350rpx;
background-color: #fff; background-color: #fff;
} }
@ -201,15 +201,16 @@ button::after {
.swiper-item { .swiper-item {
display: block; display: block;
height: 300rpx; height: 350rpx;
} }
.banner { .banner {
overflow: hidden; overflow: hidden;
height: 300rpx; height: 350rpx;
display: flex; display: flex;
width: 100%; width: 100%;
border-radius: 16rpx; border-radius: 16rpx;
margin-bottom: 8rpx;
} }
.dots { .dots {
@ -241,7 +242,7 @@ button::after {
swiper { swiper {
width: 710rpx; width: 710rpx;
height: 300rpx; height: 350rpx;
box-shadow: 0px 4px 29px 0px rgba(63, 63, 63, 0.1); box-shadow: 0px 4px 29px 0px rgba(63, 63, 63, 0.1);
border-radius: 16rpx; border-radius: 16rpx;
overflow: hidden; overflow: hidden;

1
subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.js

@ -29,6 +29,7 @@ Page({
dictType: options.dictType, dictType: options.dictType,
dictValue: options.dictValue dictValue: options.dictValue
}) })
console.log(options)
this.getSclerotiaList() this.getSclerotiaList()
}, },

19
subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.wxml

@ -1,19 +1,32 @@
<wxs module="filter" src="../../../../utils/filter.wxs"></wxs> <wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
<!-- 列表 --> <!-- 列表 -->
<view class="list-all"> <view class="list-all" wx:if="{{dictType == 'notice_yjfu_lbzx'}}">
<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="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> <image src="{{item.imgUrl}}"></image>
<view class="item-info"> <view class="item-info">
<view class="item-info-name">{{item.noticeTitle}} <view class="item-info-name">{{item.noticeTitle}}</view>
</view>
<view class="item-info-time"> <view class="item-info-time">
<text>{{item.deptName}}</text> <text>{{item.deptName}}</text>
<text>{{filter.formatTime(item.noticeTime, 'yyyy-MM-dd')}}</text> <text>{{filter.formatTime(item.noticeTime, 'yyyy-MM-dd')}}</text>
</view> </view>
</view> </view>
</view> </view>
</view>
<view class="list-all" wx:else>
<view class="list-item-2" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{sclerotialist}}" bindtap="toDetail" data-id="{{item.id}}">
<view class="name">{{item.noticeTitle}}</view>
<view class="info">
<text>{{common.getStr(item.noticeContent)}}</text>
</view>
</view>
</view> </view>
<!--加载更多提示--> <!--加载更多提示-->
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> <load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more>
<no-data isShow="{{nodata}}"></no-data> <no-data isShow="{{nodata}}"></no-data>
<wxs module="common">
module.exports.getStr = function(content) {
return content.replace(getRegExp('<\/?.+?\/?>|[&nbsp;]','g'),'')
}
</wxs>

34
subpages/oneKeyService/pages/laobingzaixianDict/laobingzaixianDict.wxss

@ -84,3 +84,37 @@ page {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.list-all .list-item-2 {
width: 100%;
padding: 40rpx 28rpx;
margin-top: 16rpx;
background: #fff;
box-sizing: border-box;
}
.list-all .list-item-2 .name {
font-size: 34rpx;
font-weight: 500;
color: rgba(51, 51, 51, 1);
line-height: 50rpx;
}
.list-all .list-item-2 .info {
margin-top: 15rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(153, 153, 153, 1);
}
.list-all .list-item-2 .info text {
line-height: 46rpx;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
font-size: 30rpx;
}

2
subpages/oneKeyService/pages/noticeDetail/noticeDetail.js

@ -43,7 +43,7 @@ Page({
this.noticeDetail(options.id) this.noticeDetail(options.id)
} else if(options.modulecode == 'notice_jwgk'){ } else if(options.modulecode == 'notice_jwgk'){
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '居务公开' title: options.modulename
}) })
this.noticeDetail(options.id) this.noticeDetail(options.id)
} else if(options.modulecode == 'notice_yjfu_lbzx'){ } else if(options.modulecode == 'notice_yjfu_lbzx'){

4
utils/config.js

@ -6,8 +6,8 @@ module.exports = {
}; };
function BASEURL() { 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://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/' // return 'http://192.168.43.19:9094/epdc-api/api/'
} }

Loading…
Cancel
Save