| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360 | 
							- <!-- 我的积分 -->
 
- <template>
 
- 	<s-layout class="wallet-wrap" :bgStyle="{'backgroundColor':'#ffffff'}" title="我的积分" navbar="normal">
 
- 		<view class="score-box bg-white ss-flex-col ss-row-center ss-col-center">
 
- 			<view class="ss-m-b-10  circle value-box ss-flex ss-row-center" :style="circleStyle">
 
- 				<view>积分</view>
 
- 			</view>
 
- 			<view class="ss-m-b-30 ss-font-40" :style="{color:percentageColor}">
 
- 				<text class="all-title ss-m-r-8">{{ points2point(userWallet.integralDO.currentQuota) }}</text>
 
- 			</view>
 
- 			<view class="ss-m-b-40 ss-flex">
 
- 				<view class="all-title ss-m-r-8">
 
- 					<button class="btn ss-reset-button"
 
- 						@tap="sheep.$router.go('/pages/goods/list', { categoryId: 98 })">
 
- 						兑换
 
- 					</button>
 
- 				</view>
 
- 				<view class="all-title ss-m-r-8" >
 
- 					<button class="btn ss-reset-button"
 
- 						@tap="sheep.$router.go('/pages/user/wallet/withdraw')">
 
- 						提现
 
- 					</button>
 
- 				</view>
 
- 			</view>
 
- 			<!-- 分割线 -->
 
- 			<view style="width: 100%;height: 20rpx;background-color: #ececec;"></view>
 
- 			<uni-list :border="false" class="ss-p-t-10 ss-w-100">
 
- 				<uni-list-item clickable @tap="sheep.$router.go('/pages/user/wallet/maxScoreLog')" title="当前可获得峰值"
 
- 					showArrow :border="false">
 
- 					<template v-slot:body>
 
- 						<p style="width: 100%">
 
- 							当前可获得峰值:{{ points2point(userWallet.integralDO.accumulatedQuota + userWallet.integralDO.ancestorQuota) }}/{{ points2point(userWallet.integralDO.highQuotaTotal) }}
 
- 						</p>
 
- 					</template>
 
- 				</uni-list-item>
 
- 				<uni-list-item clickable @tap="sheep.$router.go('/pages/user/wallet/ScoreLog', {isFreeze: true})"
 
- 					title="待确权" showArrow :border="false">
 
- 					<template v-slot:body>
 
- 						<p style="width: 100%">待确权:{{points2point(userWallet.integralDO.freezeQuota)}}</p>
 
- 					</template>
 
- 				</uni-list-item>
 
- 				<uni-list-item clickable @tap="sheep.$router.go('/pages/user/wallet/ScoreLog',{isFreeze: false})"
 
- 					title="积分来源记录" showArrow :border="false">
 
- 					<template v-slot:body>
 
- 						<p style="width: 100%">积分来源记录</p>
 
- 					</template>
 
- 				</uni-list-item>
 
- 				<uni-list-item clickable @tap="sheep.$router.go('/pages/user/wallet/withdrawalLog')"
 
- 					title="提现记录" showArrow :border="false">
 
- 					<template v-slot:body>
 
- 						<p style="width: 100%">提现记录 (预计24小时左右到账)</p>
 
- 					</template>
 
- 				</uni-list-item>
 
- 				<uni-list-item clickable @tap="state.showModel = true" title="积分计算规则" :border="false">
 
- 					<template v-slot:body>
 
- 						<p style="width: 100%">积分计算规则</p>
 
- 					</template>
 
- 				</uni-list-item>
 
- 			</uni-list>
 
- 		</view>
 
- 		<!-- 积分计算规则 -->
 
- 		<su-popup :show="state.showModel" type="center" round="10" :isMaskClick="false" showClose @close="close">
 
- 			<view class="head-nav">
 
- 				<view :class="state.navIndex==0?'activite':''" class="ss-m-l-20" @click="checkIndex(0)">
 
- 					积分计算规则
 
- 				</view>
 
- 			</view>
 
- 			<scroll-view class="scroll-view_H" scroll-y="true">
 
- 				<richtext title="积分计算规则" type='tab' />
 
- 			</scroll-view>
 
- 		</su-popup>
 
- 	</s-layout>
 
- </template>
 
- <script setup>
 
- 	import sheep from '@/sheep';
 
- 	import {
 
- 		onLoad,
 
- 		onReachBottom
 
- 	} from '@dcloudio/uni-app';
 
- 	import {
 
- 		computed,
 
- 		reactive
 
- 	} from 'vue';
 
- 	import {
 
- 		points2point
 
- 	} from '@/sheep/hooks/useGoods';
 
- 	import _ from 'lodash';
 
- 	import dayjs from 'dayjs';
 
- 	import PointApi from '@/sheep/api/member/point';
 
- 	import {
 
- 		resetPagination
 
- 	} from '@/sheep/util';
 
- 	import ScoreApi from '@/sheep/api/distri/score';
 
- 	import ScoreLog from './ScoreLog'
 
- 	import richtext from '@/pages/public/richtext'
 
- 	const userWallet = computed(() => sheep.$store('user').userWallet);
 
- 	const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
 
- 	const userInfo = computed(() => sheep.$store('user').userInfo);
 
- 	const sys_navBar = sheep.$platform.navbar;
 
- 	const state = reactive({
 
- 		currentTab: 0,
 
- 		pagination: {
 
- 			list: [],
 
- 			total: 0,
 
- 			pageSize: 10,
 
- 			pageNo: 1,
 
- 		},
 
- 		loadStatus: '',
 
- 		showModel: false,
 
- 	});
 
- 	function close() {
 
- 		state.showModel = false;
 
- 	}
 
- 	const pointsPercentage = computed(() => {
 
- 		const currentQuota = parseFloat(points2point(userWallet.value.integralDO.accumulatedQuota + userWallet
 
- 			.value.integralDO.ancestorQuota));
 
- 		const highQuotaTotal = parseFloat(points2point(userWallet.value.integralDO.highQuotaTotal));
 
- 		const percentage = (currentQuota / highQuotaTotal) * 100;
 
- 		return Math.min(percentage, 100); // 确保百分比不会超过100
 
- 	});
 
- 	const percentageColor = computed(() => {
 
- 		if (pointsPercentage.value >= 90) {
 
- 			return '#fe0000';
 
- 		} else if (pointsPercentage.value >= 75) {
 
- 			return '#d8b800';
 
- 		} else {
 
- 			return '#0c912f';
 
- 		}
 
- 	});
 
- 	const circleStyle = computed(() => {
 
- 		return {
 
- 			// background: `conic-gradient(${percentageColor.value} ${pointsPercentage.value}%, #ddd ${pointsPercentage.value}%)`
 
- 			background: percentageColor.value
 
- 		};
 
- 	});
 
- 	onLoad((options) => {
 
- 		uni.$on('createWithDrawComplete', sheep.$store('user').getWallet);
 
- 	});
 
- </script>
 
- <style lang="scss" scoped>
 
- 	.circle {
 
- 		position: relative;
 
- 		width: 100px;
 
- 		height: 100px;
 
- 		border-radius: 50%;
 
- 	}
 
- 	.circle::before {
 
- 		content: '';
 
- 		position: absolute;
 
- 		top: 10px;
 
- 		left: 10px;
 
- 		right: 10px;
 
- 		bottom: 10px;
 
- 		border-radius: 50%;
 
- 		background-color: #fff;
 
- 	}
 
- 	.circle view {
 
- 		position: absolute;
 
- 		top: 50%;
 
- 		left: 50%;
 
- 		transform: translate(-50%, -50%);
 
- 		font-size: 14px;
 
- 		font-weight: bold;
 
- 	}
 
- 	.scroll-view_H {
 
- 		width: 600rpx;
 
- 		height: 700rpx;
 
- 		padding: 20rpx;
 
- 	}
 
- 	.head-nav {
 
- 		margin: 20rpx auto;
 
- 		display: flex;
 
- 		align-items: center;
 
- 		box-sizing: border-box;
 
- 		color: var(--ui-BG-Main);
 
- 	}
 
- 	.head-nav>view {
 
- 		padding-bottom: 10rpx;
 
- 		border-bottom: 4rpx solid var(--ui-BG-Main);
 
- 	}
 
- 	.uni-list-item {
 
- 		margin: 0 20rpx;
 
- 		padding: 10rpx 0;
 
- 		border-bottom: 1px solid #d8d8d9;
 
- 	}
 
- 	.color-red {
 
- 		color: red;
 
- 	}
 
- 	.color-green {
 
- 		color: green;
 
- 	}
 
- 	.score-box {
 
- 		border-radius: 20rpx;
 
- 		padding-top: 100rpx;
 
- 	}
 
- 	.avatar-box {
 
- 		width: 100rpx;
 
- 		height: 100rpx;
 
- 		border-radius: 50%;
 
- 		overflow: hidden;
 
- 		.avatar-img {
 
- 			width: 100%;
 
- 			height: 100%;
 
- 		}
 
- 	}
 
- 	.value-box {
 
- 		width: 150rpx;
 
- 		height: 150rpx;
 
- 		text-align: center;
 
- 		border-radius: 50%;
 
- 		font-weight: bold;
 
- 	}
 
- 	.btn {
 
- 		width: 250rpx;
 
- 		background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
 
- 		border-radius: 20rpx;
 
- 		font-size: 30rpx;
 
- 		font-weight: 500;
 
- 		line-height: 80rpx;
 
- 		color: $white;
 
- 		position: relative;
 
- 		z-index: 1;
 
- 	}
 
- 	.header-box {
 
- 		width: 100%;
 
- 		background: linear-gradient(180deg, var(--ui-BG-Main) 0%, var(--ui-BG-Main-gradient) 100%) no-repeat;
 
- 		background-size: 750rpx 100%;
 
- 		padding: 0 0 120rpx 0;
 
- 		box-sizing: border-box;
 
- 		.score-box {
 
- 			height: 100%;
 
- 			.all-num {
 
- 				font-size: 50rpx;
 
- 				font-weight: bold;
 
- 				color: #fff;
 
- 				font-family: OPPOSANS;
 
- 			}
 
- 			.all-title {
 
- 				font-size: 26rpx;
 
- 				font-weight: 500;
 
- 				color: #fff;
 
- 			}
 
- 			.cicon-help-o {
 
- 				color: #fff;
 
- 				font-size: 28rpx;
 
- 			}
 
- 		}
 
- 	}
 
- 	// 筛选
 
- 	.filter-box {
 
- 		height: 114rpx;
 
- 		background-color: $bg-page;
 
- 		.total-box {
 
- 			font-size: 24rpx;
 
- 			font-weight: 500;
 
- 			color: $dark-9;
 
- 		}
 
- 		.date-btn {
 
- 			background-color: $white;
 
- 			line-height: 54rpx;
 
- 			border-radius: 27rpx;
 
- 			padding: 0 20rpx;
 
- 			font-size: 24rpx;
 
- 			font-weight: 500;
 
- 			color: $dark-6;
 
- 			.ss-seldate-icon {
 
- 				font-size: 50rpx;
 
- 				color: $dark-9;
 
- 			}
 
- 		}
 
- 	}
 
- 	.model-box {
 
- 		height: 50vh;
 
- 	}
 
- 	.list-box {
 
- 		width: 500rpx;
 
- 		padding: 0 30rpx;
 
- 		overflow-y: auto;
 
- 		.list-item {
 
- 			background: #fff;
 
- 			// border-bottom: 1rpx solid #dfdfdf;
 
- 			padding: 30rpx;
 
- 			.name {
 
- 				font-size: 28rpx;
 
- 				font-weight: 500;
 
- 				color: rgba(102, 102, 102, 1);
 
- 				line-height: 28rpx;
 
- 				// margin-bottom: 20rpx;
 
- 			}
 
- 			.time {
 
- 				font-size: 24rpx;
 
- 				font-weight: 500;
 
- 				color: rgba(196, 196, 196, 1);
 
- 				line-height: 24px;
 
- 			}
 
- 			.add {
 
- 				font-size: 30rpx;
 
- 				font-weight: 500;
 
- 				color: #e6b873;
 
- 			}
 
- 			.minus {
 
- 				font-size: 30rpx;
 
- 				font-weight: 500;
 
- 				color: $dark-3;
 
- 			}
 
- 		}
 
- 	}
 
- </style>
 
 
  |