Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_vip
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
fmp_vip
Commits
b0ec2e4e
Commit
b0ec2e4e
authored
Sep 27, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 认证返回levelCode字段。 2. 认证将memberDiscount转为"Y"或空字符串。
parent
82dc02b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
+9
-1
fmp_vip.pro
+2
-0
task/tasklogin.cpp
+7
-1
No files found.
fmp_vip.pro
View file @
b0ec2e4e
...
...
@@ -11,6 +11,8 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG
+=
c
++
11
#DEFINES += FMTEST
SOURCES
+=
\
fmp_vip
.
cpp
\
fmp_vip_p
.
cpp
\
...
...
task/tasklogin.cpp
View file @
b0ec2e4e
...
...
@@ -52,6 +52,7 @@ void TaskLogin::packagePOSRsp()
posRspJsonObj
[
"name"
]
=
getServerJsonValue
(
"name"
).
toString
();
posRspJsonObj
[
"sex"
]
=
getServerJsonValue
(
"sex"
).
toString
();
posRspJsonObj
[
"birthday"
]
=
getServerJsonValue
(
"birthday"
).
toString
();
posRspJsonObj
[
"levelCode"
]
=
getServerJsonValue
(
"levelCode"
).
toString
();
QString
phone
=
getServerJsonValue
(
"mobile"
).
toString
();
if
(
phone
.
isEmpty
())
{
phone
=
session
()
->
data
(
PosProps
.
Phone
).
toString
();
...
...
@@ -61,7 +62,9 @@ void TaskLogin::packagePOSRsp()
posRspJsonObj
[
"email"
]
=
getServerJsonValue
(
"email"
).
toString
();
posRspJsonObj
[
PosProps
.
Member_sign
]
=
session
()
->
data
(
PosProps
.
Member_sign
).
toString
();
posRspJsonObj
[
"memberDiscount"
]
=
getServerJsonValue
(
"memberDiscount"
).
toDouble
(
1.00
);
QJsonValue
discount
=
getServerJsonValue
(
"memberDiscount"
);
posRspJsonObj
[
"memberDiscount"
]
=
(
discount
.
isDouble
()
&&
discount
.
toDouble
(
1.0
)
!=
1.0
)
?
"Y"
:
""
;
}
void
TaskLogin
::
onLogin
()
...
...
@@ -97,6 +100,9 @@ void TaskLogin::onLogin()
QString
scoreStr
=
QString
::
number
(
score
);
bool
canPay
=
(
getServerJsonValue
(
PosProps
.
CanPay
).
toInt
()
==
1
);
#ifdef FMTEST
canPay
=
true
;
#endif
if
(
!
canPay
)
{
if
(
getPosJsonValue
(
PosProps
.
Fm_cmd
).
toInt
()
!=
FM_Pay
)
{
QString
info
=
QString
::
fromLocal8Bit
(
"账号: %1
\n
姓名: %2
\n
余额: %3
\n
积分: %4"
).
arg
(
account
,
name
,
amountStr
,
scoreStr
);
...
...
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