Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huangzhicong
/
SmartCanteen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
75095b78
authored
Jun 02, 2020
by
pye52
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复部分二维码扫描异常的问题
parent
043dd808
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
app/src/main/java/com/bgycc/smartcanteen/viewModel/QRCodeViewModel.java
+2
-3
No files found.
app/src/main/java/com/bgycc/smartcanteen/viewModel/QRCodeViewModel.java
View file @
75095b78
...
@@ -18,7 +18,6 @@ import com.bgycc.smartcanteen.utils.SmartCanteenUtils;
...
@@ -18,7 +18,6 @@ import com.bgycc.smartcanteen.utils.SmartCanteenUtils;
import
com.blankj.utilcode.util.LogUtils
;
import
com.blankj.utilcode.util.LogUtils
;
import
com.google.gson.JsonObject
;
import
com.google.gson.JsonObject
;
import
com.google.gson.JsonParser
;
import
com.google.gson.JsonParser
;
import
com.google.gson.JsonSyntaxException
;
import
java.util.concurrent.ScheduledFuture
;
import
java.util.concurrent.ScheduledFuture
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
@@ -99,8 +98,8 @@ public class QRCodeViewModel extends ViewModel {
...
@@ -99,8 +98,8 @@ public class QRCodeViewModel extends ViewModel {
JsonObject
jsonObject
;
JsonObject
jsonObject
;
try
{
try
{
jsonObject
=
JsonParser
.
parseString
(
scanData
).
getAsJsonObject
();
jsonObject
=
JsonParser
.
parseString
(
scanData
).
getAsJsonObject
();
}
catch
(
JsonSyntaxException
js
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
e
(
TAG
,
"非法的指令格式: "
+
scanData
);
LogUtils
.
e
(
TAG
,
"非法的指令格式: "
+
scanData
,
e
);
qrCodeState
.
postValue
(
new
QRCodeState
(
QRCodeState
.
FAILED
));
qrCodeState
.
postValue
(
new
QRCodeState
(
QRCodeState
.
FAILED
));
return
;
return
;
}
}
...
...
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