<template>
	<view class="content">
		<view class="header">
			<view class="header-top">
				<view class="header-top-left">
					<image src="../../static/index/dangqian1.png" mode=""></image>
					<span class="header-text" style="margin-right: 5px;">
						当前周期 
					</span>
					<span class="header-text">2024.01.01~2024.01.10</span>
				</view>
				<view class="header-top-btn" @click="wangqi">往期积分</view>
			</view>
			<view class="header-bottom">
				<view class="header-bottom-money">7310<text style="font-size: 23rpx;font-weight: 400;">分</text> </view>
				<view class="header-text">当前积分</view>
			</view>
		</view>
		<view class="mina">
			<!--业绩积分-->
			<view class="mina-view">
				<view class="view-title">
					<view class="view-title-left">
						<span class="view-title-left-shuxian"></span>
						<span class="view-title-left-text">业绩积分:<text class="view-num">596</text>(项目金额累计积分，兑换比例为1:1)</span>
					</view>
					<view class="view-title-right" @click="jieshi">更多</view>
				</view>
				<view class="mian-list" @click="wangqi">
					<view class="mian-list-top">
						<view class="mian-list-top-biao">已完成</view>
						<view class="mian-list-top-time">
							<span>预约时间: </span>
							<span>2024-01-02 14:00</span>
						</view>
					</view>
					<view class="mian-foot">
						<view class="mian-foot-img">
							<image src="../../my/static/bg6.png" mode=""></image>
						</view>
						<view class="mian-foot-list">
							<view class="mian-foot-view">
								<view class="mian-title">中医推拿(测试)</view>
								<view class="mian-dingwei">
									<image src="../../static/index/dangqian2.png" mode=""></image>
									<span class="shouyi-text">0.8km</span>
								</view>
							</view>
							<view class="mian-foot-dan shouyi-text">
								订单编号 : 202310311231559420
							</view>
							<view class="mian-foot-adder shouyi-text">
								服务地址 : 吉林省长春市二道区欧亚万豪购物中心16-301
							</view>
							<view class="mian-bottom">
								<view class="mian-bottom-xiang shouyi-text">项目金额 : ￥298</view>
								<view class="mian-bottom-shou">
									<span class="shouyi-text">本单收益:  </span>
									<span class="shouyi-text" style="color: #FF6000;font-weight: bold;">￥326.70</span>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view class="mian-list">
					<view class="mian-list-top">
						<view class="mian-list-top-biao">已完成</view>
						<view class="mian-list-top-time">
							<span>预约时间: </span>
							<span>2024-01-02 14:00</span>
						</view>
					</view>
					<view class="mian-foot">
						<view class="mian-foot-img">
							<image src="../../my/static/bg6.png" mode=""></image>
						</view>
						<view class="mian-foot-list">
							<view class="mian-foot-view">
								<view class="mian-title">中医推拿(测试)</view>
								<view class="mian-dingwei">
									<image src="../../static/index/dangqian2.png" mode=""></image>
									<span class="shouyi-text">0.8km</span>
								</view>
							</view>
							<view class="mian-foot-dan shouyi-text">
								订单编号 : 202310311231559420
							</view>
							<view class="mian-foot-adder shouyi-text">
								服务地址 : 吉林省长春市二道区欧亚万豪购物中心16-301
							</view>
							<view class="mian-bottom">
								<view class="mian-bottom-xiang shouyi-text">项目金额 : ￥298</view>
								<view class="mian-bottom-shou">
									<span class="shouyi-text">本单收益:  </span>
									<span class="shouyi-text" style="color: #FF6000;font-weight: bold;">￥326.70</span>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!--时长积分-->
			<view class="mina-view">
				<view class="view-title">
					<view class="view-title-left">
						<span class="view-title-left-shuxian"></span>
						<span class="view-title-left-text">时长积分: <text class="view-num">36</text>(在线时长10分钟可获取1积分)</span>
					</view>
					<view class="view-title-right" @click.stop="toggle('时长积分')">更多</view>
				</view>
				<view class="mian-table">
					<view class="table-view">
						<span style="font-size: 22rpx;">序号</span>
						<span>01</span>
						<span>02</span>
						<span>03</span>
					</view>
					<view class="table-view">
						<span style="font-size: 22rpx;">上线时间</span>
						<span>2024.01.01 10:00</span>
						<span>2024.01.01 10:00</span>
						<span>2024.01.01 10:00</span>
					</view>
					<view class="table-view">
						<span style="font-size: 22rpx;">下线时间</span>
						<span>2024.01.01 10:00</span>
						<span>2024.01.01 10:00</span>
						<span>2024.01.01 10:00</span>
					</view>
					<view class="table-view">
						<span style="font-size: 22rpx;">获取积分</span>
						<span style="color: #029D88;">12</span>
						<span style="color: #029D88;">12</span>
						<span style="color: #029D88;">12</span>
					</view>
				</view>
			</view>
			<!--充值积分-->
			<view class="mina-view">
				<view class="view-title">
					<view class="view-title-left">
						<span class="view-title-left-shuxian"></span>
						<span class="view-title-left-text">充值积分: <text class="view-num">2000</text>(充值积分比例为1:1)</span>
					</view>
					<view class="view-title-right" @click.stop="toggle('充值积分')">更多</view>
				</view>
				<view class="mian-list">
					<view class="mian-list-top">
						<view class="mian-list-top-biao">已完成</view>
						<view class="mian-list-top-time">
							<span>预约时间: </span>
							<span>2024-01-02 14:00</span>
						</view>
					</view>
					<view class="mian-foot">
						<view class="mian-foot-img">
							<image src="../../my/static/bg6.png" mode=""></image>
						</view>
						<view class="mian-foot-list">
							<view class="mian-foot-view">
								<view class="mian-title">中医推拿(测试)</view>
								<view class="mian-dingwei">
									<image src="../../static/index/dangqian2.png" mode=""></image>
									<span class="shouyi-text">0.8km</span>
								</view>
							</view>
							<view class="mian-foot-dan shouyi-text">
								订单编号 : 202310311231559420
							</view>
							<view class="mian-foot-adder shouyi-text">
								服务地址 : 吉林省长春市二道区欧亚万豪购物中心16-301
							</view>
							<view class="mian-bottom">
								<view class="mian-bottom-xiang shouyi-text">项目金额 : ￥298</view>
								<view class="mian-bottom-shou">
									<span class="shouyi-text">本单收益:  </span>
									<span class="shouyi-text" style="color: #FF6000;font-weight: bold;">￥326.70</span>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view class="mian-list">
					<view class="mian-list-top">
						<view class="mian-list-top-biao">已完成</view>
						<view class="mian-list-top-time">
							<span>预约时间: </span>
							<span>2024-01-02 14:00</span>
						</view>
					</view>
					<view class="mian-foot">
						<view class="mian-foot-img">
							<image src="../../my/static/bg6.png" mode=""></image>
						</view>
						<view class="mian-foot-list">
							<view class="mian-foot-view">
								<view class="mian-title">中医推拿(测试)</view>
								<view class="mian-dingwei">
									<image src="../../static/index/dangqian2.png" mode=""></image>
									<span class="shouyi-text">0.8km</span>
								</view>
							</view>
							<view class="mian-foot-dan shouyi-text">
								订单编号 : 202310311231559420
							</view>
							<view class="mian-foot-adder shouyi-text">
								服务地址 : 吉林省长春市二道区欧亚万豪购物中心16-301
							</view>
							<view class="mian-bottom">
								<view class="mian-bottom-xiang shouyi-text">项目金额 : ￥298</view>
								<view class="mian-bottom-shou">
									<span class="shouyi-text">本单收益:  </span>
									<span class="shouyi-text" style="color: #FF6000;font-weight: bold;">￥326.70</span>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view>
			<!-- 普通弹窗 -->
			<uni-popup ref="popup" background-color="#fff" @change="change">
				<view class="popup-content">
					<view class="popup-head">
						<span>{{titleList}}</span>
						<span @click="closePopup(type)">x</span>
					</view>
					<view class="popup-mian">
						<view class="popup-mian-textarea">
							<view class="popup-mian-view">
								<span>原服务项目价格:</span>
								<span>￥198元</span>
							</view>
							<view class="popup-mian-view">
								<span>现服务项目价格:</span>
								<span>￥298元</span>
							</view>
							<view class="popup-mian-view">
								<span>改价需支付差价:</span>
								<span>￥100元</span>
							</view>
						</view>
						<view class="popup-mian-btn">
							<span @click="closePopup(type)">
								取消
							</span>
							<span>
								确定
							</span>
						</view>
					</view>
				</view>
			</uni-popup>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				type:'center',
				titleList:''
			}
		},
		methods:{
			jieshi(){
				uni.navigateTo({
					url:'/pages/index/currentPointsDetail'
				})
			},
			change(e) {
				console.log('当前模式：' + e.type + ',状态：' + e.show);
			},
			closePopup(type){//改价    关闭弹出框
				this.type = type
				this.$refs.popup.close(type);
			},
			toggle(type) {//改价 弹出框
				this.titleList=type
				// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
				this.$refs.popup.open(this.type)
			},
			wangqi(){//往期收益 跳页
				uni.navigateTo({
					url:'/pages/index/previousPoints'
				})
			},
		}
	}
</script>

<style scoped>
	.popup-mian-view span:nth-child(1){
		color: #666666;
	}
	.popup-mian-view span:nth-child(2){
		color: #333;
		font-weight: bold;
	}
	.popup-mian-view span{
		font-size: 29rpx;
	}
	.popup-mian-view{
		width: 100%;
		height: 35px;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		border-bottom: 1px solid #DCDCDC;
	}
	.popup-mian-textarea{
		width: 100%;
		display: flex;
		flex-direction: column;
	}
	.popup-mian-btn span:nth-child(1){
		background: linear-gradient(90deg, #FE912E, #FF9970);
	}
	.popup-mian-btn span:nth-child(2){
		background: linear-gradient(90deg, #019C88, #28BA92, #35C495);
	}
	.popup-mian-btn span{
		width: 247rpx;
		height: 77rpx;
		line-height: 77rpx;
		text-align: center;
		font-weight: 400;
		font-size: 32rpx;
		color: #FFFEFE;
		border-radius: 39rpx;
	}
	.popup-mian-btn{
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		margin-top: 10px;
	}
	
	.popup-mian{
		width: 88%;
		display: flex;
		flex-direction: column;
		margin: 5px auto 0px auto;
	}
	.popup-head span:nth-child(2){
		width: 50rpx;
		height: 50rpx;
		line-height: 19px;
		text-align: center;
		font-size: 24px;
		color: #15AB8D;
		border-radius: 50%;
		border: 3px solid #15AB8D;
	}
	.popup-head span:nth-child(1){
		font-weight: bold;
		font-size: 32rpx;
		color: #333333;
	}
	.popup-head{
		width: 100%;
		height: 99.38rpx;
		background-color: rgba(21, 171, 141, 0.09);
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 0 15px;
	}
	.popup-content{
		width: 613rpx;
		height: 479rpx;
		background: #FFFFFF;
		border-radius: 56rpx;
		display: flex;
		flex-direction: column;
	}
	.table-view span{
		font-weight: 400;
		font-size: 19rpx;
		color: #666666;
	}
	.table-view span:nth-child(1){
		font-weight: bold;
	}
	.table-view span{
		margin-bottom: 15px;
	}
	.table-view{
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	.mian-table{
		width: 100%;
		padding: 10px;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		background: #FFFFFF;
		border-radius: 24rpx;
		margin-bottom: 10px;
	}
	.view-num{
		color: #029D88 !important;
	}
	.mian-bottom{
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	.mian-foot-adder{
		margin: 2px 0px;
	}
	.mian-dingwei image{
		width: 18.75rpx;
		height:21.53rpx;
		margin-right: 5px;
	}
	.mian-dingwei,.mian-bottom-shou{
		display: flex;
		flex-direction: row;
		align-items: center;
	}
	.mian-title{
		font-weight: bold;
		font-size: 31rpx;
		color: #333333;
	}
	.mian-foot-view{
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 5px;
	}
	.mian-foot-list{
		width: 75%;
		display: flex;
		flex-direction: column;
	}
	.mian-foot-img image{
		width: 100%;
		height: 100%;
	}
	.mian-foot-img{
		width: 158rpx;
		height: 188rpx;
		background: #E6E6E6;
		border-radius: 14rpx;
	}
	
	.mian-foot{
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	.mian-list-top-time span{
		font-size:25rpx;
	}
	.mian-list-top-time span:nth-child(1){
		color: #7D7D7D;
	}
	.mian-list-top-time span:nth-child(2){
		color: #11957C;
	}
	.mian-list-top-time{
		display: flex;
		flex-direction: row;
		align-items: center;
	}
	.mian-list-top-biao{
		width: 130rpx;
		height: 47rpx;
		line-height: 47rpx;
		color: #fff;
		font-size: 25rpx;
		text-align: center;
		background: linear-gradient(90deg, #019C88, #28BA92, #35C495);
		border-top-left-radius: 21rpx;
		border-bottom-right-radius: 21rpx;
	}
	.mian-list-top{
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		padding-bottom: 10px;
		border-bottom: 1px solid #E5E5E5;
		margin-bottom: 10px;
	}
	.mian-list{
		width: 100%;
		padding: 10px;
		display: flex;
		flex-direction: column;
		background: #FFFFFF;
		border-radius: 24rpx;
		margin-bottom: 10px;
	}
	.view-title-right{
		font-weight: 400;
		font-size: 21rpx;
		color: #666666;
	}
	.view-title-left-text{
		font-weight: 400;
		font-size: 25rpx;
		color: #333333;
		margin-left: 5px;
	}
	.view-title-left-shuxian{
		width: 10rpx;
		height: 29rpx;
		background: #029D88;
		border-radius: 5rpx;
	}
	.view-title-left{
		display: flex;
		flex-direction: row;
		align-items: center;
		margin: 15px 0px;
	}
	.view-title{
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	.mina-view{
		width: 100%;
		display: flex;
		flex-direction: column;
	}
	.mina{
		width: 95%;
		display: flex;
		flex-direction: column;
	}
	.header-bottom-money{
		font-weight: bold;
		font-size: 49rpx;
		color: #FFFFFF;
	}
	.header-top-btn{
		width: 174rpx;
		height: 49rpx;
		line-height: 49rpx;
		text-align: center;
		font-size: 21rpx;
		color: #333333;
		background: #FFFFFF;
		border-radius: 24rpx;
	}
	.header-text{
		font-weight: 400;
		font-size: 22rpx;
		color: #FFFFFF;
	}
	.header-top-left image{
		width: 24.31rpx;
		height:22.92rpx;
		margin-right: 2px;
		margin-top: 3px;
	}
	.header-top-left{
		display: flex;
		flex-direction: row;
		align-items: center;
	}
	.header-top{
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		margin-bottom: 10px;
	}
	.header{
		width: 100%;
		height: 300rpx;
		padding: 15px;
		background-image: url('../../static/index/fun_banner4.png');
		background-repeat: no-repeat;
		background-size: 100% 100%;
		display: flex;
		flex-direction: column;
		justify-content: space-around;
	}
	.content{
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		height: 100vh;
		background-color: #f7f7f7;
		overflow: scroll;
	}
</style>