Explorar el Código

南岸小程序公众号展示

zwq hace 2 años
padre
commit
87f1bddb2d

+ 57 - 25
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/index/index.js

@@ -189,6 +189,8 @@ Page({
 		],
 		// 媒体矩阵导航
 		mediaCurrentTab: 0,
+		// 公众号弹窗
+		ewmShowDialog: false,
 		// 媒体矩阵导航列表
 		provList: [{
 				"name": "南岸发布"
@@ -204,97 +206,116 @@ Page({
 		mediaSelectList: [{
 				id: '1',
 				name: "重庆市南岸区人民政府",
-				img: imgUrl + 'index-media-icon1.png'
+				img: imgUrl + 'index-media-icon1.png',
+				ewm: "index_ewm_logo_1.png"
 			},
 			{
 				id: '2',
 				name: "南岸文旅",
-				img: imgUrl + 'index-media-icon2.png'
+				img: imgUrl + 'index-media-icon2.png',
+				ewm: "index_ewm_logo_2.png"
 			},
 			{
 				id: '3',
 				name: "南岸发布",
-				img: imgUrl + 'index-media-icon3.png'
+				img: imgUrl + 'index-media-icon3.png',
+				ewm: "index_ewm_logo_3.jpg",
 			},
 			{
 				id: '4',
 				name: "南岸国资",
-				img: imgUrl + 'index-media-icon4.png'
+				img: imgUrl + 'index-media-icon4.png',
+				ewm: "index_ewm_logo_4.png"
 			},
 			{
 				id: '5',
 				name: "重庆南岸消防",
-				img: imgUrl + 'index-media-icon5.png'
+				img: imgUrl + 'index-media-icon5.png',
+				ewm: "index_ewm_logo_5.png"
 			},
 			{
 				id: '6',
 				name: "南岸生态环境",
-				img: imgUrl + 'index-media-icon6.png'
+				img: imgUrl + 'index-media-icon6.png',
+				ewm: "index_ewm_logo_6.png"
 			},
 			{
 				id: '7',
 				name: "南岸健康卫士",
-				img: imgUrl + 'index-media-icon7.png'
+				img: imgUrl + 'index-media-icon7.png',
+				ewm: "index_ewm_logo_7.png"
 			},
 			{
 				id: '8',
 				name: "南岸公安",
-				img: imgUrl + 'index-media-icon8.png'
+				img: imgUrl + 'index-media-icon8.png',
+				ewm: "index_ewm_logo_8.png"
 			},
 			{
 				id: '9',
 				name: "遇见南坪",
-				img: imgUrl + 'index-media-icon9.png'
+				img: imgUrl + 'index-media-icon9.png',
+				ewm: "index_ewm_logo_9.png"
 			},
 			{
 				id: '10',
 				name: "书香南岸",
-				img: imgUrl + 'index-media-icon10.png'
+				img: imgUrl + 'index-media-icon10.png',
+				ewm: "index_ewm_logo_10.png"
 			},
 			{
 				id: '11',
 				name: "南岸卫生健康监督",
-				img: imgUrl + 'index-media-icon11.png'
+				img: imgUrl + 'index-media-icon11.png',
+				ewm: "index_ewm_logo_11.jpg"
 			},
 			{
 				id: '12',
 				name: "南岸司法",
-				img: imgUrl + 'index-media-icon12.png'
+				img: imgUrl + 'index-media-icon12.png',
+				ewm: "index_ewm_logo_12.png"
 			},
 			{
 				id: '13',
 				name: "广阳岛绿色发展公司",
-				img: imgUrl + 'index-media-icon13.png'
+				img: imgUrl + 'index-media-icon13.png',
+				ewm: "index_ewm_logo_13.jpg"
 			},
 			{
 				id: '14',
 				name: "南岸人力社保",
-				img: imgUrl + 'index-media-icon14.png'
+				img: imgUrl + 'index-media-icon14.png',
+				ewm: "index_ewm_logo_14.png"
 			},
 			{
 				id: '15',
 				name: "广阳湾智创生态城",
-				img: imgUrl + 'index-media-icon15.png'
+				img: imgUrl + 'index-media-icon15.png',
+				ewm: "index_ewm_logo_15.jpg"
 			},
 			{
 				id: '16',
 				name: "南岸智慧城管",
-				img: imgUrl + 'index-media-icon16.png'
+				img: imgUrl + 'index-media-icon16.png',
+				ewm: "index_ewm_logo_16.png"
 			},
 			{
 				id: '17',
 				name: "重庆市南岸区天文街道",
-				img: imgUrl + 'index-media-icon17.png'
+				img: imgUrl + 'index-media-icon17.png',
+				ewm: "index_ewm_logo_17.png"
 			},
 			{
 				id: '18',
 				name: "南岸健康",
-				img: imgUrl + 'index-media-icon18.png'
+				img: imgUrl + 'index-media-icon18.png',
+				ewm: "index_ewm_logo_18.jpg"
 			},
 			{
 				id: '19',
 				name: "重庆市南岸区南坪街道",
-				img: imgUrl + 'index-media-icon19.png'
+				img: imgUrl + 'index-media-icon19.png',
+				ewm: "index_ewm_logo_19.png"
 			}
 		],
 		// 媒体矩阵南岸发布
@@ -310,11 +331,11 @@ Page({
 			})
 		}
 		this.setData({
-				naItem: 0
-			}),
-			this.setData({
-				naItemTab: 1
-			})
+				naItem: 0,
+				naItemTab: 1,
+				ewmShowDialog: false
+		})
+
 	},
 	// 点击服务
 	clickService1(e) {
@@ -1041,6 +1062,17 @@ Page({
 			url: '/pages/web/web?url=' + "http://www.cqna.com.cn/na_Class/node_24150.html",
 		})
 	},
-	
+	showLogoDialog(e) {
+		this.setData({
+			ewmName: e.target.dataset.name,
+			ewmUrl: e.target.dataset.ewm,
+			ewmShowDialog: true
+		})
+	},
+	closeDialog() {
+		this.setData({
+			ewmShowDialog: false
+		})
+	}
 
 })

+ 13 - 2
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/index/index.wxml

@@ -384,6 +384,17 @@
 			</view>
 		</view>
 		<!-- 政民互动 -->
+		<!-- 弹窗 -->
+		<view bindtap="closeDialog" class="mask" catchtouchmove="preventTouchMove" wx:if="{{ewmShowDialog}}"></view>
+  	<view class="ewm-dialog" wx:if="{{ewmShowDialog}}">
+			<view>
+				<image show-menu-by-longpress="{{true}}" style="width: 370rpx;height:370rpx" src="{{imgUrl + ewmUrl}}"></image>
+			</view>
+			<view style="color: #000000;font-size: 38rpx;font-weight: 600;padding-top: 10rpx;">长按图片关注我们</view>
+			<view style="color: #000000;font-size: 38rpx;padding-top: 10rpx;">{{ewmName}}</view>
+    	<!-- <image src="{{imgUrl}}close.png" bindtap="closeItem" class="close"></image> -->
+  	</view>
+  <!-- 弹窗结尾 -->
 		<!-- 媒体矩阵 -->
 		<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%;">
@@ -438,10 +449,10 @@
 									<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">
+											<view bindtap="showLogoDialog" data-name="{{item.name}}" data-ewm="{{item.ewm}}" 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 bindtap="showLogoDialog" data-name="{{item.name}}" data-ewm="{{item.ewm}}" style="display: flex;align-items:center;justify-content:center">{{item.name}}</view>
 										</view>
 									</view>
 								</swiper-item>

+ 45 - 1
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/index/index.wxss

@@ -482,4 +482,48 @@ scroll-view ::-webkit-scrollbar {
 	font-weight: 400;
 	color: #999999;
 	margin-bottom: 20rpx;
-}
+}
+
+/* 弹窗 */
+.mask {
+	width: 100%;
+	height: 100%;
+	position: fixed;
+	top: 0;
+	left: 0;
+	background: #000;
+	z-index: 9000;
+	opacity: 0.7;
+}
+
+.ewm-dialog {
+	top: 600rpx;
+	width: 580rpx;
+	height: 580rpx;
+	background-color: #fff;
+	position: fixed;
+	z-index: 9999;
+	margin: -50rpx 85rpx;
+	border-radius: 10rpx;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+	/* border-radius: 0 20rpx 0 20rpx; */
+	-webkit-animation-name: fadeIn; /*动画名称*/
+	-webkit-animation-duration: 1s; /*动画持续时间*/
+	-webkit-animation-iteration-count: 1; /*动画次数*/
+	-webkit-animation-delay: 0s; /*延迟时间*/
+}
+
+@-webkit-keyframes fadeIn {
+	0% {
+	opacity: 0; /*初始状态 透明度为0*/
+	}
+	50% {
+	opacity: 0; /*中间状态 透明度为0*/
+	}
+	100% {
+	opacity: 1; /*结尾状态 透明度为1*/
+	}
+	}