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
eee0b887
Commit
eee0b887
authored
Nov 09, 2016
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 弹窗设为置顶。 2. 日志打印加锁。 3.提示消息加标志。
parent
25a8e50e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
10 deletions
+11
-10
FMVip/fmvipdispatcher.cpp
+1
-1
FMVip/fmvipdispatcher.h
+2
-2
FMVip/fmvipforward.cpp
+4
-4
FMVip/fmvipwnd.cpp
+2
-2
FMVipDC/include/fmutils/fmutils.hpp
+2
-1
No files found.
FMVip/fmvipdispatcher.cpp
View file @
eee0b887
...
@@ -213,7 +213,7 @@ void FMVipDispatcher::onServerResponsed(const QJsonObject &rspObj)
...
@@ -213,7 +213,7 @@ void FMVipDispatcher::onServerResponsed(const QJsonObject &rspObj)
else
if
(
isPayLogin
)
{
else
if
(
isPayLogin
)
{
if
(
canPay
!=
1
)
{
if
(
canPay
!=
1
)
{
_vindow
->
resetWnd
();
_vindow
->
resetWnd
();
FMMsgWnd
::
FailureWnd
(
"请使用支付码付款"
);
FMMsgWnd
::
FailureWnd
(
"
fmv:
请使用支付码付款"
);
return
;
return
;
}
}
isPayLogin
=
false
;
isPayLogin
=
false
;
...
...
FMVip/fmvipdispatcher.h
View file @
eee0b887
...
@@ -8,8 +8,8 @@
...
@@ -8,8 +8,8 @@
#include <QMutex>
#include <QMutex>
#include <QWaitCondition>
#include <QWaitCondition>
#define Err_WindowClose "{\"statusCode\":1001, \"prompt\":0, \"msg\":\"窗口异常关闭\"}"
#define Err_WindowClose "{\"statusCode\":1001, \"prompt\":0, \"msg\":\"
fmv:
窗口异常关闭\"}"
#define Err_ErrorFMCMD "{\"statusCode\":1002, \"prompt\":1, \"msg\":\"无法识别的请求类型\"}"
#define Err_ErrorFMCMD "{\"statusCode\":1002, \"prompt\":1, \"msg\":\"
fmv:
无法识别的请求类型\"}"
#define _DEBUG
#define _DEBUG
...
...
FMVip/fmvipforward.cpp
View file @
eee0b887
...
@@ -148,7 +148,7 @@ void FMVipForward::onServerFinished(QNetworkReply *reply, bool isTimeOut)
...
@@ -148,7 +148,7 @@ void FMVipForward::onServerFinished(QNetworkReply *reply, bool isTimeOut)
QJsonDocument
jdoc
(
_needBackupReqJob
);
QJsonDocument
jdoc
(
_needBackupReqJob
);
FMBackup
::
instance
()
->
updateReqData
(
newId
,
_req
.
url
().
toString
(),
jdoc
.
toJson
(
QJsonDocument
::
Compact
));
FMBackup
::
instance
()
->
updateReqData
(
newId
,
_req
.
url
().
toString
(),
jdoc
.
toJson
(
QJsonDocument
::
Compact
));
posObj
[
"statusCode"
]
=
100
;
posObj
[
"statusCode"
]
=
100
;
posObj
[
"msg"
]
=
"结算成功"
;
posObj
[
"msg"
]
=
"
fmv:
结算成功"
;
posObj
[
"fm_id"
]
=
uuid
;
posObj
[
"fm_id"
]
=
uuid
;
posObj
[
"prompt"
]
=
1
;
posObj
[
"prompt"
]
=
1
;
posObj
[
"print1"
]
=
""
;
posObj
[
"print1"
]
=
""
;
...
@@ -156,7 +156,7 @@ void FMVipForward::onServerFinished(QNetworkReply *reply, bool isTimeOut)
...
@@ -156,7 +156,7 @@ void FMVipForward::onServerFinished(QNetworkReply *reply, bool isTimeOut)
}
else
{
}
else
{
posObj
[
"statusCode"
]
=
404
;
posObj
[
"statusCode"
]
=
404
;
QString
errCode
=
QString
::
number
(
int
(
reply
->
error
()));
QString
errCode
=
QString
::
number
(
int
(
reply
->
error
()));
QString
errMsg
=
"网络连接错误(%1): %2"
;
QString
errMsg
=
"
fmv:
网络连接错误(%1): %2"
;
// 获取错误提示
// 获取错误提示
QSettings
setting
(
qApp
->
applicationDirPath
()
+
"/config.ini"
,
QSettings
::
IniFormat
);
QSettings
setting
(
qApp
->
applicationDirPath
()
+
"/config.ini"
,
QSettings
::
IniFormat
);
setting
.
setIniCodec
(
"GBK"
);
setting
.
setIniCodec
(
"GBK"
);
...
@@ -168,7 +168,7 @@ void FMVipForward::onServerFinished(QNetworkReply *reply, bool isTimeOut)
...
@@ -168,7 +168,7 @@ void FMVipForward::onServerFinished(QNetworkReply *reply, bool isTimeOut)
posObj
[
"msg"
]
=
errMsg
.
arg
(
errCode
).
arg
(
errInfo
);
posObj
[
"msg"
]
=
errMsg
.
arg
(
errCode
).
arg
(
errInfo
);
setting
.
endGroup
();
setting
.
endGroup
();
if
(
isTimeOut
)
{
if
(
isTimeOut
)
{
posObj
[
"msg"
]
=
"向非码服务器请求超时"
;
posObj
[
"msg"
]
=
"
fmv:
向非码服务器请求超时"
;
}
}
}
}
...
@@ -181,7 +181,7 @@ void FMVipForward::onServerFinished(QNetworkReply *reply, bool isTimeOut)
...
@@ -181,7 +181,7 @@ void FMVipForward::onServerFinished(QNetworkReply *reply, bool isTimeOut)
if
(
err
.
error
!=
QJsonParseError
::
NoError
||
!
jdoc
.
isObject
())
{
if
(
err
.
error
!=
QJsonParseError
::
NoError
||
!
jdoc
.
isObject
())
{
posObj
[
"statusCode"
]
=
1000
;
posObj
[
"statusCode"
]
=
1000
;
posObj
[
"msg"
]
=
"服务器返回数据异常"
;
posObj
[
"msg"
]
=
"
fmv:
服务器返回数据异常"
;
}
else
{
}
else
{
QJsonObject
serverObj
=
jdoc
.
object
();
QJsonObject
serverObj
=
jdoc
.
object
();
...
...
FMVip/fmvipwnd.cpp
View file @
eee0b887
...
@@ -13,7 +13,7 @@ FMVipWnd::FMVipWnd(QDialog *parent) :
...
@@ -13,7 +13,7 @@ FMVipWnd::FMVipWnd(QDialog *parent) :
QDialog
(
parent
),
QDialog
(
parent
),
loadingWindow
(
new
FMLoading
(
parent
))
loadingWindow
(
new
FMLoading
(
parent
))
{
{
setWindowFlags
(
Qt
::
FramelessWindowHint
);
setWindowFlags
(
Qt
::
FramelessWindowHint
|
Qt
::
WindowStaysOnTopHint
);
setAttribute
(
Qt
::
WA_QuitOnClose
,
false
);
setAttribute
(
Qt
::
WA_QuitOnClose
,
false
);
setIsBusy
(
false
);
setIsBusy
(
false
);
}
}
...
@@ -76,7 +76,7 @@ int FMVipWnd::exec()
...
@@ -76,7 +76,7 @@ int FMVipWnd::exec()
::
SetForegroundWindow
((
HWND
)
effectiveWinId
());
::
SetForegroundWindow
((
HWND
)
effectiveWinId
());
::
SetWindowPos
(
(
HWND
)
effectiveWinId
(),
HWND_TOPMOST
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_SHOWWINDOW
);
::
SetWindowPos
(
(
HWND
)
effectiveWinId
(),
HWND_TOPMOST
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_SHOWWINDOW
);
::
SetWindowPos
(
(
HWND
)
effectiveWinId
(),
HWND_NOTOPMOST
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_SHOWWINDOW
);
//
::SetWindowPos( (HWND)effectiveWinId(), HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
showNormal
();
showNormal
();
::
SetForegroundWindow
((
HWND
)
effectiveWinId
());
::
SetForegroundWindow
((
HWND
)
effectiveWinId
());
...
...
FMVipDC/include/fmutils/fmutils.hpp
View file @
eee0b887
...
@@ -147,7 +147,7 @@ public:
...
@@ -147,7 +147,7 @@ public:
WideCharToMultiByte
(
CP_ACP
,
0
,
msg
,
-
1
,
buff
,
str_size
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
msg
,
-
1
,
buff
,
str_size
,
NULL
,
NULL
);
{
{
//
FMAutoLock auto_lock(_logger_cs);
FMAutoLock
auto_lock
(
_logger_cs
);
_Log
(
buff
);
_Log
(
buff
);
}
}
...
@@ -186,6 +186,7 @@ public:
...
@@ -186,6 +186,7 @@ public:
memset
((
void
*
)
msg
,
0
,
size
);
memset
((
void
*
)
msg
,
0
,
size
);
vsprintf
(
msg
,
format
,
arg_ptr
);
vsprintf
(
msg
,
format
,
arg_ptr
);
FMAutoLock
auto_lock
(
_logger_cs
);
_Log
(
msg
);
_Log
(
msg
);
delete
[]
msg
;
delete
[]
msg
;
}
}
...
...
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