Browse Source

小程序修改样式,编写获取领导信息列表接口和定时任务,对接区政府领导

wrh 2 năm trước cách đây
mục cha
commit
2d58f08014

+ 11 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/program/controller/HLWIntefaceController.java

@@ -7,6 +7,7 @@ import cn.hutool.json.JSONObject;
 import com.example.nngkxxdp.hlw.HlwHttpUtil;
 import com.example.nngkxxdp.program.constant.MiniConstant;
 import com.example.nngkxxdp.program.service.HLWIntefaceService;
+import com.example.nngkxxdp.util.RedisUtil;
 import com.example.nngkxxdp.util.SendUtil;
 import lombok.RequiredArgsConstructor;
 import org.springframework.core.io.ByteArrayResource;
@@ -31,6 +32,8 @@ public class HLWIntefaceController {
 
     private final HLWIntefaceService hlwIntefaceService;
     private final RedisTemplate redisTemplate;
+    @javax.annotation.Resource
+    private RedisUtil redisUtil;
 
     /**
      * 收藏
@@ -112,7 +115,15 @@ public class HLWIntefaceController {
         } catch (Exception e) {
             throw new RuntimeException(e);
         }
+    }
 
+    @GetMapping("/getAllLeader")
+    public Map<String,Object> getAllLeader(){
+        try {
+            return SendUtil.send(true, "", redisUtil.get("nazw_hlw_allLeader"));
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
     }
 
 

+ 38 - 4
nngkxxdp/src/main/java/com/example/nngkxxdp/task/HlwTask.java

@@ -3,10 +3,8 @@ package com.example.nngkxxdp.task;
 import cn.hutool.core.convert.Convert;
 import cn.hutool.core.date.*;
 import cn.hutool.core.io.FileUtil;
-import cn.hutool.core.util.ArrayUtil;
-import cn.hutool.core.util.ReUtil;
-import cn.hutool.core.util.StrUtil;
-import cn.hutool.core.util.URLUtil;
+import cn.hutool.core.util.*;
+import cn.hutool.http.HttpRequest;
 import cn.hutool.http.HttpResponse;
 import cn.hutool.http.HttpUtil;
 import cn.hutool.json.JSONArray;
@@ -24,6 +22,7 @@ import com.example.nngkxxdp.entity.Article;
 import com.example.nngkxxdp.entity.Dept;
 import com.example.nngkxxdp.hlw.HlwHttpUtil;
 import com.example.nngkxxdp.util.Blank;
+import com.example.nngkxxdp.util.RedisUtil;
 import com.example.nngkxxdp.util.WzkpRecordUtil;
 import org.apache.xmlbeans.impl.common.XPath;
 import org.jsoup.Jsoup;
@@ -76,6 +75,9 @@ public class HlwTask {
     @Resource
     private WzkpRecordUtil wzkpRecordUtil;
 
+    @Resource
+    private RedisUtil redisUtil;
+
     public static void main(String[] args) {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         long startTime = System.currentTimeMillis();
@@ -91,6 +93,38 @@ public class HlwTask {
         System.out.println("耗时:" + (endTime - startTime) / (1000 * 60) + "分");
     }
 
+    @Scheduled(cron = "0 */10 * * * ?")
+    public void getAllLeader() throws Exception {
+        log.info("获取所有领导信息-任务开始");
+        String[] leaderChannelId = {"145044", "341997", "341998", "341999", "342000", "342002", "342003", "342004", "342005", "344559", "145052", "145046"};
+        JSONArray jsonArray = new JSONArray();
+        for (String channelId : leaderChannelId) {
+            JSONObject hlwArticleList = HlwHttpUtil.getHlwArticleList2(1, 1, channelId, HlwHttpUtil.getHlwToken());
+            JSONArray data;
+            try {
+                data = hlwArticleList.getJSONArray("DATA");
+            } catch (Exception e) {
+                log.info("获取文章失败");
+                return;
+            }
+            JSONObject jsonObject = JSONUtil.parseObj(data.get(0));
+            String docId = jsonObject.getStr("DOCID");
+            String docUrl = jsonObject.getStr("DOCPUBURL");
+            Thread.sleep(500);
+            JSONObject hlwArticleInfo = HlwHttpUtil.getHlwArticleInfo(channelId, docId, HlwHttpUtil.getHlwToken());
+            try {
+                hlwArticleInfo.set("DOCPUBURL", docUrl.substring(0, docUrl.lastIndexOf("/") + 1));
+            } catch (Exception e) {
+                log.info("获取文章详细失败");
+                return;
+            }
+            jsonArray.add(hlwArticleInfo);
+            Thread.sleep(500);
+        }
+        redisUtil.set("nazw_hlw_allLeader", jsonArray);
+        log.info("获取所有领导信息-成功");
+    }
+
     //    @Scheduled(cron = "0 10 0 * * ?")
 //    @Async("threadPoolTaskExecutor")//多个定时器需要用到的线程池
 //    @GetMapping("/getTodayData")

+ 17 - 3
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/publics/index/index.js

@@ -143,6 +143,8 @@ Page({
 	},
 	// 事件处理函数
 	onLoad() {
+		// 区政府领导
+		this.getAllLeader();
 		// 政策文件
 		this.getFileListById(161753);
 		// 政策解读
@@ -151,6 +153,18 @@ Page({
 			navHeight: app.globalData.navHeight + app.globalData.menuHeight / 2
 		})
 	},
+	// 获取所有领导信息
+	getAllLeader() {
+		wx.request({
+			url: 'https://data.cqna.gov.cn/mini/hlw/getAllLeader',
+			method: 'GET',
+			success: res => {
+				this.setData({
+					leaderList: res.data.data
+				})
+			}
+		})
+	},
 	// 获取政策文件列表
 	getFileListById() {
 		var chennelId = 161753
@@ -194,7 +208,7 @@ Page({
 		// 图片解读
 		setTimeout(function () {
 			wx.request({
-				url: 'https://data.cqna.gov.cn/mini/hlw/send?page=1&limit=3&channelId=158049',
+				url: 'https://data.cqna.gov.cn/mini/hlw/send?page=1&limit=2&channelId=158049',
 				method: 'GET',
 				success: res => {
 					that.setData({
@@ -206,7 +220,7 @@ Page({
 		// 视频解读
 		setTimeout(function () {
 			wx.request({
-				url: 'https://data.cqna.gov.cn/mini/hlw/send?page=1&limit=3&channelId=158049',
+				url: 'https://data.cqna.gov.cn/mini/hlw/send?page=1&limit=2&channelId=158049',
 				method: 'GET',
 				success: res => {
 					that.setData({
@@ -329,7 +343,7 @@ Page({
 	},
 	gotoLeaderDetail() {
 		wx.navigateTo({
-			url: '/pages/publics/publicLeaderDetail/publicLeaderDetail',
+			url: '/pages/publics/publicLeaderDetail/publicLeaderDetail?leaderList=' + encodeURIComponent(JSON.stringify(this.data.leaderList)),
 		})
 	},
 	goToBaseAffairs() {

+ 169 - 171
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/publics/index/index.wxml

@@ -1,12 +1,12 @@
 <!--pages/publics/publics.wxml-->
 <wxs module="filter" src="./util.wxs"></wxs>
 <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">
+	<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>
@@ -14,170 +14,168 @@
           <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="{{leaderList}}" wx:key="*this">
-          <swiper-item>
-            <image style="width: 198rpx;height:247rpx" src="{{imgUrl}}{{item.pic}}"></image>
-            <view style="display: flex;align-items: center;white-space: nowrap;width: 200rpx;">
-              <view class="swiper-name">{{item.name}}</view>
-              <view class="swiper-item">{{item.description}}</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="margin-bottom: 20rpx;">
-      <view style="display:flex" class="content-top">
-        <view class="content-line"></view>
-        <view class="content-title">基层政务公开</view>
-        <view class="content-more" bindtap="goToBaseAffairs">查看更多 >></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="" />
-          </view>
-          {{item.name}}
-        </view>
-      </view>
-    </view>
-    <!-- 政策文件 -->
-    <view style="height: 570rpx;">
-      <view style="display:flex" class="content-top">
-        <view class="content-line"></view>
-        <view class="content-title">政策文件</view>
-        <view class="content-more" bindtap="goToFileList">查看更多 >></view>
-      </view>
-      <view style="margin-top: 5rpx;width: 690rpx;margin-left: 30rpx;box-shadow: 0px -2px 5px 0px rgba(153,153,153,0.17);">
-        <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;color: #333333;">规范文件</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;color: #333333;">其他文件</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;color: #333333;">废止和失效文件</view>
-          </view>
-        </view>
-        <view style="height: 420rpx;">
-          <swiper duration="200" current="{{fileItem}}" bindchange="changeFileTab" style="height: 100%">
-            <swiper-item>
-              <scroll-view scroll-y="true" style="height: 100%;padding:0;margin:0;">
-                <include src="file.wxml" />
-              </scroll-view>
-            </swiper-item>
-            <swiper-item>
-              <scroll-view scroll-y="true" style="height: 100%;padding:0;margin:0;">
-                <include src="file.wxml" />
-              </scroll-view>
-            </swiper-item>
-            <swiper-item>
-              <scroll-view scroll-y="true" style="height: 100%;padding:0;margin:0;">
-                <include src="file.wxml" />
-              </scroll-view>
-            </swiper-item>
-          </swiper>
-        </view>
-      </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="{{leaderList}}" wx:key="*this" wx:if="{{index<4}}">
+					<swiper-item>
+						<image style="width: 198rpx;height:247rpx" src="{{item.DOCPUBURL}}{{item.LDTX[0].APPFILE}}"></image>
+						<view style="display: flex;align-items: center;white-space: nowrap;width: 200rpx;">
+							<view class="swiper-name">{{item.CHNLIDNAME}}</view>
+							<view class="swiper-item">{{item.DRZW}}</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="margin-bottom: 20rpx;">
+			<view style="display:flex" class="content-top">
+				<view class="content-line"></view>
+				<view class="content-title">基层政务公开</view>
+				<view class="content-more" bindtap="goToBaseAffairs">查看更多 >></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="" />
+					</view>
+					{{item.name}}
+				</view>
+			</view>
+		</view>
+		<!-- 政策文件 -->
+		<view style="height: 570rpx;">
+			<view style="display:flex" class="content-top">
+				<view class="content-line"></view>
+				<view class="content-title">政策文件</view>
+				<view class="content-more" bindtap="goToFileList">查看更多 >></view>
+			</view>
+			<view style="margin-top: 5rpx;width: 690rpx;margin-left: 30rpx;box-shadow: 0px -2px 5px 0px rgba(153,153,153,0.17);">
+				<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;color: #333333;">规范文件</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;color: #333333;">其他文件</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;color: #333333;">废止和失效文件</view>
+					</view>
+				</view>
+				<view style="height: 420rpx;">
+					<swiper duration="200" current="{{fileItem}}" bindchange="changeFileTab" style="height: 100%">
+						<swiper-item>
+							<scroll-view scroll-y="true" style="height: 100%;padding:0;margin:0;">
+								<include src="file.wxml" />
+							</scroll-view>
+						</swiper-item>
+						<swiper-item>
+							<scroll-view scroll-y="true" style="height: 100%;padding:0;margin:0;">
+								<include src="file.wxml" />
+							</scroll-view>
+						</swiper-item>
+						<swiper-item>
+							<scroll-view scroll-y="true" style="height: 100%;padding:0;margin:0;">
+								<include src="file.wxml" />
+							</scroll-view>
+						</swiper-item>
+					</swiper>
+				</view>
+			</view>
 
-    </view>
-    <!-- 政策解读 -->
-    <view style="margin-top: 20rpx;">
-      <view style="display:flex" class="content-top">
-        <view class="content-line"></view>
-        <view class="content-title">政策解读</view>
-        <view class="content-more" bindtap="gotoInterpretation">查看更多 >></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 wx:if="{{ currentTab === index }}" style="position: absolute;width: 0;height: 0;border-left: 10rpx solid transparent;border-right: 10rpx solid transparent;border-top: 10rpx solid #508FF4;bottom: -5rpx;left: 40rpx;" />
-          </view>
-        </scroll-view>
-        <swiper current="{{currentTab}}" bindchange="handleSwiper" autoplay="{{false}}" style="padding: 0 10px;margin-top: 15rpx;height: 320rpx;">
-          <!-- 文字解读 -->
-          <swiper-item>
-            <view wx:for-item="item" wx:for-index="index" wx:key="index" wx:for="{{textInterpretationList}}" style="display: flex;align-items: center;justify-content: space-between;flex-wrap: wrap;height: 107rpx;font-size: 28rpx;color: #666666;width: 639rpx;margin-left: 23rpx;border-bottom: 2rpx solid #CCCCCC;">
-              <view class="limit-text-1" style="width: 500rpx">{{item.DOCTITLE}}</view>
-              <view>{{filter.formateDate(item.DOCPUBTIME)}}</view>
-              <view style="color: #c0d1e5;border: 1rpx solid #c0d1e5;border-radius: 10rpx;padding: 10rpx;">政策原文</view>
-            </view>
-          </swiper-item>
-          <!-- 图片解读 -->
-          <swiper-item>
-            <view style="display: flex;justify-content: space-between;">
-              <view style="width: 327rpx;" wx:for="{{2}}">
-                <image src="{{imgUrl}}图层 3261.png" style="width: 327rpx;height: 227rpx;"></image>
-                <view style="font-size: 20rpx;font-family: PingFang SC;color: #666666;">重庆市南岸区集体士地征收补偿安置实腌办法政策解读(视频解读)</view>
-              </view>
-            </view>
-          </swiper-item>
-          <!-- 视频解读 -->
-          <swiper-item>
-            <view style="display: flex;justify-content: space-between;">
-              <view style="width: 327rpx;" wx:for="{{2}}">
-                <image src="{{imgUrl}}图层 3261.png" style="width: 327rpx;height: 227rpx;"></image>
-                <view style="font-size: 20rpx;font-family: PingFang SC;color: #666666;">重庆市南岸区集体士地征收补偿安置实腌办法政策解读(视频解读)</view>
-              </view>
-            </view>
-          </swiper-item>
-          <!-- 媒体解读 -->
-          <swiper-item>
-            <view wx:for-item="item" wx:for-index="index" wx:key="index" wx:for="{{mediaInterpretationList}}" style="display: flex;align-items: center;justify-content: space-between;flex-wrap: wrap;height: 107rpx;font-size: 28rpx;color: #666666;width: 639rpx;margin-left: 23rpx;border-bottom: 2rpx solid #CCCCCC;">
-              <view class="limit-text-1" style="width: 500rpx">{{item.DOCTITLE}}</view>
-              <view>{{filter.formateDate(item.DOCPUBTIME)}}</view>
-              <view style="color: #c0d1e5;border: 1rpx solid #c0d1e5;border-radius: 10rpx;padding: 10rpx;">政策原文</view>
-            </view>
-          </swiper-item>
-        </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 style="margin-top: 20rpx;">
+			<view style="display:flex" class="content-top">
+				<view class="content-line"></view>
+				<view class="content-title">政策解读</view>
+				<view class="content-more" bindtap="gotoInterpretation">查看更多 >></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 wx:if="{{ currentTab === index }}" style="position: absolute;width: 0;height: 0;border-left: 10rpx solid transparent;border-right: 10rpx solid transparent;border-top: 10rpx solid #508FF4;bottom: -5rpx;left: 40rpx;" />
+					</view>
+				</scroll-view>
+				<swiper current="{{currentTab}}" bindchange="handleSwiper" autoplay="{{false}}" style="padding: 0 10px;margin-top: 15rpx;height: 320rpx;">
+					<!-- 文字解读 -->
+					<swiper-item>
+						<view wx:key="index" wx:for="{{textInterpretationList}}" style="display: flex;align-items: center;justify-content: space-between;flex-wrap: wrap;height: 107rpx;font-size: 28rpx;color: #666666;width: 639rpx;margin-left: 23rpx;border-bottom: 2rpx solid #CCCCCC;">
+							<view class="limit-text-1" style="width: 500rpx">{{item.DOCTITLE}}</view>
+							<view>{{filter.formateDate(item.DOCPUBTIME)}}</view>
+						</view>
+					</swiper-item>
+					<!-- 图片解读 -->
+					<swiper-item>
+						<view style="display: flex;justify-content: space-between;">
+							<view style="width: 327rpx;" wx:for="{{pictureInterpretationList}}" wx:key="index">
+								<image src="{{imgUrl}}图层 3261.png" style="width: 327rpx;height: 227rpx;"></image>
+								<view style="font-size: 20rpx;font-family: PingFang SC;color: #666666;">{{item.DOCTITLE}}</view>
+							</view>
+						</view>
+					</swiper-item>
+					<!-- 视频解读 -->
+					<swiper-item>
+						<view style="display: flex;justify-content: space-between;">
+							<view style="width: 327rpx;" wx:for="{{videoInterpretationList}}" wx:key="index">
+								<image src="{{imgUrl}}图层 3261.png" style="width: 327rpx;height: 227rpx;"></image>
+								<view style="font-size: 20rpx;font-family: PingFang SC;color: #666666;">{{item.DOCTITLE}}</view>
+							</view>
+						</view>
+					</swiper-item>
+					<!-- 媒体解读 -->
+					<swiper-item>
+						<view wx:key="index" wx:for="{{mediaInterpretationList}}" style="display: flex;align-items: center;justify-content: space-between;flex-wrap: wrap;height: 107rpx;font-size: 28rpx;color: #666666;width: 639rpx;margin-left: 23rpx;border-bottom: 2rpx solid #CCCCCC;">
+							<view class="limit-text-1" style="width: 500rpx">{{item.DOCTITLE}}</view>
+							<view>{{filter.formateDate(item.DOCPUBTIME)}}</view>
+						</view>
+					</swiper-item>
+				</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>

+ 2 - 4
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/publics/interpretation/interpretation.wxml

@@ -12,9 +12,8 @@
 		<swiper-item>
 			<scroll-view scroll-y="true" style="height: 100%;padding:0;margin:0;" bindscrolltolower="scrollBottom">
 				<view wx:for-item="item" wx:for-index="index" wx:key="index" wx:for="{{interpretationListInfo}}" style="display: flex;align-items: center;justify-content: space-between;flex-wrap: wrap;height: 120rpx;font-size: 28rpx;color: #666666;width: 700rpx;margin-left: 23rpx;border-bottom: 2rpx solid #CCCCCC;">
-					<view class="limit-text-1" style="width: 400rpx;-webkit-line-clamp:2;overflow:hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient:vertical;">{{item.DOCTITLE}}</view>
+					<view class="limit-text-1" style="width: 600rpx;-webkit-line-clamp:2;overflow:hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient:vertical;">{{item.DOCTITLE}}</view>
 					<view>{{filter.formateDate(item.DOCPUBTIME)}}</view>
-					<view style="color: #c0d1e5;border: 1rpx solid #c0d1e5;border-radius: 10rpx;padding: 10rpx;">政策原文</view>
 				</view>
 			</scroll-view>
 		</swiper-item>
@@ -44,9 +43,8 @@
 		<swiper-item>
 			<scroll-view scroll-y="true" style="height: 100%;padding:0;margin:0;" bindscrolltolower="scrollBottom">
 				<view wx:for-item="item" wx:for-index="index" wx:key="index" wx:for="{{interpretationListInfo}}" style="display: flex;align-items: center;justify-content: space-between;flex-wrap: wrap;height: 120rpx;font-size: 28rpx;color: #666666;width: 700rpx;margin-left: 23rpx;border-bottom: 2rpx solid #CCCCCC;">
-					<view class="limit-text-1" style="width: 400rpx;-webkit-line-clamp:2;overflow:hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient:vertical;">{{item.DOCTITLE}}</view>
+					<view class="limit-text-1" style="width: 600rpx;-webkit-line-clamp:2;overflow:hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient:vertical;">{{item.DOCTITLE}}</view>
 					<view>{{filter.formateDate(item.DOCPUBTIME)}}</view>
-					<view style="color: #c0d1e5;border: 1rpx solid #c0d1e5;border-radius: 10rpx;padding: 10rpx;">政策原文</view>
 				</view>
 			</scroll-view>
 		</swiper-item>

+ 70 - 76
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/publics/leaderInfo/leaderInfo.js

@@ -1,83 +1,77 @@
 // pages/publics/leaderInfo/leaderInfo.js
 import {
-  imgUrl
+	imgUrl
 } from "../../api/request"
 
 Page({
 
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    imgUrl: imgUrl,
-    leaderInfo: ''
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad(options) {
-    let item = JSON.parse(options.item);
-    wx.request({
-      url: 'https://data.cqna.gov.cn/mini/hlw/info?channelId=' + item.channelId + '&docId=' + item.docId,
-      method: 'GET',
-      success: res => {
-        item.LDLL = res.data.data.LDLL.replace(/\<span/gi, '<span class="fontSize"');
-        item.LDFG = res.data.data.LDFG.replace(/\<span/gi, '<span class="fontSize"');
-        this.setData({
-          leaderInfo: item
-        })
-      }
-    })
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
-  }
+	/**
+	 * 页面的初始数据
+	 */
+	data: {
+		imgUrl: imgUrl,
+		leaderInfo: ''
+	},
+
+	/**
+	 * 生命周期函数--监听页面加载
+	 */
+	onLoad(options) {
+		let item = JSON.parse(decodeURIComponent(options.item));
+		item.LDLL = item.LDLL.replace(/\<span/gi, '<span class="fontSize"');
+		item.LDFG = item.LDFG.replace(/\<span/gi, '<span class="fontSize"');
+		this.setData({
+			leaderInfo: item
+		})
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面初次渲染完成
+	 */
+	onReady() {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面显示
+	 */
+	onShow() {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面隐藏
+	 */
+	onHide() {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面卸载
+	 */
+	onUnload() {
+
+	},
+
+	/**
+	 * 页面相关事件处理函数--监听用户下拉动作
+	 */
+	onPullDownRefresh() {
+
+	},
+
+	/**
+	 * 页面上拉触底事件的处理函数
+	 */
+	onReachBottom() {
+
+	},
+
+	/**
+	 * 用户点击右上角分享
+	 */
+	onShareAppMessage() {
+
+	}
 })

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

@@ -1,12 +1,12 @@
 <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="{{imgUrl}}图层 1298.png" mode="" />
+      <image style="width: 213rpx;height: 265rpx" src="{{leaderInfo.DOCPUBURL}}{{leaderInfo.LDTX[0].APPFILE}}" 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;">{{leaderInfo.name}}</view>
+      <view style="font-size: 35rpx;font-weight: 600;padding-top: 55rpx;color: #333333;">{{leaderInfo.CHNLIDNAME}}</view>
       <scroll-view style="height: 145rpx;padding-top: 34rpx;" scroll-y>
-        <view style="width: 420rpx;font-size: 28rpx;color: #999999;line-height: 36rpx;">{{leaderInfo.description}}</view>
+        <view style="width: 420rpx;font-size: 28rpx;color: #999999;line-height: 36rpx;">{{leaderInfo.DRZW}}</view>
       </scroll-view>
     </view>
   </view>

+ 99 - 108
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/publics/publicLeaderDetail/publicLeaderDetail.js

@@ -1,126 +1,117 @@
 // pages/publicLeaderDetail/publicLeaderDetail.js
 import {
-  imgUrl
+	imgUrl
 } from "../../api/request"
 
 Page({
 
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    imgUrl: imgUrl,
-    leaderList: [{
-      channelId: '145044',
-      docId: '8852125',
-      name: '王茂春',
-      pic: '图层 1298.png',
-      description: '区委副书记,区政府党组书记、区政府区长,重庆经开区党工委副书记(兼)'
-    }, {
-      channelId: '341997',
-      docId: '10298243',
-      name: '唐昕',
-      pic: '图层 1298.png',
-      description: '区委常委,区政府党组副书记、常务副区长'
-    }, {
-      channelId: '341998',
-      docId: '10298370',
-      name: '张进',
-      pic: '图层 1298.png',
-      description: '区委常委,区政府党组成员、副区长'
-    }, {
-      channelId: '341999',
-      docId: '10298390',
-      name: '蒋文新',
-      pic: '图层 1298.png',
-      description: '民盟重庆市南岸区委主委,区政府副区长'
-    }, {
-      channelId: '342000',
-      docId: '10298402',
-      name: '游泳',
-      docId: '10298402',
-      pic: '图层 1298.png',
-      description: '区政府党组成员、副区长'
-    }, {
-      channelId: '342002',
-      docId: '10298423',
-      name: '刘露',
-      pic: '图层 1298.png',
-      description: '区政府党组成员、副区长'
-    }, {
-      channelId: '342003',
-      docId: '10298429',
-      name: '张超林',
-      pic: '图层 1298.png',
-      description: '区政府党组成员、副区长'
-    }, {
-      channelId: '342004',
-      docId: '10298447',
-      name: '杨建',
-      pic: '图层 1298.png',
-      description: '区政府党组成员、副区长,区公安分局党委书记、局长、督察长(兼)'
-    }, {
-      channelId: '342005',
-      docId: '10298487',
-      name: '石少林',
-      pic: '图层 1298.png',
-      description: '区政府党组成员、副区长'
-    }, {
-      channelId: '344559',
-      docId: '10381074',
-      name: '张炎',
-      pic: '图层 1298.png',
-      description: '区政府党组成员,中国信息通信研究院西部分院(重庆信息通信研究院)院长'
-    }, {
-      channelId: '145052',
-      docId: '10298498',
-      name: '陈炯',
-      pic: '图层 1298.png',
-      description: '区政府一级巡视员'
-    }, {
-      channelId: '145046',
-      docId: '10298513',
-      name: '莫裕全',
-      pic: '图层 1298.png',
-      description: '民进重庆市委副主委,区政府一级巡视员'
-    }],
-  },
+	/**
+	 * 页面的初始数据
+	 */
+	data: {
+		imgUrl: imgUrl,
+		leaderList: [{
+			channelId: '145044',
+			docId: '8852125',
+			name: '王茂春',
+			pic: '图层 1298.png',
+			description: '区委副书记,区政府党组书记、区政府区长,重庆经开区党工委副书记(兼)'
+		}, {
+			channelId: '341997',
+			docId: '10298243',
+			name: '唐昕',
+			pic: '图层 1298.png',
+			description: '区委常委,区政府党组副书记、常务副区长'
+		}, {
+			channelId: '341998',
+			docId: '10298370',
+			name: '张进',
+			pic: '图层 1298.png',
+			description: '区委常委,区政府党组成员、副区长'
+		}, {
+			channelId: '341999',
+			docId: '10298390',
+			name: '蒋文新',
+			pic: '图层 1298.png',
+			description: '民盟重庆市南岸区委主委,区政府副区长'
+		}, {
+			channelId: '342000',
+			docId: '10298402',
+			name: '游泳',
+			docId: '10298402',
+			pic: '图层 1298.png',
+			description: '区政府党组成员、副区长'
+		}, {
+			channelId: '342002',
+			docId: '10298423',
+			name: '刘露',
+			pic: '图层 1298.png',
+			description: '区政府党组成员、副区长'
+		}, {
+			channelId: '342003',
+			docId: '10298429',
+			name: '张超林',
+			pic: '图层 1298.png',
+			description: '区政府党组成员、副区长'
+		}, {
+			channelId: '342004',
+			docId: '10298447',
+			name: '杨建',
+			pic: '图层 1298.png',
+			description: '区政府党组成员、副区长,区公安分局党委书记、局长、督察长(兼)'
+		}, {
+			channelId: '342005',
+			docId: '10298487',
+			name: '石少林',
+			pic: '图层 1298.png',
+			description: '区政府党组成员、副区长'
+		}, {
+			channelId: '344559',
+			docId: '10381074',
+			name: '张炎',
+			pic: '图层 1298.png',
+			description: '区政府党组成员,中国信息通信研究院西部分院(重庆信息通信研究院)院长'
+		}, {
+			channelId: '145052',
+			docId: '10298498',
+			name: '陈炯',
+			pic: '图层 1298.png',
+			description: '区政府一级巡视员'
+		}, {
+			channelId: '145046',
+			docId: '10298513',
+			name: '莫裕全',
+			pic: '图层 1298.png',
+			description: '民进重庆市委副主委,区政府一级巡视员'
+		}],
+	},
 
-  onLoad(options) {
-    for (let i = 0; i < this.data.leaderList.length; i++) {
-      const element = this.data.leaderList[i];
-      setTimeout(function () {
-        wx.request({
-          url: 'https://data.cqna.gov.cn/mini/hlw/info?channelId=' + element.channelId + '&docId=' + element.docId,
-          method: 'GET',
-          success: res => {
-            console.log(res);
-          }
-        })
-      }, i * 500)
-    }
-  },
+	onLoad(options) {
+		this.setData({
+			leaderList: JSON.parse(decodeURIComponent(options.leaderList))
+		})
+	},
 
-  onReady() {
+	onReady() {
 
-  },
+	},
 
-  onShow() {
+	onShow() {
 
-  },
+	},
 
-  onHide() {
+	onHide() {
 
-  },
+	},
 
-  onUnload() {
+	onUnload() {
 
-  },
+	},
 
-  gotoInfo(e) {
-    wx.navigateTo({
-      url: '/pages/publics/leaderInfo/leaderInfo?item=' + JSON.stringify(e.currentTarget.dataset.item),
-    })
-  }
+	gotoInfo(e) {
+		wx.navigateTo({
+			url: '/pages/publics/leaderInfo/leaderInfo?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)),
+		})
+	}
 
 })

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

@@ -2,12 +2,15 @@
     <!-- item -->
     <view bindtap="gotoInfo" data-item="{{item}}" 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="{{imgUrl}}{{item.pic}}" mode="" />
+        <!-- <image style="width: 147rpx;height: 184rpx" src="{{imgUrl}}{{item.pic}}" mode="" /> -->
+        <image style="width: 147rpx;height: 184rpx" src="{{item.DOCPUBURL}}{{item.LDTX[0].APPFILE}}" mode="" />
       </view>
       <view>
         <view style="padding-left: 10rpx;display: flex;flex-direction: column;justify-content: center;">
-          <view style="font-size: 33rpx;font-weight: 600;padding: 19rpx 0;">{{item.name}}</view>
-          <view class="limit-text-2" style="width: 461rpx;font-size: 27rpx;color: #999999;line-height: 29rpx;">{{item.description}}</view>
+          <!-- <view style="font-size: 33rpx;font-weight: 600;padding: 19rpx 0;">{{item.name}}</view>
+          <view class="limit-text-2" style="width: 461rpx;font-size: 27rpx;color: #999999;line-height: 29rpx;">{{item.description}}</view> -->
+          <view style="font-size: 33rpx;font-weight: 600;padding: 19rpx 0;">{{item.CHNLIDNAME}}</view>
+          <view class="limit-text-2" style="width: 461rpx;font-size: 27rpx;color: #999999;line-height: 29rpx;">{{item.DRZW}}</view>
         </view>
         <view style="height: 103rpx;display: flex;padding-left: 10rpx;align-items: center;">
           <view style="border-radius: 5rpx;display: flex;align-items: center;justify-content: center;width: 151rpx;height:50rpx;border: 2rpx solid #C5C5C5;font-size: 27rpx;letter-spacing: 2rpx;">个人简介</view>