Skip to content

Commit

Permalink
fix: 引用回复被错误的显示为禁言
Browse files Browse the repository at this point in the history
1. 修复引用回复被错误的显示为禁言
2. 精选回复里不需要展示引用回复
3. 升级nutui-taro解决sass警告
  • Loading branch information
ice909 authored and myml committed Jan 20, 2025
1 parent b6fc68a commit 59b862a
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 62 deletions.
10 changes: 5 additions & 5 deletions components.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// generated by unplugin-vue-components
// We suggest you to commit this file into source control
/* eslint-disable */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'

export {}

declare module '@vue/runtime-core' {
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
NutActionSheet: typeof import('@nutui/nutui-taro')['ActionSheet']
NutAvatar: typeof import('@nutui/nutui-taro')['Avatar']
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"dependencies": {
"@babel/runtime": "^7.25.0",
"@nutui/icons-vue-taro": "^0.0.9",
"@nutui/nutui-taro": "^4.3.11",
"@nutui/nutui-taro": "^4.3.13",
"@tarojs/components": "4.0.4",
"@tarojs/helper": "4.0.4",
"@tarojs/plugin-framework-vue3": "4.0.4",
Expand Down
70 changes: 35 additions & 35 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 5 additions & 21 deletions src/pages/thread/thread.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,6 @@
</nut-cell>
<nut-cell class="content" desc-text-align="left">
<template #desc>
<view class="son-post" v-if="post.son_post?.id">
<span class="nickname"> {{ post.son_post.user.nickname }}:</span>
<template v-if="post.user.state === 0 || post.user.state === 1">
<view v-if="post.son_post.deleted_at === null"
class="post-message html-message taro_html vditor-reset"
@click="htmlClick($event)" v-html="post.son_post.message">
</view>
<view v-else
class="post-message html-message taro_html vditor-reset del-message">
该评论已删除!
</view>
</template>

<view v-else-if="post.user.state === 2"
class="post-message html-message taro_html vditor-reset del-message">
用户被禁言,该内容已隐藏
</view>
</view>
<template v-if="post.user.state === 0 || post.user.state === 1">
<view v-if="post.deleted_at === null"
class="post-message html-message taro_html vditor-reset"
Expand Down Expand Up @@ -160,11 +142,13 @@
</view>
</template>
</nut-cell>
<!-- 回帖内容 -->
<nut-cell class="content" desc-text-align="left">
<template #desc>
<!-- 引用的回复 -->
<view class="son-post" v-if="post.son_post?.id">
<span class="nickname"> {{ post.son_post.user.nickname }}:</span>
<template v-if="post.user.state === 0 || post.user.state === 1">
<template v-if="post.son_post.user.state !== 2">
<view v-if="post.son_post.deleted_at === null"
class="post-message html-message taro_html vditor-reset"
@click="htmlClick($event)" v-html="post.son_post.message">
Expand All @@ -175,7 +159,7 @@
</view>
</template>

<view v-else-if="post.user.state === 2"
<view v-else
class="post-message html-message taro_html vditor-reset del-message">
用户被禁言,该内容已隐藏
</view>
Expand Down Expand Up @@ -613,7 +597,7 @@ Taro.eventCenter.on("sendPost", sendPost)
// 定时刷新评论
// 如果当前位于评论的最后一页,每三秒刷新一次
const interval = ref<NodeJS.Timeout>()
const interval = ref<ReturnType<typeof setTimeout>>()
const intervalRefreshPost = ref(false)
watchEffect(() => {
if (!threadPosts.value)
Expand Down

0 comments on commit 59b862a

Please sign in to comment.