<template>
	<view class="integral">
		<view class="nav">
			<image src="/static/icon/integralbg.png" style="width: 100%; height: 100%;"></image>
			<view class="PointsColumn">
				<image src="/static/icon/integralicon.png"></image>
				<text>1000</text>
			</view>
			<view class="titletext">
				<view class="textitem" @click="gointegralRecord">
					<image src="/static/icon/integralrecord.png"></image>
					<text>积分记录</text>
				</view>
				<view class="textitem">
					<image src="/static/icon/lament.png"></image>
					<text>我的兑换</text>
				</view>
				<view class="textitem" @click="gointegralRule">
					<image src="/static/icon/integralrule.png"></image>
					<text>积分规则</text>
				</view>
			</view>
		</view>
		
		<view class="shopList">
			<view class="listTop">
				<text>积分兑换</text>
			</view>
			<view class="ListContent">
				<view class="contentItem" v-for="item in 4">
					<image src="/static/icon/Kudosbg.png"></image>
					<view class="itemName">中秋佳节五仁月饼，惊喜特供，限时抢购</view>
					<view class="itemPrice">6000积分</view>
				</view>
			</view>
			
			<uni-load-more :status="status" color="#CCCCCC" :content-text="contentText"/>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				status: 'noMore',
				contentText: {
					contentdown: '查看更多',
					contentrefresh: '加载中',
					contentnomore: '——  已经到底啦  ——'
				},
			}
		},
		methods:{
			// 跳转积分规则
			gointegralRule(){
				uni.navigateTo({
					url:'/pages/my/integral/integralRule'
				})
			},
			// 跳转积分记录
			gointegralRecord(){
				uni.navigateTo({
					url:'/pages/my/integral/integralRecord'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	$pageColor:#F9F9F9;
	$bgColor:#FFFFFF;
	// flex布局居中对齐
	@mixin flexlayout {
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.integral{
		height: 100%;
		background:$pageColor ;
	}
	.nav{
		width: 750rpx;
		height: 238rpx;
		position: relative;
		.PointsColumn{
			position: absolute;
			width: 690rpx;
			height: 74rpx;
			background: #FFFFFF;
			border-radius: $bgColor;
			left:30rpx;
			top:32rpx;
			display: flex;
			align-items: center;
			image{
				margin-left: 30rpx;
				width: 46rpx;
				height: 46rpx;
			}
			text{
				margin-left: 16rpx;
				font-size: 48rpx;
				font-family: DINAlternate-Bold, DINAlternate;
				font-weight: bold;
				color: #333333;
			}
		}
		.titletext{
			position: absolute;
			bottom:40rpx;
			left: 30rpx;
			width: 690rpx;
			height: 74rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			.textitem{
				display: flex;
				align-items: center;
				image{
					width: 44rpx;
					height: 44rpx;
				}
				text{
					margin-left: 8rpx;
					font-size: 30rpx;
					font-family: PingFang-SC-Bold, PingFang-SC;
					font-weight: bold;
					color: $bgColor;
				}
			}
		}
	}
	.shopList{
		margin-top: 24rpx;
		width: 750rpx;
		background: $bgColor;
		border-radius: 16rpx 16rpx 0px 0px;
		padding: 0 30rpx;
		box-sizing: border-box;
		padding-top: 32rpx;
		.listTop{
			@include flexlayout;
			margin-bottom: 40rpx;
			text{
				font-size: 36rpx;
				font-family: PingFang-SC-Bold, PingFang-SC;
				font-weight: bold;
				color: #333333;
			}
		}
		.ListContent{
			display: flex;
			flex-wrap: wrap;
			box-sizing: border-box;
			.contentItem:nth-child(2n+1){
				width: 332rpx;
				height: 578rpx;
				margin-right: 26rpx;
				background: $bgColor;
				box-sizing: border-box;
				box-shadow: 0px 4rpx 8rpx 0px rgba(0,0,0,0.04);
				border-radius: 12rpx;
				margin-bottom: 24rpx;
				image{
					width: 332rpx;
					height: 400rpx;
				}
				.itemName{
					margin:0 18rpx 20rpx 22rpx ;
					font-size: 28rpx;
					font-family: PingFang-SC-Bold, PingFang-SC;
					font-weight: bold;
					color: #333333;
				}
				.itemPrice{
					margin-left: 22rpx;
					font-size: 28rpx;
					font-family: PingFang-SC-Bold, PingFang-SC;
					font-weight: bold;
					color: #FF6200;
				}
			}
			.contentItem:nth-child(2n){
				width: 332rpx;
				height: 510rpx;
				box-sizing: border-box;
				background: $bgColor;
				box-shadow: 0px 4rpx 8rpx 0px rgba(0,0,0,0.04);
				border-radius: 12rpx;
				image{
					width: 332rpx;
					height: 332rpx;
				}
				.itemName{
					margin:0 18rpx 20rpx 22rpx ;
					font-size: 28rpx;
					font-family: PingFang-SC-Bold, PingFang-SC;
					font-weight: bold;
					color: #333333;
				}
				.itemPrice{
					margin-left: 22rpx;
					font-size: 28rpx;
					font-family: PingFang-SC-Bold, PingFang-SC;
					font-weight: bold;
					color: #FF6200;
				}
			}
			
		}
	}
</style>