关注粉丝语言适配

This commit is contained in:
X1627315083
2024-09-13 14:38:35 +08:00
parent 96bb0fce77
commit 7e3f97f1af
10 changed files with 107 additions and 28 deletions

View File

@@ -10,24 +10,26 @@
<div class="otherUsers_userDetail_center">
<div class="otherUsers_userDetail_center_name modal_title_text">
<div>{{ userContent.userName }}</div>
<div class="userDetail_center_name_left">关注</div>
<div v-if="userContent?.isFollow == 0" @click.stop="setFollow(userContent)" class="userDetail_center_name_left">{{$t('newScaleImage.Follow')}}</div>
<div v-else @click.stop="setFollow(userContent)" class="userDetail_center_name_left">{{$t('newScaleImage.Unfollow')}}</div>
</div>
<div class="otherUsers_userDetail_center_data">
<div class="userDetail_center_data_item modal_title_text">
<!-- <div class="userDetail_center_data_item modal_title_text">
<div>{{ userContent.homepageViewCount }}</div>
<span class="modal_title_text_intro">访问量</span>
</div>
</div> -->
<div class="userDetail_center_data_item modal_title_text">
<div>{{ userContent.portfolioCount }}</div>
<span class="modal_title_text_intro">作品</span>
<span class="modal_title_text_intro">{{$t('account.works')}}</span>
</div>
<div class="userDetail_center_data_item modal_title_text">
<div>{{ userContent.followerCount }}</div>
<span class="modal_title_text_intro">粉丝</span>
<span class="modal_title_text_intro">{{$t('account.Fans')}}</span>
</div>
<div class="userDetail_center_data_item modal_title_text">
<div>{{ userContent.followeeCount }}</div>
<span class="modal_title_text_intro">关注</span>
<span class="modal_title_text_intro">{{$t('account.Follow')}}</span>
</div>
</div>
<div class="otherUsers_userDetail_center_signature">
@@ -39,7 +41,7 @@
</div>
<div class="otherUser_works">
<div class="otherUser_works_title modal_title_text">
<div>他的作品</div>
<div>{{$t('account.hisWorks')}}</div>
</div>
<Works :isScroll="false" :otherUsers="true" :userId=userId></Works>
</div>
@@ -76,15 +78,29 @@ export default defineComponent({
})
}
let setFollow = (item:any) =>{
let url = Https.httpUrls.porfolioFollow
if(item.isFollow == 1)url = Https.httpUrls.porfolioCancelFollow
Https.axiosGet(url, {params:{followeeId:otherUsers.userId}})
.then((rv) => {
if(item.isFollow == 1){
item.isFollow = 0
}else{
item.isFollow = 1
}
})
}
onMounted (()=>{
otherUsers.userId = router.currentRoute.value.query?.userId
// alert()
getUserDetail(otherUsers.userId)
setTimeout(() => {
getUserDetail(otherUsers.userId)
}, 2000);
})
return{
...toRefs(otherUsers),
setFollow,
}
},
data(){