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
46916909
Commit
46916909
authored
Jul 31, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 会员不存在时将会员号返回到phone字段。
parent
4c0cd524
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
task/tasklogin.cpp
+7
-3
task/taskpay.cpp
+1
-1
No files found.
task/tasklogin.cpp
View file @
46916909
...
@@ -51,7 +51,11 @@ void TaskLogin::packagePOSRsp()
...
@@ -51,7 +51,11 @@ void TaskLogin::packagePOSRsp()
posRspJsonObj
[
"name"
]
=
getServerJsonValue
(
"name"
).
toString
();
posRspJsonObj
[
"name"
]
=
getServerJsonValue
(
"name"
).
toString
();
posRspJsonObj
[
"sex"
]
=
getServerJsonValue
(
"sex"
).
toString
();
posRspJsonObj
[
"sex"
]
=
getServerJsonValue
(
"sex"
).
toString
();
posRspJsonObj
[
"birthday"
]
=
getServerJsonValue
(
"birthday"
).
toString
();
posRspJsonObj
[
"birthday"
]
=
getServerJsonValue
(
"birthday"
).
toString
();
posRspJsonObj
[
"phone"
]
=
getServerJsonValue
(
"mobile"
).
toString
();
QString
phone
=
getServerJsonValue
(
"mobile"
).
toString
();
if
(
phone
.
isEmpty
())
{
phone
=
session
()
->
data
(
PosProps
.
Phone
).
toString
();
}
posRspJsonObj
[
"phone"
]
=
phone
;
posRspJsonObj
[
"address"
]
=
getServerJsonValue
(
"address"
).
toString
();
posRspJsonObj
[
"address"
]
=
getServerJsonValue
(
"address"
).
toString
();
posRspJsonObj
[
"email"
]
=
getServerJsonValue
(
"email"
).
toString
();
posRspJsonObj
[
"email"
]
=
getServerJsonValue
(
"email"
).
toString
();
posRspJsonObj
[
PosProps
.
Member_sign
]
=
session
()
->
data
(
PosProps
.
Member_sign
).
toString
();
posRspJsonObj
[
PosProps
.
Member_sign
]
=
session
()
->
data
(
PosProps
.
Member_sign
).
toString
();
...
@@ -70,8 +74,8 @@ void TaskLogin::onLogin()
...
@@ -70,8 +74,8 @@ void TaskLogin::onLogin()
int
status
=
getServerJsonValue
(
"statusCode"
).
toInt
();
int
status
=
getServerJsonValue
(
"statusCode"
).
toInt
();
// 认证失败
// 认证失败
if
(
status
==
2003
)
{
if
(
status
==
2003
)
{
FMP_INFO
()
<<
serverRspJsonObj
[
"msg"
].
toString
(
);
session
()
->
addData
(
"statusCode"
,
status
);
se
rverRspJsonObj
[
"phone"
]
=
session
()
->
data
(
PosProps
.
Member_sign
).
toString
(
);
se
ssion
()
->
addData
(
PosProps
.
Phone
,
session
()
->
data
(
PosProps
.
Member_sign
).
toString
()
);
_window
->
accept
();
_window
->
accept
();
return
;
return
;
}
else
if
(
status
!=
FM_API_SUCCESS
)
{
}
else
if
(
status
!=
FM_API_SUCCESS
)
{
...
...
task/taskpay.cpp
View file @
46916909
...
@@ -35,7 +35,7 @@ QByteArray TaskPay::doTask()
...
@@ -35,7 +35,7 @@ QByteArray TaskPay::doTask()
preTask
=
new
TaskLogin
(
posReqJsonObj
,
_session
,
this
);
preTask
=
new
TaskLogin
(
posReqJsonObj
,
_session
,
this
);
preTask
->
session
()
->
addData
(
PosProps
.
FM_Type
,
FM_Pay
);
preTask
->
session
()
->
addData
(
PosProps
.
FM_Type
,
FM_Pay
);
QByteArray
loginRst
=
preTask
->
doTask
();
QByteArray
loginRst
=
preTask
->
doTask
();
if
(
preTask
->
error
()
!=
FM_API_SUCCESS
)
{
if
(
preTask
->
error
()
!=
FM_API_SUCCESS
||
(
session
()
->
contains
(
PosProps
.
StatusCode
)
&&
session
()
->
data
(
PosProps
.
StatusCode
).
toInt
()
!=
FM_API_SUCCESS
)
)
{
return
loginRst
;
return
loginRst
;
}
}
this
->
_session
=
preTask
->
session
();
this
->
_session
=
preTask
->
session
();
...
...
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