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
ce5f3361
Commit
ce5f3361
authored
Aug 02, 2017
by
fangzhipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复一些问题
parent
49b2510e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
11 deletions
+25
-11
result.png
result.png
+0
-0
src/main/java/com/yg84/weixin/WeChat.java
src/main/java/com/yg84/weixin/WeChat.java
+25
-11
No files found.
result.png
View replaced file @
49b2510e
View file @
ce5f3361
1.47 KB
|
W:
|
H:
1.48 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/main/java/com/yg84/weixin/WeChat.java
View file @
ce5f3361
...
...
@@ -193,7 +193,7 @@ public class WeChat {
Pattern
pattern
=
Pattern
.
compile
(
"retcode:\"(.*)\",selector:\"(.*)\""
);
Matcher
m
=
pattern
.
matcher
(
msg
);
m
.
find
();
if
(
"2
"
.
equals
(
m
.
group
(
2
)))
{
if
(
!
"0
"
.
equals
(
m
.
group
(
2
)))
{
receiveMsg
();
}
return
m
.
group
(
1
);
...
...
@@ -350,16 +350,17 @@ public class WeChat {
break
;
}
}
SYNC_TIMER
.
schedule
(
new
TimerTask
()
{
@Override
public
void
run
()
{
try
{
sync
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
},
1000
,
2000
);
new
ReceiveMsgThread
().
start
();
// SYNC_TIMER.schedule(new TimerTask() {
// @Override
// public void run() {
// try {
// sync();
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
// }, 1000, 2000);
}
private
void
initMyAcount
(
JSONObject
msgObject
)
{
...
...
@@ -397,4 +398,17 @@ public class WeChat {
System
.
out
.
println
(
m
.
find
());
}
class
ReceiveMsgThread
extends
Thread
{
@Override
public
void
run
()
{
while
(
true
)
{
try
{
sync
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
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