Browse Source

干杯议事双肩走格样式修改,隐藏除楼长以外

master
mk 2 years ago
parent
commit
d5f0a8d732
  1. 9
      epdc-resident-mp-yushan/project.private.config.json
  2. 72
      epdc-resident-mp-yushan/subpages/fingertipYushan/pages/index/index.js
  3. 71
      epdc-resident-mp-yushan/subpages/fingertipYushan/pages/index/index.wxml
  4. 377
      epdc-resident-mp-yushan/subpages/fingertipYushan/pages/index/index.wxss
  5. 10
      epdc-resident-mp-yushan/subpages/fingertipYushan/utils/fingertipYushan.js
  6. 3
      epdc-resident-mp-yushan/subpages/gridArmy/pages/categoryList/categoryList.wxml
  7. 87
      epdc-resident-mp-yushan/subpages/mediateHypermarket/page/index/index.js
  8. 70
      epdc-resident-mp-yushan/subpages/mediateHypermarket/page/index/index.wxml
  9. 413
      epdc-resident-mp-yushan/subpages/mediateHypermarket/page/index/index.wxss
  10. 9
      epdc-resident-mp-yushan/subpages/mediateHypermarket/utils/mediateHypermarket.js

9
epdc-resident-mp-yushan/project.private.config.json

@ -3,6 +3,13 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "干杯议事",
"pathName": "subpages/fingertipYushan/pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "带参数二维码",
"pathName": "pages/index/index",
@ -142,5 +149,5 @@
},
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "%252525E7%2525258E%252525B0%252525E4%252525BB%252525A3%252525E6%252525A6%25252586%252525E5%252525B1%252525B1-%252525E5%252525B1%25252585%252525E6%252525B0%25252591%252525E7%252525AB%252525AF",
"libVersion": "2.33.0"
"libVersion": "2.27.3"
}

72
epdc-resident-mp-yushan/subpages/fingertipYushan/pages/index/index.js

@ -1,4 +1,5 @@
const api = require('../../utils/fingertipYushan')
import { getModuleList, contentList } from '../../utils/fingertipYushan'
Page({
/**
@ -10,10 +11,14 @@ Page({
nodata: false,
loadMoreType: 'none',
loadMoreVisible: false,
isLoadMore: false,
modulelist: [],
pid: '1438320938730868737',
typeCode: 'GBYS'
typeCode: 'GBYS',
setlectVal:'left',
noticelist:[],
moduleInfo: {
style:'4'
},
},
/**
@ -25,6 +30,7 @@ Page({
// title: options.title
// })
this.getModuleList()
this.getNoticelist()
},
// modulelist() {
// let that = this;
@ -66,6 +72,47 @@ Page({
console.log(err)
})
},
//获取通知列表
getNoticelist(categoryCode='') {
let that = this
let params = {
pageIndex: this.data.pageIndex,
pageSize: this.data.pageSize,
typeId: this.data.typeId,
}
contentList(params).then(res => {
let list = [ ...res.data ]
console.log(list)
that.setData({
noticelist: that.data.noticelist.concat(list),
loadMoreType: res.data.length === that.data.pageSize ? 'loading' : 'none',
loadMoreVisible: res.data.length === that.data.pageSize ? false : true,
preloadVisible: false
})
console.log(this.data.noticelist);
if (that.data.noticelist.length == 0) {
that.setData({
nodata: true,
loadMoreType: 'loading',
loadMoreVisible: false,
})
}else{
that.setData({
nodata: false,
})
}
}).catch(err => {
that.setData({
noticelist: [],
nodata: true,
loadMoreType: 'none',
loadMoreVisible: false,
preloadVisible: false
})
console.log(err)
})
},
/**
* 页面上拉触底事件的处理函数
*/
@ -78,12 +125,29 @@ Page({
pageIndex: this.data.pageIndex + 1,
pageSize: this.data.pageSize,
})
this.getModuleList()
this.getNoticelist()
}
},
goDetails (e) {
wx.navigateTo({
url: `/subpages/workTodo/pages/moduleList/moduleList?pid=${e.currentTarget.dataset.module.id}&typeCode=${e.currentTarget.dataset.module.typeCode}&name=${e.currentTarget.dataset.module.name}&style=${e.currentTarget.dataset.module.moduleStyle}`,
})
}
},
handelTab(e){
this.setData({
setlectVal:e.currentTarget.dataset.value,
typeId:e.currentTarget.dataset.item.id,
pageIndex:1,
noticelist:[]
})
this.getNoticelist()
console.log(this.data.noticelist.length);
},
toDetail(e){
const info = e.currentTarget.dataset
wx.navigateTo({
url: `/subpages/communityNews/pages/detail/detail?id=${info.id}`
})
},
})

71
epdc-resident-mp-yushan/subpages/fingertipYushan/pages/index/index.wxml

@ -1,15 +1,60 @@
<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-module="{{item}}">
<image class="img-bj" src="{{item.imgUrl}}"></image>
<!-- {{item.name}} -->
</button>
<!-- <load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible && isLoadMore}}"></load-more> -->
<view class="tab">
<text bind:tap="handelTab" data-value="left" data-item="{{modulelist[0]}}" class="{{setlectVal=='left'?'selectTab_color':''}}">{{modulelist[0].name}}</text>
<text bind:tap="handelTab" data-value="right" data-item="{{modulelist[1]}}" class="{{setlectVal=='right'?'selectTab_color':''}}">{{modulelist[1].name}}</text>
<view class="{{setlectVal == 'left'?'tab_left':'tab_right'}} selectTab" src="../../images/work/select.png" mode=""/>
</view>
<wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
<view class="dept-list">
<!-- 1. 图标、模块类别名称 -->
<view class="type-1" wx:if="{{modulelist.length > 0 && moduleInfo.style == '1'}}">
<block wx:for="{{modulelist}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="list-item" bindtap="navigateToType" data-info="{{item}}">
<image class="list-icon" src="{{item.imgUrl}}"/>
<view class="list-name">{{item.name}}</view>
</view>
</block>
</view>
<!-- 2. 图片、标题、部门、浏览次数 -->
<view class="type-2" wx:if="{{noticelist.length > 0 && moduleInfo.style == '2'}}">
<view class="list-item" wx:for="{{noticelist}}" data-id="{{item.id}}" bindtap="toDetail" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="item-info">
<view class="item-info-title">{{item.noticeTitle}}</view>
<view class="item-info-dept">
<view class="dept"><image class="dept-icon-1" src="../../images/danwei.png" />{{item.deptName}}</view>
<view class="read"><image class="dept-icon-2" src="../../images/eye.png" />{{item.readingAmount}}</view>
</view>
</view>
<image class="list-img" src="{{item.imgUrl}}"></image>
</view>
</view>
<!-- 3. 模块标题、内容、背景图 -->
<view class="type-3" wx:if="{{modulelist.length > 0 && moduleInfo.style == '3'}}">
<view class="list-item color-{{index%6}}" wx:for="{{modulelist}}" bindtap="navigateToType" data-info="{{item}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="title">{{item.name}}</view>
</view>
</view>
<!-- 4. 标题、部门、时间 -->
<view class="type-4" wx:if="{{noticelist.length > 0 && moduleInfo.style == '4'}}">
<view class="list-item" wx:for="{{noticelist}}" bindtap="toDetail" data-id="{{item.id}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="item-name">{{item.noticeTitle}}</view>
<view class="item-info">
<view class="dept">{{item.deptName}}</view>
<view class="time">{{common.getTimeStr(item.releaseTime)}}</view>
</view>
</view>
</view>
</view>
<wxs module="common">
module.exports.getStr = function(content) {
return content.replace(getRegExp('<\/?.+?\/?>|[&nbsp;]','g'),'')
}
module.exports.getTimeStr = function(time) {
return time.split(' ')[0].replace(getRegExp('-','g'),'.')
}
</wxs>
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more>
<no-data isShow="{{nodata}}"></no-data>

377
epdc-resident-mp-yushan/subpages/fingertipYushan/pages/index/index.wxss

@ -1,3 +1,7 @@
page {
background: #f7f7f7;
height: auto;
}
.index {
width: calc(100% - 60rpx);
/* margin-top: 28rpx; */
@ -33,3 +37,376 @@ button::after {
left: 0;
z-index: 10;
}
.tab{
display: flex;
justify-content: space-around;
text-align: center;
position: relative;
color: #999;
font-family: PingFang SC;
font-size: 34rpx;
padding: 0 60rpx;
box-sizing: border-box;
margin-top: 20rpx;
height: 44rpx;
}
.tab .selectTab{
width: 80rpx;
height: 6rpx;
background: #f95454;
border-radius: 4rpx;
position: absolute;
transition: left 0.5s ease;
}
.tab .selectTab_color{
color: #f95454;
}
.tab_left{
top: 50rpx;
left: 175rpx;
}
.tab_right{
top: 50rpx;
left: 489rpx;
}
/* 轮播图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: 350rpx;
}
.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: 350rpx;
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: 350rpx;
}
.banner {
overflow: hidden;
height: 350rpx;
display: flex;
width: 100%;
margin: 0 auto;
background-color: #FFF;
padding: 44rpx 0;
}
.banner-item {
overflow: hidden;
height: 350rpx;
display: flex;
width: 100%;
border-radius: 16rpx;
margin-bottom: 8rpx;
}
.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 {
width: 710rpx;
height: 350rpx;
margin: 0 auto;
box-shadow: 0px 4px 29px 0px rgba(63, 63, 63, 0.1);
border-radius: 16rpx;
overflow: hidden;
-webkit-backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
}
.video-title {
width: 100%;
height: 50rpx;
line-height: 50rpx;
padding-left: 40rpx;
color: white;
background: linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0));
background: -webkit-linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0));
position: absolute;
top: 0;
}
/* 轮播图end */
/* type-1 start */
.type-1 {
display: flex;
flex-wrap: wrap;
padding: 20rpx 40rpx;
background-color: #ffffff;
margin-top: 10rpx;
}
.type-1 .list-item {
width: 200rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 20rpx 10rpx;
}
.type-1 .list-item .list-icon {
width: 60rpx;
height: 60rpx;
}
.type-1 .list-item .list-name {
font-size: 28rpx;
color: #333333;
}
/* type-1 end */
/* type-2 start */
.type-2 {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.type-2 .list-item {
width: 710rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin: 10rpx 0;
border-radius: 6rpx;
background-color: #ffffff;
padding: 20rpx;
box-sizing: border-box;
}
.type-2 .list-item .item-info {
width: 420rpx;
min-height: 160rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.type-2 .list-item .item-info .item-info-title {
font-size: 32rpx;
color: #000000;
overflow: hidden;
text-overflow: ellipsis;
word-wrap:break-word;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
display: -webkit-box;
}
.type-2 .list-item .item-info .item-info-dept {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20rpx;
font-size: 26rpx;
color: #aaaaaa;
}
.type-2 .list-item .item-info .item-info-dept .dept {
display: flex;
align-items: center;
}
.type-2 .list-item .item-info .item-info-dept .dept-icon-1{
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
.type-2 .list-item .item-info .item-info-dept .read{
display: flex;
align-items: center;
font-size: 24rpx;
color: #000000;
}
.type-2 .list-item .item-info .item-info-dept .dept-icon-2{
width: 28rpx;
height: 24rpx;
margin-right: 10rpx;
}
.type-2 .list-item .list-img {
width: 220rpx;
height: 146rpx;
border-radius: 12rpx;
}
/* type-2 end */
/* type-3 start */
.type-3 {
display: flex;
flex-wrap: wrap;
padding: 20rpx;
background-color: #ffffff;
margin-top: 10rpx;
}
.type-3 .list-item {
width: 330rpx;
height: 150rpx;
display: flex;
flex-direction: column;
justify-content: center;
margin: 20rpx 10rpx;
position: relative;
border-radius: 14rpx;
}
.type-3 .color-0 {
background-color: rgba(27, 171, 252, 0.13);
}
.type-3 .color-1 {
background-color: rgba(255, 100, 92, 0.13);
}
.type-3 .color-2 {
background-color: rgba(251, 128, 54, 0.13);
}
.type-3 .color-3 {
background-color: rgba(67, 204, 202, 0.13);
}
.type-3 .color-4 {
background-color: rgba(184, 159, 150, 0.13);
}
.type-3 .color-5 {
background-color: rgba(255, 213, 86, 0.13);
}
.type-3 .list-item .list-bg {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
border-radius: 12rpx;
opacity: 0.2;
}
.type-3 .list-item .title {
margin-left: 30rpx;
font-size: 32rpx;
color: #333333;
}
.type-3 .list-item .content {
margin-left: 30rpx;
margin-top: 8rpx;
font-size: 26rpx;
color: #666666;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
/* type-3 end */
/* type-4 start */
.type-4 {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #ffffff;
margin-top: 10rpx;
}
.type-4 .list-item {
width: 690rpx;
min-height: 150rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 20rpx 0;
border-radius: 6rpx;
background-color: #f5f7fa;
padding: 20rpx;
box-sizing: border-box;
}
.type-4 .list-item .item-name {
font-size: 34rpx;
color: #333333;
}
.type-4 .list-item .item-info {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.type-4 .list-item .item-info .dept{
font-size: 28rpx;
color: #fba84f;
}
.type-4 .list-item .item-info .time{
font-size: 28rpx;
color: #999999;
}

10
epdc-resident-mp-yushan/subpages/fingertipYushan/utils/fingertipYushan.js

@ -3,3 +3,13 @@ var request = require('../../../utils/request')
export function getModuleList(params) {
return request.get('news/getModuleList', params)
}
// 社区资讯 - 资讯列表
export function contentList(params) {
return request.get('news/contentList', params)
}
// 社区资讯-资讯详情
export function contentDetail(id) {
return request.get(`/news/contentDetail/${id}`)
}

3
epdc-resident-mp-yushan/subpages/gridArmy/pages/categoryList/categoryList.wxml

@ -7,8 +7,9 @@
</view>
<image src="../../images/top-img.png" class="top-img" />
</view>
<!-- item.typeCode == 'SLTJ' &&item.typeCode != 'QLTJ'&&item.typeCode != 'FLTJ'&&item.typeCode != 'XLTJ' -->
<view class="org-list">
<view class="list-item" bindtap="navigateTo" wx:for="{{categoryList}}" wx:for-item="item" wx:for-index="index" wx:key="value" data-code="{{item.typeCode}}" data-name="{{item.typeName}}" hover-class="org-hover" hover-stay-time="150" wx:if="{{item.typeCode != 'SLTJ' &&item.typeCode != 'QLTJ'&&item.typeCode != 'FLTJ'&&item.typeCode != 'XLTJ'}}">
<view class="list-item" bindtap="navigateTo" wx:for="{{categoryList}}" wx:for-item="item" wx:for-index="index" wx:key="value" data-code="{{item.typeCode}}" data-name="{{item.typeName}}" hover-class="org-hover" hover-stay-time="150" wx:if="{{item.typeCode == 'lzdw' }}">
<view class="list-item-label">{{item.typeName}}</view>
<image class="list-item-icon" src="../../images/right-sword.png" />
</view>

87
epdc-resident-mp-yushan/subpages/mediateHypermarket/page/index/index.js

@ -1,4 +1,5 @@
const api = require('../../utils/mediateHypermarket')
import { getModuleList, contentList } from '../../utils/mediateHypermarket'
Page({
/**
@ -10,10 +11,14 @@ Page({
nodata: false,
loadMoreType: 'none',
loadMoreVisible: false,
isLoadMore: false,
modulelist: [],
pid: '1438320938730868737',
typeCode: 'SJZG'
typeCode: 'SJZG',
setlectVal:'left',
noticelist:[],
moduleInfo: {
style:'4'
},
},
/**
@ -25,6 +30,7 @@ Page({
// title: options.title
// })
this.getModuleList()
this.getNoticelist()
},
// modulelist() {
// let that = this;
@ -43,10 +49,7 @@ Page({
typeCode: this.data.typeCode
}
api.getModuleList(params).then(res => {
const customOrder = ["有话说", "点将台", "联动轴", "闪光灯"];
res.data.sort((a, b) => {
return customOrder.indexOf(a.name) - customOrder.indexOf(b.name);
});
console.log(res.data)
this.setData({
modulelist: this.data.modulelist.concat(res.data),
loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none',
@ -69,6 +72,47 @@ Page({
console.log(err)
})
},
//获取通知列表
getNoticelist(categoryCode='') {
let that = this
let params = {
pageIndex: this.data.pageIndex,
pageSize: this.data.pageSize,
typeId: this.data.typeId,
}
contentList(params).then(res => {
let list = [ ...res.data ]
console.log(list)
that.setData({
noticelist: that.data.noticelist.concat(list),
loadMoreType: res.data.length === that.data.pageSize ? 'loading' : 'none',
loadMoreVisible: res.data.length === that.data.pageSize ? false : true,
preloadVisible: false
})
console.log(this.data.noticelist);
if (that.data.noticelist.length == 0) {
that.setData({
nodata: true,
loadMoreType: 'loading',
loadMoreVisible: false,
})
}else{
that.setData({
nodata: false,
})
}
}).catch(err => {
that.setData({
noticelist: [],
nodata: true,
loadMoreType: 'none',
loadMoreVisible: false,
preloadVisible: false
})
console.log(err)
})
},
/**
* 页面上拉触底事件的处理函数
*/
@ -81,24 +125,29 @@ Page({
pageIndex: this.data.pageIndex + 1,
pageSize: this.data.pageSize,
})
this.getModuleList()
this.getNoticelist()
}
},
goDetails (e) {
console.log(e);
if(e.currentTarget.dataset.module.typeCode == '01'){
wx.redirectTo({
url: '/pages/discussion/discussion',
})
return
}else if(e.currentTarget.dataset.module.typeCode == 'DJT'){
wx.navigateTo({
url: '/subpages/mediateHypermarket/page/dotGeneral/dotGeneral',
url: `/subpages/workTodo/pages/moduleList/moduleList?pid=${e.currentTarget.dataset.module.id}&typeCode=${e.currentTarget.dataset.module.typeCode}&name=${e.currentTarget.dataset.module.name}&style=${e.currentTarget.dataset.module.moduleStyle}`,
})
return
}
},
handelTab(e){
this.setData({
setlectVal:e.currentTarget.dataset.value,
typeId:e.currentTarget.dataset.item.id,
pageIndex:1,
noticelist:[]
})
this.getNoticelist()
console.log(this.data.noticelist.length);
},
toDetail(e){
const info = e.currentTarget.dataset
wx.navigateTo({
url: `/subpages/workTodo/pages/moduleList/moduleList?pid=${e.currentTarget.dataset.module.id}&typeCode=${e.currentTarget.dataset.module.typeCode}&name=${e.currentTarget.dataset.module.name}&style=${e.currentTarget.dataset.module.moduleStyle}`,
url: `/subpages/communityNews/pages/detail/detail?id=${info.id}`
})
}
},
})

70
epdc-resident-mp-yushan/subpages/mediateHypermarket/page/index/index.wxml

@ -1,16 +1,60 @@
<!--subpages/mediateHypermarket/page/index/index.wxml-->
<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-module="{{item}}">
<image class="img-bj" src="{{item.imgUrl}}"></image>
<!-- {{item.name}} -->
</button>
<view class="tab">
<text bind:tap="handelTab" data-value="left" data-item="{{modulelist[0]}}" class="{{setlectVal=='left'?'selectTab_color':''}}">{{modulelist[0].name}}</text>
<text bind:tap="handelTab" data-value="right" data-item="{{modulelist[1]}}" class="{{setlectVal=='right'?'selectTab_color':''}}">{{modulelist[1].name}}</text>
<view class="{{setlectVal == 'left'?'tab_left':'tab_right'}} selectTab" src="../../images/work/select.png" mode=""/>
</view>
<wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
<!-- <load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible && isLoadMore}}"></load-more> -->
<view class="dept-list">
<!-- 1. 图标、模块类别名称 -->
<view class="type-1" wx:if="{{modulelist.length > 0 && moduleInfo.style == '1'}}">
<block wx:for="{{modulelist}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="list-item" bindtap="navigateToType" data-info="{{item}}">
<image class="list-icon" src="{{item.imgUrl}}"/>
<view class="list-name">{{item.name}}</view>
</view>
</block>
</view>
<!-- 2. 图片、标题、部门、浏览次数 -->
<view class="type-2" wx:if="{{noticelist.length > 0 && moduleInfo.style == '2'}}">
<view class="list-item" wx:for="{{noticelist}}" data-id="{{item.id}}" bindtap="toDetail" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="item-info">
<view class="item-info-title">{{item.noticeTitle}}</view>
<view class="item-info-dept">
<view class="dept"><image class="dept-icon-1" src="../../images/danwei.png" />{{item.deptName}}</view>
<view class="read"><image class="dept-icon-2" src="../../images/eye.png" />{{item.readingAmount}}</view>
</view>
</view>
<image class="list-img" src="{{item.imgUrl}}"></image>
</view>
</view>
<!-- 3. 模块标题、内容、背景图 -->
<view class="type-3" wx:if="{{modulelist.length > 0 && moduleInfo.style == '3'}}">
<view class="list-item color-{{index%6}}" wx:for="{{modulelist}}" bindtap="navigateToType" data-info="{{item}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="title">{{item.name}}</view>
</view>
</view>
<!-- 4. 标题、部门、时间 -->
<view class="type-4" wx:if="{{noticelist.length > 0 && moduleInfo.style == '4'}}">
<view class="list-item" wx:for="{{noticelist}}" bindtap="toDetail" data-id="{{item.id}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="item-name">{{item.noticeTitle}}</view>
<view class="item-info">
<view class="dept">{{item.deptName}}</view>
<view class="time">{{common.getTimeStr(item.releaseTime)}}</view>
</view>
</view>
</view>
</view>
<wxs module="common">
module.exports.getStr = function(content) {
return content.replace(getRegExp('<\/?.+?\/?>|[&nbsp;]','g'),'')
}
module.exports.getTimeStr = function(time) {
return time.split(' ')[0].replace(getRegExp('-','g'),'.')
}
</wxs>
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more>
<no-data isShow="{{nodata}}"></no-data>

413
epdc-resident-mp-yushan/subpages/mediateHypermarket/page/index/index.wxss

@ -1,4 +1,8 @@
/* subpages/mediateHypermarket/page/index/index.wxss */
page {
background: #f7f7f7;
height: auto;
}
.index {
width: calc(100% - 60rpx);
/* margin-top: 28rpx; */
@ -35,3 +39,412 @@
z-index: 10;
}
.index {
width: calc(100% - 60rpx);
/* margin-top: 28rpx; */
height: 300rpx;
line-height: 300rpx;
margin-left: 30rpx;
border-radius: 10rpx;
position: relative;
margin-bottom: 28rpx;
padding: 0;
background: #fff;
box-shadow: 0rpx 4rpx 14rpx 0rpx rgba(5, 5, 5, 0.4);
}
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;
}
.tab{
display: flex;
justify-content: space-around;
text-align: center;
position: relative;
color: #999;
font-family: PingFang SC;
font-size: 34rpx;
padding: 0 60rpx;
box-sizing: border-box;
margin-top: 20rpx;
height: 44rpx;
}
.tab .selectTab{
width: 80rpx;
height: 6rpx;
background: #f95454;
border-radius: 4rpx;
position: absolute;
transition: left 0.5s ease;
}
.tab .selectTab_color{
color: #f95454;
}
.tab_left{
top: 50rpx;
left: 175rpx;
}
.tab_right{
top: 50rpx;
left: 489rpx;
}
/* 轮播图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: 350rpx;
}
.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: 350rpx;
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: 350rpx;
}
.banner {
overflow: hidden;
height: 350rpx;
display: flex;
width: 100%;
margin: 0 auto;
background-color: #FFF;
padding: 44rpx 0;
}
.banner-item {
overflow: hidden;
height: 350rpx;
display: flex;
width: 100%;
border-radius: 16rpx;
margin-bottom: 8rpx;
}
.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 {
width: 710rpx;
height: 350rpx;
margin: 0 auto;
box-shadow: 0px 4px 29px 0px rgba(63, 63, 63, 0.1);
border-radius: 16rpx;
overflow: hidden;
-webkit-backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
}
.video-title {
width: 100%;
height: 50rpx;
line-height: 50rpx;
padding-left: 40rpx;
color: white;
background: linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0));
background: -webkit-linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0));
position: absolute;
top: 0;
}
/* 轮播图end */
/* type-1 start */
.type-1 {
display: flex;
flex-wrap: wrap;
padding: 20rpx 40rpx;
background-color: #ffffff;
margin-top: 10rpx;
}
.type-1 .list-item {
width: 200rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 20rpx 10rpx;
}
.type-1 .list-item .list-icon {
width: 60rpx;
height: 60rpx;
}
.type-1 .list-item .list-name {
font-size: 28rpx;
color: #333333;
}
/* type-1 end */
/* type-2 start */
.type-2 {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.type-2 .list-item {
width: 710rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin: 10rpx 0;
border-radius: 6rpx;
background-color: #ffffff;
padding: 20rpx;
box-sizing: border-box;
}
.type-2 .list-item .item-info {
width: 420rpx;
min-height: 160rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.type-2 .list-item .item-info .item-info-title {
font-size: 32rpx;
color: #000000;
overflow: hidden;
text-overflow: ellipsis;
word-wrap:break-word;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
display: -webkit-box;
}
.type-2 .list-item .item-info .item-info-dept {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20rpx;
font-size: 26rpx;
color: #aaaaaa;
}
.type-2 .list-item .item-info .item-info-dept .dept {
display: flex;
align-items: center;
}
.type-2 .list-item .item-info .item-info-dept .dept-icon-1{
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
.type-2 .list-item .item-info .item-info-dept .read{
display: flex;
align-items: center;
font-size: 24rpx;
color: #000000;
}
.type-2 .list-item .item-info .item-info-dept .dept-icon-2{
width: 28rpx;
height: 24rpx;
margin-right: 10rpx;
}
.type-2 .list-item .list-img {
width: 220rpx;
height: 146rpx;
border-radius: 12rpx;
}
/* type-2 end */
/* type-3 start */
.type-3 {
display: flex;
flex-wrap: wrap;
padding: 20rpx;
background-color: #ffffff;
margin-top: 10rpx;
}
.type-3 .list-item {
width: 330rpx;
height: 150rpx;
display: flex;
flex-direction: column;
justify-content: center;
margin: 20rpx 10rpx;
position: relative;
border-radius: 14rpx;
}
.type-3 .color-0 {
background-color: rgba(27, 171, 252, 0.13);
}
.type-3 .color-1 {
background-color: rgba(255, 100, 92, 0.13);
}
.type-3 .color-2 {
background-color: rgba(251, 128, 54, 0.13);
}
.type-3 .color-3 {
background-color: rgba(67, 204, 202, 0.13);
}
.type-3 .color-4 {
background-color: rgba(184, 159, 150, 0.13);
}
.type-3 .color-5 {
background-color: rgba(255, 213, 86, 0.13);
}
.type-3 .list-item .list-bg {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
border-radius: 12rpx;
opacity: 0.2;
}
.type-3 .list-item .title {
margin-left: 30rpx;
font-size: 32rpx;
color: #333333;
}
.type-3 .list-item .content {
margin-left: 30rpx;
margin-top: 8rpx;
font-size: 26rpx;
color: #666666;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
/* type-3 end */
/* type-4 start */
.type-4 {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #ffffff;
margin-top: 10rpx;
}
.type-4 .list-item {
width: 690rpx;
min-height: 150rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 20rpx 0;
border-radius: 6rpx;
background-color: #f5f7fa;
padding: 20rpx;
box-sizing: border-box;
}
.type-4 .list-item .item-name {
font-size: 34rpx;
color: #333333;
}
.type-4 .list-item .item-info {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.type-4 .list-item .item-info .dept{
font-size: 28rpx;
color: #fba84f;
}
.type-4 .list-item .item-info .time{
font-size: 28rpx;
color: #999999;
}

9
epdc-resident-mp-yushan/subpages/mediateHypermarket/utils/mediateHypermarket.js

@ -3,3 +3,12 @@ var request = require('../../../utils/request')
export function getModuleList(params) {
return request.get('news/getModuleList', params)
}
// 社区资讯 - 资讯列表
export function contentList(params) {
return request.get('news/contentList', params)
}
// 社区资讯-资讯详情
export function contentDetail(id) {
return request.get(`/news/contentDetail/${id}`)
}
Loading…
Cancel
Save