- 博客(15)
- 收藏
- 关注
原创 JWT的前端后端的各项配置(Vue3+webapi)
一、后端接口:WebApi1.appsettings.json文件{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" } }, "Authentication": { "SecretKey": "JianKeEducationCRMAP
2021-07-15 16:27:24 1039
原创 vue.config.js配置
一、根目录新建vue.config.jsmodule.exports = { publicPath: process.env.NODE_ENV === 'production' ? '/production-sub-path/' : '/', // 输出文件目录 outputDir: 'dist', // eslint-loader 是否在保存的时候检查 lintOnSave: true, // use the full build with in-browser comp
2021-07-14 15:51:58 537
原创 Vue初体验-登录
一、首先写个webapi方法[ApiController] [Route("api/[controller]/[action]")] public class UserController : ControllerBase { [HttpPost] public string Login([FromBody] UserModel userModel) //public string Login(string userName, s
2021-07-07 16:52:13 185
原创 C# .net WebApi 跨域
Startup.cs中 public void ConfigureServices(IServiceCollection services) { services.AddControllers(); #region 跨域 services.AddCors(options => { options.AddPolicy(AllowSpecif
2021-07-06 14:48:31 173
原创 菜单表设计
/// <summary> /// 系统菜单 /// </summary> public class ManageMenu { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } /// <summary> /// 名字 ...
2021-01-27 17:19:23 794
原创 .netcore webapi 发布后静态图片地址访问不了
需要在Startup的Configure注册静态资源//发布时服务器注册静态资源 app.UseStaticFiles(new StaticFileOptions { FileProvider = new PhysicalFileProvider("C:/webroot/dengfenglaicrmapitest/UploadFile"), RequestPath = "/UploadFi
2021-01-27 16:08:02 2445
原创 SaaS系统 .netcore webapi
1.什么是SaaSSaaS系统,软件即服务,租户系统,相对于传统软件,SaaS不需要租户购买服务器,不需要安装,也不需要花费大量的时间和成本去维护,只需要购买使用权,租用即可2.首先要有租户表 /// <summary> /// 租户 /// </summary> public class SysTenant { [Key] [DatabaseGenerated(DatabaseGeneratedOp
2021-01-27 15:36:36 717 1
原创 NPOI导出Excel .netcore webapi
1.建立好Excel导出数据要用到的模板 T.xlsx2.引入程序包3.将读取出来的数据List放到Excel中 public async Task<IActionResult> GetExcel(){ var dt = DateTime.Now; var rootPath = _webHostEnvironment.ContentRootPath + "
2021-01-26 16:33:36 228
原创 .netcore webapi 连接mysql数据库
1.在appsettings.json写好数据库连接语句 "DbContext": { "ConnectionString": "server=服务器; Database=数据库名; User Id=用户名; Password=密码;" }2.Startuppublic Startup(IConfiguration configuration) { Configuration = configuration; }
2021-01-26 16:03:16 796
原创 Swagger在 .netcore webapi中使用
1.首先引用需要的类库2.在Startup的ConfigureServices注入#region Swagger services.AddSwaggerGen(c => { c.ResolveConflictingActions(apiDescriptions => apiDescriptions.First()); c.SwaggerDoc("v1", new Mi
2021-01-26 15:48:36 157
原创 .netcore webapi 跨域问题
需要在Startup的ConfigureServices添加跨域支持#region 跨域 services.AddCors(options => { options.AddPolicy(AllowSpecificOrigin, builder => { builder.AllowAny
2021-01-26 15:29:09 192
原创 AutoMapper .netcore webapi中使用
1.NuGet管理程序包添加automapper引用:2.Startup的ConfigureServices中注册服务//添加对AutoMapper的支持services.AddAutoMapper(cfg =>{ cfg.AddProfile<MapperConfig>(); });3.添加MapperConfig文件,写映射关系public class MapperConfig:Profile{ public MapperConfig() {
2021-01-26 15:00:24 207
原创 JQuery获取checkbox选项
//全选 $("#btn_checkAll").click(function () { $("[name='checkbox']").attr("checked", 'true'); }); //取消全选 $("#btn_cancelCheck").click(function () {
2012-12-06 17:22:57 263
原创 获取select选中文本值
var language1 = $("#language option:selected").text();var language2 = $("#language").find('option:selected').text();var language3 = $("select[name=language]").find("option:selected").text();//va
2012-12-06 14:21:15 316
原创 JQuery获取文本框值
//获取文本框值 $('#btnSubmit').click(function () { var val = $("#txtContent").val(); var val2 = $("input[id='txtContent']").val(); var val3 = $("input[id='txtContent']").attr
2012-12-06 11:31:58 444
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人