Commit c9f5c971 by 李毅波

【无】搭建JK.ERP.OMS项目,对外开放webapi

parents
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- Backup*.rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
\ No newline at end of file
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration.Json;
using Microsoft.Extensions.Options;
using System.IO;
namespace JK.ERP.Helper
{
public class AppSettingHelper
{
public static IConfiguration Configuration { get; set; }
static AppSettingHelper()
{
Configuration = new ConfigurationBuilder()
.Add(new JsonConfigurationSource { Path = "appsettings.json", ReloadOnChange = true })
.Build();
}
//public static T GetSectionObject<T>(string path = null) where T : new()
//{
// var entity = new T();
// if (string.IsNullOrEmpty(path))
// {
// Configuration.Bind(entity);
// }
// else {
// var section = Configuration.GetSection(path);
// section.Bind(entity);
// }
// return entity;
//}
}
public class JWTSetting
{
/// <summary>
/// 发行人
/// </summary>
public string Issuer { get; set; }
/// <summary>
/// 受众人
/// </summary>
public string Audience { get; set; }
/// <summary>
/// 密钥
/// </summary>
public string TockenSecrete { get; set; }
}
}
using Microsoft.AspNetCore.Http;
using Microsoft.IdentityModel.Tokens;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.IdentityModel.Tokens.Jwt;
using System.Linq;
using System.Security.Claims;
using System.Text;
namespace JK.ERP.Helper
{
[Serializable]
public class AccountAuth
{
public int Id { get; set; }
public string AccountId { get; set; }
[Required(ErrorMessage = "账号必填")]
public string Account { get; set; }
[Required(ErrorMessage = "密码必填")]
[StringLength(maximumLength: 10, MinimumLength = 6, ErrorMessage = "密码长度最多10位")]
public string Password { get; set; }
}
public class TockenInfo
{
public string Account { get; set; }
public string Password { get; set; }
}
public class AuthHelper
{
/// <summary>
/// 生成Tocken
/// </summary>
/// <param name="p"></param>
/// <returns></returns>
public static string GetTocken(AccountAuth auth)
{
string _issuer = AppSettingHelper.Configuration["JWTSetting:Issuer"];
string audience = AppSettingHelper.Configuration["JWTSetting:Audience"];
string TockenSecrete = AppSettingHelper.Configuration["JWTSetting:TockenSecrete"];
var securityKey = new SigningCredentials(new SymmetricSecurityKey(Encoding.ASCII.GetBytes(TockenSecrete)), SecurityAlgorithms.HmacSha256);
var claims = new Claim[] {
new Claim(JwtRegisteredClaimNames.Sid,auth.AccountId),
new Claim(JwtRegisteredClaimNames.Iss,_issuer),
new Claim(JwtRegisteredClaimNames.Sub,auth.Account),
new Claim(JwtRegisteredClaimNames.Jti,auth.Password),
new Claim("Guid",Guid.NewGuid().ToString("D"))
};
SecurityToken securityToken = new JwtSecurityToken(
issuer: _issuer,
audience: audience,
signingCredentials: securityKey,
expires: DateTime.Now.AddMinutes(2),//过期时间
claims: claims
);
return new JwtSecurityTokenHandler().WriteToken(securityToken);
}
/// <summary>
/// 解析Jwt生成的 Tocken
/// </summary>
/// <param name="accesTocken"></param>
/// <returns></returns>
public static AccountAuth GetTockenInfo(string accesTocken)
{
try
{
if (accesTocken.Contains("Bearer"))
{
accesTocken = accesTocken.Replace("Bearer ", "");
}
var tockHandler = new JwtSecurityToken(accesTocken);
AccountAuth auth = new AccountAuth
{
Account = tockHandler.Claims.FirstOrDefault(c => c.Type == JwtRegisteredClaimNames.Sub).Value,
Password = tockHandler.Claims.FirstOrDefault(c => c.Type == JwtRegisteredClaimNames.Jti).Value
};
return auth;
}
catch (Exception ex)
{
throw new Exception($"解析Tocken时错误:{ex.Message}!");
}
}
/// <summary>
/// 获取accessTocken
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public static string GetTockenString(HttpContext context)
{
return context != null ? context.Request.Headers["Authorization"].ToString() : "";
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.9" />
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="3.1.5" />
<PackageReference Include="Microsoft.Extensions.Options" Version="3.1.9" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.8.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.8.0" />
</ItemGroup>
</Project>
using System;
using System.Collections.Generic;
using System.Text;
namespace JK.ERP.Helper
{
public class LogHelper
{
private static readonly log4net.ILog loginfo = log4net.LogManager.GetLogger("LogInfo");
public static void Info(string info)
{
if (loginfo.IsInfoEnabled)
{
loginfo.Info(info);
}
}
public static void Info(string excptionType, string message, string stackTrace)
{
if (loginfo.IsInfoEnabled)
{
loginfo.ErrorFormat("{0}:{1}\n{2}", excptionType, message, stackTrace);
}
}
public static void Warn(string info)
{
if (loginfo.IsWarnEnabled)
{
loginfo.Warn(info);
}
}
public static void Error(Exception ex)
{
if (loginfo.IsErrorEnabled)
{
loginfo.Error(ex);
}
}
public static void Error(object message)
{
if (loginfo.IsErrorEnabled)
{
loginfo.Error(message);
}
}
public static void Error(string info, Exception ex)
{
if (loginfo.IsErrorEnabled)
{
loginfo.Error(info, ex);
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<log4net>
<!-- Define some output appenders -->
<appender name="rollingAppender" type="log4net.Appender.RollingFileAppender">
<file value="log\log.txt" />
<!--追加日志内容-->
<appendToFile value="true" />
<!--防止多线程时不能写Log,官方说线程非安全-->
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<!--可以为:Once|Size|Date|Composite-->
<!--CompositeSizeDate的组合-->
<rollingStyle value="Composite" />
<!--当备份文件时,为文件名加的后缀-->
<datePattern value="yyyyMMdd.TXT" />
<!--日志最大个数,都是最新的-->
<!--rollingStyle节点为Size时,只能有value个日志-->
<!--rollingStyle节点为Composite时,每天有value个日志-->
<maxSizeRollBackups value="20" />
<!--可用的单位:KB|MB|GB-->
<maximumFileSize value="3MB" />
<!--置为true,当前最新日志文件名永远为file节中的名字-->
<staticLogFileName value="true" />
<!--输出级别在INFOERROR之间的日志-->
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ALL" />
<param name="LevelMax" value="FATAL" />
</filter>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline"/>
</layout>
</appender>
<root>
<priority value="ALL"/>
<level value="ALL"/>
<appender-ref ref="rollingAppender" />
</root>
</log4net>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Text;
namespace JK.ERP.Bussiness
{
using JK.ERP.IService;
using JK.ERP.Service;
using JK.ERP.Entity;
public class AccountAuthBussiness
{
private IAccountAuth service = new AccountAuthService();
public AccountAuth GetAccountAuth(string account, string pwd)
{
return service.GetAccountAuth(account, pwd);
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\JK.ERP.Entity\JK.ERP.Entity.csproj" />
<ProjectReference Include="..\JK.ERP.IService\JK.ERP.IService.csproj" />
<ProjectReference Include="..\JK.ERP.Model\JK.ERP.Model.csproj" />
<ProjectReference Include="..\JK.ERP.Service\JK.ERP.Service.csproj" />
</ItemGroup>
</Project>
using System;
using System.Collections.Generic;
using System.Text;
namespace JK.ERP.Entity
{
public class AccountAuth
{
public int Id { get; set; }
public string Account { get; set; }
public string Password { get; set; }
public string AccessToken { get; set; }
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="sqlSugarCore" Version="5.0.1" />
</ItemGroup>
</Project>
using JK.ERP.Model;
using System;
using System.Collections.Generic;
using System.Text;
namespace JK.ERP.IService
{
using JK.ERP.Entity;
public interface IAccountAuth
{
AccountAuth GetAccountAuth(string account, string pwd);
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\JK.ERP.Entity\JK.ERP.Entity.csproj" />
<ProjectReference Include="..\JK.ERP.Model\JK.ERP.Model.csproj" />
</ItemGroup>
</Project>
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace JK.ERP.Model
{
using JK.ERP.Helper;
public class BaseDB
{
public static SqlSugarClient GetClient()
{
SqlSugarClient db = new SqlSugarClient(
new ConnectionConfig {
ConnectionString=BaseDBConfig.ConnectionString,
DbType=DbType.SqlServer,
IsAutoCloseConnection=true
}
);
db.Aop.OnLogExecuting = (sql, pars) =>
{
string log = sql + "\r\n" + db.Utilities.SerializeObject(pars.ToDictionary(it => it.ParameterName, it => it.Value));
LogHelper.Info(log);
Console.WriteLine(log);
Console.WriteLine();
};
return db;
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace JK.ERP.Model
{
public class BaseDBConfig
{
public static string ConnectionString = "server=192.168.8.248;database=SinadealTradeDB;uid=sa;pwd=admin+123;Max Pool Size=2000";
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="sqlSugarCore" Version="5.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\JK.ERP.COMMON\JK.ERP.Helper\JK.ERP.Helper.csproj" />
</ItemGroup>
</Project>
using System;
using System.Collections.Generic;
using System.Text;
namespace JK.ERP.Model
{
public class MessageModel<T>
{
public bool Success { get; set; }
public string Msg { get; set; }
public List<T> Data { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace JK.ERP.Model
{
public class TableModel<T>
{
/// <summary>
/// 表格数据,支持分页
/// </summary>
public int Code { get; set; }
public string Msg { get; set; }
public int Count { get; set; }
public List<T> Data { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace JK.ERP.Service
{
using JK.ERP.Entity;
using JK.ERP.IService;
using JK.ERP.Model;
using SqlSugar;
public class AccountAuthService : BaseDB,IAccountAuth
{
public SqlSugarClient db = BaseDB.GetClient();
public AccountAuth GetAccountAuth(string account, string pwd)
{
return db.Queryable<AccountAuth>()
.With(SqlWith.NoLock)
.First(f=>f.Account==account && f.Password==pwd);
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\JK.ERP.IService\JK.ERP.IService.csproj" />
<ProjectReference Include="..\JK.ERP.Model\JK.ERP.Model.csproj" />
</ItemGroup>
</Project>

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30413.136
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JK.ERP.WEBAPP", "JK.ERP.WEBAPP\JK.ERP.WEBAPP.csproj", "{141CF2A3-A8DB-46A9-8E07-F3D15E2ED0F9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JK.ERP.WEBAPI", "JK.ERP.WEBAPI\JK.ERP.WEBAPI.csproj", "{BC4C3CC1-A3EE-44A6-AB63-BD61DF997F86}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JK.ERP.COMMON", "JK.ERP.COMMON", "{C05B785A-57B6-4C8F-BD49-F23B1229ADAF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JK.ERP.Helper", "JK.ERP.COMMON\JK.ERP.Helper\JK.ERP.Helper.csproj", "{EB60145D-DD17-4532-B9B9-613CB2DA593C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JK.ERP.CORE", "JK.ERP.CORE", "{0C3CD167-5701-4C90-8133-47DC88CE9116}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JK.ERP.Service", "JK.ERP.CORE\JK.ERP.Service\JK.ERP.Service.csproj", "{02DF830E-99BC-4F38-8198-24CCE5A3AF75}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JK.ERP.IService", "JK.ERP.CORE\JK.ERP.IService\JK.ERP.IService.csproj", "{2E2BED3A-4378-46C1-A32B-D6CF14666214}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JK.ERP.Model", "JK.ERP.CORE\JK.ERP.Model\JK.ERP.Model.csproj", "{8B8932C1-FE3A-4C5C-821D-A7EF5437EF97}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JK.ERP.Entity", "JK.ERP.CORE\JK.ERP.Entity\JK.ERP.Entity.csproj", "{9421C73F-096E-41D1-8B60-8D32F52BBDD7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JK.ERP.Bussiness", "JK.ERP.CORE\JK.ERP.Bussiness\JK.ERP.Bussiness.csproj", "{74B27306-502F-482E-9F4D-72DF6AB08E7F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{141CF2A3-A8DB-46A9-8E07-F3D15E2ED0F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{141CF2A3-A8DB-46A9-8E07-F3D15E2ED0F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{141CF2A3-A8DB-46A9-8E07-F3D15E2ED0F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{141CF2A3-A8DB-46A9-8E07-F3D15E2ED0F9}.Release|Any CPU.Build.0 = Release|Any CPU
{BC4C3CC1-A3EE-44A6-AB63-BD61DF997F86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC4C3CC1-A3EE-44A6-AB63-BD61DF997F86}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC4C3CC1-A3EE-44A6-AB63-BD61DF997F86}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC4C3CC1-A3EE-44A6-AB63-BD61DF997F86}.Release|Any CPU.Build.0 = Release|Any CPU
{EB60145D-DD17-4532-B9B9-613CB2DA593C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB60145D-DD17-4532-B9B9-613CB2DA593C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB60145D-DD17-4532-B9B9-613CB2DA593C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB60145D-DD17-4532-B9B9-613CB2DA593C}.Release|Any CPU.Build.0 = Release|Any CPU
{02DF830E-99BC-4F38-8198-24CCE5A3AF75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02DF830E-99BC-4F38-8198-24CCE5A3AF75}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02DF830E-99BC-4F38-8198-24CCE5A3AF75}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02DF830E-99BC-4F38-8198-24CCE5A3AF75}.Release|Any CPU.Build.0 = Release|Any CPU
{2E2BED3A-4378-46C1-A32B-D6CF14666214}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E2BED3A-4378-46C1-A32B-D6CF14666214}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E2BED3A-4378-46C1-A32B-D6CF14666214}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E2BED3A-4378-46C1-A32B-D6CF14666214}.Release|Any CPU.Build.0 = Release|Any CPU
{8B8932C1-FE3A-4C5C-821D-A7EF5437EF97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8B8932C1-FE3A-4C5C-821D-A7EF5437EF97}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B8932C1-FE3A-4C5C-821D-A7EF5437EF97}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8B8932C1-FE3A-4C5C-821D-A7EF5437EF97}.Release|Any CPU.Build.0 = Release|Any CPU
{9421C73F-096E-41D1-8B60-8D32F52BBDD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9421C73F-096E-41D1-8B60-8D32F52BBDD7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9421C73F-096E-41D1-8B60-8D32F52BBDD7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9421C73F-096E-41D1-8B60-8D32F52BBDD7}.Release|Any CPU.Build.0 = Release|Any CPU
{74B27306-502F-482E-9F4D-72DF6AB08E7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74B27306-502F-482E-9F4D-72DF6AB08E7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74B27306-502F-482E-9F4D-72DF6AB08E7F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74B27306-502F-482E-9F4D-72DF6AB08E7F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{EB60145D-DD17-4532-B9B9-613CB2DA593C} = {C05B785A-57B6-4C8F-BD49-F23B1229ADAF}
{02DF830E-99BC-4F38-8198-24CCE5A3AF75} = {0C3CD167-5701-4C90-8133-47DC88CE9116}
{2E2BED3A-4378-46C1-A32B-D6CF14666214} = {0C3CD167-5701-4C90-8133-47DC88CE9116}
{8B8932C1-FE3A-4C5C-821D-A7EF5437EF97} = {0C3CD167-5701-4C90-8133-47DC88CE9116}
{9421C73F-096E-41D1-8B60-8D32F52BBDD7} = {0C3CD167-5701-4C90-8133-47DC88CE9116}
{74B27306-502F-482E-9F4D-72DF6AB08E7F} = {0C3CD167-5701-4C90-8133-47DC88CE9116}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B299B537-3F30-46C9-8E23-26B0D9649A1B}
EndGlobalSection
EndGlobal
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Text;
using System.ComponentModel.DataAnnotations;
using JK.ERP.Helper;
using log4net.Core;
using Microsoft.Extensions.Logging;
using log4net.Repository.Hierarchy;
using RestSharp;
namespace JK.ERP.WEBAPI.Controllers
{
using JK.ERP.Bussiness;
using JK.ERP.Entity;
using JK.ERP.Helper;
using Newtonsoft.Json;
using System.Xml;
[Route("api/[controller]/[action]")]
[ApiController]
public class DockingPlatformController : ControllerBase
{
private readonly ILogger<DockingPlatformController> _logger;
public DockingPlatformController(ILogger<DockingPlatformController> logger)
{
_logger = logger;
}
[HttpGet]
public string Index()
{
return "Hello World";
}
//[HttpPost]
//public ApiResult RequestAuth(AccountAuth auth)
//{
// ApiResult result = new ApiResult();
// //try
// //{
// // string tockenStr = AuthHelper.GetTocken(auth);
// // result.data = tockenStr;
// // result.code = 200;
// // result.message = "授权成功!";
// //}
// //catch (Exception ex)
// //{
// // result.code = 500;
// // result.message = $"授权异常:{ex.Message}";
// // _logger.LogInformation($"Login:{result.message}");
// //}
// return result;
//}
[HttpPost]
[AllowAnonymous]
public ApiResult authTest(string accesTocken)
{
ApiResult result = new ApiResult();
try
{
var info = AuthHelper.GetTockenInfo(accesTocken);
result.data = info;
result.code = 200;
result.message = "success!";
}
catch (Exception ex)
{
result.message = "error:" + ex.Message;
}
return result;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Text;
using System.ComponentModel.DataAnnotations;
using JK.ERP.Helper;
using log4net.Core;
using Microsoft.Extensions.Logging;
using log4net.Repository.Hierarchy;
using RestSharp;
namespace JK.ERP.WEBAPI.Controllers
{
using JK.ERP.Bussiness;
using JK.ERP.Entity;
using JK.ERP.Helper;
using Newtonsoft.Json;
using System.Xml;
[Route("api/[controller]/[action]")]
[ApiController]
public class eRacuniController : ControllerBase
{
private readonly ILogger<eRacuniController> _logger;
public eRacuniController(ILogger<eRacuniController> logger)
{
_logger = logger;
}
[HttpGet]
public string Index()
{
return "Hello World";
}
private bool VaildToken(string accessToken)
{
string authToken = AppSettingHelper.Configuration["eRacuni:AuthToken"];
if (authToken != accessToken)
{
return false;
}
else
{
return true;
}
}
private IRestResponse Request(Dictionary<string, object> dict)
{
string api = AppSettingHelper.Configuration["eRacuni:api"];
string username = AppSettingHelper.Configuration["eRacuni:username"];
string md5pass = AppSettingHelper.Configuration["eRacuni:md5pass"];
string token = AppSettingHelper.Configuration["eRacuni:token"];
StringBuilder sb = new StringBuilder(@"<?xml version=""1.0"" encoding=""utf-8""?>");
sb.Append("<request>");
sb.Append("<login username=\"" + username + "\" md5pass=\"" + md5pass + "\" token=\"" + token + "\" />");
foreach (KeyValuePair<string, object> item in dict)
{
switch (item.Key)
{
#region SalesOrderList-InitParamters
case "SalesOrderList":
SalesOrderListModel so = (SalesOrderListModel)item.Value;
sb.Append("<method name=\"SalesOrderList\">");
if (!string.IsNullOrEmpty(so.number))
sb.Append("<parameter name=\"number\" value=\"" + so.number + "\" />");
if (!string.IsNullOrEmpty(so.dateFrom))
sb.Append("<parameter name=\"dateFrom\" type=\"Date\" value=\"" + so.dateFrom + "\" />");
if (!string.IsNullOrEmpty(so.dateTo))
sb.Append("<parameter name=\"dateTo\" type=\"Date\" value=\"" + so.dateTo + "\" />");
if (!string.IsNullOrEmpty(so.receivalDateFrom))
sb.Append("<parameter name=\"receivalDateFrom\" type=\"Date\" value=\"" + so.receivalDateFrom + "\" />");
if (!string.IsNullOrEmpty(so.receivalDateTo))
sb.Append("<parameter name=\"receivalDateTo\" type=\"Date\" value=\"" + so.receivalDateTo + "\" />");
if (!string.IsNullOrEmpty(so.dateOfPaymentFrom))
sb.Append("<parameter name=\"dateOfPaymentFrom\" type=\"Date\" value=\"" + so.dateOfPaymentFrom + "\" />");
if (!string.IsNullOrEmpty(so.dateOfPaymentTo))
sb.Append("<parameter name=\"dateOfPaymentTo\" type=\"Date\" value=\"" + so.dateOfPaymentTo + "\" />");
if (!string.IsNullOrEmpty(so.deliveryAddress))
sb.Append("<parameter name=\"deliveryAddress\" value=\"" + so.deliveryAddress + "\" />");
if (!string.IsNullOrEmpty(so.buyer))
sb.Append("<parameter name=\"buyer\" value=\"" + so.buyer + "\" />");
if (!string.IsNullOrEmpty(so.costPosition))
sb.Append("<parameter name=\"costPosition\" value=\"" + so.costPosition + "\" />");
if (!string.IsNullOrEmpty(so.totalAmount))
sb.Append("<parameter name=\"totalAmount\" value=\"" + so.totalAmount + "\" />");
if (!string.IsNullOrEmpty(so.totalCurrency))
sb.Append("<parameter name=\"totalCurrency\" value=\"" + so.totalCurrency + "\" />");
if (!string.IsNullOrEmpty(so.article))
sb.Append("<parameter name=\"article\" value=\"" + so.article + "\" />");
if (!string.IsNullOrEmpty(so.status))
sb.Append("<parameter name=\"status\" value=\"" + so.status + "\" />");
sb.Append("</method>");
break;
#endregion
#region ProductList-InitParamters
case "ProductList":
ProductListModel pm = (ProductListModel)item.Value;
sb.Append("<method name=\"ProductList\">");
if (!string.IsNullOrEmpty(pm.productCode))
sb.Append("<parameter name=\"productCode\" value=\"" + pm.productCode + "\" />");
if (!string.IsNullOrEmpty(pm.productCodeFrom))
sb.Append("<parameter name=\"productCodeFrom\" value=\"" + pm.productCodeFrom + "\" />");
if (!string.IsNullOrEmpty(pm.productCodeTo))
sb.Append("<parameter name=\"productCodeTo\" value=\"" + pm.productCodeTo + "\" />");
if (!string.IsNullOrEmpty(pm.searchKey))
sb.Append("<parameter name=\"searchKey\" type=\"String\" value=\"" + pm.searchKey + "\" />");
if (!string.IsNullOrEmpty(pm.supplierCode))
sb.Append("<parameter name=\"supplierCode\" value=\"" + pm.supplierCode + "\" />");
if (!string.IsNullOrEmpty(pm.barCode))
sb.Append("<parameter name=\"barCode\" value=\"" + pm.barCode + "\" />");
if (!string.IsNullOrEmpty(pm.brand))
sb.Append("<parameter name=\"brand\" type=\"String\" value=\"" + pm.brand + "\" />");
if (!string.IsNullOrEmpty(pm.productGroup))
sb.Append("<parameter name=\"productGroup\" value=\"" + pm.productGroup + "\" />");
if (!string.IsNullOrEmpty(pm.status))
sb.Append("<parameter name=\"status\" value=\"" + pm.status + "\" />");
sb.Append("</method>");
break;
#endregion
#region ProductList-InitParamters
case "GoodsReceiptList":
GoodsReceiptListModel gr = (GoodsReceiptListModel)item.Value;
sb.Append("<method name=\"GoodsReceiptList\">");
if (!string.IsNullOrEmpty(gr.number))
sb.Append("<parameter name=\"number\" value=\"" + gr.number + "\" />");
if (!string.IsNullOrEmpty(gr.dateFrom))
sb.Append("<parameter name=\"dateFrom\" type=\"Date\" value=\"" + gr.dateFrom + "\" />");
if (!string.IsNullOrEmpty(gr.dateTo))
sb.Append("<parameter name=\"dateTo\" type=\"Date\" value=\"" + gr.dateTo + "\" />");
if (!string.IsNullOrEmpty(gr.warehouse))
sb.Append("<parameter name=\"warehouse\" type=\"String\" value=\"" + gr.warehouse + "\" />");
if (!string.IsNullOrEmpty(gr.dateOfReceival))
sb.Append("<parameter name=\"dateOfReceival\" type=\"Date\" value=\"" + gr.dateOfReceival + "\" />");
if (!string.IsNullOrEmpty(gr.supplierDeliveryNote))
sb.Append("<parameter name=\"supplierDeliveryNote\" type=\"String\" value=\"" + gr.supplierDeliveryNote + "\" />");
if (!string.IsNullOrEmpty(gr.purchaseOrder))
sb.Append("<parameter name=\"purchaseOrder\" type=\"String\" value=\"" + gr.purchaseOrder + "\" />");
if (!string.IsNullOrEmpty(gr.serialNumber))
sb.Append("<parameter name=\"serialNumber\" type=\"String\" value=\"" + gr.serialNumber + "\" />");
if (!string.IsNullOrEmpty(gr.supplier))
sb.Append("<parameter name=\"supplier\" type=\"String\" value=\"" + gr.supplier + "\" />");
if (!string.IsNullOrEmpty(gr.costPosition))
sb.Append("<parameter name=\"costPosition\" type=\"String\" value=\"" + gr.costPosition + "\" />");
if (!string.IsNullOrEmpty(gr.product))
sb.Append("<parameter name=\"product\" type=\"String\" value=\"" + gr.product + "\" />");
if (!string.IsNullOrEmpty(gr.remarks))
sb.Append("<parameter name=\"remarks\" type=\"String\" value=\"" + gr.remarks + "\" />");
if (!string.IsNullOrEmpty(gr.status))
sb.Append("<parameter name=\"status\" value=\"" + gr.status + "\" />");
sb.Append("</method>");
break;
#endregion
}
}
sb.Append("</request>");
string paramters = sb.ToString();
var client = new RestClient(api);
var request = new RestRequest(Method.POST);
request.AddHeader("Postman-Token", "f1ebf3ff-a1ae-471c-b422-77dc2d4a5b6d");
request.AddHeader("cache-control", "no-cache");
request.AddHeader("Content-Type", "application/xml");
request.AddParameter("undefined", paramters, ParameterType.RequestBody);
_logger.LogInformation($"RequestBody:{paramters}");
return client.Execute(request);
}
[HttpGet]
/// <summary>
/// eRacuni-SalesOrderList
/// </summary>
/// <param name="accessToken"></param>
/// <returns></returns>
public ApiResult SalesOrderList([FromBody] SalesOrderListModel model)
{
ApiResult result = new ApiResult();
try
{
if (model == null)
{
result.code = 500;
result.message = $"error:model is null";
return result;
}
if (!VaildToken(model.accessToken))
{
result.code = 500;
result.message = $"error:Unauthorized";
return result;
}
IRestResponse response = Request(new Dictionary<string, object>() { { "SalesOrderList", model } });
result.data = response.Content;
result.code = Convert.ToInt32(response.StatusCode);
result.message = response.StatusDescription;
}
catch (Exception ex)
{
result.code = 500;
result.message = $"error:{ex.Message}";
}
_logger.LogInformation($"SalesOrderList:{JsonConvert.SerializeObject(result)}");
return result;
}
[HttpGet]
/// <summary>
/// eRacuni-ProductList
/// </summary>
/// <param name="accessToken"></param>
/// <returns></returns>
public ApiResult ProductList([FromBody] ProductListModel model)
{
ApiResult result = new ApiResult();
try
{
if (model == null)
{
result.code = 500;
result.message = $"error:model is null";
return result;
}
if (!VaildToken(model.accessToken))
{
result.code = 500;
result.message = $"error:Unauthorized";
return result;
}
IRestResponse response = Request(new Dictionary<string, object>() { { "ProductList", model } });
result.data = response.Content;
result.code = Convert.ToInt32(response.StatusCode);
result.message = response.StatusDescription;
}
catch (Exception ex)
{
result.code = 500;
result.message = $"error:{ex.Message}";
}
_logger.LogInformation($"ProductList:{JsonConvert.SerializeObject(result)}");
return result;
}
[HttpGet]
/// <summary>
/// eRacuni-GoodsReceiptList
/// </summary>
/// <param name="accessToken"></param>
/// <returns></returns>
public ApiResult GoodsReceiptList([FromBody] GoodsReceiptListModel model)
{
ApiResult result = new ApiResult();
try
{
if (model == null)
{
result.code = 500;
result.message = $"error:model is null";
return result;
}
if (!VaildToken(model.accessToken))
{
result.code = 500;
result.message = $"error:Unauthorized";
return result;
}
IRestResponse response = Request(new Dictionary<string, object>() { { "GoodsReceiptList", model } });
result.data = response.Content;
result.code = Convert.ToInt32(response.StatusCode);
result.message = response.StatusDescription;
}
catch (Exception ex)
{
result.code = 500;
result.message = $"error:{ex.Message}";
}
_logger.LogInformation($"GoodsReceiptList:{JsonConvert.SerializeObject(result)}");
return result;
}
}
public class GoodsReceiptListModel
{
public string accessToken { get; set; }
/// <summary>
/// Document number
/// </summary>
public string number { get; set; }
/// <summary>
/// The date which is used to select goods receipts whose date is following it
/// </summary>
public string dateFrom { get; set; }
/// <summary>
/// The date which is used to select goods receipts whose date is preceding it
/// </summary>
public string dateTo { get; set; }
/// <summary>
/// Warehouse code
/// </summary>
public string warehouse { get; set; }
/// <summary>
/// The date of receival
/// </summary>
public string dateOfReceival { get; set; }
/// <summary>
/// Delivery Note number
/// </summary>
public string supplierDeliveryNote { get; set; }
/// <summary>
/// Purchase number
/// </summary>
public string purchaseOrder { get; set; }
/// <summary>
/// Product serial number
/// </summary>
public string serialNumber { get; set; }
/// <summary>
/// Supplier name
/// </summary>
public string supplier { get; set; }
/// <summary>
/// Cost position code
/// </summary>
public string costPosition { get; set; }
/// <summary>
/// Product code, or product name
/// </summary>
public string product { get; set; }
/// <summary>
/// Document remarks
/// </summary>
public string remarks { get; set; }
/// <summary>
/// Possible values: Draft, Issued, Booked, NotBooked, CancellationDocument, CancelledDocument, WithReceivedInvoiceReference, WithoutReceivedInvoiceReference
/// </summary>
public string status { get; set; }
}
public class ProductListModel
{
public string accessToken { get; set; }
/// <summary>
/// Product's code
/// </summary>
public string productCode { get; set; }
/// <summary>
/// Search by product code range
/// </summary>
public string productCodeFrom { get; set; }
/// <summary>
/// Search by product code range
/// </summary>
public string productCodeTo { get; set; }
/// <summary>
/// Search key. The value from this property is used for searching for values in fields: "name", "description" and "brand"
/// </summary>
public string searchKey { get; set; }
/// <summary>
/// Supplier code
/// </summary>
public string supplierCode { get; set; }
/// <summary>
/// Bar code
/// </summary>
public string barCode { get; set; }
/// <summary>
/// Name of the product's brand
/// </summary>
public string brand { get; set; }
/// <summary>
/// Code of product group (primary or secondary)
/// </summary>
public string productGroup { get; set; }
/// <summary>
/// Usage status (active, inactive)
/// </summary>
public string status { get; set; }
}
public class SalesOrderListModel
{
public string accessToken { get; set; }
/// <summary>
/// Document number
/// </summary>
public string number { get; set; }
/// <summary>
/// The date which is used to select sales orders whose date is following it.
/// </summary>
public string dateFrom { get; set; }
/// <summary>
/// The date which is used to select sales orders whose date is preceding it
/// </summary>
public string dateTo { get; set; }
/// <summary>
/// The date which is used to select sales orders whose date of receiva is following it
/// </summary>
public string receivalDateFrom { get; set; }
/// <summary>
/// The date which is used to select sales orders whose date od receiva is preceding it
/// </summary>
public string receivalDateTo { get; set; }
/// <summary>
/// The date which is used to select sales orders whose date of payment (date from payment record on document) is following it
/// </summary>
public string dateOfPaymentFrom { get; set; }
/// <summary>
/// The date which is used to select sales orders whose date of payment (date from payment record on document) is preceding it.
/// </summary>
public string dateOfPaymentTo { get; set; }
/// <summary>
/// Delivery address of the buyer
/// </summary>
public string deliveryAddress { get; set; }
/// <summary>
/// Buyer code, or buyer name
/// </summary>
public string buyer { get; set; }
/// <summary>
/// Cost position code
/// </summary>
public string costPosition { get; set; }
/// <summary>
/// Total amount of the sales order
/// </summary>
public string totalAmount { get; set; }
/// <summary>
/// Currency used in sales order
/// </summary>
public string totalCurrency { get; set; }
/// <summary>
/// Product code, or product name
/// </summary>
public string article { get; set; }
/// <summary>
/// Possible values:
/// Draft
/// IssuedDocument
/// Opened
/// Processing
/// PartialDelivery
/// CompletedDelivery
/// CompletedDeliveryPartialInvoic
/// CompletedDeliveryAndSettledInvoice
/// Cancelled
/// Reversed
/// OnHold
/// Shipped
/// CorrectionPending
/// ReservedStock
/// PaymentRecordExists
/// PaidNotInvoiced
/// </summary>
public string status { get; set; }
}
public class ApiResult
{
public object data { get; set; }
/// <summary>
/// 200:成功,500:失败
/// </summary>
public int code { get; set; }
public string message { get; set; }
}
}
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.9" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.1.9" />
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="3.1.5" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="RestSharp" Version="106.11.7" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.8.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\JK.ERP.COMMON\JK.ERP.Helper\JK.ERP.Helper.csproj" />
<ProjectReference Include="..\JK.ERP.CORE\JK.ERP.Bussiness\JK.ERP.Bussiness.csproj" />
<ProjectReference Include="..\JK.ERP.CORE\JK.ERP.Entity\JK.ERP.Entity.csproj" />
</ItemGroup>
<ItemGroup>
<Content Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace JK.ERP.WEBAPI
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureLogging(configureLogging=>configureLogging.AddLog4Net())
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:61931",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "api/DockingPlatform/Index",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"JK.ERP.WEBAPI": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "api/DockingPlatform/Index",
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace JK.ERP.WEBAPI
{
using JK.ERP.Helper;
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
//services.AddOptions();
//services.Configure<JWTSetting>(Configuration.GetSection("JWTSetting"));
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}
}
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"JWTSetting": {
"Issuer": "JK",
"Audience": "*",
"TockenSecrete": "123456jkguoji78"
},
"eRacuni": {
"api": "https://eurofaktura.com/WebServicesSI/API",
"username": "IMEDIAGSM@GMAIL.COM",
"md5pass": "66c05e7e6e0d29d8fc2e80bf9c6b84e0",
"token": "FDF3B9A8716D0D00AA0E8D470459CF56",
"AuthToken": "o437OHPrrAODuq6!NUA$FMLMIZHGAyDA"
}
}
<?xml version="1.0" encoding="utf-8"?>
<log4net>
<!-- Define some output appenders -->
<appender name="rollingAppender" type="log4net.Appender.RollingFileAppender">
<file value="log\log.txt" />
<!--追加日志内容-->
<appendToFile value="true" />
<!--防止多线程时不能写Log,官方说线程非安全-->
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<!--可以为:Once|Size|Date|Composite-->
<!--CompositeSizeDate的组合-->
<rollingStyle value="Composite" />
<!--当备份文件时,为文件名加的后缀-->
<datePattern value="yyyyMMdd.TXT" />
<!--日志最大个数,都是最新的-->
<!--rollingStyle节点为Size时,只能有value个日志-->
<!--rollingStyle节点为Composite时,每天有value个日志-->
<maxSizeRollBackups value="20" />
<!--可用的单位:KB|MB|GB-->
<maximumFileSize value="3MB" />
<!--置为true,当前最新日志文件名永远为file节中的名字-->
<staticLogFileName value="true" />
<!--输出级别在INFOERROR之间的日志-->
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ALL" />
<param name="LevelMax" value="FATAL" />
</filter>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline"/>
</layout>
</appender>
<root>
<priority value="ALL"/>
<level value="ALL"/>
<appender-ref ref="rollingAppender" />
</root>
</log4net>
\ No newline at end of file
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<RazorLangVersion>3.0</RazorLangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BootstrapBlazor" Version="3.1.28" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="3.2.1" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="3.2.0" />
</ItemGroup>
</Project>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace JK.ERP.WEBAPP
{
public class TodoItem
{
public string Title { get; set; }
public bool IsDone { get; set; }
}
}
@page "/"
<Layout ShowFooter="true">
<Header>
<div class="text-center header">Header</div>
</Header>
<Main>
<div class="text-center main">Main</div>
</Main>
<Footer>
<div class="text-center footer">Footer</div>
</Footer>
</Layout>
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Text;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace JK.ERP.WEBAPP
{
public class Program
{
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("app");
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
await builder.Build().RunAsync();
}
}
}
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:61910",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"JK.ERP.WEBAPP": {
"commandName": "Project",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
@inherits LayoutComponentBase
<div class="wrapper">
@*<Header />
@Body
<Footer />*@
</div>
@using System.Net.Http
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.WebAssembly.Http
@using Microsoft.JSInterop
@using JK.ERP.WEBAPP
@using JK.ERP.WEBAPP.Shared
@using BootstrapBlazor
*,
*:after,
*:before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html {
line-height: 1.15;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
hr {
box-sizing: content-box;
height: 0;
overflow: visible;
}
pre {
font-family: monospace, monospace;
font-size: 1em;
}
a {
background-color: transparent;
}
abbr[title] {
border-bottom: none;
text-decoration: underline;
text-decoration: underline dotted;
}
b,
strong {
font-weight: bolder;
}
code,
kbd,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
img {
border-style: none;
}
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
margin: 0;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
button:-moz-focusring,
[type="button"]-moz-focusring,
[type="reset"]-moz-focusring,
[type="submit"]-moz-focusring {
outline: 1px dotted ButtonText;
}
fieldset {
padding: 0.35em 0.75em 0.625em;
}
legend {
box-sizing: border-box;
color: inherit;
display: table;
max-width: 100%;
padding: 0;
white-space: normal;
}
progress {
vertical-align: baseline;
}
textarea {
overflow: auto;
}
[type="checkbox"],
[type="radio"] {
box-sizing: border-box;
padding: 0;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
details {
display: block;
}
summary {
display: list-item;
}
template {
display: none;
}
[hidden] {
display: none;
}
@font-face {
font-family: 'Fira Code Medium';
src: url('https://static.meowv.com/fonts/FiraCode-Medium.woff2') format('woff2'), url("https://static.meowv.com/fonts/FiraCode-Medium.woff") format("woff");
font-weight: 500;
font-style: normal;
}
html {
font-family: 'Fira Code Medium', Microsoft Yahei, monospace;
overflow-x: hidden;
}
html::-webkit-scrollbar {
width: 5px;
height: 5px;
}
html::-webkit-scrollbar-thumb {
height: 20px;
background-color: #5A9600;
}
html::-webkit-scrollbar-thumb:hover {
background-color: #5A9600;
}
body {
font-size: 11pt;
font-weight: normal;
line-height: 2em;
background-color: #fff;
color: #161209;
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
body:before {
content: "";
background-repeat: no-repeat;
background-position: center;
opacity: 0.05;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}
body.dark-theme {
background-color: #292a2d;
color: #a9a9b3;
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
a {
color: #161209;
text-decoration: none;
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
cursor: pointer;
}
a:hover {
color: #5A9600;
text-decoration: none;
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
.dark-theme a {
color: #a9a9b3;
text-decoration: none;
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
.dark-theme a:hover {
color: #fff;
text-decoration: none;
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
.wrapper {
display: flex;
flex-direction: column;
min-height: 100vh;
width: 100%;
}
.navbar {
height: 4rem;
line-height: 4rem;
width: 100%;
}
.navbar .container {
width: auto;
max-width: 1200px;
text-align: center;
margin: 0 auto;
display: flex;
justify-content: space-between;
}
.main {
flex-grow: 1;
flex-shrink: 0;
flex-basis: auto;
}
.container {
padding-left: 1em;
padding-right: 1em;
}
.footer {
width: 100%;
text-align: center;
}
/*input css begin*/
* {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
input[type="checkbox"],
input[type="radio"] {
display: none;
width: 0;
height: 0;
visibility: hidden;
}
input[type="checkbox"]:checked + label:after {
transition: all 0.3s ease-in;
}
input[type="checkbox"]:not(:checked) + label:after {
transition: all 0.3s ease-out;
}
input[type="checkbox"]:checked + label,
input[type="checkbox"]:not(:checked) + label {
transition: all 0.3s ease-in-out;
}
input[type="checkbox"]:checked + label:before,
input[type="checkbox"]:checked + label i:before,
input[type="checkbox"]:not(:checked) + label i:before,
input[type="checkbox"]:checked + label i:after,
input[type="checkbox"]:not(:checked) + label i:after,
input[type="checkbox"]:not(:checked) + label:before {
transition: all 0.3s ease-in-out;
}
input[type="radio"]:checked + label:after,
input[type="radio"]:not(:checked) + label:after {
transition: all 0.3s ease-in-out;
}
.switch_default + label {
background-color: #e6e6e6;
border-radius: 7px;
cursor: pointer;
display: inline-block;
height: 14px;
position: relative;
box-shadow: 0.2px 0.2px 1px 0.5px rgb(180, 180, 180);
width: 30px;
}
.switch_default + label:after {
background-color: #fff;
border-radius: 50%;
content: "";
height: 12px;
left: 1px;
position: absolute;
top: .5px;
width: 12px;
box-shadow: 0.2px 0.2px 1px 0.5px rgb(180, 180, 180);
}
.switch_default:checked + label {
background-color: #1ABC9C;
box-shadow: none;
}
.switch_default:checked + label:after {
left: 17px;
}
@font-face {
font-family: "iconfont";
src: url('//at.alicdn.com/t/font_1313145_r9szngeugmj.eot?t=1566619028667'); /* IE9 */
src: url('//at.alicdn.com/t/font_1313145_r9szngeugmj.eot?t=1566619028667#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAiMAAsAAAAAD1QAAAg+AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDdAqRCI1TATYCJAMgCxIABCAFhG0HXhvDDFGUcFIP2c+CnCw3FdS0XDPVbunm+E8fE3Kh6ue/bf25c6cYjLF6zMIMaivAjSQGxCJXNjJwM/BFbdbXczPwNb5ueXi7vbv7y5IszKOA2/IoDoIWp4GmlieQNKkzrZalJCXDA+JcJDsu8Qa0obxaKz0SBAprr8Pya68FDD1xLPmjV6X13/Yu2UGLwt0ogQZU0TadboBznEq5XTozB57jZIAAcBIhD9CoGqEBFsnmIaQcFrMO2IIc2dGMsCK6YceQoM1AYfMaog8ANkW/j36QIRaAQBWwNxyzKY3Q+PFfc3jxIDY1UMKy5bQAIC4GgAHkAQApCu9GyVoAH+mtGBdNmg6Ad/4iBn7eL/Nr/K3+VQPNX3ODg5Vq8NGkCugA8I4dSMwF/3moApsfAIgxwAA/79GfWyADCRDAr7EABcAACZDAv4oEGDDQTAIIfM0J4IFB7Oo8ABQCEC8AXhmk1ovRGGdBLBjd8PEhEkmUKwkj7Q2XcCgpncW8lAwLD1RQiHpZRCPq2XFdPSZJ3VpOf+ZhInXgUYXu9IMEcu/9thnRJonEzeipaAUHrRb40G4oKdWek0KrqlNGvzvlfPb53B6P7vUa5LLhRpv+Zw0tVitpxk1GbHIT1GOTq0g3lxGJLwnzP3PXM67Ni/ReV/m8z3XQCRx2U8CB4ubYY42tYP8zB3DedYFj3iPehzZXg7jQNGGpSdyWZUrVOM4BsDiENpWAUjmGclVtXimBYkVhTA6glC2CGUKEKYGMTqFAm8jIEglCiWVMAVfAK7R4waZoiZa8fLLKuRYsBEfBoro9YU2ScTwGn4PTrhTr1J7G+5+ZNb5LVzt8ywqc80TgwCGPGcZB6Ww+qVeunp71mz0/R8o9PS3t9eQ4AASOuAFfmOU3UDoKQSY0oPmcN0CoIxMRTTQ2lpYWUFoHYfZupcysO9TjOlmvK1cMwAZbLdVtCqvldfSJgPc1YcXQKW4mGjDFK7tJflBU3j8Y/Li047Pnj+79adS3ArfHp3VMyC2NSv+4dJ3El3ZqRz1cpT+Z+7Itr7FKLvr90rseudkbeoKjsHZJg5vj/a9M399PlAsGE4Ml1FSqcksTTM5zlPCRCmmDqJfKttsWUfJZHW9U3kJw12FvhEG7RGgIQM5LEaOoDEzglhAOWbmJnGRbgtuCKAbDsi7hrTfVVdskAPrXon3RbM0E1gR02BFPwMU1Q0iRtpjK/O0YK4LPUVL4TfNW8s3btybD9+0LDX9/9vCTIwaOjFe7+D9yPnGdcEWEs+yq347wxL0ohLvwEyfY+henIWkPEYKNI088lFHaoT6EJ0xHV80n5hFBF2EizJRkuyqYMkSNRWPrDestoO0c1WnAs3ffYRi+7dzaFcRG4vI+3A2KyelHcdMsVVsbI5L3E9h0dPVwh+DJ9GSszlx9fxKjeotDabJW4/NpSjWRPooAYz4/UqPaNk8xbzdEy6MTcKm89JovnDkR4UmPL/0uVZriLpGW+OTXx60ZO5cJp9xUCm2mwum5Y9eMuy73lUhT3bKuRUvj0z0RJ+hw2k0nEwWMqVSYZe5UUGClzHTKdHU4Q5oSdwoE34G2NA0Xok63Ct4Gb+Puht1C5W34lWoxKAN+qhtTCz9FlOwLg6pWTltGzvMeXkRMhk0T04eFUvFjhqhw3Infqybsnz4wJZB7Yg+62BPqUTkaFWAsni3kjLwPO19nJqpb/poAtJqmP0dpE9OrJ3iWZp4dyqQSp3NIa3llctmQYRPDhqlOZ8QqoqMXf1qR+NUIe8xHExICSuPClqlN2Y0PpzwNP1iLfJcuBXKvr14F30xvVt++/fv2+bK8f3+v/nf5EvTbvNmv9+6rkdzJNDZ+DVev+hZt4+0jB/fPn3YW6sOPP8+B8GhxP5WZSfUT79yS7C9PASndzqvVkXljwP+iUVyPJ05eXxV6ajK5yYK3cXHKdZOYoRlYyQ4r/Hj1x/53UrI4gxk6aV2cksNbN1mmUK9GZ8AmKaTsL78lId4h+zMz074Ju115mr3Y3Ou+tHirQR3K8vr98suK/3tWastt6WV5pexWOjwonO6mZfmySNBcWq2X782vGaqUbD6wWLlaufjAZolyTYFOXsYT3MM0HIrpCfYwyqE1+b3FCtlTtyJIodVyBzx29C+ZIlE7vq43FdKebtggp1uYHsZbTv7333+lQWpv3Xj55FbFaoVUsSZCBvVYucWbNtddcvOmxRzfHedt7RsY6HP3vfbBIgAAgx/ja1hA9z/4E0wt3kfm4WIAABLxaN3/kggj7wIyFi9G8Ba+hGvfTCvBs+p7qhnBtb+x0j+rKS9WPt1O1OHAvARgEUBkvIeiIg9gcDBgGSwo2NAYXv8+A7f0wb2sXgj2EgA4ZxzA28ccCv1LCiM4xstOGJGhCYwENMZKA5Cs4wQpUqVA01gNaE4uqHeXCgMHDIUEAHJgBUMjPLyNJgS5ysVNkDtcEhAfmhIJ33Fo1COM5rSksANKZSALJ3eIOpdoFPRzBIvB2mVyVS4uTh0nmmd16BzE4tdqER1Oi7VLKC4oskJqsUt0LLGJs9ssc7lMgslh7RRUbAOxo8Mq2BzWNtHgKmhF0FZdWGiSNy0wWDuBI+cg0nEF+EYC6M0htzCw6mKa3IWr/Pw4IrNZOug4Omrq5C1EDk6W+QtQDAVQNACg5ncNqnmUbKduZjJwkdZE8IodrDoJoCKtqMPxWwlga16ujcjApQBaJ3htqqGQBjMN5RdsL+z8pecAwLEPwyYCYUQiCtGIQSySAPnxnspIu0XLbEsX3anr0plFrLNZSIPVKNJmi6t1lp7qsrpEJwAAAA==') format('woff2'), url('//at.alicdn.com/t/font_1313145_r9szngeugmj.woff?t=1566619028667') format('woff'), url('//at.alicdn.com/t/font_1313145_r9szngeugmj.ttf?t=1566619028667') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('//at.alicdn.com/t/font_1313145_r9szngeugmj.svg?t=1566619028667#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.iconread:before {
content: "\e742";
}
.iconweixin:before {
content: "\e632";
}
.iconmanage:before {
content: "\e610";
}
.iconapi:before {
content: "\e668";
}
.iconcode:before {
content: "\e654";
}
.icongithub:before {
content: "\ea0a";
}
.iconnotes:before {
content: "\e687";
}
.header-logo a {
padding: 0;
}
.navbar .menu a {
padding: 0 8px;
}
.navbar .menu .active {
font-weight: 900;
color: #161209;
}
.dark-theme .navbar .menu .active {
color: #fff;
}
.navbar-header a:hover,
.navbar .menu a:hover {
background-color: transparent;
}
header label {
margin-left: 15px;
position: relative;
-webkit-transform: translateY(0.1em) translateX(0.5em);
}
.copyright {
font-size: 14px;
}
.pagination {
display: flex;
flex-direction: row;
justify-content: center;
list-style: none;
white-space: nowrap;
width: 100%;
padding-top: 2em;
}
.pagination a,
.pagination span {
-webkit-font-smoothing: antialiased;
font-size: 12px;
color: #bfbfbf;
letter-spacing: 0.1em;
font-weight: 700;
padding: 5px 5px;
text-decoration: none;
transition: 0.3s;
}
.pagination .page-number {
padding-bottom: 3px;
margin: 0 20px;
box-sizing: border-box;
position: relative;
display: inline;
}
.pagination .page-number.disabled {
display: none;
}
.pagination .page-number:hover a {
color: #000;
}
.dark-theme .pagination .page-number:hover a {
color: #fff;
}
.pagination .page-number:before,
.pagination .page-number:after {
position: absolute;
content: "";
width: 0;
height: 1px;
background: #000;
transition: 0.3s;
bottom: 0px;
}
.dark-theme .pagination .page-number:before,
.dark-theme .pagination .page-number:after {
background: #fff;
}
.pagination .page-number:before .current,
.pagination .page-number:after .current {
width: 100%;
}
.pagination .page-number:before {
left: 50%;
}
.pagination .page-number:after {
right: 50%;
}
.pagination .page-number:hover:before,
.pagination .page-number:hover:after {
width: 50%;
}
.pagination .page-number.current {
color: #000;
}
.dark-theme .pagination .page-number.current {
color: #fff;
}
.pagination .page-number.current:before,
.pagination .page-number.current:after {
width: 60%;
}
.intro {
transform: translateY(20vh);
text-align: center;
}
.intro .avatar {
padding: 10px;
}
.intro .avatar img {
width: 128px;
height: auto;
display: inline-block;
-webkit-border-radius: 100%;
border-radius: 100%;
-webkit-box-shadow: 0 0 0 0.3618em rgba(0, 0, 0, 0.05);
box-shadow: 0 0 0 0.3618em rgba(0, 0, 0, 0.05);
margin: 0 auto;
-webkit-transition: all ease 0.4s;
-moz-transition: all ease 0.4s;
-o-transition: all ease 0.4s;
transition: all ease 0.4s;
cursor: pointer;
}
.intro .avatar img:hover {
position: relative;
-webkit-transform: translateY(-0.75em);
-moz-transform: translateY(-0.75em);
-ms-transform: translateY(-0.75em);
-o-transform: translateY(-0.75em);
transform: translateY(-0.75em);
cursor: pointer;
}
.nickname {
font-size: 2em;
font-weight: normal;
}
.links a {
padding: 0 5px;
}
.links a:hover {
background-color: transparent;
}
.links .iconfont {
font-size: 2em;
}
.post-wrap {
position: relative;
width: 100%;
max-width: 1024px;
margin: 0 auto;
padding-top: 2rem;
}
.archive-item-date {
float: right;
text-align: right;
color: #a9a9b3;
}
.dark-theme .archive-item-date {
color: #87878d;
}
.post-wrap .categories-card {
margin: 0 auto;
margin-top: 1em;
display: flex;
align-items: center;
justify-content: space-between;
flex-direction: row;
flex-wrap: wrap;
padding: 0 2.5em;
line-height: 1.6em;
}
.post-wrap .categories-card .card-item {
font-size: 14px;
text-align: left;
width: 50%;
display: flex;
align-items: flex-start;
position: relative;
}
.post-wrap .categories-card .card-item .categories {
overflow: hidden;
}
.categories h3 {
display: inline-block;
}
.categories span {
float: right;
padding-right: 1em;
}
.categories .more-post-link {
float: right;
}
.tag-cloud-tags {
margin: 10px 0;
padding-top: 2em;
}
.tag-cloud-tags a {
display: inline-block;
position: relative;
margin: 5px 10px;
word-wrap: break-word;
transition-duration: 0.3s;
transition-property: transform;
transition-timing-function: ease-out;
}
.tag-cloud-tags a:active,
.tag-cloud-tags a:focus,
.tag-cloud-tags a:hover {
color: #5A9600;
transform: scale(1.1);
}
.dark-theme .tag-cloud-tags a:active,
.dark-theme .tag-cloud-tags a:focus,
.dark-theme .tag-cloud-tags a:hover {
color: #fff;
}
.tag-cloud-tags a small {
margin: 0 0.3em;
color: #a9a9b3;
}
.dark-theme .tag-cloud-tags a small {
color: #fff;
}
.page {
padding-top: 0;
}
.page .post-content {
margin: 0;
padding-top: 0;
}
.post-wrap p {
font-size: 1em;
margin: 0.5em 0 0.5em 0;
}
.post-wrap .post-header h1 {
margin: 0 !important;
}
.post-wrap .post-title {
font-size: 2em;
line-height: 1.5em;
}
.post-wrap .eror-tip {
text-align: center;
line-height: 1.5em;
margin-top: 250px;
}
.post-wrap .post-meta {
color: rgba(85, 85, 85, 0.529) !important;
}
.dark-theme .post-wrap .post-meta {
color: #87878d !important;
}
.post-wrap .post-meta a {
color: #000;
}
.dark-theme .post-wrap .post-meta a {
color: #eee;
}
.post-wrap .post-meta a:hover {
color: #5A9600;
}
.dark-theme .post-wrap .post-meta a:hover {
color: #fff;
}
.post-content {
padding-top: 2rem;
text-align: justify;
}
.post-copyright {
margin-top: 5rem;
border-top: 1px solid #e8e8e8;
border-bottom: 1px solid #e8e8e8;
}
.post-copyright a {
color: #000;
}
.dark-theme .post-copyright a {
color: #eee;
}
.post-copyright a:hover {
color: #5A9600;
}
.dark-theme .post-copyright a:hover {
color: #fff;
}
.post-copyright .copyright-item {
margin: 5px 0;
}
.post-copyright .lincese {
font-weight: bold;
}
.dark-theme .post-copyright {
border-top: 1px solid #909196;
border-bottom: 1px solid #909196;
}
.post-tags {
padding: 1rem 0 1rem;
display: flex;
justify-content: space-between;
}
.post-nav:before,
.post-nav:after {
content: " ";
display: table;
}
.post-nav a.prev,
.post-nav a.next {
font-weight: 600;
font-size: 16px;
transition-property: transform;
transition-timing-function: ease-out;
transition-duration: 0.3s;
}
.post-nav a.prev {
float: left;
}
.post-nav a.prev::before {
content: "<";
margin-right: 0.5em;
}
.post-nav a.prev:hover {
transform: translateX(-4px);
}
.post-nav a.next {
float: right;
}
.post-nav a.next::after {
content: ">";
margin-left: 0.5em;
}
.post-nav a.next:hover {
transform: translateX(4px);
}
.post-nav a.prev::before,
.post-nav a.next::after {
font-weight: bold;
}
.tag:not(:last-child) a::after {
content: " / ";
}
@media only screen and (min-device-width: 320px) and (max-device-width: 1024px) {
.main {
padding-top: 40pt;
}
.navbar {
display: none;
}
.navbar-mobile {
display: block !important;
position: fixed;
width: 100%;
z-index: 100;
transition: all 0.6s ease 0s;
}
.navbar-mobile .container {
padding: 0;
margin: 0;
line-height: 5.5em;
background: #fff;
}
.navbar-mobile .container .navbar-header {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
padding-right: 1em;
padding-left: 1em;
box-sizing: border-box;
position: relative;
}
.navbar-mobile .container .navbar-header .menu-toggle {
cursor: pointer;
line-height: 5.5em;
padding: auto 2em;
}
.navbar-mobile .container .navbar-header .menu-toggle span {
display: block;
background: #000;
width: 36px;
height: 2px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-transition: 0.25s margin 0.25s, 0.25s transform;
-moz-transition: 0.25s margin 0.25s, 0.25s transform;
transition: 0.25s margin 0.25s, 0.25s transform;
}
.dark-theme .navbar-mobile .container .navbar-header .menu-toggle span {
background: #a9a9b3;
}
.navbar-mobile .container .navbar-header .menu-toggle span:nth-child(1) {
margin-bottom: 8px;
}
.navbar-mobile .container .navbar-header .menu-toggle span:nth-child(3) {
margin-top: 8px;
}
.navbar-mobile .container .navbar-header .menu-toggle.active span {
-webkit-transition: 0.25s margin, 0.25s transform 0.25s;
-moz-transition: 0.25s margin, 0.25s transform 0.25s;
transition: 0.25s margin, 0.25s transform 0.25s;
}
.navbar-mobile .container .navbar-header .menu-toggle.active span:nth-child(1) {
-moz-transform: rotate(45deg) translate(4px, 6px);
-ms-transform: rotate(45deg) translate(4px, 6px);
-webkit-transform: rotate(45deg) translate(4px, 6px);
transform: rotate(45deg) translate(4px, 6px);
}
.navbar-mobile .container .navbar-header .menu-toggle.active span:nth-child(2) {
opacity: 0;
}
.navbar-mobile .container .navbar-header .menu-toggle.active span:nth-child(3) {
-moz-transform: rotate(-45deg) translate(8px, -10px);
-ms-transform: rotate(-45deg) translate(8px, -10px);
-webkit-transform: rotate(-45deg) translate(8px, -10px);
transform: rotate(-45deg) translate(8px, -10px);
}
.navbar-mobile .container .menu {
text-align: center;
background: #fff;
/*border-top: 1px solid #000;*/
padding-top: 1em;
padding-bottom: 1em;
display: none;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1), 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.navbar-mobile .container .menu a {
display: inline-block;
margin: 0 1em;
line-height: 2.5em;
}
.navbar-mobile .container .menu.active {
display: block;
white-space: nowrap;
box-sizing: border-box;
overflow-x: auto;
}
.dark-theme .navbar-mobile .container .menu {
background: #292a2d;
/*border-top: 1px solid #87878d;*/
}
.dark-theme .navbar-mobile .container {
background: #292a2d !important;
}
.archive {
width: 90%;
}
.archive .archive-item .archive-item-date {
display: none;
}
#dynamic-to-top {
display: none !important;
}
.footer {
height: 3rem;
width: 100%;
text-align: center;
line-height: 1.5rem;
padding-top: 2em;
}
.post-warp {
padding-top: 6em;
}
.post-warp .archive-item-date {
display: none;
}
.categories .categories-card .card-item {
width: 100%;
display: flex;
min-height: 0;
}
.categories .categories-card .card-item .categories {
overflow: hidden;
}
.signature-img {
width: 100%;
}
.signature-box img {
height: 100px !important;
}
.signature-img img {
height: 100px;
}
.signature-action, .vip-action {
width: 100%;
}
.signature-action select, .vip-action select {
width: 100%;
}
.signature-action input, .vip-action input {
width: 200px;
float: left;
margin-top: 5px;
}
.signature-action button, .vip-action button {
width: 200px;
margin-top: 5px;
}
.mta-box {
width: 100% !important;
}
.mta-a ul li {
width: 100% !important;
}
.navbar-mobile {
display: none;
}
}
@media only screen and (min-device-width: 768px) {
.navbar-mobile {
display: none;
}
}
@media only screen and (min-width: 1024px) {
.navbar-mobile {
display: none;
}
}
.loader {
box-sizing: content-box;
display: block;
position: absolute;
top: 50%;
left: 50%;
margin: 0;
text-align: center;
z-index: 1000;
-webkit-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
}
.loader:before {
position: absolute;
content: '';
top: 0;
left: 50%;
width: 50px;
height: 50px;
margin: 0 0 0 -25px;
border-radius: 50px;
border: 4px solid rgba(0, 0, 0, .1);
}
.loader:after {
position: absolute;
content: '';
top: 0;
left: 50%;
width: 50px;
height: 50px;
margin: 0 0 0 -25px;
animation: loader .6s linear;
animation-iteration-count: infinite;
border-radius: 50px;
border: 4px solid transparent;
border-top-color: #767676;
box-shadow: 0 0 0 1px transparent;
}
@keyframes loader {
from {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.dark-theme .post-content {
background: #292a2d !important;
color: #eee !important;
}
.dark-theme .post-content p code, .dark-theme .post-content ul li code {
background: #292a2d !important;
}
.apps {
color: red;
font-weight: bold;
}
.signature-box {
margin-top: 100px;
text-align: center;
}
.signature-box img {
border: none;
height: 145px;
margin-bottom: 50px;
}
.signature-action select, .vip-action select {
height: 30px;
}
.signature-action input, .vip-action input {
height: 25px;
padding-left: 5px;
}
.signature-action input:focus, .vip-action input:focus {
outline: none;
}
.signature-action button, .vip-action button {
width: 135px;
height: 30px;
}
.tag-cloud-tags-extend {
padding-top: 0;
}
.hidden {
display: none;
}
.vip-action {
text-align: center;
}
.imgbox {
width: 70%;
text-align: center;
margin: 80px auto 0;
}
.imgbox img {
max-width: 100%;
max-height: 100%;
}
.girl-qrcode {
text-align: center;
}
.girl-img {
width: 20%;
}
.btnbox {
text-align: center;
margin-top: 20px;
}
.tab-box {
margin: 0 auto;
margin-top: 50px;
width: 1150px;
}
.top-tab {
font-weight: bold;
float: left;
margin-top: 5px;
}
.top-tab ul li {
list-style: none;
}
.top-tab ul li a.archive {
color: #5A9600;
}
.top-content {
float: left;
}
.top-content ul li {
list-style: none;
height: 35px;
line-height: 35px;
width: 888px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.mta-box {
width: 75%;
margin: 100px auto 0;
}
.mta-a {
margin: 20px 68px 50px 20px;
}
.mta-a ul {
width: auto;
display: none;
}
.mta-a ul li {
float: left;
width: 25%;
list-style: none;
}
.mta-a-item {
margin: 0 10px;
border: 1px solid #e1e1e1;
background: #fff;
min-height: 60px;
}
.mta-a-title {
padding: 16px 16px 0;
height: 20px;
line-height: 20px;
}
.mta-a-value {
height: 100%;
font-size: 30px;
height: 24px;
margin: 20px 0 20px 30px;
}
.mta-date {
text-align: right;
padding-right: 5px;
}
.dark-theme .mta-a-item {
border: 1px solid #a9a9b3;
background: transparent;
}
.qrcode {
width: 120px;
z-index: 99999;
opacity: 0.8;
margin: 20px auto 0;
}
.qrcode img {
width: 100%;
}
.soul {
text-align: center;
margin-top: 200px;
}
.soul-btn {
background-color: #5a9600;
border: 5px;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
}
.soul-btn:hover {
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19);
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="keywords" content="Meowv,qix,阿星Plus,个人博客">
<meta name="description" content="阿星Plus的个人博客,用于发表原创文章,关注微信公众号:『阿星Plus』了解更多。">
<title>😍阿星Plus⭐⭐⭐</title>
<base href="/" />
<link href="css/app.css" rel="stylesheet" />
</head>
<body>
<app>
<div class="loader"></div>
</app>
<script src="_framework/blazor.webassembly.js"></script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment