123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285 |
- <!-- 装修用户组件:用户资产 -->
- <template>
- <view>
- <view class="progress-box" @tap="state.showProtocol = true">
- <view class="progress-container">
- <view class="progress-bar" :style="{ width: progressWidth }">
- </view>
- <view class="progress-text">
- {{userWallet.socialStatusLevel || $t('common.no_level')}}
- </view>
- </view>
- </view>
- <!-- <view class="ss-wallet-menu-wrap ss-flex ss-col-center">
- <view class="menu-item ss-flex-1 ss-flex-col ss-col-center">
- <view class="value-box ">
- <view class="value-text ">看点</view>
- </view>
- <view class="menu-title ss-m-t-15">*888</view>
- <view class="menu-title ss-m-t-15">看广告做任务得收益</view>
- </view>
- <view class="menu-item ss-flex-1 ss-flex-col ss-col-center"
- @tap="sheep.$router.go('/pages/user/wallet/score')">
- <view class="value-box ">
- <view class="value-text">佣金</view>
- </view>
- <view class="menu-title ss-m-t-15">#{{ userInfo.point || 0 }}</view>
- <view class="menu-title ss-m-t-15">=数字人民币:7263</view>
- 注释 <view class="menu-title ss-m-t-15">=NFR(数字资产):87263</view>
- <view class="menu-mini-title ss-m-t-15">[按32小时市场均值实时换算]</view>
- </view>
- <view class="menu-item ss-flex-1 ss-flex-col ss-col-center"
- @tap="sheep.$router.go('/pages/user/wallet/team')">
- <view class="value-box ">
- <view class="value-text">团队</view>
- </view>
- <view class="menu-title ss-m-t-15">88人</view>
- <view class="menu-title ss-m-t-15">直推人今日贡献#92</view>
- <view class="menu-title ss-m-t-15">直推人总贡献值#7692</view>
- </view>
- <view class="menu-item ss-flex-col ss-col-center menu-wallet">
- <view class="value-box ">
- <view class="value-text">NFR</view>
- </view>
- <view class="menu-title ss-m-t-15">8734枚</view>
- <view class="menu-title ss-m-t-15">历史转换数量</view>
- <view class="menu-title ss-m-t-15">点击跳转查看行情</view>
- </view>
- </view> -->
-
- <view class="ss-wallet-menu-wrap ss-flex ss-col-center">
- <view class="menu-item ss-flex-1 ss-flex-col ss-col-center ss-row-center"
- @tap="sheep.$router.go('/pages/user/wallet/score')">
- <view class="value-box ">
- <view class="value-text">{{$t('wallet.wallet')}}</view>
- </view>
- <view class="menu-title ss-m-t-15 text-center">{{$t('wallet.commission')}}:{{ points2point(userWallet.integralDO.currentQuota) }}</view>
- <view class="menu-title ss-m-t-15 text-center">{{$t('wallet.consumption_points')}}:{{ points2point(userWallet.integralDO.consumptionPoints) }}</view>
- <!-- <view class="menu-title ss-m-t-15">待确权:{{ points2point(userWallet.integralDO.freezeQuota) }}</view> -->
- </view>
- <view class="menu-item ss-flex-1 ss-flex-col ss-col-center ss-row-center"
- @tap="sheep.$router.go('/pages/user/wallet/team')">
- <view class="value-box ">
- <view class="value-text">{{$t('wallet.team')}}</view>
- </view>
- <view class="menu-title ss-m-t-15">{{ userWallet.descNo +" "+ $t('wallet.people') }}</view>
- </view>
- </view>
-
- <!-- 佣金确权 -->
- <su-popup :show="state.showProtocol" 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)">
- {{$t('wallet.generation_rules')}}
- </view>
- <view :class="state.navIndex==1?'activite':''" class="ss-m-l-20" @click="checkIndex(1)">
- {{$t('wallet.benefits')}}
- </view>
- </view>
- <scroll-view class="scroll-view_H" scroll-y="true">
- <Richtext title="身价产生规则" v-if="state.navIndex==0" type='tab' />
- <Richtext title="身价权益" v-if="state.navIndex==1" type='tab' />
- </scroll-view>
- </su-popup>
- </view>
- </template>
- <script setup>
- /**
- * 装修组件 - 订单菜单组
- */
- import {
- computed,
- reactive
- } from 'vue';
- import sheep from '@/sheep';
- import {
- fen2yuan,
- points2point
- } from '../../hooks/useGoods';
- import Richtext from '@/pages/public/richtext.vue'
- const state = reactive({
- showProtocol: false,
- navIndex: 0
- })
- const userWallet = computed(() => sheep.$store('user').userWallet);
- const userInfo = computed(() => sheep.$store('user').userInfo);
- const numData = computed(() => sheep.$store('user').numData);
- const progressWidth = computed(() => {
- if (!userWallet.value.socialStatusPoint && !userWallet.value.socialStatusPoint){
- return "0%"
- }
- const progress = ((userWallet.value.socialStatusPoint / (userWallet.value.socialStatusPoint +
- userWallet.value.socialUpNeed)) * 100) + "%"
- // console.log(progress)
- return progress
- })
- // 查看协议
- function onProtocol(title) {
- sheep.$router.go('/pages/public/richtext', {
- title,
- });
- }
- const close = () => {
- state.showProtocol = false
- }
- function checkIndex(index) {
- state.navIndex = index;
- }
- </script>
- <style lang="scss" scoped>
- .head-nav {
- margin: 20rpx auto;
- display: flex;
- align-items: center;
- color: #CCCCCC;
- }
- .activite {
- box-sizing: border-box;
- color: var(--ui-BG-Main);
- border-bottom: 4rpx solid var(--ui-BG-Main);
- }
- .head-nav>view {
- padding-bottom: 10rpx;
- }
- .content {
- /* background: #008000; */
- height: 100%;
- }
- .scroll-view_H {
- width: 600rpx;
- height: 700rpx;
- padding: 20rpx;
- }
- .progress-box {
- padding: 40rpx 40rpx 0;
- }
- /* 进度条容器 */
- .progress-container {
- width: 100%;
- /* 全宽 */
- height: 40rpx;
- /* 高度 */
- background-color: #e0e0e0;
- /* 背景色 */
- border-radius: 20rpx;
- /* 圆角 */
- position: relative;
- /* 相对定位,用于文本定位 */
- }
- /* 进度条 */
- .progress-bar {
- height: 100%;
- background: var(--ui-BG-Main);
- /* 渐变色 */
- border-radius: 20rpx;
- /* 圆角 */
- position: relative;
- /* 相对定位,用于文本定位 */
- display: flex;
- /* 开启 Flex 布局 */
- align-items: center;
- /* 垂直居中 */
- justify-content: center;
- /* 水平居中 */
- }
- /* 进度文本 */
- .progress-text {
- color: white;
- font-size: 16px;
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- }
- .ss-wallet-menu-wrap {
- flex-wrap: wrap;
- height: auto;
- padding: 40rpx;
- .menu-wallet {
- width: 144rpx;
- }
- // .menu-item:nth-child(1),
- // .menu-item:nth-child(2) {
- // border-bottom: 4rpx solid #f6f6f6;
- // }
- .menu-item:nth-child(odd) {
- border-right: 4rpx solid #f6f6f6;
- }
- .menu-item {
- height: 300rpx;
- flex: 0 0 50%;
- /* flex-grow: 0, flex-shrink: 0, flex-basis: 50% */
- box-sizing: border-box;
- padding: 20rpx;
- /* 确保 padding 和 border 不会使元素宽度超过 50% */
- /* 可选,为了视觉效果 */
- .menu-title {
- font-size: 32rpx;
- line-height: 32rpx;
- color: #333333;
- }
- /* 可选,为了视觉效果 */
- .menu-mini-title {
- font-size: 20rpx;
- line-height: 20rpx;
- color: #333333;
- }
- .item-icon {
- width: 44rpx;
- height: 44rpx;
- }
- .value-box {
- width: 120rpx;
- height: 120rpx;
- // line-height: 100rpx;
- text-align: center;
- border-radius: 50%;
- border: 2px solid #f6f6f6;
- display:flex;
- align-items: center;
- justify-content: center;
- .value-text {
- font-size: 28rpx;
- color: #000000;
- // line-height: 100rpx;
- vertical-align: text-bottom;
- font-family: OPPOSANS;
- }
- .unit-text {
- font-size: 24rpx;
- color: #343434;
- line-height: 24rpx;
- }
- }
- }
- }
- </style>
|