| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <template>
- <view class="lis-item x-f es-center es-pt-24 es-pb-30 es-pl-30 es-pr-30 lis-item-line" @click="$navTo('/pages/expert/index?userId='+item.userId)">
- <view class="avatar live es-w-112 es-h-112">
- <!-- <view class="live-status x-c">直播中</view> -->
- <image
- :src="item.avatar || 'https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1d7eb0607a074892964dd32e8735e540.jpg'"
- mode="aspectFill"></image>
- </view>
- <view class="x-f es-center flex">
- <view class="es-ml-16">
- <view class="title es-mb-20">{{item.nickName}}</view>
- <view class="desc" v-show="type=='follow'">{{item.remark}}</view>
- <view class="desc" v-show="type=='fans'">{{item.fans || 0}}粉丝 {{item.videoNum || 0}}视频</view>
- </view>
- <view class="x-c desc" :class="isFollow==1?'follow':'no-follow'" @click.stop="handleFollow">{{isFollow==1? '已关注' : type=='follow'?'关注': '回关'}}</view>
- </view>
- </view>
- </template>
- <script>
- import { getTalentByToken,getVideoList,doFollow,checkFollow,getTalentByUserId } from "@/api/expert.js"
- export default {
- props: {
- type: {
- type: String,
- default: 'follow'
- },
- isFollow: {
- type: [String,Number],
- default: 0
- },
- item: {
- type: Object,
- default: {}
- }
- },
- data() {
- return {
-
- }
- },
- methods: {
- handleFollow() {
- doFollow({talentId: this.item.talentId}).then(res=>{
- if(res.code==200) {
- this.$emit('resetData')
- }
- uni.showToast({
- title: res.msg
- })
- })
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .title {
- font-weight: 600;
- }
-
- .desc {
- font-size: 24rpx;
- color: #999999;
- }
-
- .avatar {
- border-radius: 50%;
- position: relative;
- box-sizing: border-box;
- border: 5rpx solid #FF5030;
-
- image {
- border-radius: 50%;
- width: 100%;
- height: 100%;
- position: relative;
- z-index: 3;
- }
- }
-
- .live {
- padding: 6rpx;
- border: none;
- background: linear-gradient(to bottom, #FACC22, #FF5030);
-
- &::after {
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- content: "";
- width: 106rpx;
- height: 106rpx;
- background-color: #fff;
- border-radius: 50%;
- }
- }
-
- .live-status {
- min-width: 96rpx;
- padding: 5rpx 0;
- box-sizing: border-box;
- background: #FF5030;
- border-radius: 17rpx;
- position: absolute;
- left: 50%;
- bottom: -14rpx;
- transform: translateX(-50%);
- z-index: 9;
- font-family: MiSans;
- font-weight: 400;
- font-size: 20rpx;
- color: #FFFFFF;
- word-break: keep-all;
- }
-
- .follow {
- width: 150rpx;
- height: 51rpx;
- background: #E5E5E5;
- border-radius: 25rpx;
- }
-
- .no-follow {
- width: 150rpx;
- height: 51rpx;
- background: #FFFFFF;
- border-radius: 25rpx;
- border: 1px solid #FF5030;
- color: #FF5030 !important;
- }
- .lis-item {
- overflow: hidden;
- }
- .lis-item-line {
- position: relative;
- &::after {
- content: "";
- position: absolute;
- bottom: 0;
- left: 136rpx;
- border-bottom: 1px solid #F5F7FA;
- width: 100%;
- transform: scaleY(0.5);
- border-top-color: #F5F7FA;
- border-right-color: #F5F7FA;
- border-left-color: #F5F7FA;
- }
- }
- </style>
|