Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FMVip_LXJ
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhenfei.zhang
FMVip_LXJ
Commits
c6b8768a
Commit
c6b8768a
authored
Dec 12, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab.freemud.com:zhenfei.zhang/FMVip_LXJ into dev
parents
870cd5ed
45d1cce7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
FMVip_LXJ/task/fmp_redeem.cpp
+12
-5
No files found.
FMVip_LXJ/task/fmp_redeem.cpp
View file @
c6b8768a
...
...
@@ -104,7 +104,7 @@ QJsonObject FMPRedeem::Redeem(const QJsonObject &request)
if
(
scanningDialog
.
exec
()
!=
QDialog
::
Accepted
)
{
QJsonObject
ret
;
ret
[
"status
C
ode"
]
=
FM_API_WINDOWCLOSE
;
ret
[
"status
_c
ode"
]
=
FM_API_WINDOWCLOSE
;
ret
[
"msg"
]
=
"窗口关闭"
;
return
ret
;
}
...
...
@@ -283,7 +283,6 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
QJsonObject
redeemResult
;
QJsonObject
retJson
=
SendRequest
(
reqData
);
qDebug
()
<<
retJson
;
int
statusCode
=
retJson
[
"statusCode"
].
toInt
();
switch
(
statusCode
)
{
...
...
@@ -320,14 +319,14 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
ErrCodeDialog
::
showForErr
(
coupon
,
QString
(
"error:"
).
append
(
QString
::
number
(
statusCode
)));
break
;
}
redeemResult
[
"status
C
ode"
]
=
retJson
[
"statusCode"
];
redeemResult
[
"status
_c
ode"
]
=
retJson
[
"statusCode"
];
redeemResult
[
"msg"
]
=
retJson
[
"msg"
].
toString
();
return
redeemResult
;
}
else
{
QJsonObject
retJson
;
retJson
[
"status
C
ode"
]
=
FM_API_WINDOWCLOSE
;
retJson
[
"status
_c
ode"
]
=
FM_API_WINDOWCLOSE
;
retJson
[
"msg"
]
=
"窗口关闭"
;
return
retJson
;
}
...
...
@@ -337,18 +336,24 @@ QJsonObject FMPRedeem::ShowForHasConsum(QJsonObject json)
{
QString
storeInfo
=
QString
(
"%1(%2)"
).
arg
(
_store_id
).
arg
(
_station_id
);
ConsumptionDialog
::
ShowForHasConsum
(
json
[
"msg"
].
toString
(),
""
,
storeInfo
,
_coupon
);
json
[
"status_code"
]
=
json
[
"statusCode"
];
json
.
remove
(
"statusCode"
);
return
json
;
}
QJsonObject
FMPRedeem
::
ShowForInvalid
(
QJsonObject
json
)
{
ErrCodeDialog
::
showForInvalid
(
_coupon
);
json
[
"status_code"
]
=
json
[
"statusCode"
];
json
.
remove
(
"statusCode"
);
return
json
;
}
QJsonObject
FMPRedeem
::
ShowForExpird
(
QJsonObject
json
)
{
ErrCodeDialog
::
showForExpird
(
""
,
""
,
""
,
_coupon
);
json
[
"status_code"
]
=
json
[
"statusCode"
];
json
.
remove
(
"statusCode"
);
return
json
;
}
...
...
@@ -357,6 +362,8 @@ QJsonObject FMPRedeem::ShowForErr(QJsonObject json)
int
statusCode
=
json
[
"statusCode"
].
toInt
();
QString
msg
=
json
[
"msg"
].
toString
();
ErrCodeDialog
::
showForErr
(
_coupon
,
QString
(
"%1: %2"
).
arg
(
QString
::
number
(
statusCode
)).
arg
(
msg
));
json
[
"status_code"
]
=
json
[
"statusCode"
];
json
.
remove
(
"statusCode"
);
return
json
;
}
...
...
@@ -364,7 +371,7 @@ QJsonObject FMPRedeem::ShowForMismatch(QJsonObject json)
{
ErrCodeDialog
::
showForMismatch
(
_coupon
,
"券和商品不匹配"
);
QJsonObject
mismatch
;
mismatch
[
"status
C
ode"
]
=
31
;
mismatch
[
"status
_c
ode"
]
=
31
;
mismatch
[
"msg"
]
=
"券和商品不匹配"
;
return
mismatch
;
}
...
...
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