摘要: 需要引入UAParser,IPTools.Core类库a 1 public static partial class HttpContextExtension 2 { 3 /// <summary> 4 /// 是否是ajax请求 5 /// </summary> 6 /// <param name 阅读全文
posted @ 2024-06-22 13:36 乐 乐——1128 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 1 public static partial class Extensions 2 { 3 #region 转换为long 4 /// <summary> 5 /// 将object转换为long,若转换失败,则返回0。不抛出异常。 6 /// </summary> 7 /// <param na 阅读全文
posted @ 2024-06-22 11:44 乐 乐——1128 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 1 public class HttpHelper 2 { 3 /// <summary> 4 /// 发起POST同步请求 5 /// </summary> 6 /// <param name="url"></param> 7 /// <param name="postData"></param> 阅读全文
posted @ 2024-06-22 11:24 乐 乐——1128 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 1 public class DateTimeHelper 2 { 3 /// <summary> 4 /// 5 /// </summary> 6 /// <param name="dateTime"></param> 7 /// <returns></returns> 8 public stat 阅读全文
posted @ 2024-06-22 11:14 乐 乐——1128 阅读(5) 评论(0) 推荐(0) 编辑
摘要: public static class JsonHelper { /// <summary> /// 将对象序列化为JSON格式 /// </summary> /// <param name="o">对象</param> /// <returns>json字符串</returns> public s 阅读全文
posted @ 2024-06-22 10:58 乐 乐——1128 阅读(2) 评论(0) 推荐(0) 编辑