Commit ad80e5a4 authored by 吴春's avatar 吴春

提交代码

parent 8b3821d9
......@@ -100,7 +100,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
{
try
{
string URL = $"http://127.0.0.1:{developerKitsPort}/v2/preview?project={Mall.Common.Plugin.StringHelper.UrlEncode(projectUrl+ "/miniProject")}&qr-format=base64";
string URL = $"http://127.0.0.1:{developerKitsPort}/v2/preview?project={Mall.Common.Plugin.StringHelper.UrlEncode(projectUrl + "/miniProject")}&qr-format=base64";
string result = Mall.Common.Plugin.HttpHelper.HttpGet(URL, Encoding.UTF8, "");
if (result.Length > 200 && !result.Contains("data:image/png;base64,"))
{
......@@ -147,14 +147,14 @@ namespace Mall.WebApi.Controllers.AppletWeChat
{
if (string.IsNullOrWhiteSpace(query.Version))
{
query.Version = "1.0.0";
query.Version = "1.0.00";
}
int version = Convert.ToInt32(query.Version.Replace(".", ""));
version += 1;
query.Version = version.ToString().Substring(0, version.ToString().Length - 2) + "." + version.ToString().Substring(version.ToString().Length - 2, 1) + "." + version.ToString().Substring(version.ToString().Length - 1, 1);
query.Version = version.ToString().Substring(0, version.ToString().Length - 3) + "." + version.ToString().Substring(version.ToString().Length - 3, 1) + "." + version.ToString().Substring(version.ToString().Length - 1, 2);
string URL = $"http://127.0.0.1:{developerKitsPort}/v2/upload?project={Mall.Common.Plugin.StringHelper.UrlEncode(projectUrl+ "/miniProject")}&version=V{query.Version}&desc=微信开发者工具HTTP上传&appid={model.MiniAppId}";
string URL = $"http://127.0.0.1:{developerKitsPort}/v2/upload?project={Mall.Common.Plugin.StringHelper.UrlEncode(projectUrl + "/miniProject")}&version=V{query.Version}&desc=微信开发者工具HTTP上传&appid={model.MiniAppId}";
string result = Mall.Common.Plugin.HttpHelper.HttpGet(URL, Encoding.UTF8, "");
JObject parmsJob = JObject.Parse(result);
if (parmsJob.ContainsKey("code"))
......@@ -164,7 +164,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
//更新版本
appletWeChatModule.UpdateVersion(query);
return ApiResult.Success("上传成功", result);
return ApiResult.Success("上传成功", new { result, URL });
}
catch (Exception ex)
{
......
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