作者 lihongjuan

修改

... ... @@ -23,11 +23,19 @@
"pages/question/question",
"pages/attract/list/list",
"pages/attract/articleDetail/articleDetail",
"pages/detail/detail"
"pages/detail/detail",
"pages/dangjianwork",
"pages/dangjianwork/dangjianwork"
],
"tabBar": {
"list": [
{
"pagePath": "pages/dangjianwork/dangjianwork",
"text": "党建工作",
"iconPath": "/images/01_nav@2x.png",
"selectedIconPath": "/images/01_nav_fill@2x.png"
},
{
"pagePath": "pages/matrix/matrix",
"text": "企业矩阵",
"iconPath": "/images/01_nav@2x.png",
... ...
... ... @@ -19,7 +19,16 @@ Page({
page: 1,
list:[],
ifData:!1,
noMore:!1
noMore:!1,
imgUrls: ['http://txgyy.jjjtech.cn/uploads/20190409/7f686056aea2291e40351b38e8ef9a08.png',
'http://txgyy.jjjtech.cn/uploads/20190409/7f686056aea2291e40351b38e8ef9a08.png'
],
indicatorDots: false,
autoplay: false,
interval: 2000,
duration: 1000,
currentSwiper: 0,
},
/**
... ... @@ -37,9 +46,17 @@ Page({
}
}), this.policyType(), this.getBanner();
},
//轮播图
swiperChange: function (e) {
this.setData({
currentSwiper: e.detail.current
})
},
getBanner(){
let url = '/api/Article/getAttractInvestmentBanner';
app.post(url,{}).then(r=>{
console.log(r)
this.setData({
banner: r.banner
})
... ...
<!--pages/attract/attract.wxml-->
<view class='top_view'>
<view class='top_banner'>
<image src='{{banner}}' width='100%' mode='widthFix' bindtap='bannerDetail' id='1'></image>
</view>
<!-- <view class='top_banner'>
<image src='{{banner}}' width='100%' mode='widthFix' bindtap='bannerDetail' id='1'></image>
</view> -->
<!-- 菜单按钮 -->
<view class='menu_content'>
<scroll-view class='menu_items' scroll-x="true" scroll-left="{{navScrollLeft}}" scroll-with-animation="{{true}}">
<block wx:for='{{policyList}}' wx:key=''>
<view class='menu_item {{currentTab== index?"active":""}}' bindtap='switchTab' data-current='{{index}}' id='{{item.id}}'>
{{item.name}}
</view>
</block>
</scroll-view>
<!-- <view class='paixun'>
<view class="swiper_image">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange">
<block wx:for="{{imgUrls}}" wx:key="doct">
<swiper-item style="border-radius:10px;">
<image src="{{item}}" data-index='{{index}}' class="slide-image" bindtap='viewImg' width="355" height="150" />
</swiper-item>
</block>
</swiper>
<view class="dots">
<block wx:for="{{imgUrls}}" wx:key="">
<view class="dot{{index == currentSwiper ? ' active' : ''}}"></view>
</block>
</view>
</view>
<!-- 菜单按钮 -->
<view class='menu_content'>
<scroll-view class='menu_items' scroll-x="true" scroll-left="{{navScrollLeft}}" scroll-with-animation="{{true}}">
<block wx:for='{{policyList}}' wx:key=''>
<view class='menu_item {{currentTab== index?"active":""}}' bindtap='switchTab' data-current='{{index}}' id='{{item.id}}'>
{{item.name}}
</view>
</block>
</scroll-view>
<!-- <view class='paixun'>
<image src='/images/shaixuan@3x.png' mode='widthFix'></image>
</view> -->
</view>
</view>
</view>
<!-- 新闻 -->
<view class="news_detail_container" hidden='{{!ifData}}' style="height:{{windowHeight-205}}px;">
<view class='news_detail_items'>
<block wx:for='{{list}}' wx:key=''>
<navigator class='news_detail_item' url='/pages/attract/articleDetail/articleDetail?id={{item.id}}' id="{{item.id}}" >
<view class='new_info'>
<view class='new_title'><text class='recommond' wx:if='{{item.recommend}}'>推荐</text>{{item.title}}</view>
<view class='new_time_address'>
<view class='form' wx:if="{{item.keywords}}">{{item.keywords}}</view>
<view class='time'>{{item.create_time_text}}</view>
</view>
</view>
<view class='new_info_image' wx:if="{{item.thumb_image}}">
<image src='{{item.thumb_image}}' mode='widthFix'></image>
<block wx:for='{{list}}' wx:key=''>
<navigator class='news_detail_item' url='/pages/attract/articleDetail/articleDetail?id={{item.id}}' id="{{item.id}}">
<view class='new_info'>
<view class='new_title'>
<text class='recommond' wx:if='{{item.recommend}}'>推荐</text>{{item.title}}</view>
<view class='new_time_address'>
<view class='form' wx:if="{{item.keywords}}">{{item.keywords}}</view>
<view class='time'>{{item.create_time_text}}</view>
</view>
</navigator>
</view>
<view class='new_info_image' wx:if="{{item.thumb_image}}">
<image src='{{item.thumb_image}}' mode='widthFix'></image>
</view>
</navigator>
</block>
</view>
</view>
<view class="none-box" hidden="{{ifData}}">
<view>暂无相关信息</view>
<view>暂无相关信息</view>
</view>
\ No newline at end of file
... ...
/* pages/attract/attract.wxss */
page{
background: #FFF;
page {
background: #fff;
}
.top_banner image{
width: 100%;
.top_banner image {
width: 100%;
}
.top_view{
background: #F7F7F7;
position:fixed;
top:0;
left:0;
width:100%;
z-index:101;
.top_view {
background: #f7f7f7;
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 101;
}
/* .top_banner{
position: fixed;
top: 0;
... ... @@ -20,122 +24,139 @@ page{
width: 100%;
z-index: 101;
} */
.menu_content{
display: flex;
position: fixed;
top: 310rpx;
left: 0;
width: 100%;
z-index: 101;
border-top: 8rpx solid #f5f5f5;
}
.menu_items{
display: flex;
font-size: 26rpx;
background: #FFF;
border-bottom: 2rpx solid #f5f5f5;
position: relative;
flex: 1;
overflow: hidden;
white-space: nowrap;
line-height: 74rpx;
}
.menu_item{
padding:0 33rpx;
display: inline-block;
text-align: center;
.menu_content {
display: flex;
position: fixed;
top: 310rpx;
left: 0;
width: 100%;
z-index: 101;
border-top: 8rpx solid #f5f5f5;
}
.menu_items {
display: flex;
font-size: 26rpx;
background: #fff;
border-bottom: 2rpx solid #f5f5f5;
position: relative;
flex: 1;
overflow: hidden;
white-space: nowrap;
line-height: 74rpx;
}
.menu_item {
padding: 0 33rpx;
display: inline-block;
text-align: center;
}
/* .menu_item:first-child{
padding-left: rpx;
} */
.menu_item.active{
color: #169BD5;
}
.paixun{
position: relative;
display: flex;
align-items: center;
height: 74rpx;
width: 78rpx;
justify-content: center;
background-color: #FFF;
}
.paixun image{
width: 32rpx;
}
.paixun:before{
content:'';
height: 32rpx;
width: 2rpx;
background-color: #f5f5f5;
top: 50%;
left: 0;
position: absolute;
transform: translateY(-50%);
.menu_item.active {
color: #169bd5;
}
.news_detail_container{
background: #FFF;
margin-top: 390rpx;
position: relative;
.paixun {
position: relative;
display: flex;
align-items: center;
height: 74rpx;
width: 78rpx;
justify-content: center;
background-color: #fff;
}
.news_detail_items{
margin: 0 32rpx;
.paixun image {
width: 32rpx;
}
.news_detail_item{
border-bottom:2rpx solid #f5f5f5;
display: flex;
padding: 24rpx 0;
.paixun:before {
content: '';
height: 32rpx;
width: 2rpx;
background-color: #f5f5f5;
top: 50%;
left: 0;
position: absolute;
transform: translateY(-50%);
}
.news_detail_item:last-child{
border: none;
.news_detail_container {
background: #fff;
margin-top: 390rpx;
position: relative;
}
.new_info_image{
width: 248rpx;
height: 146rpx;
border-radius: 8rpx;
overflow: hidden;
margin-left: 32rpx;
.news_detail_items {
margin: 0 32rpx;
}
.new_info_image image{
width: 100%;
.news_detail_item {
border-bottom: 2rpx solid #f5f5f5;
display: flex;
padding: 24rpx 0;
}
.news_detail_item:last-child {
border: none;
}
.new_info_image {
width: 248rpx;
height: 146rpx;
border-radius: 8rpx;
overflow: hidden;
margin-left: 32rpx;
}
.new_info{
flex: 1;
height: 146rpx;
display: flex;
flex-flow: column;
justify-content: space-between;
font-size: 32rpx;
color: #333;
}
.new_title{
display: -webkit-box;
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp:2;
}
.new_time_address{
display: flex;
align-items: center;
justify-content: space-between;
font-size: 22rpx;
color: #999;
}
.zhaoshang_desc{
.new_info_image image {
width: 100%;
}
.new_info {
flex: 1;
height: 146rpx;
display: flex;
flex-flow: column;
justify-content: space-between;
font-size: 32rpx;
color: #333;
}
.new_title {
display: -webkit-box;
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.new_time_address {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 22rpx;
color: #999;
}
.zhaoshang_desc {
margin: 0 30rpx;
}
.none-box{
top: 600rpx;
.none-box {
top: 600rpx;
}
.recommond{
.recommond {
font-size: 20rpx;
padding:4rpx 8rpx;
background-color: #E80404;
padding: 4rpx 8rpx;
background-color: #e80404;
color: #fff;
display: inline-flex;
align-items: center;
... ... @@ -146,4 +167,77 @@ page{
margin-right: 10rpx;
position: relative;
top: -4rpx;
}
\ No newline at end of file
}
/* 轮播图 */
.swiper_image {
/* width: 686rpx;
height: 300rpx; */
font-size: 0;
/* margin: 30rpx auto 0; */
position: relative;
/* box-shadow: 0px -1px 6px 0px rgba(212, 137, 96, 0.11);
border-radius: 10px; */
}
.swiper_item_img {
/* border-radius: 10rpx; */
/* height: 300rpx; */
}
.swiper_image image {
width: 100%;
height: 100%;
/* box-shadow:0px -1px 6px 0px rgba(212,137,96,0.11); */
/* border-radius: 10px; */
}
.swiper_item_img swiper-item {
/* width: 686rpx; */
/* height: 300rpx; */
/* box-shadow: 0px -1px 6px 0px rgba(212, 137, 96, 0.11); */
/* display: felx; */
/* align-items: center;
justify-content: center;
border-radius: 10px; */
border-radius:0!important;
}
.swiper_item_img swiper-item image {
width: 100%;
height: 100%;
/* border-radius: 10px; */
}
.dots {
/* width: 156rpx; */
height: 36rpx;
display: flex;
flex-direction: row;
position: absolute;
justify-content: center;
left: 0;
right: 0;
bottom: 20rpx;
}
/*未选中时的小圆点样式 */
.dot {
width: 16rpx;
height: 16rpx;
border-radius: 50%;
margin-right: 26rpx;
background-color: #b9c0f7;
}
/*选中以后的小圆点样式 */
.active {
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background-color: #fff;
}
... ...
... ... @@ -75,7 +75,7 @@ page {
.label_img {
position: absolute;
right: 0;
top: 10rpx;
top: 1rpx;
width: 80rpx;
height: 32rpx;
}
... ... @@ -83,7 +83,7 @@ page {
.label_info {
position: absolute;
right: 0;
top: 10rpx;
top: 4rpx;
width: 80rpx;
height: 32rpx;
font-size: 20rpx;
... ... @@ -143,15 +143,17 @@ page {
margin-bottom: 20rpx;
box-shadow: 0 10rpx 0 0 #62bae0;
position: relative;
}
.list_content_box {
padding: 20rpx 16rpx;
padding: 2rpx 16rpx;
}
.list_item .top_logo {
width: 100%;
height: 336rpx;
/* height: 336rpx; */
height:195rpx;
}
.list_title_box {
... ... @@ -177,7 +179,8 @@ page {
.list_content {
font-size: 26rpx;
color: #666;
height: 68rpx;
/* height: 68rpx; */
height:31rpx;
margin-top: 4rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
... ... @@ -191,7 +194,7 @@ page {
text-align: right;
font-size: 40rpx;
color: #333;
margin-top: 10rpx;
margin-top: -2rpx;
}
.areasChoose{
width: 100%;
... ...