Skip to content

Commit

Permalink
Merge pull request #3105 from JeffreySu/Developer
Browse files Browse the repository at this point in the history
Developer
  • Loading branch information
JeffreySu authored Dec 18, 2024
2 parents c4b9cb0 + fe66683 commit 5da425d
Show file tree
Hide file tree
Showing 24 changed files with 90 additions and 34 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ yarn.lock
/Samples/MP/Senparc.Weixin.Sample.MP.Simple/appsettings.Development.json
/src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/AdvancedAPIs/Media/*.jpg
/src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/*.jpg
/Samples/SamplePublish/
6 changes: 3 additions & 3 deletions Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8.sln
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Senparc.Weixin.TenPayV3.Tes
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Senparc.Weixin.Sample.MP.net8", "..\..\MP\Senparc.Weixin.Sample.MP\Senparc.Weixin.Sample.MP.net8.csproj", "{81A078A9-97D1-446D-88ED-87F4BB484D91}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3.2 不同微信模块 Samples", "3.2 不同微信模块 Samples", "{34CFB1D8-6025-4E93-A67F-D94DD3B9198F}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "03.02 不同微信模块 Samples", "03.02 不同微信模块 Samples", "{34CFB1D8-6025-4E93-A67F-D94DD3B9198F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3.1 完整 Sample(进阶)", "3.1 完整 Sample(进阶)", "{1B168C93-E3E3-4939-8EDC-19CE4E041874}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "03.01 完整 Sample(进阶)", "03.01 完整 Sample(进阶)", "{1B168C93-E3E3-4939-8EDC-19CE4E041874}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Senparc.Weixin.Sample.Shared", "..\..\Shared\Senparc.Weixin.Sample.Shared\Senparc.Weixin.Sample.Shared.shproj", "{9FE36012-8B32-488E-96AD-BA7CEDAEEAB8}"
EndProject
Expand All @@ -95,7 +95,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Senparc.Weixin.Sample.TenPa
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Senparc.Weixin.Sample.Shared", "..\Senparc.Weixin.Sample.Shared\Senparc.Weixin.Sample.Shared.shproj", "{81A03BCD-B887-4A40-8867-FF6B8D61CFC3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3.3 人工智能(AI)", "3.3 人工智能(AI)", "{AB1460AF-4BE8-4CC2-AF3B-3473B5A41778}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "03.03 人工智能(AI)", "03.03 人工智能(AI)", "{AB1460AF-4BE8-4CC2-AF3B-3473B5A41778}"
ProjectSection(SolutionItems) = preProject
..\..\..\Samples with AI\readme.md = ..\..\..\Samples with AI\readme.md
EndProjectSection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
目前 Senparc.Weixin SDK 已支持微信 8.x API 中几乎所有接口以及<strong>小程序</strong>
</h1>
<p>
当前站点运行 <a href="https://github.com/JeffreySu/WeiXinMPSDK/tree/master/Samples/All/net6-mvc/" target="_blank">Sample</a>
当前站点运行 <a href="https://github.com/JeffreySu/WeiXinMPSDK/tree/master/Samples/All/net8-mvc/" target="_blank">Sample</a>
版本:v@(TempData["SampleVersion"]) (@TempData["BuildTime"])
</p>
<p>&nbsp;</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
using Senparc.Weixin.MP.Entities.Request;
using Senparc.Weixin.MP.MessageContexts;
using Senparc.Weixin.MP.MessageHandlers;
using System;
using System.IO;
using System.Threading.Tasks;

namespace Senparc.Weixin.Sample.MP
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<EmbeddedResource Include="wwwroot\**\*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Senparc.Weixin.All" Version="2024.10.20.1" />
<PackageReference Include="Senparc.Weixin.All" Version="2024.11.29" />
</ItemGroup>
<!-- 此节点为 Sample 共享文件需要而添加,实际项目无需添加 -->
<Import Project="..\..\Shared\Senparc.Weixin.Sample.Shared\Senparc.Weixin.Sample.Shared.projitems" Label="Shared" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ var result = await Senparc.Weixin.MP.AdvancedAPIs.UserApi.GetAsync(accessToken);

wx.ready(function () {
var url = '@(Context.Request.Scheme)://sdk.weixin.senparc.com';
var link = url + '@(Context.Request.PathAndQuery())';
var link = url + '@(Context.Request.Path + Context.Request.QueryString)';
var imgUrl = url + '/images/v2/ewm_01.png';

//转发到朋友圈
Expand Down
2 changes: 1 addition & 1 deletion Samples/MP/Senparc.Weixin.Sample.MP.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Senparc.Weixin.Sample.MP", "Senparc.Weixin.Sample.MP\Senparc.Weixin.Sample.MP.csproj", "{99EEB8CC-FE5E-4A1D-80C2-9A0C1FA757BD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Senparc.Weixin.Sample.MP", "Senparc.Weixin.Sample.MP\Senparc.Weixin.Sample.MP.net8.csproj", "{99EEB8CC-FE5E-4A1D-80C2-9A0C1FA757BD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Senparc.Weixin.Sample.MP.Simple", "Senparc.Weixin.Sample.MP.Simple\Senparc.Weixin.Sample.MP.Simple.csproj", "{4A5EF3E4-3466-49C6-8A16-85EA6BD781BF}"
EndProject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ namespace Senparc.Weixin.Sample.MP.Controllers
using Senparc.Weixin.MP;
using Senparc.Weixin.MP.Entities.Request;
using Senparc.Weixin.MP.MvcExtension;

using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;

public partial class WeixinController : BaseController
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
using Senparc.Weixin.MP.Entities.Request;
using Senparc.Weixin.MP.MessageContexts;
using Senparc.Weixin.MP.MessageHandlers;
using System;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;

namespace Senparc.Weixin.Sample.MP
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Senparc.Weixin.MP.AdvancedAPIs;
using Senparc.Weixin.MP.Entities;
using System.Diagnostics;
using System.Threading.Tasks;


namespace Senparc.Weixin.Sample.MP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@

<!--引用 Nuget 包-->
<ItemGroup>
<PackageReference Include="Senparc.Weixin.AspNet" Version="1.3.5" />
<PackageReference Include="Senparc.Weixin.MP" Version="16.22.4" />
<PackageReference Include="Senparc.Weixin.MP.Middleware" Version="1.3.5" />
<PackageReference Include="Senparc.Weixin.MP.MVC" Version="7.15.5" />
<PackageReference Include="Senparc.Weixin.AspNet" Version="1.4.7" />
<PackageReference Include="Senparc.Weixin.MP" Version="16.23.6" />
<PackageReference Include="Senparc.Weixin.MP.Middleware" Version="1.4.7" />
<PackageReference Include="Senparc.Weixin.MP.MVC" Version="7.16.7" />
</ItemGroup>

<!--直接引用源码-->
Expand All @@ -37,6 +37,4 @@
<ProjectReference Include="..\..\..\src\Senparc.Weixin.MP.MvcExtension\Senparc.Weixin.MP.MvcExtension\Senparc.Weixin.MP.MvcExtension.net8.csproj" />
<ProjectReference Include="..\..\..\src\Senparc.Weixin.MP\Senparc.Weixin.MP\Senparc.Weixin.MP.net8.csproj" />
</ItemGroup>-->


</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ var result = await Senparc.Weixin.MP.AdvancedAPIs.UserApi.GetAsync(accessToken);

wx.ready(function () {
var url = '@(Context.Request.Scheme)://sdk.weixin.senparc.com';
var link = url + '@(Context.Request.PathAndQuery())';
var link = url + '@(Context.Request.Path + Context.Request.QueryString)';
var imgUrl = url + '/images/v2/ewm_01.png';

//转发到朋友圈
Expand Down
2 changes: 1 addition & 1 deletion Samples/MP/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
项目 | 说明
---- | ----
Senparc.Weixin.Sample.MP | 公众号主要功能的简要演示项目
Senparc.Weixin.Sample.MP.Simple | 公众号的精简模式演示项目
Senparc.Weixin.Sample.MP.Simple | 公众号的最精简模式演示项目

> 此项目中所演示的精简模式等,都可以举一反三用在其他平台上(如小程序、企业微信、微信支付等)。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<a href="https://github.com/JeffreySu/WeiXinMPSDK/tree/Developer" target="_blank">.NET 3.5 / 4.0 / 4.5 / .NET Standard 2.x / .NET Core 2.x / .NET Core 3.x / .NET 6.0 / .NET 8.0</a> 多种框架。
</p>
<p>Senparc.Weixin SDK 是目前使用率最高的微信 .NET SDK,也是国内最受欢迎的 .NET 开源项目之一,是唯一入选 <strong>2021“科创中国”开源创新榜</strong><a href="https://tv.sohu.com/v/dXMvOTkyNjI2MTAvMzI3NjU3NDI0LnNodG1s.html?key=/v/dXMvOTkyNjI2MTAvMzI3NjU3NDI0LnNodG1s.html?vid=327657424&vid=327657424" target="_blank">[1]</a> <a href="https://cccst.org.cn/detail?id=846" target="_blank">[2]</a> 的 .NET 项目。</p>
<p>项目自 2012 年开源,2013 年 1 月起正式发布到 GitHub。10 余年来,我们一直保持着项目的持续更新,并将完整的源代码以及设计思想毫无保留地分享给大家,希望有更多的人可以从中受益,理解并传播开源的精神,一同助力中国开源事业!感恩一路上给我们提供帮助的朋友们!</p>
<p>项目自 2012 年开源,2013 年 1 月起正式发布到 GitHub。十几年来,我们一直保持着项目的持续更新,并将完整的源代码以及设计思想毫无保留地分享给大家,希望有更多的人可以从中受益,理解并传播开源的精神,一同助力中国开源事业!感恩一路上给我们提供帮助的朋友们!</p>
<div id="title_about_team" class="target-fix"></div>
<h5>团队</h5>
<p>Senparc.Weixin 由盛派网络及盛派开发者社区核心团队负责维护,同时正在得到大量来自社区成员和社会各界的支持,欢迎加入我们!</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@
global using Microsoft.Extensions.Options;
global using Senparc.Weixin.Entities;
global using Microsoft.Extensions.FileProviders;
global using Microsoft.AspNetCore.Builder;
global using Microsoft.AspNetCore.Http;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Hosting;
global using System.IO;
4 changes: 3 additions & 1 deletion Samples/TenPayV2/Senparc.Weixin.Sample.TenPayV2/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
var builder = WebApplication.CreateBuilder(args);
using Senparc.Weixin.RegisterServices;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@

<!--引用 Nuget 包-->
<ItemGroup>
<PackageReference Include="Senparc.Weixin.AspNet" Version="1.3.5" />
<PackageReference Include="Senparc.Weixin.MP" Version="16.22.4" />
<PackageReference Include="Senparc.Weixin.MP.MVC" Version="7.15.5" />
<PackageReference Include="Senparc.Weixin.TenPay" Version="1.16.4" />
<PackageReference Include="Senparc.Weixin.AspNet" Version="1.4.7" />
<PackageReference Include="Senparc.Weixin.MP" Version="16.23.6" />
<PackageReference Include="Senparc.Weixin.MP.MVC" Version="7.16.7" />
<PackageReference Include="Senparc.Weixin.TenPay" Version="1.17.6" />
<PackageReference Include="System.Drawing.Common" Version="8.0.0" />
<PackageReference Include="ZXing.Net" Version="0.16.9" />
</ItemGroup>
Expand Down
8 changes: 7 additions & 1 deletion Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
var builder = WebApplication.CreateBuilder(args);
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System.IO;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@

<!--引用 Nuget 包-->
<ItemGroup>
<PackageReference Include="Senparc.Weixin.AspNet" Version="1.3.5" />
<PackageReference Include="Senparc.Weixin.MP" Version="16.22.4" />
<PackageReference Include="Senparc.Weixin.MP.MVC" Version="7.15.5" />
<PackageReference Include="Senparc.Weixin.TenpayV3" Version="1.6.6" />
<PackageReference Include="Senparc.Weixin.AspNet" Version="1.4.7" />
<PackageReference Include="Senparc.Weixin.MP" Version="16.23.6" />
<PackageReference Include="Senparc.Weixin.MP.MVC" Version="7.16.7" />
<PackageReference Include="Senparc.Weixin.TenpayV3" Version="1.7.8" />
<PackageReference Include="System.Drawing.Common" Version="8.0.0" />
<PackageReference Include="ZXing.Net" Version="0.16.9" />
</ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions Samples/Work/Senparc.Weixin.Sample.Work/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Senparc.Weixin.Work.Containers;
using System.IO;

var builder = WebApplication.CreateBuilder(args);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

<!--引用 Nuget 包-->
<ItemGroup>
<PackageReference Include="Senparc.Weixin.AspNet" Version="1.3.5" />
<PackageReference Include="Senparc.Weixin.Work" Version="3.24.0" />
<PackageReference Include="Senparc.Weixin.Work.Middleware" Version="1.3.5" />
<PackageReference Include="Senparc.Weixin.AspNet" Version="1.4.7" />
<PackageReference Include="Senparc.Weixin.Work" Version="3.25.2" />
<PackageReference Include="Senparc.Weixin.Work.Middleware" Version="1.4.7" />
</ItemGroup>

<!--直接引用源码-->
Expand Down
6 changes: 6 additions & 0 deletions Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System.IO;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@

<!--引用 Nuget 包-->
<ItemGroup>
<PackageReference Include="Senparc.Weixin.AspNet" Version="1.3.5" />
<PackageReference Include="Senparc.Weixin.TenPayV3" Version="1.6.6" />
<PackageReference Include="Senparc.Weixin.WxOpen" Version="3.22.0" />
<PackageReference Include="Senparc.Weixin.WxOpen.Middleware" Version="1.3.5" />
<PackageReference Include="Senparc.Weixin.AspNet" Version="1.4.7" />
<PackageReference Include="Senparc.Weixin.TenPayV3" Version="1.7.8" />
<PackageReference Include="Senparc.Weixin.WxOpen" Version="3.23.2" />
<PackageReference Include="Senparc.Weixin.WxOpen.Middleware" Version="1.4.7" />
</ItemGroup>

<!--直接引用源码-->
Expand Down
21 changes: 21 additions & 0 deletions Samples/sample-publish.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@echo off
setlocal

echo Publishing MP/Senparc.Weixin.Sample.MP/Senparc.Weixin.Sample.MP.net8.csproj...
dotnet publish MP/Senparc.Weixin.Sample.MP/Senparc.Weixin.Sample.MP.net8.csproj -o ./SamplePublish/MP

echo Publishing TenPayV2/Senparc.Weixin.Sample.TenPayV2/Senparc.Weixin.Sample.TenPayV2.net8.csproj...
dotnet publish TenPayV2/Senparc.Weixin.Sample.TenPayV2/Senparc.Weixin.Sample.TenPayV2.net8.csproj -o ./SamplePublish/TenPayV2

echo Publishing TenPayV3/Senparc.Weixin.Sample.TenPayV3/Senparc.Weixin.Sample.TenPayV3.net8.csproj...
dotnet publish TenPayV3/Senparc.Weixin.Sample.TenPayV3/Senparc.Weixin.Sample.TenPayV3.net8.csproj -o ./SamplePublish/TenPayV3

echo Publishing Work/Senparc.Weixin.Sample.Work/Senparc.Weixin.Sample.Work.net8.csproj...
dotnet publish Work/Senparc.Weixin.Sample.Work/Senparc.Weixin.Sample.Work.net8.csproj -o ./SamplePublish/Work

echo Publishing WxOpen/Senparc.Weixin.Sample.WxOpen/Senparc.Weixin.Sample.WxOpen.net8.csproj...
dotnet publish WxOpen/Senparc.Weixin.Sample.WxOpen/Senparc.Weixin.Sample.WxOpen.net8.csproj -o ./SamplePublish/WxOpen

echo All projects have been published.
endlocal
pause

0 comments on commit 5da425d

Please sign in to comment.