09 2024 档案

摘要:若访问项目文件wwwroot以外的其他静态文件使用如下方式访问 1.配置文件中配置路径(appsetting) "App": { "ServerRootAddress": "https://localhost:44301/", "ClientRootAddress": "https://localh 阅读全文
posted @ 2024-09-26 14:17 流年sugar 阅读(148) 评论(0) 推荐(0)
摘要:本次样例的执行内容是,匹配就返回匹配数据的id,不匹配就新增数据 方式一 DECLARE @userId INT if not EXISTS(select 1 from dbo.User where PId=4 AND Code='XX') BEGIN INSERT INTO dbo.User(PI 阅读全文
posted @ 2024-09-19 18:08 流年sugar 阅读(48) 评论(0) 推荐(0)
摘要:安装库MailKit 发送邮件 /// <summary> /// 发送邮件 /// </summary> /// <param name="subject">邮件主题</param> /// <param name="body">邮件内容</param> public void SendEmail 阅读全文
posted @ 2024-09-12 14:54 流年sugar 阅读(101) 评论(0) 推荐(0)
摘要:前景: vue项目引入了store的js库,在引用是报编译错误 原因: store是一个js库,是用JavaScript写的就没法导出TypeScript 声明文件(还有可能的包是 TypeScript 编写的,但没有导出声明文件,一样会抛出这个异常),更深层次的意思是TypeScript 没有找到 阅读全文
posted @ 2024-09-11 14:56 流年sugar 阅读(210) 评论(0) 推荐(0)
摘要:后端 创建一个Hub类,重写连接和断连方法 ChatHub 记录下每一位登录人连接SignalR的信息至Redis中 引用的Microsoft.AspNetCore.App框架 public class ChatHub : Hub { //ConcurrentDictionary<string, H 阅读全文
posted @ 2024-09-10 09:59 流年sugar 阅读(104) 评论(0) 推荐(0)
摘要:路由中使用state传递参数,参数就不会显示在地址栏中 router.push({ name: 'home', state: { id: info.id, name: info.name } }) 使用window.history.state获取参数 mounted() { this.userInf 阅读全文
posted @ 2024-09-04 10:46 流年sugar 阅读(441) 评论(0) 推荐(0)