Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_home
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_home
Commits
005693b1
Commit
005693b1
authored
Mar 07, 2018
by
Amnes1a
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
显示桌面悬浮窗; 消除部分警告信息
parent
0e47e6b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
fmp_home.pro
+1
-0
fmp_home_p.cpp
+15
-13
No files found.
fmp_home.pro
View file @
005693b1
...
...
@@ -83,6 +83,7 @@ RESOURCES += \
res
/
img
.
qrc
win32
{
QMAKE_CXXFLAGS
+=
/
wd4018
/
wd4189
RC_FILE
+=
res
/
$$
{
ORIGIN_TARGET
}.
rc
system
(
$$
PWD
/../
fmprc
.
bat
$$
PWD
/
version
.
h
$$
ORIGIN_TARGET
)
}
...
...
fmp_home_p.cpp
View file @
005693b1
...
...
@@ -46,10 +46,10 @@ int FMPHomePrivate::Init()
// _navWindow->createMenuBtn("payment", QString::fromLocal8Bit("非码支付"));
// _navWindow->createMenuBtn("vip", QString::fromLocal8Bit("非码会员"));
// _navWindow->createMenuBtn("takeout", QString::fromLocal8Bit("非码外卖"));
//
_navWindow->createMenuBtn("coupons", QString::fromLocal8Bit("码多多"));
_navWindow
->
createMenuBtn
(
"coupons"
,
QString
::
fromLocal8Bit
(
"码多多"
));
// _navWindow->createMenuBtn("tool", QString::fromLocal8Bit("设置"));
//
_navWindow->show();
_navWindow
->
show
();
connect
(
_navWindow
,
SIGNAL
(
menuBtnClicked
(
QString
)),
this
,
SLOT
(
onMenuBtnClicked
(
QString
)));
connect
(
_navWindow
,
&
NavWindow
::
pluginActived
,
this
,
&
FMPHomePrivate
::
onPluginActived
);
...
...
@@ -69,17 +69,6 @@ int FMPHomePrivate::Init()
q
->
_inited
=
true
;
q
->
notification
(
QString
::
fromLocal8Bit
(
"[非码POS插件]启动成功!"
));
QTimer
::
singleShot
(
1000
,
this
,
[](){
//启动卡券核销
FMPRedeemInterface
*
svcRedeem
=
FMP
::
GetService
<
FMPRedeemInterface
>
();
if
(
svcRedeem
)
{
svcRedeem
->
StartService
();
QJsonObject
result
=
svcRedeem
->
Redeem
(
QJsonArray
());
FMP_DEBUG
()
<<
result
;
}
});
return
FMP_SUCCESS
;
}
...
...
@@ -179,6 +168,19 @@ void FMPHomePrivate::onMenuBtnClicked(QString btnName)
}
else
if
(
btnName
==
"coupons"
)
{
// FMPVipInterface *e = q->GetService<FMPVipInterface>(q->_ctx);
// e->StartService();
//启动卡券核销
FMPRedeemInterface
*
svcRedeem
=
FMP
::
GetService
<
FMPRedeemInterface
>
();
if
(
svcRedeem
)
{
svcRedeem
->
StartService
();
QJsonObject
result
=
svcRedeem
->
Redeem
(
QJsonArray
());
FMP_DEBUG
()
<<
result
;
}
else
{
FMP_DEBUG
()
<<
"coupon service not available"
;
}
return
;
}
else
if
(
btnName
==
"tool"
)
{
svc
=
FMP
::
GetService
<
FMPSettingsInterface
>
();
}
...
...
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