| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <template>
- <view class="assets">
- <view class="header">
- <view class="img"><image :src="userInfo.avatar" mode=""></image></view>
- {{ userInfo.nickname }}
- </view>
- <view class="numerical">
- <view class="value">
- <text>8555</text><br>
- 贡献值
- </view>
- <view class="l"></view>
- <view class="value">
- <text>788</text><br>
- 诚信值
- </view>
- </view>
- <view class="main">
- <view class="btn" @click="nav('/pages/money/wallet')">
- <image src="../../static/icon/index1.png"></image>
- <text>{{userInfo.brokerage_price * 1}}</text>
- 佣金
- </view>
- <view class="btn" @click="nav('/pages/money/award')">
- <image src="../../static/icon/index2.png"></image>
- <text>{{ candy||0 }}</text>
- 糖果
- </view>
- <view class="btn" @click="nav('/pages/money/integralShopping')">
- <image src="../../static/icon/index3.png"></image>
- <text>{{ userInfo.now_money*1 }}</text>
- 货款
- </view>
- <view class="btn" @click="nav('/pages/money/mallPoints')">
- <image src="../../static/icon/index4.png"></image>
- <text>2000</text>
- 商城积分
- </view>
- <view class="btn" @click="nav('/pages/money/integralP')">
- <image src="../../static/icon/index5.png"></image>
- <text>{{ jf||0 }}</text>
- 拼团积分
- </view>
- <view class="btn" @click="nav('/pages/money/frozen')">
- <image src="../../static/icon/index6.png"></image>
- <text>2000</text>
- 拼团冻结积分
- </view>
- <view class="btn" @click="nav('/pages/money/publicWelfare')">
- <image src="../../static/icon/index7.png"></image>
- <text>2000</text>
- 公益积分
- </view>
-
- </view>
- </view>
- </template>
- <script>
- import { wallet } from '@/api/finance.js';
- export default {
- mounted() {
- console.log(this.userInfo)
- },
- data() {
- return {
- candy: '',
- jf: ''
- }
- },
- mounted() {
- this.getWallet()
- },
- methods: {
- getWallet() {
- wallet({}).then(({ data }) => {
- console.log(data)
- const obj = this
- const arr = Object.keys(data.back);
- console.log(arr);
- let ar = [];
- arr.forEach(e => {
- console.log(e,'11111')
- if(e == 'LALA'){
- obj.candy = (data.back[e].money.money*1).toFixed(0)
- }
- if(e == 'USDC'){
- obj.jf = (data.back[e].money.money*1)
- }
- ar.push(data.back[e]);
- });
- });
- },
- nav(url) {
- uni.navigateTo({
- url: url,
- fail() {
- uni.switchTab({
- url: url
- });
- }
- });
- },
- },
- computed: {
- userInfo() {
- return this.$store.state.user.userInfo
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .assets {
- .header {
- height: 480rpx;
- background: linear-gradient(180deg, #32C6FF 0%, #2E58FF 100%);
- color: #fff;
- font-size: 35rpx;
- text-align: center;
- font-family: PingFang-SC-Medium;
- padding-top: 140rpx;
- .img {
- margin-bottom: 10rpx;
- image {
- border-radius: 50%;
- width: 150rpx;
- height: 150rpx;
- border: solid 6rpx #fff;
- }
- }
- }
- .numerical {
- box-shadow: 0 5rpx 10rpx 1rpx #e6e6e6;
- margin: 30rpx;
- color: #666666;
- display: flex;
- text-align: center;
- background-color: #fff;
- padding: 30rpx;
- border-radius: 20rpx;
- position: relative;
- top: -120rpx;
- .l {
- background-color: #F8F8F8;
- width: 5rpx;
- height: 70rpx;
- margin: auto 0;
- }
- .value {
- flex: 1;
- }
- text {
- font-size: 40rpx;
- color: #333333;
- }
- }
- .main {
- position: relative;
- top: -140rpx;
- display: flex;
- flex-wrap: wrap;
- text-align: center;
- margin: 20rpx;
- .btn {
- padding: 40rpx;
- box-shadow: 0 5rpx 10rpx 1rpx #e6e6e6;
- border-radius: 20rpx;
- width: calc(50% - 20rpx);
- height: 240rpx;
- background-color: #fff;
- margin: 10rpx;
- display: grid;
- align-content: space-around;
- color: #666666;
- font-family: PingFang-SC-Medium;
- image {
- margin: 10rpx auto;
- width: 80rpx;
- height: 80rpx;
- }
- text {
- color: #333333;
- font-size: 35rpx;
- }
- }
- }
- }
- </style>
|