style: 修复消息样式
This commit is contained in:
@@ -9,7 +9,6 @@ namespace Yi.Framework.Bbs.Domain.Shared.Consts
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 常量定义
|
/// 常量定义
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public class DiscussConst
|
public class DiscussConst
|
||||||
{
|
{
|
||||||
public const string No_Exist = "传入的主题id不存在";
|
public const string No_Exist = "传入的主题id不存在";
|
||||||
@@ -18,32 +17,20 @@ namespace Yi.Framework.Bbs.Domain.Shared.Consts
|
|||||||
|
|
||||||
public const string AgreeNotice = """
|
public const string AgreeNotice = """
|
||||||
<div>
|
<div>
|
||||||
<h3 class="title" style="color: #333; font-size: 18px; margin: 0 0 10px;">🍗 您的主题 [{0}] 被 [{1}] 用户点赞!</h3>
|
<h3 class="title" style="color: #333; font-size: 18px; margin: 0 0 10px;">🍗 您的主题 [<a href="/article/{2}" target="_blank" style="color: #007BFF;text-decoration: none;">{0}</a>] 有 [{1}] 用户点赞!</h3>
|
||||||
<p class="link" style="color: #555;font-size: 16px;">
|
|
||||||
点击前往主题地址:
|
|
||||||
<a href="/article/{2}" target="_blank" style="color: #007BFF;text-decoration: none;">https://ccnetcore.com/article/{2}</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
""";
|
""";
|
||||||
|
|
||||||
public const string CommentNotice = """
|
public const string CommentNotice = """
|
||||||
<div>
|
<div>
|
||||||
<h3 class="title" style="color: #333; font-size: 18px; margin: 0 0 10px;">🍖 您的主题 [{0}] 被 [{1}] 用户评论!</h3>
|
<h3 class="title" style="color: #333; font-size: 18px; margin: 0 0 10px;">🍖 您的主题 [<a href="/article/{3}" target="_blank" style="color: #007BFF;text-decoration: none;">{0}</a>] 有 [{1}] 用户评论!</h3>
|
||||||
<p class="link" style="color: #555;font-size: 16px;">
|
</div>
|
||||||
评论内容:[{2}]
|
""";
|
||||||
点击前往主题地址:
|
|
||||||
<a href="/article/{3}" target="_blank" style="color: #007BFF;text-decoration: none;">https://ccnetcore.com/article/{3}</a>
|
public const string CommentNoticeToReply = """
|
||||||
</p>
|
<div>
|
||||||
</div>
|
<h3 class="title" style="color: #333; font-size: 18px; margin: 0 0 10px;">🍖 您在主题 [<a href="/article/{3}" target="_blank" style="color: #007BFF;text-decoration: none;">{0}</a>] 的评论有 [{1}] 用户回复!</h3>
|
||||||
""";
|
</div>
|
||||||
public const string CommentNoticeToReply= """
|
""";
|
||||||
<div>
|
|
||||||
<h3 class="title" style="color: #333; font-size: 18px; margin: 0 0 10px;">🍖 您在主题 [{0}] 的评论被 [{1}] 用户回复!</h3>
|
|
||||||
<p class="link" style="color: #555;font-size: 16px;">
|
|
||||||
评论内容:[{2}]
|
|
||||||
点击前往主题地址:
|
|
||||||
<a href="/article/{3}" target="_blank" style="color: #007BFF;text-decoration: none;">https://ccnetcore.com/article/{3}</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
""";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -54,9 +54,15 @@ namespace Yi.Framework.Bbs.Domain.EventHandlers
|
|||||||
var content = commentEntity.Content.Length >= 30 ? commentEntity.Content.Substring(0, 30)+"..." : commentEntity.Content;
|
var content = commentEntity.Content.Length >= 30 ? commentEntity.Content.Substring(0, 30)+"..." : commentEntity.Content;
|
||||||
//通知主题作者,有人评论
|
//通知主题作者,有人评论
|
||||||
await _localEventBus.PublishAsync(new BbsNoticeEventArgs(disucssDto.DiscussUserId, string.Format(DiscussConst.CommentNotice, disucssDto.DiscussTitle, commentUser.UserName, content,commentEntity.DiscussId)), false);
|
await _localEventBus.PublishAsync(new BbsNoticeEventArgs(disucssDto.DiscussUserId, string.Format(DiscussConst.CommentNotice, disucssDto.DiscussTitle, commentUser.UserName, content,commentEntity.DiscussId)), false);
|
||||||
//通知回复者,有人评论
|
|
||||||
await _localEventBus.PublishAsync(new BbsNoticeEventArgs(commentEntity.ParentId, string.Format(DiscussConst.CommentNoticeToReply, disucssDto.DiscussTitle, commentUser.UserName, content,commentEntity.DiscussId)), false);
|
|
||||||
|
|
||||||
|
//如果为空,表示根路径,没有回复者
|
||||||
|
if (commentEntity.ParentId != Guid.Empty)
|
||||||
|
{
|
||||||
|
//通知回复者,有人评论
|
||||||
|
await _localEventBus.PublishAsync(new BbsNoticeEventArgs(commentEntity.ParentId, string.Format(DiscussConst.CommentNoticeToReply, disucssDto.DiscussTitle, commentUser.UserName, content,commentEntity.DiscussId)), false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,12 @@ namespace Yi.Framework.Rbac.Application.Services
|
|||||||
{
|
{
|
||||||
var path = await GetReturnPathAsync(code, isThumbnail);
|
var path = await GetReturnPathAsync(code, isThumbnail);
|
||||||
|
|
||||||
|
if (!File.Exists(path))
|
||||||
|
{
|
||||||
|
throw new UserFriendlyException("文件不存在",code:"404");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var steam = await File.ReadAllBytesAsync(path);
|
var steam = await File.ReadAllBytesAsync(path);
|
||||||
|
|
||||||
//考虑从路径中获取
|
//考虑从路径中获取
|
||||||
|
|||||||
@@ -37,6 +37,9 @@
|
|||||||
<Content Update="wwwroot\icon\**">
|
<Content Update="wwwroot\icon\**">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Update="appsettings.Development.json">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -82,9 +82,9 @@
|
|||||||
<div class="top">你好,很高兴今天又遇到你呀~</div>
|
<div class="top">你好,很高兴今天又遇到你呀~</div>
|
||||||
<el-row class="active">
|
<el-row class="active">
|
||||||
|
|
||||||
<el-col v-for="item in activeList" :span="6">
|
<el-col v-for="item in activeList" :span="6" @click="handleToRouter(item.path)">
|
||||||
|
|
||||||
<el-icon color="#70aafb" size="30px" @click="handleToRouter(item.path)">
|
<el-icon color="#70aafb" size="30px" >
|
||||||
<component :is="item.icon"></component>
|
<component :is="item.icon"></component>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<span> {{item.name}}</span>
|
<span> {{item.name}}</span>
|
||||||
@@ -176,8 +176,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, reactive, computed, nextTick, watch } from "vue";
|
import {onMounted, ref, reactive, computed, nextTick, watch} from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
import DisscussCard from "@/components/DisscussCard.vue";
|
import DisscussCard from "@/components/DisscussCard.vue";
|
||||||
import InfoCard from "@/components/InfoCard.vue";
|
import InfoCard from "@/components/InfoCard.vue";
|
||||||
import PlateCard from "@/components/PlateCard.vue";
|
import PlateCard from "@/components/PlateCard.vue";
|
||||||
@@ -185,18 +185,18 @@ import ScrollbarInfo from "@/components/ScrollbarInfo.vue";
|
|||||||
import BottomInfo from "@/components/BottomInfo.vue";
|
import BottomInfo from "@/components/BottomInfo.vue";
|
||||||
import VisitsLineChart from "./components/VisitsLineChart/index.vue";
|
import VisitsLineChart from "./components/VisitsLineChart/index.vue";
|
||||||
import AccessLogChart from "./components/AccessLogChart/Index.vue"
|
import AccessLogChart from "./components/AccessLogChart/Index.vue"
|
||||||
import { access, getAccessList } from "@/apis/accessApi.js";
|
import {access, getAccessList} from "@/apis/accessApi.js";
|
||||||
import { getList } from "@/apis/plateApi.js";
|
import {getList} from "@/apis/plateApi.js";
|
||||||
import { getList as bannerGetList } from "@/apis/bannerApi.js";
|
import {getList as bannerGetList} from "@/apis/bannerApi.js";
|
||||||
import { getHomeDiscuss } from "@/apis/discussApi.js";
|
import {getHomeDiscuss} from "@/apis/discussApi.js";
|
||||||
import { getWeek } from "@/apis/accessApi.js";
|
import {getWeek} from "@/apis/accessApi.js";
|
||||||
import {
|
import {
|
||||||
getRecommendedTopic,
|
getRecommendedTopic,
|
||||||
getRecommendedFriend,
|
getRecommendedFriend,
|
||||||
getRankingPoints,
|
getRankingPoints,
|
||||||
getUserAnalyse,
|
getUserAnalyse,
|
||||||
} from "@/apis/analyseApi.js";
|
} from "@/apis/analyseApi.js";
|
||||||
import { getList as getAllDiscussList } from "@/apis/discussApi.js";
|
import {getList as getAllDiscussList} from "@/apis/discussApi.js";
|
||||||
import PointsRanking from "./components/PointsRanking/index.vue";
|
import PointsRanking from "./components/PointsRanking/index.vue";
|
||||||
import RecommendFriend from "./components/RecommendFriend/index.vue";
|
import RecommendFriend from "./components/RecommendFriend/index.vue";
|
||||||
import ThemeData from "./components/RecommendTheme/index.vue";
|
import ThemeData from "./components/RecommendTheme/index.vue";
|
||||||
@@ -224,16 +224,16 @@ const isAllDiscussFinished = ref(false);
|
|||||||
const userAnalyseInfo = ref({});
|
const userAnalyseInfo = ref({});
|
||||||
const onlineNumber = ref(0);
|
const onlineNumber = ref(0);
|
||||||
|
|
||||||
const activeList=[
|
const activeList = [
|
||||||
{name:"签到",path:"/activity/sign",icon:"Present"},
|
{name: "签到", path: "/activity/sign", icon: "Present"},
|
||||||
{name:"等级",path:"/activity/level",icon:"Ticket"},
|
{name: "等级", path: "/activity/level", icon: "Ticket"},
|
||||||
{name:"大转盘",path:"/activity/lucky",icon:"Sunny"},
|
{name: "大转盘", path: "/activity/lucky", icon: "Sunny"},
|
||||||
{name:"银行",path:"/activity/bank",icon:"Money"},
|
{name: "银行", path: "/activity/bank", icon: "Money"},
|
||||||
|
|
||||||
{name:"任务",path:"/activity/sign",icon:"Memo"},
|
{name: "任务", path: "/activity/sign", icon: "Memo"},
|
||||||
{name:"娱乐城",path:"/activity/sign",icon:"Sunrise"},
|
{name: "娱乐城", path: "/activity/sign", icon: "Sunrise"},
|
||||||
{name:"其他",path:"/activity/sign",icon:"Sunny"},
|
{name: "开始", path: "/start", icon: "Position"},
|
||||||
{name:"其他",path:"/activity/sign",icon:"Sunny"},
|
{name: "聊天室", path: "/chat", icon: "ChatRound"},
|
||||||
];
|
];
|
||||||
|
|
||||||
//主题查询参数
|
//主题查询参数
|
||||||
@@ -246,34 +246,34 @@ const query = reactive({
|
|||||||
//初始化
|
//初始化
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
access();
|
access();
|
||||||
const { data: plateData } = await getList();
|
const {data: plateData} = await getList();
|
||||||
plateList.value = plateData.items;
|
plateList.value = plateData.items;
|
||||||
const { data: discussData, config: discussConfig } = await getHomeDiscuss();
|
const {data: discussData, config: discussConfig} = await getHomeDiscuss();
|
||||||
discussList.value = discussData;
|
discussList.value = discussData;
|
||||||
isDiscussFinished.value = discussConfig.isFinish;
|
isDiscussFinished.value = discussConfig.isFinish;
|
||||||
const { data: bannerData } = await bannerGetList();
|
const {data: bannerData} = await bannerGetList();
|
||||||
bannerList.value = bannerData.items;
|
bannerList.value = bannerData.items;
|
||||||
const { data: weekData } = await getWeek();
|
const {data: weekData} = await getWeek();
|
||||||
weekList.value = weekData;
|
weekList.value = weekData;
|
||||||
const { data: pointData, config: pointConfig } = await getRankingPoints();
|
const {data: pointData, config: pointConfig} = await getRankingPoints();
|
||||||
pointList.value = pointData;
|
pointList.value = pointData;
|
||||||
isPointFinished.value = pointConfig.isFinish;
|
isPointFinished.value = pointConfig.isFinish;
|
||||||
const { data: friendData, config: friendConfig } =
|
const {data: friendData, config: friendConfig} =
|
||||||
await getRecommendedFriend();
|
await getRecommendedFriend();
|
||||||
friendList.value = friendData;
|
friendList.value = friendData;
|
||||||
isFriendFinished.value = friendConfig.isFinish;
|
isFriendFinished.value = friendConfig.isFinish;
|
||||||
const { data: themeData, config: themeConfig } = await getRecommendedTopic();
|
const {data: themeData, config: themeConfig} = await getRecommendedTopic();
|
||||||
themeList.value = themeData;
|
themeList.value = themeData;
|
||||||
isThemeFinished.value = themeConfig.isFinish;
|
isThemeFinished.value = themeConfig.isFinish;
|
||||||
const { data: allDiscussData, config: allDiscussConfig } =
|
const {data: allDiscussData, config: allDiscussConfig} =
|
||||||
await getAllDiscussList({
|
await getAllDiscussList({
|
||||||
Type: 0,
|
Type: 0,
|
||||||
skipCount: 1,
|
skipCount: 1,
|
||||||
maxResultCount: 30,
|
maxResultCount: 30,
|
||||||
});
|
});
|
||||||
isAllDiscussFinished.value = allDiscussConfig.isFinish;
|
isAllDiscussFinished.value = allDiscussConfig.isFinish;
|
||||||
allDiscussList.value = allDiscussData.items;
|
allDiscussList.value = allDiscussData.items;
|
||||||
const { data: userAnalyseInfoData } = await getUserAnalyse();
|
const {data: userAnalyseInfoData} = await getUserAnalyse();
|
||||||
onlineNumber.value = userAnalyseInfoData.onlineNumber;
|
onlineNumber.value = userAnalyseInfoData.onlineNumber;
|
||||||
userAnalyseInfo.value = userAnalyseInfoData;
|
userAnalyseInfo.value = userAnalyseInfoData;
|
||||||
});
|
});
|
||||||
@@ -323,16 +323,16 @@ const handleToRouter = (path) => {
|
|||||||
// 推送的实时人数获取
|
// 推送的实时人数获取
|
||||||
const currentOnlineNum = computed(() => useSocketStore().getOnlineNum());
|
const currentOnlineNum = computed(() => useSocketStore().getOnlineNum());
|
||||||
watch(
|
watch(
|
||||||
() => currentOnlineNum.value,
|
() => currentOnlineNum.value,
|
||||||
(val) => {
|
(val) => {
|
||||||
onlineNumber.value = val;
|
onlineNumber.value = val;
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{deep: true}
|
||||||
);
|
);
|
||||||
|
|
||||||
const onClickAccessLog = async () => {
|
const onClickAccessLog = async () => {
|
||||||
accessLogDialogVisible.value = true;
|
accessLogDialogVisible.value = true;
|
||||||
const { data } = await getAccessList();
|
const {data} = await getAccessList();
|
||||||
|
|
||||||
accessAllList.value = data;
|
accessAllList.value = data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user