Explorar el Código

南岸小程序公开样式,政策文件item

zwq hace 2 años
padre
commit
3ff8ecc527

+ 8 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/publics/index/index.js

@@ -69,6 +69,8 @@ Page({
       pic: 'publics-base-9.png',
       name: '社会保险领域'
     }],
+    // 政策文件tab
+    fileTab: 0,
 		// 政策解读
 		policyInterpretation: [{
 			name: '文字解读'
@@ -134,6 +136,12 @@ Page({
 				url: '/pages/publics/government/government',
 			})
 		}
+  },
+  // 切换政策文件类型
+  clickFileTab: function (e) {
+		this.setData({
+			fileTab: e.currentTarget.dataset.item
+		})
 	},
 	// 切换政策解读
 	tabNav(e) {

+ 126 - 109
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/publics/index/index.wxml

@@ -1,117 +1,134 @@
 <!--pages/publics/publics.wxml-->
 <view style="background-color: #F5F5F5">
-	<scroll-view style="height: 1549rpx;" scroll-y="true">
-		<!-- 顶部栏 -->
-		<view class="top">
-			<image src="{{imgUrl}}topbg.webp" style="width: 100%;height:519rpx"></image>
-			<image src="{{imgUrl}}toplogo.png" class="top-logo" style="top: {{navHeight}}rpx"></image>
-			<view class="top-serach">
-				<view class="search-input">
-					<input style="height: 72rpx;" placeholder="请在此输入关键字" />
-				</view>
-				<button class="search-button">
-					<image src="{{imgUrl}}search.png"></image>
-				</button>
-			</view>
-		</view>
-		<!-- 区政府领导 -->
-		<view class="learder">
-			<view style="display:flex" class="content-top">
-				<view class="content-line"></view>
-				<view class="content-title">区政府领导</view>
-				<view class="content-more" bindtap="gotoLeaderDetail">查看更多 >></view>
-			</view>
-			<swiper display-multiple-items="3" autoplay="{{false}}" style="padding: 0 20rpx;" next-margin="40rpx" snap-to-edge="{{true}}">
-				<block wx:for="{{background}}" wx:key="*this">
-					<swiper-item>
-						<image src="{{imgUrl}}图层 1298.png"></image>
-						<view style="display: flex;align-items: center;white-space: nowrap;width: 200rpx;">
-							<view class="swiper-name">王茂春</view>
-							<view class="swiper-item">区长,区委领导阿健身房</view>
-						</view>
-					</swiper-item>
-				</block>
-			</swiper>
-		</view>
-		<!-- 政府信息公开 -->
-		<view>
-			<view style="display:flex" class="content-top">
-				<view class="content-line"></view>
-				<view class="content-title">政府信息公开</view>
-				<view class="content-more" bindtap="goToGovernment">查看更多 >></view>
-			</view>
-			<view style="padding: 0 40rpx;display: flex;justify-content:space-between;flex-wrap: wrap;">
-				<view bindtap="goToGovernment" data-index="{{index}}" wx:for="{{governmentInfoList}}" wx:key="index" style="position: relative;padding: 10rpx 0;">
-					<image src="{{imgUrl}}{{item.pic}}" style="width: 326rpx;height: 157rpx;" />
-					<view style="font-size: 24rpx;position: absolute;top: 67rpx;left: 8rpx;">{{item.title}}</view>
-				</view>
-			</view>
-		</view>
-		<!-- 基层政务公开 -->
-		<view style="height: 500px;">
-			<view style="display:flex" class="content-top">
-				<view class="content-line"></view>
-				<view class="content-title">基层政务公开</view>
-				<view class="content-more" bindtap="goToMore">查看更多 >></view>
-			</view>
-			<view style="padding: 0 8rpx 20rpx 8rpx;background-color: #ffffff;width: 690rpx;margin-left: 30rpx;display: flex;flex-wrap:wrap;justify-content: space-between;">
+  <scroll-view style="height: 1549rpx;" scroll-y="true">
+    <!-- 顶部栏 -->
+    <view class="top">
+      <image src="{{imgUrl}}topbg.webp" style="width: 100%;height:519rpx"></image>
+      <image src="{{imgUrl}}toplogo.png" class="top-logo" style="top: {{navHeight}}rpx"></image>
+      <view class="top-serach">
+        <view class="search-input">
+          <input style="height: 72rpx;" placeholder="请在此输入关键字" />
+        </view>
+        <button class="search-button">
+          <image src="{{imgUrl}}search.png"></image>
+        </button>
+      </view>
+    </view>
+    <!-- 区政府领导 -->
+    <view class="learder">
+      <view style="display:flex" class="content-top">
+        <view class="content-line"></view>
+        <view class="content-title">区政府领导</view>
+        <view class="content-more" bindtap="gotoLeaderDetail">查看更多 >></view>
+      </view>
+      <swiper display-multiple-items="3" autoplay="{{false}}" style="padding: 0 20rpx;height: 290rpx" next-margin="40rpx" snap-to-edge="{{true}}">
+        <block wx:for="{{background}}" wx:key="*this">
+          <swiper-item>
+            <image style="width: 198rpx;height:247rpx" src="{{imgUrl}}图层 1298.png"></image>
+            <view style="display: flex;align-items: center;white-space: nowrap;width: 200rpx;">
+              <view class="swiper-name">王茂春</view>
+              <view class="swiper-item">区长,区委领导阿健身房</view>
+            </view>
+          </swiper-item>
+        </block>
+      </swiper>
+    </view>
+    <!-- 政府信息公开 -->
+    <view>
+      <view style="display:flex" class="content-top">
+        <view class="content-line"></view>
+        <view class="content-title">政府信息公开</view>
+        <view class="content-more" bindtap="goToGovernment">查看更多 >></view>
+      </view>
+      <view style="padding: 0 40rpx;display: flex;justify-content:space-between;flex-wrap: wrap;">
+        <view bindtap="goToGovernment" data-index="{{index}}" wx:for="{{governmentInfoList}}" wx:key="index" style="position: relative;padding: 10rpx 0;">
+          <image src="{{imgUrl}}{{item.pic}}" style="width: 326rpx;height: 157rpx;" />
+          <view style="font-size: 24rpx;position: absolute;top: 67rpx;left: 8rpx;">{{item.title}}</view>
+        </view>
+      </view>
+    </view>
+    <!-- 基层政务公开 -->
+    <view style="height: 470px;">
+      <view style="display:flex" class="content-top">
+        <view class="content-line"></view>
+        <view class="content-title">基层政务公开</view>
+        <view class="content-more" bindtap="goToMore">查看更多 >></view>
+      </view>
+      <view style="padding: 0 8rpx 20rpx 8rpx;background-color: #ffffff;width: 690rpx;margin-left: 30rpx;display: flex;flex-wrap:wrap;justify-content: space-between;">
         <view wx:for="{{baseList}}" wx:for-index="index" wx:for-item="item" wx:key="index" style="position: relative;margin-top: 60rpx;color: #ffffff;font-size: 32rpx;width: 207rpx;height: 94rpx;background-color: #889FFF;border-radius: 8rpx;border: 1rpx solid #4547FF;display: flex;align-items: center;justify-content: center;">
           <view style="position: absolute;top: -33rpx;width: 65rpx;height: 65rpx;">
-            <image style="width: 65rpx;height: 65rpx;" src="{{imgUrl + item.pic}}" mode=""/>
+            <image style="width: 65rpx;height: 65rpx;" src="{{imgUrl + item.pic}}" mode="" />
           </view>
           {{item.name}}
         </view>
-			</view>
-		</view>
-		<!-- 政策文件 -->
-		<view style="height: 400px;">
-			<view style="display:flex" class="content-top">
-				<view class="content-line"></view>
-				<view class="content-title">政策文件</view>
-				<view class="content-more" bindtap="goToMore">查看更多 >></view>
-			</view>
-			<view>
-				<view style="background-image: url('{{imgUrl}}public1.png');width: 100%;height:100%"></view>
-			</view>
-		</view>
-		<!-- 政策解读 -->
-		<view>
-			<view style="display:flex" class="content-top">
-				<view class="content-line"></view>
-				<view class="content-title">政策解读</view>
-				<view class="content-more" bindtap="goToMore">查看更多 >></view>
-			</view>
-			<view class="policy-interpretation">
-				<scroll-view class="scroll-wrapper" scroll-x scroll-with-animation="true" scroll-into-view="item{{currentTab < 4 ? 0 : currentTab - 3}}">
-					<view class="navigate-item" id="item{{index}}" wx:for="{{policyInterpretation}}" wx:key="index" data-index="{{index}}" bindtap="tabNav">
-						<view class="names">{{item.name}}</view>
-						<view class="currtline {{currentTab === index ? 'active' : ''}}" wx:if="{{currentTab === index}}"></view>
-					</view>
-				</scroll-view>
-				<swiper display-multiple-items="2" current="{{currentTab}}" bindchange="handleSwiper" autoplay="{{false}}" style="padding: 0 10px;margin-top: 15rpx;height: 320rpx;">
-					<block wx:for="{{background}}" wx:key="*this">
-						<swiper-item>
-							<image src="{{imgUrl}}图层 3261.png" style="width: 327rpx;height: 227rpx;"></image>
-							<view style="font-size: 18rpx;font-family: PingFang SC;color: #666666;">重庆市南岸区集体士地征收补偿安置实腌办法政策解读(视频解读)</view>
-						</swiper-item>
-					</block>
-				</swiper>
-			</view>
-		</view>
-		<!-- 政务专题 -->
-		<view>
-			<view style="display:flex" class="content-top">
-				<view class="content-line"></view>
-				<view class="content-title">政务专题</view>
-				<view class="content-more" bindtap="goToMore">查看更多 >></view>
-			</view>
-			<swiper display-multiple-items="2" autoplay="{{false}}" style="padding: 0 10px;height: 400rpx;;">
-				<block wx:for="{{topics}}" wx:key="*this">
-					<swiper-item>
-						<image src="{{imgUrl}}{{item}}" bindtap="gotoZXWDK" style="width: 327rpx;height: 227rpx;"></image>
-					</swiper-item>
-				</block>
-			</swiper>
-		</view>
-	</scroll-view>
+      </view>
+    </view>
+    <!-- 政策文件 -->
+    <view style="height: 400px;">
+      <view style="display:flex" class="content-top">
+        <view class="content-line"></view>
+        <view class="content-title">政策文件</view>
+        <view class="content-more" bindtap="goToMore">查看更多 >></view>
+      </view>
+      <view style="width: 690rpx;margin-left: 30rpx;">
+        <view style="height: 66rpx;display: flex;background-color: #ffffff;">
+          <!-- 规范文件 -->
+          <view style="position: relative;margin-left: 57rpx;" class="tab-item {{fileTab==0?'active':''}}" bindtap="clickFileTab" data-item="0">
+            <view wx:if="{{ fileTab==0 }}" style="position: absolute;width: 0;height: 0;border-left: 10rpx solid transparent;border-right: 10rpx solid transparent;border-top: 10rpx solid #508FF4;bottom: -13rpx;" />
+            <view style="height:50rpx;">规范文件</view>
+          </view>
+          <!-- 其他文件 -->
+          <view style="position: relative;margin-left: 70rpx;" class="tab-item {{fileTab==1?'active':''}}" bindtap="clickFileTab" data-item="1">
+            <view wx:if="{{ fileTab==1 }}" style="position: absolute;width: 0;height: 0;border-left: 10rpx solid transparent;border-right: 10rpx solid transparent;border-top: 10rpx solid #508FF4;bottom: -13rpx;" />
+            <view style="height:50rpx;">其他文件</view>
+          </view>
+          <!-- 废止和失效文件 -->
+          <view style="position: relative;margin-left: 70rpx;" class="tab-item {{fileTab==2?'active':''}}" bindtap="clickFileTab" data-item="2">
+            <view wx:if="{{ fileTab==2 }}" style="position: absolute;width: 0;height: 0;border-left: 10rpx solid transparent;border-right: 10rpx solid transparent;border-top: 10rpx solid #508FF4;bottom: -13rpx;" />
+            <view style="height:50rpx;">废止和失效文件</view>
+          </view>
+        </view>
+      </view>
+
+    </view>
+    <!-- 政策解读 -->
+    <view>
+      <view style="display:flex" class="content-top">
+        <view class="content-line"></view>
+        <view class="content-title">政策解读</view>
+        <view class="content-more" bindtap="goToMore">查看更多 >></view>
+      </view>
+      <view class="policy-interpretation">
+        <scroll-view class="scroll-wrapper" scroll-x scroll-with-animation="true" scroll-into-view="item{{currentTab < 4 ? 0 : currentTab - 3}}">
+          <view class="navigate-item" id="item{{index}}" wx:for="{{policyInterpretation}}" wx:key="index" data-index="{{index}}" bindtap="tabNav">
+            <view class="names">{{item.name}}</view>
+            <view class="currtline {{currentTab === index ? 'active' : ''}}" wx:if="{{currentTab === index}}"></view>
+          </view>
+        </scroll-view>
+        <swiper display-multiple-items="2" current="{{currentTab}}" bindchange="handleSwiper" autoplay="{{false}}" style="padding: 0 10px;margin-top: 15rpx;height: 320rpx;">
+          <block wx:for="{{background}}" wx:key="*this">
+            <swiper-item>
+              <image src="{{imgUrl}}图层 3261.png" style="width: 327rpx;height: 227rpx;"></image>
+              <view style="font-size: 18rpx;font-family: PingFang SC;color: #666666;">重庆市南岸区集体士地征收补偿安置实腌办法政策解读(视频解读)</view>
+            </swiper-item>
+          </block>
+        </swiper>
+      </view>
+    </view>
+    <!-- 政务专题 -->
+    <view>
+      <view style="display:flex" class="content-top">
+        <view class="content-line"></view>
+        <view class="content-title">政务专题</view>
+        <view class="content-more" bindtap="goToMore">查看更多 >></view>
+      </view>
+      <swiper display-multiple-items="2" autoplay="{{false}}" style="padding: 0 10px;height: 400rpx;;">
+        <block wx:for="{{topics}}" wx:key="*this">
+          <swiper-item>
+            <image src="{{imgUrl}}{{item}}" bindtap="gotoZXWDK" style="width: 327rpx;height: 227rpx;"></image>
+          </swiper-item>
+        </block>
+      </swiper>
+    </view>
+  </scroll-view>
 </view>

+ 18 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/publics/index/index.wxss

@@ -107,6 +107,24 @@
 	font-size: 24rpx;
 	height: 32rpx;
   }
+
+  /* 政策文件 */
+  .tab-item{
+    font-size: 30rpx;
+    text-align: center;
+    line-height: 60rpx;
+    color: #333333;
+    height: 54rpx;
+    display: flex;
+    justify-content: center;
+    flex-direction: row;
+  }
+  
+  .tab-item.active{
+    font-size: 30rpx;
+    border-bottom: 7rpx solid #508FF4;
+    position: relative;
+  }
   
   /* 政策解读 */
   .policy-interpretation {

+ 5 - 1
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/publics/leaderInfo/leaderInfo.js

@@ -1,11 +1,15 @@
 // pages/publics/leaderInfo/leaderInfo.js
+import {
+	imgUrl
+} from "../../api/request"
+
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-
+    imgUrl: imgUrl
   },
 
   /**

+ 1 - 1
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/publics/leaderInfo/leaderInfo.wxml

@@ -1,7 +1,7 @@
 <view>
   <view style="margin-top: 32rpx;height: 329rpx;width: 750rpx;display: flex;background-color: #ffffff;">
     <view style="width: 273rpx;height: 100%;display: flex;align-items: center;justify-content: center;">
-      <image style="width: 213rpx;height: 265rpx" src="https://imagecdn.cqliving.com/images/app_4/cms/202105/2f6942bd99b36639a2a9f567b0e303ab14f10e63.jpg" mode="" />
+      <image style="width: 213rpx;height: 265rpx" src="{{imgUrl}}图层 1298.png" mode="" />
     </view>
     <view style="padding-left: 17rpx;display: flex;flex-direction: column;">
       <view style="font-size: 35rpx;font-weight: 600;padding-top: 55rpx;color: #333333;">王茂春</view>

+ 5 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/publics/publicLeaderDetail/publicLeaderDetail.js

@@ -1,10 +1,15 @@
 // pages/publicLeaderDetail/publicLeaderDetail.js
+import {
+	imgUrl
+} from "../../api/request"
+
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
+    imgUrl: imgUrl,
     leaderList: []
   },
 

+ 1 - 1
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/publics/publicLeaderDetail/publicLeaderDetail.wxml

@@ -2,7 +2,7 @@
     <!-- item -->
     <view bindtap="gotoInfo" wx:for="{{ leaderList }}" wx:for-item="item" wx:for-index="index" wx:key="index" style="margin-left: 32rpx;margin-top: 31rpx;height: 225rpx;width: 688rpx;display: flex;background-color: #ffffff;">
       <view style="width: 187rpx;height: 100%;display: flex;align-items: center;justify-content: center;">
-        <image style="width: 147rpx;height: 184rpx" src="https://imagecdn.cqliving.com/images/app_4/cms/202105/2f6942bd99b36639a2a9f567b0e303ab14f10e63.jpg" mode="" />
+        <image style="width: 147rpx;height: 184rpx" src="{{imgUrl}}图层 1298.png" mode="" />
       </view>
       <view>
         <view style="padding-left: 10rpx;display: flex;flex-direction: column;justify-content: center;">