wrh пре 2 година
родитељ
комит
c6b11aa06a

+ 5 - 2
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/albumEdit/albumEdit.js

@@ -57,13 +57,13 @@ Page({
 				icon: "none",
 				duration: 1500
 			})
-		} else if (this.data.pictureDescription == '') {
+		} else if (e.detail.value.pictureDescription == '') {
 			wx.showToast({
 				title: "作品描述不能为空",
 				icon: "none",
 				duration: 1500
 			})
-		} else if (e.detail.value.img == '') {
+		} else if (this.data.img == '') {
 			wx.showToast({
 				title: "我的作品不能为空",
 				icon: "none",
@@ -82,6 +82,9 @@ Page({
 				formData: e.detail.value,
 				success: function (res) {
 					if (res.statusCode == 200) {
+						wx.navigateBack({
+							delta: 1
+						});
 						wx.showToast({
 							title: "投稿成功",
 							icon: "success",

+ 63 - 4
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/index/index.js

@@ -211,9 +211,6 @@ Page({
 			{
 				"name": "微信公众号"
 			},
-			// {
-			// 	"name": "新浪微博矩阵"
-			// },
 			{
 				"name": "今日头条"
 			}
@@ -298,8 +295,27 @@ Page({
 				id: '16',
 				name: "南岸智慧城管",
 				img: imgUrl + 'index-media-icon16.png'
+			},
+			{
+				id: '17',
+				name: "重庆市南岸区天文街道",
+				img: imgUrl + 'index-media-icon17.png'
+			},
+			{
+				id: '18',
+				name: "南岸健康",
+				img: imgUrl + 'index-media-icon18.png'
+			},
+			{
+				id: '19',
+				name: "重庆市南岸区南坪街道",
+				img: imgUrl + 'index-media-icon19.png'
 			}
-		]
+		],
+		// 媒体矩阵南岸发布
+		mediaReleaseList: [],
+		// 媒体矩阵今日头条
+		mediaHeadlineList: []
 	},
 	onReady() {},
 	onShow() {
@@ -427,6 +443,10 @@ Page({
 				console.log(e, '动态加载字体失败')
 			},
 		})
+		// 获取媒体矩阵南岸发布数据
+		this.getMediaReleaseList();
+		// 获取媒体矩阵今日头条数据
+		this.getMediaHeadlineList();
 		// 获取好差评图表
 		this.barComponent3 = this.selectComponent('#streetlinechart3');
 		this.init_bar3();
@@ -789,6 +809,45 @@ Page({
 			})
 		}
 	},
+	// 获取媒体矩阵南岸发布数据
+	getMediaReleaseList() {
+		let date = new Date();
+		let year = date.getFullYear()
+		let month = date.getMonth() + 1
+		let day = date.getDate()
+		let time = year + "-" + month + "-" + day;
+		wx.request({
+			url: 'https://www.cqna.gov.cn/data/article/getNAFBArticleByDate?date=' + time,
+			method: 'GET',
+			success: res => {
+				this.setData({
+					mediaReleaseList: res.data.data
+				})
+			}
+		})
+	},
+	gotoReleaseDetail(e) {
+		wx.navigateTo({
+			url: '/pages/web/web?wxUrl=' + encodeURIComponent(e.currentTarget.dataset.url),
+		})
+	},
+	// 获取媒体矩阵今日头条数据
+	getMediaHeadlineList(){
+		wx.request({
+			url: 'https://www.cqna.gov.cn/data/article/getAllOfficialAccount?official=重庆市南岸区人民政府',
+			method: 'GET',
+			success: res => {
+				this.setData({
+					mediaHeadlineList: res.data.data.jrtt
+				})
+			}
+		})
+	},
+	gotoHeadlineDetail(e) {
+		wx.navigateTo({
+			url: '/pages/web/web?wxUrl=' + encodeURIComponent(e.currentTarget.dataset.url),
+		})
+	},
 	mediaBindChange: function (e) {
 		var that = this;
 		that.setData({

+ 29 - 16
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/index/index.wxml

@@ -385,7 +385,7 @@
 		</view>
 		<!-- 政民互动 -->
 		<!-- 媒体矩阵 -->
-		<view style="height: 809rpx;width: 100%;position:relative;margin-top: 80rpx;">
+		<view style="height: 924rpx;width: 100%;position:relative;margin-top: 80rpx;">
 			<view style="margin-left: 20rpx;border-radius: 10rpx;background-color: #ffffff;padding: 25rpx 30rpx;width: 651rpx;height: 100%;">
 				<!-- 标题 -->
 				<view style="  display: flex;justify-content: left;align-items: center;height: 60rpx;">
@@ -413,7 +413,7 @@
 					</view>
 					<!-- header -->
 					<!-- content -->
-					<view style="height: 700rpx;width: 100%;">
+					<view style="height: 800rpx;width: 100%;">
 						<!-- 头部导航 -->
 						<view class="media-swiper-tab">
 							<scroll-view scroll-x="true" show-scrollbar="false" scroll-with-animation="true" scroll-left="{{navScrollLeft}}rpx" style="width: 100%;white-space: nowrap;">
@@ -426,21 +426,34 @@
 						<!-- 选项内容 -->
 						<view style="margin-top: 25rpx">
 							<swiper current="{{mediaCurrentTab}}" class="media-swiper-box" duration="300" bindchange="mediaBindChange">
-								<block wx:for="{{provList}}" wx:for-item="city" wx:key="n">
-									<swiper-item>
-										<scroll-view scroll-y="true" style="height: 100%;padding:0;margin:0;">
-											<view style="display: flex;justify-content: flex-start;flex-wrap: wrap">
-												<!-- 选项 -->
-												<view wx:for="{{mediaSelectList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="{{index % 2 === 0?'media-icon-1':'media-icon-2'}}">
-													<view style="display: flex;align-items:center;justify-content:center;margin-right: 4rpx">
-														<image src="{{item.img}}" style="height:44rpx;width:44rpx;"></image>
-													</view>
-													<view style="display: flex;align-items:center;justify-content:center">{{item.name}}</view>
-												</view>
+								<swiper-item>
+									<view class="message" style="padding: 4rpx 40rpx;">
+										<view wx:for="{{mediaReleaseList}}" wx:key="index" bindtap="gotoReleaseDetail" data-url="{{item.url}}" class="releaseList">
+											<view style="width: 450rpx;">{{item.title}}</view>
+											<image src="data:{{item.cover}}" style="width: 75rpx;height:75rpx" />
+										</view>
+									</view>
+								</swiper-item>
+								<swiper-item>
+									<view style="display: flex;justify-content: flex-start;flex-wrap: wrap">
+										<!-- 选项 -->
+										<view wx:for="{{mediaSelectList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="{{index % 2 === 0?'media-icon-1':'media-icon-2'}}">
+											<view style="display: flex;align-items:center;justify-content:center;margin-right: 4rpx">
+												<image src="{{item.img}}" style="height:44rpx;width:44rpx;"></image>
 											</view>
-										</scroll-view>
-									</swiper-item>
-								</block>
+											<view style="display: flex;align-items:center;justify-content:center">{{item.name}}</view>
+										</view>
+									</view>
+								</swiper-item>
+								<swiper-item>
+									<view wx:for="{{mediaHeadlineList}}" wx:key="index" class="news-item" bindtap="gotoHeadlineDetail" data-url="{{item.url}}">
+										<view class="jigou">
+											<view style="background-color: #B9D9FD;display: inline-block;padding: 0px 10rpx;">{{item.officialAccount}}</view>
+										</view>
+										<view style="margin: 16rpx 0 28rpx 0;">{{item.title}}</view>
+										<view class="time">{{item.createTime}}</view>
+									</view>
+								</swiper-item>
 							</swiper>
 						</view>
 						<!-- 选项内容 -->

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

@@ -423,3 +423,58 @@ scroll-view ::-webkit-scrollbar {
   padding-bottom:25rpx;
   width: 40%;
 }
+
+.message {
+    margin-top: 20rpx;
+    background: #F2F9FF;
+    padding: 18rpx 23rpx;
+    box-sizing: border-box;
+    position: relative;
+}
+
+.message .releaseList {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    height: 150rpx;
+    font-size: 30rpx;
+    color: #333333;
+    border-bottom: 1rpx solid #D3D3D3;
+}
+
+.message .releaseList:last-child {
+    border-bottom: none;
+}
+
+.news-item {
+    border-bottom: 1rpx solid #E1E1E1;
+    margin-top: 20rpx;
+    display: flex;
+    flex-direction: column;
+    font-size: 30rpx;
+    font-family: Source Han Sans SC;
+    font-weight: 400;
+    color: #333333;
+}
+.news-item .jigou {
+    font-size: 30rpx;
+    font-family: Source Han Sans SC;
+    font-weight: 400;
+    color: #2E77C6;
+}
+.news-item .jigou span{
+    padding: 3rpx 8rpx;
+    background: #B9D9FD;
+    line-height: 20rpx;
+}
+.news-item p{
+    margin-top: 13rpx;
+    margin-bottom: 24rpx;
+}
+.news-item .time {
+    font-size: 28rpx;
+    font-family: Source Han Sans SC;
+    font-weight: 400;
+    color: #999999;
+    margin-bottom: 24rpx;
+}

+ 16 - 11
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/web/web.js

@@ -5,23 +5,28 @@ Page({
 	 * 页面的初始数据
 	 */
 	data: {
-		url:''
+		url: ''
 	},
 
 	/**
 	 * 生命周期函数--监听页面加载
 	 */
 	onLoad(options) {
-    if (options.se && options.se != '') {
-      // 有se就是地图搜索
-      this.setData({
-        url:options.url + '?se=' + options.se
-      })
-    } else {
-      this.setData({
-        url:options.url
-      })
-    }
+		if (options.se && options.se != '') {
+			// 有se就是地图搜索
+			this.setData({
+				url: options.url + '?se=' + options.se
+			})
+		} else if (options.wxUrl && options.wxUrl != '') {
+			// 代表是微信文章 需要转义
+			this.setData({
+				url: decodeURIComponent(options.wxUrl)
+			})
+		} else {
+			this.setData({
+				url: options.url
+			})
+		}
 	},
 
 	/**