关注粉丝语言适配

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

@@ -11,7 +11,7 @@
<div class="account_generalMessage_center modal_title_text">
<div class="account_generalMessage_item" v-for="item in dataList" :key="item.id">
<div class="account_generalMessage_item_right">
<div class="account_generalMessage_item_right_img">
<div class="account_generalMessage_item_right_img" @click.stop="openOtherUsers(item)">
<img :src="item.avatar" alt="">
</div>
<div class="account_generalMessage_item_right_title">
@@ -86,7 +86,27 @@ export default defineComponent({
accountFollofFans.getListData.isNoData = true
})
}
let setFollow = (item:any) =>{
let url = Https.httpUrls.porfolioFollow
if(item.isFollow == 1)url = Https.httpUrls.porfolioCancelFollow
Https.axiosGet(url, {params:{followeeId:item.senderId}})
.then((rv) => {
if(item.isFollow == 1){
item.isFollow = 0
}else{
item.isFollow = 1
}
})
}
let openOtherUsers = (item:any)=>{
const routeUrl = router.resolve({
path:'/home/otherUsers',
query:{
userId:item.senderId
}
})
window.open(routeUrl.href,'_blank')
}
onMounted (()=>{
accountFollofFans.getListData.isNoData = false
accountFollofFans.getListData.page = 0
@@ -106,6 +126,8 @@ export default defineComponent({
searchFollowFansList,
getFollowFansList,
loadingDom,
setFollow,
openOtherUsers,
}
},
data(){

View File

@@ -12,12 +12,12 @@
<div class="account_generalMessage_item" v-for="item in dataList" :key="item.id">
<a-badge :dot="item.isRead == 0"></a-badge>
<div class="account_generalMessage_item_right">
<div class="account_generalMessage_item_right_img">
<img :src="item.senderUserAvatar" alt="">
<div class="account_generalMessage_item_right_img" @click.stop="openOtherUsers(item)">
<img :src="item.avatar" alt="">
</div>
<div class="account_generalMessage_item_right_title">
<div class="">{{ item.senderUserName }}</div>
<div class="modal_title_text_intro">{{ item.createTime }} 关注了你</div>
<div class="modal_title_text_intro">{{ item.createTime }} </div>
</div>
</div>
<div class="account_generalMessage_item_left">
@@ -26,7 +26,7 @@
</div>
</div>
<div class="account_generalMessage_item" style="justify-content: center;" v-if="dataList.length == 0 && getListData.isNoData">
没有任何信息~
{{$t('account.dataNull')}}
</div>
<div class="page_loading_box" v-show="!getListData.isNoData">
<span class="page_loading" ref="loadingDom" v-show="!getListData.isShowMark"></span>
@@ -87,7 +87,27 @@ export default defineComponent({
accountFollofFans.getListData.isNoData = true
})
}
let setFollow = (item:any) =>{
let url = Https.httpUrls.porfolioFollow
if(item.isFollow == 1)url = Https.httpUrls.porfolioCancelFollow
Https.axiosGet(url, {params:{followeeId:item.senderId}})
.then((rv) => {
if(item.isFollow == 1){
item.isFollow = 0
}else{
item.isFollow = 1
}
})
}
let openOtherUsers = (item:any)=>{
const routeUrl = router.resolve({
path:'/home/otherUsers',
query:{
userId:item.senderId
}
})
window.open(routeUrl.href,'_blank')
}
onMounted (()=>{
accountFollofFans.getListData.isNoData = false
accountFollofFans.getListData.page = 0
@@ -107,6 +127,8 @@ export default defineComponent({
searchFollowFansList,
getFollowFansList,
loadingDom,
setFollow,
openOtherUsers,
}
},
data(){

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(){