Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
aerphouse
ApolloERP
提交
f70f1327
ApolloERP
项目概览
aerphouse
/
ApolloERP
大约 1 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ApolloERP
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
f70f1327
编写于
2月 29, 2024
作者:
I
IanDavid
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
小修改
上级
d497b36e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
11 deletion
+12
-11
Ae.C.Login.Api/Ae.C.Login.Api.Client/Clients/WeChatService/WeChatClient.cs
....C.Login.Api.Client/Clients/WeChatService/WeChatClient.cs
+4
-3
Ae.C.Login.Api/Ae.C.Login.Api/appsettings.json
Ae.C.Login.Api/Ae.C.Login.Api/appsettings.json
+4
-4
MiniAppC/README.md
MiniAppC/README.md
+2
-2
MiniAppC/package.swan.json
MiniAppC/package.swan.json
+1
-1
MiniAppC/project.config.json
MiniAppC/project.config.json
+1
-1
未找到文件。
Ae.C.Login.Api/Ae.C.Login.Api.Client/Clients/WeChatService/WeChatClient.cs
浏览文件 @
f70f1327
...
...
@@ -36,12 +36,13 @@ namespace Ae.C.Login.Api.Client.Clients.WeChatService
/// <returns></returns>
public
async
Task
<
GetJsCodeResponse
>
GetJscode2session
(
LoginPlatform
platform
,
string
jsCode
)
{
GetJsCode2SessionRequest
request
=
new
GetJsCode2SessionRequest
();
string
openId
=
""
;
try
{
//创建调用client
var
client
=
clientFactory
.
CreateClient
(
"WebChat"
);
//整合调用参数
GetJsCode2SessionRequest
request
=
new
GetJsCode2SessionRequest
();
request
.
Js_Code
=
jsCode
;
if
(
platform
==
LoginPlatform
.
YangChe
)
{
...
...
@@ -63,13 +64,13 @@ namespace Ae.C.Login.Api.Client.Clients.WeChatService
}
//调微信接口
string
openId
=
await
client
.
GetAsStringAsync
<
GetJsCode2SessionRequest
>(
configuration
[
"WebChat:jscode2session"
],
request
);
openId
=
await
client
.
GetAsStringAsync
<
GetJsCode2SessionRequest
>(
configuration
[
"WebChat:jscode2session"
],
request
);
GetJsCodeResponse
result
=
JsonConvert
.
DeserializeObject
<
GetJsCodeResponse
>(
openId
);
return
result
;
}
catch
(
Exception
ex
)
{
logger
.
Error
(
$"微信GetJscode2session:Request:
{
JsonConvert
.
SerializeObject
(
new
{
platform
=
platform
,
jsCode
=
jsCode
})}
调用失败
"
,
ex
);
logger
.
Error
(
$"微信GetJscode2session:Request:
{
JsonConvert
.
SerializeObject
(
request
)}
, openId=
{
openId
}
"
,
ex
);
return
null
;
}
}
...
...
Ae.C.Login.Api/Ae.C.Login.Api/appsettings.json
浏览文件 @
f70f1327
...
...
@@ -28,17 +28,17 @@
"RefreshTokenExpiresMinutes"
:
"100080"
//
60
*
24
*
7
},
"Mini"
:
{
"
CheBang"
:
{
"
YangChe"
:
{
//
1
"AppId"
:
""
,
"Secret"
:
""
,
"Grant_Type"
:
"authorization_code"
},
"
YangChe"
:
{
"AppId"
:
""
,
"
CheBang"
:
{
//
2
"AppId"
:
"
wx48091b1fd1f7ad7d
"
,
"Secret"
:
""
,
"Grant_Type"
:
"authorization_code"
},
"QiPei"
:
{
"QiPei"
:
{
//
3
"AppId"
:
""
,
"Secret"
:
""
,
"Grant_Type"
:
"authorization_code"
...
...
MiniAppC/README.md
浏览文件 @
f70f1327
...
...
@@ -13,10 +13,10 @@ cd myproject
yarn
# 开发时构建
npm dev
npm
run
dev
# 打包构建
npm build
npm
run
build
# 指定平台的开发时构建(微信、百度、头条、支付宝)
npm dev:wx
...
...
MiniAppC/package.swan.json
浏览文件 @
f70f1327
{
"appid"
:
"wx
559ad07b5033016f
"
,
"appid"
:
"wx
48091b1fd1f7ad7d
"
,
"setting"
:
{
"urlCheck"
:
false
},
...
...
MiniAppC/project.config.json
浏览文件 @
f70f1327
...
...
@@ -34,7 +34,7 @@
},
"miniprogramRoot"
:
"dist/wx/"
,
"compileType"
:
"miniprogram"
,
"appid"
:
"wx
559ad07b5033016f
"
,
"appid"
:
"wx
48091b1fd1f7ad7d
"
,
"projectname"
:
"miniappc-main"
,
"simulatorType"
:
"wechat"
,
"simulatorPluginLibVersion"
:
{},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录