index.vue 2.9 KB
<template>
	<u-popup :show="show" :safeAreaInsetBottom="false" bgColor="transparent" mode="center">
		<view class="HonorWall">
			<view class="HonorWall-i">
				<u-icon name="close-circle"  @click="close" size="30" color="#fff"></u-icon>
			</view>
			<view class="HonorWall-c">
				<image class="HonorWall-c-bg" src="@/static/imagesV2/icon13.png" mode="widthFix"></image>
				<view class="HonorWall-c-c">
					<view class="HonorWall-c-c-t">
						<view class="HonorWall-c-c-t-c">荣誉勋章</view>
					</view>
					<view class="HonorWall-c-c-b">
						<view class="HonorWall-c-c-b-i" v-for="(item, index) in dataList" :key="index">
							<image class="HonorWall-c-c-b-i-i"v-if="item.is_light" src="@/static/imagesV2/icon15s.png" mode="widthFix"></image>
							<image class="HonorWall-c-c-b-i-i"v-else src="@/static/imagesV2/icon15.png" mode="widthFix"></image>
							<view class="HonorWall-c-c-b-i-t">{{ item.name }}</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</u-popup>
</template>

<script>
	export default {
		name: 'HonorWall',
		props: {
			dataList: {
				type: Array,
				default: () => []
			}
		},
		data() {
			return {
				show: false
			}
		},
		methods: {
			close() {
				debugger
				this.show = false
			},
			open() {
				this.show = true
			}
		}
	}
</script>

<style lang="scss" scoped>
	.HonorWall{
		.HonorWall-i{
			display: flex;
			justify-content: flex-end;
			margin-bottom: 20rpx;
		}
		.HonorWall-c{
			position: relative;
			height: 760rpx;
			width: 650rpx;
			.HonorWall-c-bg{
				height: 100%;
				width: 100%;
			}
			.HonorWall-c-c{
				position: absolute;
				top: 0;
				left: 0;
				padding: 50rpx;
				width: 100%;
				box-sizing: border-box;
				.HonorWall-c-c-t{
					font-size: 34rpx;
					color: #555D71;
					display: flex;
					justify-content: center;
					.HonorWall-c-c-t-c{
						position: relative;
						padding: 0 17rpx;
						&:before{
							content: '';
							background-image: url(@/static/imagesV2/icon14.png);
							background-size: 100% 100%;
							position: absolute;
							left: 0;
							top: 50%;
							height: 36rpx;
							width: 36rpx;
							transform: translateY(-50%) translateX(-100%);
						}
						&:after{
							content: '';
							background-image: url(@/static/imagesV2/icon14s.png);
							background-size: 100% 100%;
							position: absolute;
							right: 0;
							top: 50%;
							height: 36rpx;
							width: 36rpx;
							transform: translateY(-50%) translateX(100%);
						}
					}
				}
				.HonorWall-c-c-b{
					display: grid;
					grid-template-columns: repeat(4, auto);
					justify-content: space-between;
					margin-top: 20rpx;
					grid-row-gap: 40rpx;
					grid-column-gap: 40rpx;
					.HonorWall-c-c-b-i{
						text-align: center;
						.HonorWall-c-c-b-i-i{
							height: 90rpx;
							width: 90rpx;
						}
						.HonorWall-c-c-b-i-t{
							font-size: 24rpx;
							color: #555D71;
						}
					}
				}
			}
		}
	}
</style>