Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
ad80e5a4
Commit
ad80e5a4
authored
Jun 23, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
8b3821d9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
PublishController.cs
Mall.WebApi/Controllers/AppletWeChat/PublishController.cs
+5
-5
No files found.
Mall.WebApi/Controllers/AppletWeChat/PublishController.cs
View file @
ad80e5a4
...
@@ -100,7 +100,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
...
@@ -100,7 +100,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
{
{
try
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
,
""
);
string
result
=
Mall
.
Common
.
Plugin
.
HttpHelper
.
HttpGet
(
URL
,
Encoding
.
UTF8
,
""
);
if
(
result
.
Length
>
200
&&
!
result
.
Contains
(
"data:image/png;base64,"
))
if
(
result
.
Length
>
200
&&
!
result
.
Contains
(
"data:image/png;base64,"
))
{
{
...
@@ -147,14 +147,14 @@ namespace Mall.WebApi.Controllers.AppletWeChat
...
@@ -147,14 +147,14 @@ namespace Mall.WebApi.Controllers.AppletWeChat
{
{
if
(
string
.
IsNullOrWhiteSpace
(
query
.
Version
))
if
(
string
.
IsNullOrWhiteSpace
(
query
.
Version
))
{
{
query
.
Version
=
"1.0.0"
;
query
.
Version
=
"1.0.0
0
"
;
}
}
int
version
=
Convert
.
ToInt32
(
query
.
Version
.
Replace
(
"."
,
""
));
int
version
=
Convert
.
ToInt32
(
query
.
Version
.
Replace
(
"."
,
""
));
version
+=
1
;
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
,
""
);
string
result
=
Mall
.
Common
.
Plugin
.
HttpHelper
.
HttpGet
(
URL
,
Encoding
.
UTF8
,
""
);
JObject
parmsJob
=
JObject
.
Parse
(
result
);
JObject
parmsJob
=
JObject
.
Parse
(
result
);
if
(
parmsJob
.
ContainsKey
(
"code"
))
if
(
parmsJob
.
ContainsKey
(
"code"
))
...
@@ -164,7 +164,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
...
@@ -164,7 +164,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
//更新版本
//更新版本
appletWeChatModule
.
UpdateVersion
(
query
);
appletWeChatModule
.
UpdateVersion
(
query
);
return
ApiResult
.
Success
(
"上传成功"
,
result
);
return
ApiResult
.
Success
(
"上传成功"
,
new
{
result
,
URL
}
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
...
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