Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wxBot
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
wxBot
Commits
01e23e80
Commit
01e23e80
authored
Jul 24, 2017
by
Paul0523
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加win登录功能
parent
d9426c5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
src/main/java/com/yg84/weixin/WeChat.java
src/main/java/com/yg84/weixin/WeChat.java
+10
-1
No files found.
src/main/java/com/yg84/weixin/WeChat.java
View file @
01e23e80
...
@@ -281,7 +281,16 @@ public class WeChat {
...
@@ -281,7 +281,16 @@ public class WeChat {
}
}
System
.
out
.
println
(
"\033[47;30m \033[0m"
);
System
.
out
.
println
(
"\033[47;30m \033[0m"
);
}
else
if
(
SystemUtils
.
IS_OS_WINDOWS
){
}
else
if
(
SystemUtils
.
IS_OS_WINDOWS
){
int
width
=
300
;
// 二维码图片宽度
int
height
=
300
;
// 二维码图片高度
String
format
=
"png"
;
// 二维码的图片格式
BitMatrix
bitMatrix
=
new
MultiFormatWriter
().
encode
(
text
,
BarcodeFormat
.
QR_CODE
,
width
,
height
,
hints
);
// 生成二维码
File
outputFile
=
new
File
(
"./result.png"
);
MatrixToImageWriter
.
writeToFile
(
bitMatrix
,
format
,
outputFile
);
Runtime
run
=
Runtime
.
getRuntime
();
System
.
out
.
println
(
"cmd /c start "
+
outputFile
.
getAbsolutePath
().
replace
(
".\\"
,
""
).
replace
(
":\\"
,
":\\\\"
));
run
.
exec
(
"cmd /c start "
+
outputFile
.
getAbsolutePath
().
replace
(
".\\"
,
""
).
replace
(
":\\"
,
":\\\\"
));
}
else
if
(
SystemUtils
.
IS_OS_MAC
)
{
}
else
if
(
SystemUtils
.
IS_OS_MAC
)
{
int
width
=
300
;
// 二维码图片宽度
int
width
=
300
;
// 二维码图片宽度
int
height
=
300
;
// 二维码图片高度
int
height
=
300
;
// 二维码图片高度
...
...
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