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
09a5e76b
Commit
09a5e76b
authored
Jul 27, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 手机号认证不可支付。 2. 认证区别实体卡号。
parent
4305996f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
7 deletions
+27
-7
fmnetwork.cpp
+1
-2
global.h
+1
-1
task/tasklogin.cpp
+16
-3
task/taskpay.cpp
+3
-1
windows/fmviplogin.cpp
+6
-0
No files found.
fmnetwork.cpp
View file @
09a5e76b
...
...
@@ -44,7 +44,6 @@ int FMNetwork::send(const QString &url, const QByteArray &reqData, QByteArray &r
QTimer
timer
;
timer
.
setSingleShot
(
true
);
connect
(
&
timer
,
SIGNAL
(
timeout
()),
&
loop
,
SLOT
(
quit
()));
timer
.
start
(
1000
*
60
);
loop
.
exec
();
...
...
@@ -57,7 +56,7 @@ int FMNetwork::send(const QString &url, const QByteArray &reqData, QByteArray &r
int
err
=
reply
->
error
();
rspData
=
reply
->
readAll
();
error
=
FM_API_NETWORERROR
;
errorMsg
=
netErrInfo
(
err
);
errorMsg
=
QString
(
"NetworkError(%1)"
).
arg
(
err
);
}
}
else
{
error
=
FM_API_TIMEOUT
;
...
...
global.h
View file @
09a5e76b
...
...
@@ -84,7 +84,7 @@ struct PP{
Amount
=
"amount"
;
Phone
=
"phone"
;
Fm_open_id
=
"fm_open_id"
;
CanPay
=
"
C
anPay"
;
CanPay
=
"
c
anPay"
;
Address
=
"address"
;
Email
=
"email"
;
...
...
task/tasklogin.cpp
View file @
09a5e76b
...
...
@@ -28,7 +28,12 @@ void TaskLogin::setWindow()
void
TaskLogin
::
packageServerReq
()
{
QJsonObject
code
;
code
[
ServerProps
(
PosProps
.
Member_sign
)]
=
session
()
->
data
(
PosProps
.
Member_sign
).
toString
();
QString
memberSign
=
session
()
->
data
(
PosProps
.
Member_sign
).
toString
();
// 原生卡前加上"cardNo="标志给服务端
if
(
memberSign
.
length
()
==
6
)
{
memberSign
=
"cardNo="
+
memberSign
;
}
code
[
ServerProps
(
PosProps
.
Member_sign
)]
=
memberSign
;
serverReqJsonObj
[
"data"
]
=
code
;
}
...
...
@@ -74,8 +79,15 @@ void TaskLogin::onLogin()
QString
birthday
=
getServerJsonValue
(
PosProps
.
Birthday
).
toString
();
QString
name
=
getServerJsonValue
(
PosProps
.
Name
).
toString
();
if
(
getServerJsonValue
(
PosProps
.
CanPay
).
toInt
()
==
0
)
{
FMMsgWnd
::
LoginSuccess
(
account
,
name
,
birthday
,
_window
);
bool
canPay
=
(
getServerJsonValue
(
PosProps
.
CanPay
).
toInt
()
==
1
);
if
(
!
canPay
)
{
if
(
getPosJsonValue
(
PosProps
.
Fm_cmd
).
toInt
()
!=
FM_Pay
)
{
FMMsgWnd
::
LoginSuccess
(
account
,
name
,
birthday
,
_window
);
}
else
{
FMMsgWnd
::
FailureWnd
(
QString
::
fromLocal8Bit
(
ErrorNeedPayCode
),
_window
);
_window
->
resetWnd
();
return
;
}
}
session
()
->
addData
(
PosProps
.
Name
,
name
);
...
...
@@ -83,6 +95,7 @@ void TaskLogin::onLogin()
session
()
->
addData
(
PosProps
.
Fm_open_id
,
account
);
session
()
->
addData
(
PosProps
.
Amount
,
getServerJsonValue
(
PosProps
.
Amount
).
toInt
());
session
()
->
addData
(
PosProps
.
Score
,
getServerJsonValue
(
PosProps
.
Score
).
toInt
());
session
()
->
addData
(
PosProps
.
CanPay
,
canPay
);
_window
->
accept
();
}
...
...
task/taskpay.cpp
View file @
09a5e76b
...
...
@@ -29,7 +29,9 @@ QByteArray TaskPay::doTask()
// return ret;
// }
if
(
session
()
->
data
(
PosProps
.
Fm_open_id
).
toString
()
==
0
)
{
QString
fm_open_id_pos
=
getPosJsonValue
(
PosProps
.
Fm_open_id
).
toString
();
QString
fm_open_id_session
=
session
()
->
data
(
PosProps
.
Fm_open_id
).
toString
();
if
(
fm_open_id_session
==
""
||
fm_open_id_pos
!=
fm_open_id_session
||
session
()
->
data
(
PosProps
.
CanPay
).
toBool
()
==
false
)
{
preTask
=
new
TaskLogin
(
posReqJsonObj
,
_session
,
this
);
preTask
->
session
()
->
addData
(
PosProps
.
FM_Type
,
FM_Pay
);
QByteArray
loginRst
=
preTask
->
doTask
();
...
...
windows/fmviplogin.cpp
View file @
09a5e76b
...
...
@@ -4,6 +4,7 @@
#include <QFile>
#include <QMutex>
#include "fmloading.h"
#include "fmmsgwnd.h"
FMVipLogin
::
FMVipLogin
(
QDialog
*
parent
)
:
FMVipWnd
(
parent
),
...
...
@@ -52,6 +53,11 @@ QString FMVipLogin::getVersionInfo()
void
FMVipLogin
::
on_login_btn_clicked
()
{
QString
id
=
ui
->
login_edit
->
text
();
if
(
id
.
isEmpty
())
{
FMMsgWnd
::
FailureWnd
(
QString
::
fromLocal8Bit
(
"认证号码不能为空!"
),
this
);
resetWnd
();
return
;
}
_session
->
addData
(
PosProps
.
Member_sign
,
id
);
...
...
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