zyejMAll-mobile/pages/commission/components/commission-info.vue

145 lines
3.0 KiB
Vue
Raw Permalink Normal View History

2024-08-07 10:31:42 +08:00
<!-- 分销商信息 -->
<template>
2024-10-16 18:09:51 +08:00
<!-- 用户资料 -->
<view class="user-card ss-flex ss-col-bottom">
<view class="card-top ss-flex ss-row-between">
<view class="ss-flex">
<view class="head-img-box">
<image class="head-img" :src="sheep.$url.cdn(userInfo.avatar)" mode="aspectFill"></image>
</view>
<view class="ss-flex-col">
<view class="user-name" style="color:white;">{{ userInfo.nickname }}</view>
</view>
</view>
</view>
<!-- 账户信息 -->
2024-11-04 11:13:41 +08:00
<account-info />
2024-10-16 18:09:51 +08:00
</view>
2024-11-04 11:13:41 +08:00
2024-08-07 10:31:42 +08:00
</template>
<script setup>
2024-10-16 18:09:51 +08:00
import accountInfo from './account-info.vue';
import sheep from '@/sheep';
import BrokerageApi from '@/sheep/api/trade/brokerage';
import {
computed,
reactive,
onBeforeMount
} from 'vue';
import {
fen2yuan
} from '@/sheep/hooks/useGoods';
const userInfo = computed(() => sheep.$store('user').userInfo);
const headerBg = sheep.$url.css('/static/img/shop/commission/background.png');
2024-08-07 10:31:42 +08:00
2024-10-16 18:09:51 +08:00
const state = reactive({
showMoney: false,
});
async function getAgentInfo() {
const { code, data } = await BrokerageApi.getBrokerageUserSummary();
if (code !== 0) {
return;
}
state.summary = data;
}
onBeforeMount(async() => {
getAgentInfo();
// 概要数据
let { data } = await BrokerageApi.getBrokerageUserSummary();
state.arr = data;
});
2024-08-07 10:31:42 +08:00
</script>
<style lang="scss" scoped>
2024-10-16 18:09:51 +08:00
2024-11-04 11:13:41 +08:00
2024-10-16 18:09:51 +08:00
// 用户资料卡片
.user-card {
width: 100%;
height: 580rpx;
// margin: -88rpx 20rpx 0 20rpx;
2024-11-04 11:13:41 +08:00
background: url('https://zysc.fjptzykj.com:3000/shangcheng/ae736076156e99710f417fe5619cd0be47a2fad082a192dbbd6dcbc2bbc65eea.png') no-repeat;
2024-10-21 17:47:58 +08:00
// background: url('https://zysc.fjptzykj.com:3000/shangcheng/4bcaa2803c9cc953353d22db804b952b333e97d2a0d57266a00baf0c07379efa.png') no-repeat;
// background:#ff3000;
2024-10-16 18:09:51 +08:00
background-size: 100% 100%;
display: flex;
flex-wrap: wrap;
2024-08-07 10:31:42 +08:00
2024-10-16 18:09:51 +08:00
.head-img-box {
margin-right: 20rpx;
width: 62rpx;
height: 62rpx;
border-radius: 50%;
position: relative;
background: #fce0ad;
2024-08-07 10:31:42 +08:00
2024-10-16 18:09:51 +08:00
.head-img {
width: 62rpx;
height: 62rpx;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
2024-08-07 10:31:42 +08:00
2024-10-16 18:09:51 +08:00
.card-top {
box-sizing: border-box;
margin-top: 46px;
margin-left: 16px;
2024-08-07 10:31:42 +08:00
2024-10-16 18:09:51 +08:00
.user-name {
font-size: 32rpx;
font-weight: bold;
color: #692e04;
line-height: 30rpx;
}
2024-08-07 10:31:42 +08:00
2024-10-16 18:09:51 +08:00
.log-btn {
width: 84rpx;
height: 42rpx;
border: 2rpx solid rgba(#ffffff, 0.33);
border-radius: 21rpx;
font-size: 22rpx;
font-weight: 400;
color: #ffffff;
margin-bottom: 20rpx;
}
2024-08-07 10:31:42 +08:00
2024-10-16 18:09:51 +08:00
.look-btn {
color: #fff;
width: 40rpx;
height: 40rpx;
}
}
2024-08-07 10:31:42 +08:00
2024-10-16 18:09:51 +08:00
.user-info-box {
.tag-box {
background: #ff6000;
border-radius: 18rpx;
line-height: 36rpx;
2024-08-07 10:31:42 +08:00
2024-10-16 18:09:51 +08:00
.tag-img {
width: 36rpx;
height: 36rpx;
border-radius: 50%;
margin-left: -2rpx;
}
2024-08-07 10:31:42 +08:00
2024-10-16 18:09:51 +08:00
.tag-title {
font-size: 24rpx;
padding: 0 10rpx;
font-weight: 500;
line-height: 36rpx;
color: #fff;
}
}
}
}
</style>