123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <template>
- <view class="item" v-if="fansInfo" @click="$emit('view', fansInfo)">
- <view class="avatar-wrapper">
- <image class="avatar" :src="fansInfo.headImage"></image>
- <view class="mask">{{ fansInfo.role | filterRole }}</view>
- </view>
- <view class="info">
- <view class="name">{{ fansInfo.userName }}
- <!-- <tui-icon margin="0 0 0 10upx" :color="fansInfo.gender === 0 ? '#10aeff' : '#f37e7d'" name="friendadd-fill" :size="18"></tui-icon> -->
- <!-- <view class="add-time">绑定时间:{{ fansInfo.addTime }}</view> -->
- <view class="account-wrapper" style="font-size: 24upx; color: #3d3d3d; "> 产生佣金: <text style="color: #f40;">¥{{
- fansInfo.amount }}</text></view>
- </view>
- <view class="phone">
- <view class="phone-number">{{ fansInfo.phone ? fansInfo.phone.slice(0, 3) + '****' + fansInfo.phone.slice(7) : '-'
- }}
- </view>
- <button class="uni-btn" @click="handleCallPhone(fansInfo.phone)">
- <tui-icon class="icon" color="#ccc" :size="16" name="voipphone"></tui-icon>
- 拨打
- </button>
- </view>
- <view class="fans-wrapper">
- <view class="fans-item">
- <view class="fans-title">粉丝数:</view>
- <view class="numbers">{{ fansInfo.fans }}</view>
- </view>
- <view class="fans-item">
- <view class="fans-title">今日粉丝数:</view>
- <view class="numbers">{{ fansInfo.todayFans }}</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- props: {
- fansInfo: {
- type: Object,
- required: true
- }
- },
- filters: {
- filterRole(role) {
- return { 5: '区代理', 4: '加盟商', 3: '合伙人', 2: '团长', 1: '会员',0: '未知' }[role]
- }
- },
- methods: {
- handleCallPhone(phone) {
- if (!phone) return;
- uni.makePhoneCall({
- phoneNumber: phone
- });
- },
- },
- }
- </script>
- <style lang="less" scoped>
- .item {
- margin-top: 30upx;
- padding: 20upx;
- box-sizing: border-box;
- width: 700upx;
- background-color: #fff;
- border-radius: 10upx;
- display: flex;
- align-items: flex-start;
- .avatar-wrapper {
- position: relative;
- border-radius: 10upx;
- overflow: hidden;
- border: 1upx solid #f3f3f3;
- .mask {
- position: absolute;
- left: 0;
- right: 0;
- bottom: 0;
- width: 100%;
- height: 40upx;
- background-color: rgba(0, 0, 0, 0.5);
- font-size: 24upx;
- color: #fff;
- text-align: center;
- line-height: 40upx;
- }
- }
- .avatar {
- flex-shrink: 0;
- width: 100upx;
- height: 100upx;
- border-radius: 10upx;
- display: block;
- }
- .info {
- flex: 1;
- margin-left: 20upx;
- .name {
- display: flex;
- align-items: center;
- justify-content: space-between;
- font-size: 28upx;
- font-weight: 500;
- .add-time {
- font-size: 24upx;
- }
- }
- .phone {
- display: flex;
- align-items: center;
- justify-content: space-between;
- font-size: 24upx;
- margin-top: 16upx;
- .uni-btn {
- display: flex;
- align-items: center;
- color: #ccc;
- font-size: 24upx;
- .icon {
- margin-right: 10upx !important;
- }
- }
- }
- }
- }
- .fans-wrapper {
- font-size: 24upx;
- color: #3d3d3d;
- display: flex;
- align-items: center;
- margin-top: 20upx;
- .fans-item {
- flex: 1;
- color: #000;
- display: flex;
- &:nth-child(2) {
- text-align: right;
- justify-content: flex-end;
- }
- .fans-title {
- color: #ccc;
- }
- }
- }
- </style>
|