123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314 |
- <template>
- <view>
- <hua-page-head :pageTitle="pageTitle" color="#fff"></hua-page-head>
- <view class="container">
- <view class="user-info d-flex justify-content-between align-items-center">
- <view class="info d-flex align-items-center">
- <view class="avatar">
- <image :src="userInfo.avatar" mode=""></image>
- </view>
- <view class="cont">
- <view class="name">{{ userInfo.nickname }}</view>
- <view class="up">上级分销商:无</view>
- </view>
- </view>
- <view class="level">{{ data.level_name }}</view>
- </view>
- <view class="account bg-white radius10">
- <view class="top d-flex justify-content-between align-items-center">
- <view class="item">
- <view class="txt">抵用券余额</view>
- <view class="num">{{ data.energy }}</view>
- </view>
- <view class="item">
- <view class="txt">今日抵用券余额</view>
- <view class="num">{{ data.todayenergy }}</view>
- </view>
- <view class="item">
- <view class="txt">邀请有效账号</view>
- <view class="num">{{ data.ztui }}</view>
- </view>
- </view>
- <view class="wrap">
- <view class="acc-data d-flex justify-content-between flex-wrap">
- <view class="item">
- <view class="txt">累计推荐商家(奖励抵用券)</view>
- <view class="num">{{ data.tshopenergy }}</view>
- </view>
- <view class="item">
- <view class="txt">累计推荐用户(奖励抵用券)</view>
- <view class="num">{{ data.tuserenergy }}</view>
- </view>
- <view class="item">
- <view class="txt">月度收益抵用券</view>
- <view class="num">{{ data.menergy }}</view>
- </view>
- <view class="item">
- <view class="txt">总收益抵用券</view>
- <view class="num">{{ data.totalenergy }}</view>
- </view>
- </view>
- <router-link to="/pages/user/energy-transfer"><button class="btn">转让抵用券</button></router-link>
- <router-link to="/bundle/pages/user_fans/user_fans"><button class="btn">我的团队</button></router-link>
- </view>
- </view>
- <view class="user-code d-flex justify-content-between align-items-center bg-white radius10">
- <view class="title">
- 我的邀请码
- <text class="tip">点击复制即可</text>
- </view>
- <view class="code" @tap.stop="onCopy">{{ inviteCode }}</view>
- </view>
- <view class="menu bg-white radius10">
- <router-link to="/pages/user/energy-detials">
- <view class="item d-flex justify-content-between align-items-center">
- <view class="title">抵用券明细</view>
- <text class="iconfont"></text>
- </view>
- </router-link>
- <view class="item d-flex justify-content-between align-items-center">
- <view class="title">推广商家</view>
- <text class="num">{{ data.tshop }}家</text>
- </view>
- <view class="item d-flex justify-content-between align-items-center">
- <view class="title">推广用户</view>
- <text class="num">{{ data.tuser }}人</text>
- </view>
- <view class="item d-flex justify-content-between align-items-center">
- <view class="title">奖励规则</view>
- <text class="iconfont"></text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- apiEnergy
- } from '@/api/shop.js';
- import {
- mapGetters,
- mapActions
- } from 'vuex';
- import {
- copy
- } from '@/utils/tools';
- export default {
- data() {
- return {
- pageTitle: '宝藏密码',
- data: {}
- };
- },
- onShow() {
- this.getEnergy();
- },
- methods: {
- ...mapActions(['getUser']),
- onCopy(e) {
- copy(this.userInfo.sn);
- },
- goBack() {
- uni.navigateBack({
- delta: 1
- });
- },
- async getEnergy() {
- const {
- data,
- code
- } = await apiEnergy();
- if (code == 1) {
- console.log(data);
- this.data = data;
- }
- }
- },
- computed: {
- ...mapGetters(['userInfo', 'inviteCode'])
- }
- };
- </script>
- <style lang="scss">
- page {
- background: #f3f4f6 url('https://shop.xianghuaqi.net.cn/images/treasureBg.png') no-repeat;
- background-size: 100%;
- }
- .container {
- padding: 0 24rpx;
- box-sizing: border-box;
- }
- .page-head {
- height: 80rpx;
- line-height: 80rpx;
- position: relative;
- color: #fff;
- .iconfont {
- position: absolute;
- left: 24rpx;
- top: 50%;
- transform: translateY(-50%) rotateY(180deg);
- }
- .title {
- font-weight: bold;
- }
- }
- .user-info {
- margin: 32rpx auto;
- .info {
- color: #fff;
- .avatar {
- image {
- width: 120rpx;
- height: 120rpx;
- border-radius: 50%;
- }
- margin-right: 20rpx;
- }
- .cont {
- line-height: 40rpx;
- }
- }
- .level {
- background: linear-gradient(151deg, #ffe9d1 0%, #ffd2a7 100%);
- border-radius: 14px;
- font-size: 24rpx;
- color: #f73e33;
- width: 160rpx;
- height: 56rpx;
- text-align: center;
- line-height: 56rpx;
- }
- }
- .account {
- margin: 32rpx auto;
- .top {
- background: linear-gradient(158deg, #fef6e1 0%, #f5e4be 100%);
- border-radius: 10px 10px 0px 0px;
- height: 186rpx;
- .item {
- text-align: center;
- flex-basis: 100%;
- .txt {
- font-size: 20rpx;
- color: #b18044;
- }
- .num {
- margin-top: 12rpx;
- font-weight: 600;
- font-size: 32rpx;
- color: #823308;
- }
- }
- }
- .wrap {
- padding: 40rpx;
- box-sizing: border-box;
- .item {
- width: 50%;
- border-bottom: 1px solid #f3f4f6;
- border-right: 1px solid #f3f4f6;
- padding: 40rpx 0;
- .txt {
- color: #616161;
- font-size: 20rpx;
- }
- .num {
- font-size: 32rpx;
- color: #040404;
- font-weight: 600;
- margin-top: 12rpx;
- }
- &:nth-child(3),
- &:nth-child(4) {
- border-bottom: none;
- }
- &:nth-child(2n) {
- padding-left: 20rpx;
- border-right: none;
- }
- }
- .btn {
- background: linear-gradient(142deg, #f16d60 0%, #f8352b 100%);
- border-radius: 25px;
- color: #fff;
- margin-top: 30rpx;
- }
- }
- }
- .user-code {
- height: 100rpx;
- padding: 0 24rpx;
- .title {
- font-size: 28rpx;
- color: #363636;
- .tip {
- color: #aaaaaa;
- font-size: 24rpx;
- margin-left: 20rpx;
- }
- }
- .code {
- padding: 10rpx 20rpx;
- background-color: #f3f4f6;
- border-radius: 30rpx;
- font-size: 28rpx;
- font-weight: 600;
- }
- }
- .menu {
- margin: 24rpx auto;
- padding: 0 24rpx;
- box-sizing: border-box;
- .item {
- padding: 30rpx 0;
- box-sizing: border-box;
- border-bottom: 1px solid #f3f4f6;
- .title {
- color: #040404;
- font-size: 28rpx;
- font-weight: 600;
- }
- .num {
- color: #040404;
- font-weight: 600;
- }
- }
- }
- </style>
|