Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
ShopERP
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杜龙飞
ShopERP
Commits
710381ae
Commit
710381ae
authored
Aug 26, 2025
by
PC-20220610JUCQ\Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
<develop>:(ShopERP 端)<无> ShopERP 创建对外的 API 接口。
parent
2465c933
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
13 deletions
+1
-13
CoreCms.Net.Web.WebApi/Infrastructure/ServicesContainerExtend.cs
+0
-10
CoreCms.Net.Web.WebApi/appsettings.json
+1
-3
No files found.
CoreCms.Net.Web.WebApi/Infrastructure/ServicesContainerExtend.cs
View file @
710381ae
...
...
@@ -66,14 +66,6 @@ namespace CoreCms.Net.Web.WebApi.Infrastructure
//使用 SignalR
builder
.
Services
.
AddSignalR
();
// 引入Payment 依赖注入(支付宝支付/微信支付)
builder
.
Services
.
AddAlipay
();
builder
.
Services
.
AddWeChatPay
();
// 在 appsettings.json 中 配置选项
builder
.
Services
.
Configure
<
WeChatPayOptions
>(
builder
.
Configuration
.
GetSection
(
"WeChatPay"
));
builder
.
Services
.
Configure
<
AlipayOptions
>(
builder
.
Configuration
.
GetSection
(
"Alipay"
));
// 注入工厂 HTTP 客户端
builder
.
Services
.
AddHttpClient
();
...
...
@@ -105,8 +97,6 @@ namespace CoreCms.Net.Web.WebApi.Infrastructure
{
//数据格式首字母小写 不使用驼峰
p
.
SerializerSettings
.
ContractResolver
=
new
CamelCasePropertyNamesContractResolver
();
//不使用驼峰样式的key
//p.SerializerSettings.ContractResolver = new DefaultContractResolver();
//忽略循环引用
p
.
SerializerSettings
.
ReferenceLoopHandling
=
ReferenceLoopHandling
.
Ignore
;
//设置时间格式(必须使用yyyy/MM/dd格式,因为ios系统不支持2018-03-29格式的时间,只识别2018/03/09这种格式。)
...
...
CoreCms.Net.Web.WebApi/appsettings.json
View file @
710381ae
{
"ConnectionStrings"
:
{
"DbType"
:
"MySql"
,
//
如果采用容器化部署Service
要写成mysql的服务名,否则写地址
"SqlConnection"
:
"Server=192.168.8.109;Port=3306;Database=ShopERP;Uid=root;Pwd=123456;CharSet=utf8;pooling=true;SslMode=None;Allow User Variables=true;Convert Zero Datetime=True;Allow Zero Datetime=True;"
//
Mysql数据库链接字符串,请保持后面的属性别少。经过测试,mysql版本需要
5.7
或以上
},
"Consul"
:
{
"consulAddress"
:
"http://127.0.0.1:8500"
,
...
...
@@ -13,7 +11,7 @@
},
//定时任务管理面板的账户密码
"HangFire"
:
{
"Login"
:
"
ShopERP
"
,
"Login"
:
"
admin
"
,
"PassWord"
:
"oq9wfbdeasygj647v"
},
//Swagger授权访问设置
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment