fix swagger报错
This commit is contained in:
parent
f2c83958b4
commit
73d62e56a2
@ -46,6 +46,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
}
|
||||
|
||||
[Route("/")]
|
||||
[HttpGet]
|
||||
public IActionResult Index()
|
||||
{
|
||||
return Content("Hello看到这里页面说明你已经成功启动了本项目,加油吧 少年。");
|
||||
|
||||
@ -1,19 +1,15 @@
|
||||
using Hei.Captcha;
|
||||
using Infrastructure;
|
||||
using Infrastructure.Extensions;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc.Razor;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using SqlSugar.IOC;
|
||||
using Swashbuckle.AspNetCore.Filters;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@ -98,7 +94,7 @@ namespace ZR.Admin.WebApi
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "ZrAdmin v1"));
|
||||
app.UseSwaggerUI(c => c.SwaggerEndpoint("v1/swagger.json", "ZrAdmin v1"));
|
||||
|
||||
//ʹ¿ÉÒÔ¶à´Î¶àÈ¥bodyÄÚÈÝ
|
||||
app.Use((context, next) =>
|
||||
|
||||
@ -8,7 +8,7 @@ export default {
|
||||
name: "Swagger",
|
||||
data() {
|
||||
return {
|
||||
src: process.env.VUE_APP_BASE_API + "swagger/index.html",
|
||||
src: process.env.VUE_APP_BASE_API + "/swagger/index.html",
|
||||
height: document.documentElement.clientHeight - 94.5 + "px;",
|
||||
loading: true
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user