home.vue 16 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534
<template>
	<view class="page">
		<view class="bg">
			<image src="/static/bg.jpg"></image>
		</view>
		<pyh-nv ref="nv" :config="nvConfig"></pyh-nv>
		<view class="listBox" :style="{'padding-top':(pageTop+'px')}">
			<view class="content">
				<view class="banner">
					<swiper class="screen-swiper" indicator-dots="true" circular="true" autoplay="true" interval="5000"
						duration="500">
						<swiper-item v-for="(item,index) in swiperList" :key="index">
							<image :src="item.url" mode="aspectFill"></image>
						</swiper-item>
					</swiper>
				</view>

				<view class="menu-nav">
					<view class="nav">
						<view class="list" @click="tzyl">
							<view>
								<image src="/static/new/1.png" mode="heightFix"></image>
							</view>
							<view class="text">养老</view>
						</view>
						<view class="list" @click="minor">
							<view>
								<image src="/static/new/2.png" mode="heightFix"></image>
							</view>
							<view class="text">未成年</view>
						</view>
						<view class="list" @click="map">
							<view>
								<image src="/static/new/3.png" mode="heightFix"></image>
							</view>
							<view class="text">地名</view>
						</view>
						<view class="list" @click="funeral">
							<view>
								<image src="/static/new/4.png" mode="heightFix"></image>
							</view>
							<view class="text">殡葬</view>
						</view>
						<!-- <view class="list" @click="toponym">
							<view><image src="/static/new/image 1.png" mode="heightFix"></image></view>
							<view class="text">地名申报</view>
						</view>
						<view class="list" @click="lmpsb">
							<view><image src="/static/new/image 2.png" mode="heightFix"></image></view>
							<view class="text">地名查询</view>
						</view>
						<view class="list" @click="gopath('/pages/policy/policy')">
							<view><image src="/static/new/image 3.png" mode="heightFix"></image></view>
							<view class="text">政策文件</view>
						</view>
						<view class="list" @click="journalism">
							<view><image src="/static/new/image 4.png" mode="heightFix"></image></view>
							<view class="text">新闻资讯</view>
						</view> -->
					</view>
				</view>
			</view>
			<view class="xw" style="">
				<view class="title">
					<view class="box1">
						<image src="../../static/new/矩形 331.png" mode=""></image>
						<span>养老服务</span>
					</view>
				</view>
				<view class="content" style="padding-bottom: 0;">
					<view class="box_item"
						@click="goyl('http://icare.rsxmzj.91xxt.com:81/admin/resources/wsShop/html/index/oIndex_index.html')">
						<view style="margin-bottom: 20rpx;">
							<image src="../../static/yl/image-2.png" style="height: 100rpx;" mode="heightFix"></image>
						</view>
						<view class="text">服务预约</view>
					</view>
					<view class="box_item"
						@click="goyl('http://icare.rsxmzj.91xxt.com:81/admin/resources/H5_YLZS/html/login.html')">
						<view style="margin-bottom: 20rpx;">
							<image src="../../static/yl/image.png" style="height: 100rpx;" mode="heightFix"></image>
						</view>
						<view class="text">高龄津贴认证</view>
					</view>
					<view class="box_item"
						@click="goyl('http://show.rsxmzj.91xxt.com:81/2020/orgMap/html/map/list.html')">
						<view style="margin-bottom: 20rpx;">
							<image src="../../static/yl/image-4.png" style="height: 100rpx;" mode="heightFix"></image>
						</view>
						<view class="text">关爱地图</view>
					</view>

					<view class="box_item"
						@click="goyl('http://icare.rsxmzj.91xxt.com:81/admin/mobile/meal_aid_copy/html/login.html')">
						<view style="margin-bottom: 20rpx;">
							<image src="../../static/yl/image-5.png" style="height: 100rpx;" mode="heightFix"></image>
						</view>
						<view class="text">养老助餐</view>
					</view>
				</view>
				<view class="content" style="padding-top: 0;">
					<view class="box_item"
						@click="goyl('http://cwservice.rsxmzj.91xxt.com:81/icare-admin/resources/cwbt/html/login.html')">
						<view style="margin-bottom: 20rpx;">
							<image src="../../static/yl/image-3.png" style="height: 100rpx;" mode="heightFix"></image>
						</view>
						<view class="text">床位补贴机构资质申请</view>
					</view>
				</view>
			</view>
			<view class="xw" style="">
				<view class="title">
					<view class="box1">
						<image src="../../static/new/矩形 331.png" mode=""></image>
						<span>未成年服务</span>
					</view>
				</view>
				<view class="content">
					<view class="box_item" @click="minor">
						<view style="margin-bottom: 20rpx;">
							<image src="/static/new/2.png" style="height: 100rpx;" mode="heightFix"></image>
						</view>
						<view class="text">个案登记</view>
					</view>
					<view class="box_item" @click="whisper">
						<view style="margin-bottom: 20rpx;">
							<image src="/static/new/whisper.png" style="height: 100rpx;" mode="heightFix"></image>
						</view>
						<view class="text">悄悄话</view>
					</view>
					<!-- 		<view class="box_item" @click="gopath('/pages/activitylist/activitylist?activeType=未成年')">
						<view style="margin-bottom: 20rpx;">
							<image src="/static/new/image 4.png" style="height: 100rpx;" mode="heightFix"></image>
						</view>
						<view class="text">未成年活动</view>
					</view> -->
				</view>
			</view>

			<view class="xw" style="padding-top: 20rpx;padding-left: 20rpx;">
				<view class="title">
					<view class="box1">
						<image src="../../static/new/矩形 331.png" mode=""></image>
						<span>区划地名服务</span>
					</view>
				</view>
				<view class="content" style="margin-bottom:40rpx;">
					<view class="box_item" @click="gopath('/pages/declaration/newDeclaration')">
						<view style="margin-bottom: 20rpx;">
							<image src="/static/ly/image6.png" style="width: 60%;height: 90rpx;" mode=""></image>
						</view>
						<view class="text">地名申报</view>
					</view>
					<view class="box_item" @click="lmpsb">
						<view style="margin-bottom: 20rpx;">
							<image src="/static/new/image 2.png" style="width: 60%;height: 90rpx;" mode=""></image>
						</view>
						<view class="text">地名查询</view>
					</view>
					<view class="box_item" @click="gopath('/pages/mapdoorplate/mapdoorplate')">
						<view style="margin-bottom: 20rpx;">
							<image src="/static/ly/image8.png" style="width: 60%;height: 90rpx;" mode=""></image>
						</view>
						<view class="text">地名标志备案</view>
					</view>


					<view class="box_item" @click="gopath('/pages/declaration/declaration?type=3')">
						<view style="margin-bottom: 20rpx;">
							<image src="/static/ly/image5.png" style="width: 60%;height: 90rpx;" mode=""></image>
						</view>
						<view class="text">建筑物名称备案</view>
					</view>

				</view>
				<view class="content" style="margin-top: -70rpx;z-index: 10000;padding: 0 20rpx;">
					<view class="box_item" @click="gopath('/pages/declaration/declaration?type=5')">
						<view style="margin-bottom: 20rpx;">
							<image src="/static/ly/image11.png" style="width: 60%;height: 90rpx;" mode=""></image>
						</view>
						<view class="text">门楼牌备案</view>
					</view>
					<!-- 			<view class="box_item" @click="gopath('/pages/maptask/maptask')">
						<view style="margin-bottom: 20rpx;">
							<image src="/static/new/image 1.png" style="width: 60%;height: 90rpx;" mode=""></image>
						</view>
						<view class="text">巡检任务</view>
					</view> -->
					<view class="box_item" @click="gopath('/pages/policy/policy')">
						<view style="margin-bottom: 20rpx;">
							<image src="/static/new/image 3.png" style="width: 60%;height: 90rpx;" mode=""></image>
						</view>
						<view class="text">政策文件</view>
					</view>

				</view>
			</view>


			<!-- 服务 -->
			<view class="xw" style="padding-top: 20rpx;padding-left: 20rpx;">
				<view class="title">
					<view class="box1">
						<image src="../../static/new/矩形 331.png" mode=""></image>
						<span>殡葬服务</span>
					</view>
				</view>
				<view class="content">
					<view class="box_item" @click="funeralculture">
						<view>
							<image src="/static/nav/nav_ico5.png" style="width: 90%;" mode="widthFix"></image>
						</view>
						<view class="text">线上报丧</view>
					</view>
					<view class="box_item" @click="funerallaw">
						<view>
							<image src="/static/nav/nav_ico6.png" style="width: 90%;" mode="widthFix"></image>
						</view>
						<view class="text">线上预约</view>
					</view>
					<view class="box_item" @click="funeralguide">
						<view>
							<image src="/static/nav/nav_ico9.png" style="width: 90%;" mode="widthFix"></image>
						</view>
						<view class="text">办事指南</view>
					</view>
					<view class="box_item" @click="funeralproblem">
						<view>
							<image src="/static/nav/nav_ico10.png" style="width: 90%;" mode="widthFix"></image>
						</view>
						<view class="text">常见问题</view>
					</view>
				</view>
			</view>
			<view class="xw" style="padding-top: 20rpx;padding-left: 20rpx;padding-bottom: 20rpx;">
				<view class="title">
					<view class="box1">
						<image src="../../static/new/矩形 331.png" mode=""></image>
						<span>最新活动</span>
					</view>
					<view @click="gopath('/pages/activitylist/activitylist')" style="margin-right: 20rpx;font-size: 26rpx;display: flex;align-items: center;">
						查看更多
						<u-icon name="arrow-right"></u-icon>
					</view>
				</view>
				<view v-if="list.length>0">
					<view class="content1"  @click="gopath('/pages/activity/activity?id='+item.id)" v-for="(item,index) in list" :key="index">
						<view class="box_item">
							<view class="box_left">
								<span class="f1">{{item.activityName}}</span>
								<span
									class="f2">{{item.eventStartDate?item.eventStartDate:'-'}}{{item.eventEndDate?'至'+item.eventEndDate:'-'}}</span>
							</view>
							<view class="box_right" v-if="item.activeImage">
								<view class="images">
									<image :src="BASE_URL + item.activeImage[0]"
										style="width: 100%;height: 100%;border-radius: 20rpx;" mode="aspectFill">
									</image>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view v-else style="width: 100%;text-align: center;margin-top: 100rpx;font-size: 30rpx;">
					暂无数据
				</view>
				<!-- 					<view class="content" >
						<view class="box_item" @click="gopath('/pages/activitylist/activitylist')">
							<view style="margin-bottom: 20rpx;">
								<image src="/static/new/image 4.png" style="width: 60%;height: 90rpx;" mode=""></image>
							</view>
							<view class="text">活动</view>
						</view>
					</view> -->
			</view>
			<view style="height: 50rpx;"></view>
		</view>
	</view>

</template>

<script>
	import md5 from "../../common/md5.js";
	import BASE_URL from "@/common/config.js"
	export default {
		data() {
			return {
				from:{
					activeStatus:'展示',
					activeType:''
				},
				BASE_URL,
				list: [],
				nvConfig: {
					title: "数字民政服务平台",
					bgColor: "#ffffff",
					color: "#000000",
					fixedAssist: {
						hide: true,
					},
					transparent: {
						initColor: "#000",
					},
					back: {
						hide: true
					},
				},
				swiperList: [{
						id: 0,
						type: 'image',
						url: '/static/img/1.jpg'
					},
					{
						id: 1,
						type: 'image',
						url: '/static/img/1.jpg'
					},
				],
			}
		},
		onPageScroll(e) {
			this.$refs.nv.pageScroll(e)
		},
		computed: {
			pageTop() {
				return parseInt(88 * uni.getSystemInfoSync().windowWidth / 750) + uni.getSystemInfoSync().statusBarHeight
			}
		},
		onLoad() {
			uni.hideTabBar();
			this.getlist()
		},
		methods: {
			getlist() {
				this.API.getactivityInfoSheet(this.from).then(res => {
					console.log(res);
					for (let i = 0; i < res.rows.length; i++) {
						if (res.rows[i].activeImage) {
							res.rows[i].activeImage = res.rows[i].activeImage.split(',')
						}

					}
					this.list = res.rows

				})
			},
			goyl(e) {
				console.log(e)
				uni.navigateTo({
					url: '/pages/webviewyl/webviewyl?url=' + e
				})
			},
			// 
			funeralculture() {
				uni.setStorageSync('dh', 1)
				uni.navigateTo({
					url: '/pages/funeralreport/funeralreport'
				})
			},
			funerallaw() {
				uni.navigateTo({
					url: '/pages/funeralreservation/funeralreservation'
				})
			},
			funeralguide() {
				uni.navigateTo({
					url: '/pages/funeralguide/funeralguide'
				})
			},
			funeralproblem() {
				uni.navigateTo({
					url: '/pages/funeralproblem/funeralproblem'
				})
			},
			// 
			gopath(e) {
				uni.navigateTo({
					url: e
				})
			},
			// 
			gopath(e) {
				uni.navigateTo({
					url: e
				})
			},
			toponym() {
				uni.navigateTo({
					url: "/pages/declaration/newDeclaration"
				})
			},
			tzyl() {
				// window.location.href = `http://show.rsxmzj.91xxt.com:81/2023/renshou/index.html?p=${t}&t=${time}&sign=${encryptedstr}`
				uni.navigateTo({
					url: "/pages/webview/webview"
				})
			},
			lmpsb() {
				uni.navigateTo({
					// url:'/pages/mapdoorplate/mapdoorplate'
					url: '/pages/map1/map'
					// url: '/pages/receiptRegistration/receiptRegistration'
				})
			},
			minor() {
				uni.navigateTo({
					url: '/pages/receiptRegistration/receiptRegistration'
				})
			},
			whisper() {
				uni.navigateTo({
					url: '/pages/whisper/index'
				})
			},
			journalism() {
				uni.navigateTo({
					url: '/pages/journalism/journalism'
				})
			},
			// 获取用户信息
			hquserinfo() {
				var info = {
					userId: uni.getStorageSync("USERS_KEY").userId,
				}
				this.API.hquserinfo(info).then(res => {
					console.log("获取用户信息", res);
					this.user.nickName = res.data.nickName;
					this.user.avatar = res.data.avatar
					this.user.deptId = res.data.deptId
					console.log("信息", this.user);
				})
			},
			funeral() {
				var info = {
					userId: uni.getStorageSync("USERS_KEY").userId,
				}
				this.API.hquserinfo(info).then(res => {
					console.log("获取用户信息", res);
					console.log("信息1", res.data.roles[0].roleName, uni.getStorageSync('userjs'));
					if (res.data.roles[0].roleName != uni.getStorageSync('userjs')) {
						uni.reLaunch({
							url: '/pages/login/login'
						});
						return
					}
					if (uni.getStorageSync('userjs') == null || uni.getStorageSync('userjs') == undefined) {
						uni.reLaunch({
							url: '/pages/login/login'
						});
						return
					}

					if (uni.getStorageSync('userjs') != '普通用户') {
						uni.switchTab({
							url: '/pages/my/my'
						})
					} else {
						uni.switchTab({
							url: '/pages/funeral/funeral'
						})
					}
				})

			},
			map() {
				uni.navigateTo({
					url: '/pages/declaration/list'
				})
				// uni.navigateTo({
				// 	url: '/pages/map/map'
				// })
			},
			map1() {
				uni.navigateTo({
					url: '/pages/map1/map'
				})
			},
			xwtz() {
				uni.navigateTo({
					url: "/pages/xw/xw"
				})
			}
		}
	};
</script>
<style scoped lang="scss">
	@import 'home.scss';

	.content1 {
		padding: 20rpx;
		border: 2rpx solid #eee;
		border-radius: 36rpx;
		margin-top: 20rpx;

		.box_item {
			background-color: #fff;
			display: flex;
			padding: 20rpx;
			border-radius: 20rpx;
			// height: 200rpx;

			.box_left {
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				width: 100%;
				// margin-right: 2%;

				.f1 {
					font-size: 30rpx;
					font-weight: 600;
					display: block;
					margin-bottom: 20rpx;
				}

				.f2 {
					color: #ababab;
				}
			}

			.box_right {
				width: 40%;

				.images {
					// background-color: #ababab;
					height: 160rpx;
					width: 100%;
					// background-image: url("http://antis14.sherkxuan.cn/assets/images/a1.png");
					// background-size: 100% 100%;
				}
			}
		}
	}
</style>