refactor: 移除未使用的依赖并优化代码
- 移除 nuxt-swiper、tinymce 等相关未使用的依赖 - 优化频道关注接口的请求头配置 - 在频道操作中添加登录验证 - 修复样式类名中的语法错误
This commit is contained in:
@ -37,7 +37,7 @@
|
||||
<div class="stats-item">
|
||||
<span class="stats-label">当前有</span>
|
||||
<span class="stats-value"><i class="el-icon-arrow-up"></i> {{ lunTanRes?.chatUserCount }}人聊天</span>
|
||||
<span class="stats-value ml-[2px] cursor-pointer color-[#1a65ff!]" @click="handleChat">立即加入</span>
|
||||
<span class="stats-value ml-[2px] cursor-pointer !color-[#1a65ff]" @click="handleChat">立即加入</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -76,9 +76,17 @@
|
||||
})
|
||||
|
||||
const handleClick = () => {
|
||||
if (!userStore.token) {
|
||||
ElMessage.warning('请先登录')
|
||||
return
|
||||
}
|
||||
navigateTo('/channel/create?channelId=' + lunTanRes.value?.channelId)
|
||||
}
|
||||
const handleFollow = () => {
|
||||
if (!userStore.token) {
|
||||
ElMessage.warning('请先登录')
|
||||
return
|
||||
}
|
||||
createChannelFollow({ channelId: lunTanRes.value!.channelId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
lunTanRes.value!.isFollow = true
|
||||
@ -87,6 +95,10 @@
|
||||
})
|
||||
}
|
||||
const handleUnfollow = () => {
|
||||
if (!userStore.token) {
|
||||
ElMessage.warning('请先登录')
|
||||
return
|
||||
}
|
||||
deleteChannelFollow({ channelId: lunTanRes.value!.channelId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
lunTanRes.value!.isFollow = false
|
||||
|
||||
Reference in New Issue
Block a user