作者 lihongjuan

修改

@@ -23,11 +23,19 @@ @@ -23,11 +23,19 @@
23 "pages/question/question", 23 "pages/question/question",
24 "pages/attract/list/list", 24 "pages/attract/list/list",
25 "pages/attract/articleDetail/articleDetail", 25 "pages/attract/articleDetail/articleDetail",
26 - "pages/detail/detail" 26 + "pages/detail/detail",
  27 + "pages/dangjianwork",
  28 + "pages/dangjianwork/dangjianwork"
27 ], 29 ],
28 "tabBar": { 30 "tabBar": {
29 "list": [ 31 "list": [
30 { 32 {
  33 + "pagePath": "pages/dangjianwork/dangjianwork",
  34 + "text": "党建工作",
  35 + "iconPath": "/images/01_nav@2x.png",
  36 + "selectedIconPath": "/images/01_nav_fill@2x.png"
  37 + },
  38 + {
31 "pagePath": "pages/matrix/matrix", 39 "pagePath": "pages/matrix/matrix",
32 "text": "企业矩阵", 40 "text": "企业矩阵",
33 "iconPath": "/images/01_nav@2x.png", 41 "iconPath": "/images/01_nav@2x.png",
@@ -19,7 +19,16 @@ Page({ @@ -19,7 +19,16 @@ Page({
19 page: 1, 19 page: 1,
20 list:[], 20 list:[],
21 ifData:!1, 21 ifData:!1,
22 - noMore:!1 22 + noMore:!1,
  23 + imgUrls: ['http://txgyy.jjjtech.cn/uploads/20190409/7f686056aea2291e40351b38e8ef9a08.png',
  24 + 'http://txgyy.jjjtech.cn/uploads/20190409/7f686056aea2291e40351b38e8ef9a08.png'
  25 + ],
  26 + indicatorDots: false,
  27 + autoplay: false,
  28 + interval: 2000,
  29 + duration: 1000,
  30 + currentSwiper: 0,
  31 +
23 }, 32 },
24 33
25 /** 34 /**
@@ -37,9 +46,17 @@ Page({ @@ -37,9 +46,17 @@ Page({
37 } 46 }
38 }), this.policyType(), this.getBanner(); 47 }), this.policyType(), this.getBanner();
39 }, 48 },
  49 +
  50 + //轮播图
  51 + swiperChange: function (e) {
  52 + this.setData({
  53 + currentSwiper: e.detail.current
  54 + })
  55 + },
40 getBanner(){ 56 getBanner(){
41 let url = '/api/Article/getAttractInvestmentBanner'; 57 let url = '/api/Article/getAttractInvestmentBanner';
42 app.post(url,{}).then(r=>{ 58 app.post(url,{}).then(r=>{
  59 + console.log(r)
43 this.setData({ 60 this.setData({
44 banner: r.banner 61 banner: r.banner
45 }) 62 })
1 <!--pages/attract/attract.wxml--> 1 <!--pages/attract/attract.wxml-->
2 <view class='top_view'> 2 <view class='top_view'>
3 - <view class='top_banner'>  
4 - <image src='{{banner}}' width='100%' mode='widthFix' bindtap='bannerDetail' id='1'></image>  
5 -</view> 3 + <!-- <view class='top_banner'>
  4 + <image src='{{banner}}' width='100%' mode='widthFix' bindtap='bannerDetail' id='1'></image>
  5 + </view> -->
6 6
7 -<!-- 菜单按钮 -->  
8 -<view class='menu_content'>  
9 - <scroll-view class='menu_items' scroll-x="true" scroll-left="{{navScrollLeft}}" scroll-with-animation="{{true}}">  
10 - <block wx:for='{{policyList}}' wx:key=''>  
11 - <view class='menu_item {{currentTab== index?"active":""}}' bindtap='switchTab' data-current='{{index}}' id='{{item.id}}'>  
12 - {{item.name}}  
13 - </view>  
14 - </block>  
15 - </scroll-view>  
16 - <!-- <view class='paixun'> 7 +
  8 + <view class="swiper_image">
  9 + <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange">
  10 + <block wx:for="{{imgUrls}}" wx:key="doct">
  11 + <swiper-item style="border-radius:10px;">
  12 + <image src="{{item}}" data-index='{{index}}' class="slide-image" bindtap='viewImg' width="355" height="150" />
  13 + </swiper-item>
  14 + </block>
  15 + </swiper>
  16 +
  17 + <view class="dots">
  18 + <block wx:for="{{imgUrls}}" wx:key="">
  19 + <view class="dot{{index == currentSwiper ? ' active' : ''}}"></view>
  20 + </block>
  21 + </view>
  22 +
  23 + </view>
  24 +
  25 +
  26 + <!-- 菜单按钮 -->
  27 + <view class='menu_content'>
  28 + <scroll-view class='menu_items' scroll-x="true" scroll-left="{{navScrollLeft}}" scroll-with-animation="{{true}}">
  29 + <block wx:for='{{policyList}}' wx:key=''>
  30 + <view class='menu_item {{currentTab== index?"active":""}}' bindtap='switchTab' data-current='{{index}}' id='{{item.id}}'>
  31 + {{item.name}}
  32 + </view>
  33 + </block>
  34 + </scroll-view>
  35 + <!-- <view class='paixun'>
17 <image src='/images/shaixuan@3x.png' mode='widthFix'></image> 36 <image src='/images/shaixuan@3x.png' mode='widthFix'></image>
18 </view> --> 37 </view> -->
19 -</view> 38 + </view>
20 </view> 39 </view>
21 40
22 <!-- 新闻 --> 41 <!-- 新闻 -->
23 <view class="news_detail_container" hidden='{{!ifData}}' style="height:{{windowHeight-205}}px;"> 42 <view class="news_detail_container" hidden='{{!ifData}}' style="height:{{windowHeight-205}}px;">
24 <view class='news_detail_items'> 43 <view class='news_detail_items'>
25 - <block wx:for='{{list}}' wx:key=''>  
26 - <navigator class='news_detail_item' url='/pages/attract/articleDetail/articleDetail?id={{item.id}}' id="{{item.id}}" >  
27 - <view class='new_info'>  
28 - <view class='new_title'><text class='recommond' wx:if='{{item.recommend}}'>推荐</text>{{item.title}}</view>  
29 - <view class='new_time_address'>  
30 - <view class='form' wx:if="{{item.keywords}}">{{item.keywords}}</view>  
31 - <view class='time'>{{item.create_time_text}}</view>  
32 - </view>  
33 - </view>  
34 - <view class='new_info_image' wx:if="{{item.thumb_image}}">  
35 - <image src='{{item.thumb_image}}' mode='widthFix'></image> 44 + <block wx:for='{{list}}' wx:key=''>
  45 + <navigator class='news_detail_item' url='/pages/attract/articleDetail/articleDetail?id={{item.id}}' id="{{item.id}}">
  46 + <view class='new_info'>
  47 + <view class='new_title'>
  48 + <text class='recommond' wx:if='{{item.recommend}}'>推荐</text>{{item.title}}</view>
  49 + <view class='new_time_address'>
  50 + <view class='form' wx:if="{{item.keywords}}">{{item.keywords}}</view>
  51 + <view class='time'>{{item.create_time_text}}</view>
36 </view> 52 </view>
37 - </navigator> 53 + </view>
  54 + <view class='new_info_image' wx:if="{{item.thumb_image}}">
  55 + <image src='{{item.thumb_image}}' mode='widthFix'></image>
  56 + </view>
  57 + </navigator>
38 </block> 58 </block>
39 </view> 59 </view>
40 </view> 60 </view>
41 61
42 <view class="none-box" hidden="{{ifData}}"> 62 <view class="none-box" hidden="{{ifData}}">
43 - <view>暂无相关信息</view> 63 + <view>暂无相关信息</view>
44 </view> 64 </view>
1 /* pages/attract/attract.wxss */ 1 /* pages/attract/attract.wxss */
2 -page{  
3 - background: #FFF; 2 +
  3 +page {
  4 + background: #fff;
4 } 5 }
5 -.top_banner image{  
6 - width: 100%; 6 +
  7 +.top_banner image {
  8 + width: 100%;
7 } 9 }
8 -.top_view{  
9 - background: #F7F7F7;  
10 - position:fixed;  
11 - top:0;  
12 - left:0;  
13 - width:100%;  
14 - z-index:101; 10 +
  11 +.top_view {
  12 + background: #f7f7f7;
  13 + position: fixed;
  14 + top: 0;
  15 + left: 0;
  16 + width: 100%;
  17 + z-index: 101;
15 } 18 }
  19 +
16 /* .top_banner{ 20 /* .top_banner{
17 position: fixed; 21 position: fixed;
18 top: 0; 22 top: 0;
@@ -20,122 +24,139 @@ page{ @@ -20,122 +24,139 @@ page{
20 width: 100%; 24 width: 100%;
21 z-index: 101; 25 z-index: 101;
22 } */ 26 } */
23 -.menu_content{  
24 - display: flex;  
25 - position: fixed;  
26 - top: 310rpx;  
27 - left: 0;  
28 - width: 100%;  
29 - z-index: 101;  
30 - border-top: 8rpx solid #f5f5f5;  
31 -}  
32 -.menu_items{  
33 - display: flex;  
34 - font-size: 26rpx;  
35 - background: #FFF;  
36 - border-bottom: 2rpx solid #f5f5f5;  
37 - position: relative;  
38 - flex: 1;  
39 - overflow: hidden;  
40 - white-space: nowrap;  
41 - line-height: 74rpx;  
42 -  
43 -}  
44 -.menu_item{  
45 - padding:0 33rpx;  
46 - display: inline-block;  
47 - text-align: center; 27 +
  28 +.menu_content {
  29 + display: flex;
  30 + position: fixed;
  31 + top: 310rpx;
  32 + left: 0;
  33 + width: 100%;
  34 + z-index: 101;
  35 + border-top: 8rpx solid #f5f5f5;
  36 +}
  37 +
  38 +.menu_items {
  39 + display: flex;
  40 + font-size: 26rpx;
  41 + background: #fff;
  42 + border-bottom: 2rpx solid #f5f5f5;
  43 + position: relative;
  44 + flex: 1;
  45 + overflow: hidden;
  46 + white-space: nowrap;
  47 + line-height: 74rpx;
48 } 48 }
  49 +
  50 +.menu_item {
  51 + padding: 0 33rpx;
  52 + display: inline-block;
  53 + text-align: center;
  54 +}
  55 +
49 /* .menu_item:first-child{ 56 /* .menu_item:first-child{
50 padding-left: rpx; 57 padding-left: rpx;
51 } */ 58 } */
52 -.menu_item.active{  
53 - color: #169BD5;  
54 -}  
55 -.paixun{  
56 - position: relative;  
57 - display: flex;  
58 - align-items: center;  
59 - height: 74rpx;  
60 - width: 78rpx;  
61 - justify-content: center;  
62 - background-color: #FFF;  
63 -}  
64 -.paixun image{  
65 - width: 32rpx;  
66 -}  
67 -.paixun:before{  
68 - content:'';  
69 - height: 32rpx;  
70 - width: 2rpx;  
71 - background-color: #f5f5f5;  
72 - top: 50%;  
73 - left: 0;  
74 - position: absolute;  
75 - transform: translateY(-50%); 59 +
  60 +.menu_item.active {
  61 + color: #169bd5;
76 } 62 }
77 -.news_detail_container{  
78 - background: #FFF;  
79 - margin-top: 390rpx;  
80 - position: relative; 63 +
  64 +.paixun {
  65 + position: relative;
  66 + display: flex;
  67 + align-items: center;
  68 + height: 74rpx;
  69 + width: 78rpx;
  70 + justify-content: center;
  71 + background-color: #fff;
81 } 72 }
82 -.news_detail_items{  
83 - margin: 0 32rpx; 73 +
  74 +.paixun image {
  75 + width: 32rpx;
84 } 76 }
85 -.news_detail_item{  
86 - border-bottom:2rpx solid #f5f5f5;  
87 - display: flex;  
88 - padding: 24rpx 0; 77 +
  78 +.paixun:before {
  79 + content: '';
  80 + height: 32rpx;
  81 + width: 2rpx;
  82 + background-color: #f5f5f5;
  83 + top: 50%;
  84 + left: 0;
  85 + position: absolute;
  86 + transform: translateY(-50%);
89 } 87 }
90 -.news_detail_item:last-child{  
91 - border: none; 88 +
  89 +.news_detail_container {
  90 + background: #fff;
  91 + margin-top: 390rpx;
  92 + position: relative;
92 } 93 }
93 -.new_info_image{  
94 - width: 248rpx;  
95 - height: 146rpx;  
96 - border-radius: 8rpx;  
97 - overflow: hidden;  
98 - margin-left: 32rpx; 94 +
  95 +.news_detail_items {
  96 + margin: 0 32rpx;
99 } 97 }
100 -.new_info_image image{  
101 - width: 100%; 98 +
  99 +.news_detail_item {
  100 + border-bottom: 2rpx solid #f5f5f5;
  101 + display: flex;
  102 + padding: 24rpx 0;
  103 +}
  104 +
  105 +.news_detail_item:last-child {
  106 + border: none;
  107 +}
  108 +
  109 +.new_info_image {
  110 + width: 248rpx;
  111 + height: 146rpx;
  112 + border-radius: 8rpx;
  113 + overflow: hidden;
  114 + margin-left: 32rpx;
102 } 115 }
103 -.new_info{  
104 - flex: 1;  
105 - height: 146rpx;  
106 - display: flex;  
107 - flex-flow: column;  
108 - justify-content: space-between;  
109 - font-size: 32rpx;  
110 - color: #333;  
111 -  
112 -}  
113 -.new_title{  
114 - display: -webkit-box;  
115 - word-break: break-all;  
116 - text-overflow: ellipsis;  
117 - overflow: hidden;  
118 - -webkit-box-orient: vertical;  
119 - -webkit-line-clamp:2;  
120 -}  
121 -.new_time_address{  
122 - display: flex;  
123 - align-items: center;  
124 - justify-content: space-between;  
125 - font-size: 22rpx;  
126 - color: #999;  
127 -}  
128 -.zhaoshang_desc{ 116 +
  117 +.new_info_image image {
  118 + width: 100%;
  119 +}
  120 +
  121 +.new_info {
  122 + flex: 1;
  123 + height: 146rpx;
  124 + display: flex;
  125 + flex-flow: column;
  126 + justify-content: space-between;
  127 + font-size: 32rpx;
  128 + color: #333;
  129 +}
  130 +
  131 +.new_title {
  132 + display: -webkit-box;
  133 + word-break: break-all;
  134 + text-overflow: ellipsis;
  135 + overflow: hidden;
  136 + -webkit-box-orient: vertical;
  137 + -webkit-line-clamp: 2;
  138 +}
  139 +
  140 +.new_time_address {
  141 + display: flex;
  142 + align-items: center;
  143 + justify-content: space-between;
  144 + font-size: 22rpx;
  145 + color: #999;
  146 +}
  147 +
  148 +.zhaoshang_desc {
129 margin: 0 30rpx; 149 margin: 0 30rpx;
130 } 150 }
131 151
132 -.none-box{  
133 - top: 600rpx; 152 +.none-box {
  153 + top: 600rpx;
134 } 154 }
135 -.recommond{ 155 +
  156 +.recommond {
136 font-size: 20rpx; 157 font-size: 20rpx;
137 - padding:4rpx 8rpx;  
138 - background-color: #E80404; 158 + padding: 4rpx 8rpx;
  159 + background-color: #e80404;
139 color: #fff; 160 color: #fff;
140 display: inline-flex; 161 display: inline-flex;
141 align-items: center; 162 align-items: center;
@@ -146,4 +167,77 @@ page{ @@ -146,4 +167,77 @@ page{
146 margin-right: 10rpx; 167 margin-right: 10rpx;
147 position: relative; 168 position: relative;
148 top: -4rpx; 169 top: -4rpx;
149 -}  
  170 +}
  171 +
  172 +/* 轮播图 */
  173 +
  174 +.swiper_image {
  175 + /* width: 686rpx;
  176 + height: 300rpx; */
  177 + font-size: 0;
  178 + /* margin: 30rpx auto 0; */
  179 + position: relative;
  180 + /* box-shadow: 0px -1px 6px 0px rgba(212, 137, 96, 0.11);
  181 + border-radius: 10px; */
  182 +}
  183 +
  184 +.swiper_item_img {
  185 + /* border-radius: 10rpx; */
  186 + /* height: 300rpx; */
  187 +}
  188 +
  189 +.swiper_image image {
  190 + width: 100%;
  191 + height: 100%;
  192 + /* box-shadow:0px -1px 6px 0px rgba(212,137,96,0.11); */
  193 + /* border-radius: 10px; */
  194 +}
  195 +
  196 +.swiper_item_img swiper-item {
  197 + /* width: 686rpx; */
  198 + /* height: 300rpx; */
  199 + /* box-shadow: 0px -1px 6px 0px rgba(212, 137, 96, 0.11); */
  200 + /* display: felx; */
  201 + /* align-items: center;
  202 + justify-content: center;
  203 + border-radius: 10px; */
  204 + border-radius:0!important;
  205 +}
  206 +
  207 +.swiper_item_img swiper-item image {
  208 + width: 100%;
  209 + height: 100%;
  210 + /* border-radius: 10px; */
  211 +}
  212 +
  213 +.dots {
  214 + /* width: 156rpx; */
  215 + height: 36rpx;
  216 + display: flex;
  217 + flex-direction: row;
  218 + position: absolute;
  219 + justify-content: center;
  220 + left: 0;
  221 + right: 0;
  222 + bottom: 20rpx;
  223 +}
  224 +
  225 +/*未选中时的小圆点样式 */
  226 +
  227 +.dot {
  228 + width: 16rpx;
  229 + height: 16rpx;
  230 + border-radius: 50%;
  231 + margin-right: 26rpx;
  232 + background-color: #b9c0f7;
  233 +}
  234 +
  235 +/*选中以后的小圆点样式 */
  236 +
  237 +.active {
  238 + width: 16rpx;
  239 + height: 16rpx;
  240 + border-radius: 50%;
  241 + background-color: #fff;
  242 +
  243 +}
@@ -75,7 +75,7 @@ page { @@ -75,7 +75,7 @@ page {
75 .label_img { 75 .label_img {
76 position: absolute; 76 position: absolute;
77 right: 0; 77 right: 0;
78 - top: 10rpx; 78 + top: 1rpx;
79 width: 80rpx; 79 width: 80rpx;
80 height: 32rpx; 80 height: 32rpx;
81 } 81 }
@@ -83,7 +83,7 @@ page { @@ -83,7 +83,7 @@ page {
83 .label_info { 83 .label_info {
84 position: absolute; 84 position: absolute;
85 right: 0; 85 right: 0;
86 - top: 10rpx; 86 + top: 4rpx;
87 width: 80rpx; 87 width: 80rpx;
88 height: 32rpx; 88 height: 32rpx;
89 font-size: 20rpx; 89 font-size: 20rpx;
@@ -143,15 +143,17 @@ page { @@ -143,15 +143,17 @@ page {
143 margin-bottom: 20rpx; 143 margin-bottom: 20rpx;
144 box-shadow: 0 10rpx 0 0 #62bae0; 144 box-shadow: 0 10rpx 0 0 #62bae0;
145 position: relative; 145 position: relative;
  146 +
146 } 147 }
147 148
148 .list_content_box { 149 .list_content_box {
149 - padding: 20rpx 16rpx; 150 + padding: 2rpx 16rpx;
150 } 151 }
151 152
152 .list_item .top_logo { 153 .list_item .top_logo {
153 width: 100%; 154 width: 100%;
154 - height: 336rpx; 155 + /* height: 336rpx; */
  156 + height:195rpx;
155 } 157 }
156 158
157 .list_title_box { 159 .list_title_box {
@@ -177,7 +179,8 @@ page { @@ -177,7 +179,8 @@ page {
177 .list_content { 179 .list_content {
178 font-size: 26rpx; 180 font-size: 26rpx;
179 color: #666; 181 color: #666;
180 - height: 68rpx; 182 + /* height: 68rpx; */
  183 + height:31rpx;
181 margin-top: 4rpx; 184 margin-top: 4rpx;
182 display: -webkit-box; 185 display: -webkit-box;
183 -webkit-box-orient: vertical; 186 -webkit-box-orient: vertical;
@@ -191,7 +194,7 @@ page { @@ -191,7 +194,7 @@ page {
191 text-align: right; 194 text-align: right;
192 font-size: 40rpx; 195 font-size: 40rpx;
193 color: #333; 196 color: #333;
194 - margin-top: 10rpx; 197 + margin-top: -2rpx;
195 } 198 }
196 .areasChoose{ 199 .areasChoose{
197 width: 100%; 200 width: 100%;