Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FMVip_Today
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_Today
Commits
c987ab89
Commit
c987ab89
authored
Sep 27, 2016
by
NitefllWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 只调用会员认证接口时且认证成功时,弹窗显示会员账号、姓名、生日。2. 充值、支付页面增加显示会员生日。3. 所有的会员认证界面认证错误后都可以继续输入认证。
parent
1d1e5399
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
165 additions
and
33 deletions
+165
-33
FMVip/fmmsgwnd.cpp
+17
-3
FMVip/fmmsgwnd.h
+4
-1
FMVip/fmvipdispatcher.cpp
+26
-15
FMVip/fmvipdispatcher.h
+1
-0
FMVip/fmvipforward.cpp
+3
-0
FMVip/fmvipfund.cpp
+2
-0
FMVip/fmviporder.cpp
+2
-0
FMVip/forms/fmmsgwnd.ui
+11
-7
FMVip/forms/fmvipfund.ui
+30
-0
FMVip/forms/fmviporder.ui
+69
-7
No files found.
FMVip/fmmsgwnd.cpp
View file @
c987ab89
...
...
@@ -30,14 +30,16 @@ void FMMsgWnd::show(InfoType type, const QString &info)
case
InfoType
:
:
T_Warning
:
iconUrl
=
":/tip_warning.png"
;
break
;
case
InfoType
:
:
T_LoginSuccess
:
// ui->alertIconLab->setText("会员认证成功");
iconUrl
=
":/tip_ok.png"
;
break
;
default
:
iconUrl
=
""
;
break
;
}
if
(
iconUrl
==
""
){
ui
->
alertIconLab
->
setText
(
iconUrl
);
}
else
{
if
(
iconUrl
!=
""
){
QPixmap
icon
(
iconUrl
);
ui
->
alertIconLab
->
setPixmap
(
icon
);
}
...
...
@@ -56,6 +58,18 @@ void FMMsgWnd::WarningWnd(const QString &info)
FMMsgWnd
window
;
window
.
show
(
FMMsgWnd
::
T_Warning
,
info
);
}
void
FMMsgWnd
::
SuccessWnd
(
const
QString
&
info
)
{
FMMsgWnd
window
;
window
.
show
(
FMMsgWnd
::
T_Success
,
info
);
}
void
FMMsgWnd
::
LoginSuccess
(
const
QString
&
account
,
const
QString
&
name
,
const
QString
&
birthday
)
{
FMMsgWnd
window
;
QString
info
=
QString
(
"账号:%1
\n
姓名:%2
\n
生日:%3"
).
arg
(
account
).
arg
(
name
).
arg
(
birthday
);
window
.
show
(
FMMsgWnd
::
T_LoginSuccess
,
info
);
}
void
FMMsgWnd
::
on_alertBtnOk_clicked
()
{
...
...
FMVip/fmmsgwnd.h
View file @
c987ab89
...
...
@@ -20,12 +20,15 @@ public:
T_Normal
,
T_Success
,
T_Failure
,
T_Warning
T_Warning
,
T_LoginSuccess
};
void
show
(
InfoType
type
=
T_Normal
,
const
QString
&
info
=
""
);
static
void
FailureWnd
(
const
QString
&
info
);
static
void
WarningWnd
(
const
QString
&
info
);
static
void
SuccessWnd
(
const
QString
&
info
);
static
void
LoginSuccess
(
const
QString
&
account
,
const
QString
&
name
,
const
QString
&
birthday
);
private
slots
:
void
on_alertBtnOk_clicked
();
...
...
FMVip/fmvipdispatcher.cpp
View file @
c987ab89
...
...
@@ -78,6 +78,7 @@ INT FMVipDispatcher::_ParseRequest(LPSTR data)
isLastOne
=
true
;
_serverRspData
.
clear
();
isPayLogin
=
false
;
isLogin
=
false
;
// 唤起客户端界面
emit
requested
(
_posReqObj
);
...
...
@@ -137,7 +138,7 @@ void FMVipDispatcher::onRequest(const QJsonObject &jsonObj)
#endif
else
if
(
type
==
Type_Pay
||
type
==
Type_Fund
)
{
requestSuccess
=
true
;
// 支付、充值
、结算
先检查登陆状态。
// 支付、充值先检查登陆状态。
QJsonObject
copyJsonObj
(
jsonObj
);
if
(
type
==
Type_Fund
&&
!
isLogined
())
{
...
...
@@ -189,31 +190,41 @@ void FMVipDispatcher::onFinished()
}
void
FMVipDispatcher
::
onServerResponsed
(
const
QJsonObject
&
rspObj
)
{
{
int
status
=
rspObj
[
"statusCode"
].
toInt
();
int
prompt
=
rspObj
[
"prompt"
].
toInt
();
if
(
_vindow
!=
0
)
{
_vindow
->
setIsBusy
(
false
);
// 支付时, 会员认证的返回,如果不可付款
int
canPa
n
=
FMVipForward
::
instance
()
->
sessionDataInt
(
"canPay"
);
int
canPa
y
=
FMVipForward
::
instance
()
->
sessionDataInt
(
"canPay"
);
// 如果是支付认证则不关闭窗口
if
(
isPayLogin
)
{
if
(
status
!=
100
)
{
if
(
isLogin
)
{
// 失败则弹出错误信息
if
(
status
!=
100
)
{
_vindow
->
resetWnd
();
FMMsgWnd
::
FailureWnd
(
rspObj
[
"msg"
].
toString
());
return
;
}
else
if
(
canPan
!=
1
)
{
_vindow
->
resetWnd
();
FMMsgWnd
::
FailureWnd
(
"请使用支付码付款"
);
return
;
}
isPayLogin
=
false
;
// 成功,且是最后一步,则弹出认证信息
else
if
(
isLastOne
)
{
QString
account
=
FMVipForward
::
instance
()
->
sessionData
(
"fm_open_id"
);
QString
name
=
FMVipForward
::
instance
()
->
sessionData
(
"name"
);
QString
birthday
=
FMVipForward
::
instance
()
->
sessionData
(
"birthday"
);
FMMsgWnd
::
LoginSuccess
(
account
,
name
,
birthday
);
}
// 成功,是支付认证,但不能支付
else
if
(
isPayLogin
)
{
if
(
canPay
!=
1
)
{
_vindow
->
resetWnd
();
FMMsgWnd
::
FailureWnd
(
"请使用支付码付款"
);
return
;
}
isPayLogin
=
false
;
}
}
isLogin
=
false
;
_vindow
->
deleteLater
();
}
...
...
@@ -221,7 +232,6 @@ void FMVipDispatcher::onServerResponsed(const QJsonObject &rspObj)
QByteArray
rspData
=
rspDoc
.
toJson
();
_serverRspData
=
rspData
;
if
(
status
!=
100
)
{
if
(
prompt
==
0
)
{
...
...
@@ -246,6 +256,7 @@ void FMVipDispatcher::onDoPost()
void
FMVipDispatcher
::
login
()
{
isLogin
=
true
;
if
(
!
_vindow
)
{
FMVipLogin
*
login
=
new
FMVipLogin
(
isPayLogin
);
connect
(
login
,
SIGNAL
(
destroyed
(
QObject
*
)),
SLOT
(
onFinished
()));
...
...
FMVip/fmvipdispatcher.h
View file @
c987ab89
...
...
@@ -65,6 +65,7 @@ private:
QWaitCondition
serverIsBusy
;
BOOL
requestSuccess
;
BOOL
isPayLogin
;
BOOL
isLogin
;
};
#endif // FMVIPDISPATCHER_H
FMVip/fmvipforward.cpp
View file @
c987ab89
...
...
@@ -301,8 +301,11 @@ void FMVipForward::logined(const QJsonObject &serverJob, QJsonObject &posJob)
name
=
(
name
.
isEmpty
())
?
"未知"
:
name
;
QString
mobile
=
memberObj
[
"mobile"
].
toString
();
mobile
=
(
mobile
.
isEmpty
())
?
"未知"
:
mobile
;
QString
birthday
=
memberObj
[
"birthday"
].
toString
();
birthday
=
(
birthday
.
isEmpty
())
?
"未知"
:
birthday
;
addSessionData
(
"name"
,
name
);
addSessionData
(
"mobile"
,
mobile
);
addSessionData
(
"birthday"
,
birthday
);
}
void
FMVipForward
::
funded
(
const
QJsonObject
&
serverJob
,
QJsonObject
&
posJob
)
...
...
FMVip/fmvipfund.cpp
View file @
c987ab89
...
...
@@ -14,6 +14,7 @@ FMVipFund::FMVipFund(QDialog *parent) :
QString
amount_str
=
FMVipForward
::
instance
()
->
sessionData
(
"amount"
);
QString
charge_amount_str
=
FMVipForward
::
instance
()
->
sessionData
(
"charge_amount"
);
QString
name
=
FMVipForward
::
instance
()
->
sessionData
(
"name"
);
QString
birthday
=
FMVipForward
::
instance
()
->
sessionData
(
"birthday"
);
double
amount
=
amount_str
.
toDouble
()
/
100.0
;
double
charge_amount
=
charge_amount_str
.
toDouble
()
/
100.0
;
...
...
@@ -27,6 +28,7 @@ FMVipFund::FMVipFund(QDialog *parent) :
ui
->
balance_label
->
setText
(
show_amount_str
);
ui
->
amount_edit
->
setText
(
show_charge_amount_str
);
ui
->
name_label
->
setText
(
name
);
ui
->
bir_label
->
setText
(
birthday
);
ui
->
fund_btn
->
setFocus
();
}
...
...
FMVip/fmviporder.cpp
View file @
c987ab89
...
...
@@ -18,6 +18,7 @@ FMVipOrder::FMVipOrder(QDialog *parent) :
QString
score_str
=
FMVipForward
::
instance
()
->
sessionData
(
"score"
);
QString
needPay_str
=
FMVipForward
::
instance
()
->
sessionData
(
"needPay"
);
QString
name
=
FMVipForward
::
instance
()
->
sessionData
(
"name"
);
QString
birthday
=
FMVipForward
::
instance
()
->
sessionData
(
"birthday"
);
double
standard_amount
=
FMVipForward
::
instance
()
->
sessionDataInt
(
"standard_amount"
)
/
100.0
;
orderInfo
=
new
FMVipOrder
::
OrderInfo
(
amount_str
,
score_str
,
needPay_str
);
...
...
@@ -30,6 +31,7 @@ FMVipOrder::FMVipOrder(QDialog *parent) :
ui
->
balance_label
->
setText
(
orderInfo
->
getAmountStr
());
ui
->
price_label
->
setText
(
orderInfo
->
getNeedPayStr
());
ui
->
name_label
->
setText
(
name
);
ui
->
bir_label
->
setText
(
birthday
);
initCouponItems
();
connect
(
ui
->
coupon_page
,
SIGNAL
(
itemClicked
(
QListWidgetItem
*
)),
this
,
SLOT
(
onItemClicked
(
QListWidgetItem
*
)));
...
...
FMVip/forms/fmmsgwnd.ui
View file @
c987ab89
...
...
@@ -25,20 +25,21 @@
background: transparent;
}
#alertIconLab
{
image:url(
"
:/tip_error.png
"
);
}
#close_btn {
min-width: 30px; min-height: 30px;
max-width: 30px; max-height: 30px;
border-image: url(
"
:/btn_alert_close.png
"
);
}
#alertIconLab
{
color: rgb(0, 0, 0);
font: normal 22px
"
Microsoft YaHei
"
;
margin-top: 20px;
}
#alertLabMsg
{
min-height: 110px;
color: rgb(129, 129, 129);
font: normal 19px
"
Microsoft YaHei
"
}
...
...
@@ -84,8 +85,11 @@
</property>
<item>
<widget
class=
"QLabel"
name=
"alertIconLab"
>
<property
name=
"text"
>
<string>
Title
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
<set>
Qt::Align
Bottom|Qt::AlignH
Center
</set>
</property>
</widget>
</item>
...
...
FMVip/forms/fmvipfund.ui
View file @
c987ab89
...
...
@@ -257,6 +257,36 @@ QPushButton#fund_btn:hover {
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"bir_desc_label"
>
<property
name=
"text"
>
<string>
生日:
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"bir_label"
>
<property
name=
"text"
>
<string>
2016-9-27
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_20"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Expanding
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
122
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"name_desc_label"
>
<property
name=
"text"
>
<string>
姓名:
</string>
...
...
FMVip/forms/fmviporder.ui
View file @
c987ab89
...
...
@@ -131,7 +131,7 @@
}
#coupon_prev_btn, #coupon_next_btn {
font: 400 16px
"
Microsoft YaHei
"
;
min-height:
40px; max-height: 4
0px;
min-height:
60px; max-height: 6
0px;
min-width: 70px; max-width: 70px;
border: 1 solid rgb(228,228,228);
border-radius: 7px;
...
...
@@ -141,14 +141,15 @@
background: rgb(154,200,50);
color: white;
}
/*
#coupon_prev_btn
{
margin-top:
50
px;
margin-top:
35
px;
}
#coupon_next_btn
{
margin-bottom:
50
px;
}
margin-bottom:
35
px;
}
*/
/*
* 支付
...
...
@@ -397,6 +398,36 @@
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"bir_desc_label"
>
<property
name=
"text"
>
<string>
生日:
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"bir_label"
>
<property
name=
"text"
>
<string>
2016-9-27
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_20"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Expanding
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
122
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"name_desc_label"
>
<property
name=
"text"
>
<string>
姓名:
</string>
...
...
@@ -460,7 +491,7 @@
<item>
<widget
class=
"QLabel"
name=
"point_label"
>
<property
name=
"text"
>
<string>
0
</string>
<string>
10000
0
</string>
</property>
</widget>
</item>
...
...
@@ -597,13 +628,30 @@
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"pageCtrlLayLayout"
>
<property
name=
"spacing"
>
<number>
0
</number>
</property>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QPushButton"
name=
"coupon_prev_btn"
>
<property
name=
"cursor"
>
<cursorShape>
PointingHandCursor
</cursorShape>
</property>
<property
name=
"text"
>
<string>
向上
</string>
<string>
向
上
</string>
</property>
</widget>
</item>
...
...
@@ -626,10 +674,24 @@
<bool>
false
</bool>
</property>
<property
name=
"text"
>
<string>
向下
</string>
<string>
向
下
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"verticalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
...
...
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