Commit 3af3b991 by gujin.wang

添加悬浮窗显示

parent 0e47e6b8
...@@ -46,10 +46,10 @@ int FMPHomePrivate::Init() ...@@ -46,10 +46,10 @@ int FMPHomePrivate::Init()
// _navWindow->createMenuBtn("payment", QString::fromLocal8Bit("非码支付")); // _navWindow->createMenuBtn("payment", QString::fromLocal8Bit("非码支付"));
// _navWindow->createMenuBtn("vip", QString::fromLocal8Bit("非码会员")); // _navWindow->createMenuBtn("vip", QString::fromLocal8Bit("非码会员"));
// _navWindow->createMenuBtn("takeout", QString::fromLocal8Bit("非码外卖")); // _navWindow->createMenuBtn("takeout", QString::fromLocal8Bit("非码外卖"));
// _navWindow->createMenuBtn("coupons", QString::fromLocal8Bit("码多多")); _navWindow->createMenuBtn("coupons", QString::fromLocal8Bit("码多多"));
// _navWindow->createMenuBtn("tool", QString::fromLocal8Bit("设置")); // _navWindow->createMenuBtn("tool", QString::fromLocal8Bit("设置"));
// _navWindow->show(); _navWindow->show();
connect(_navWindow, SIGNAL(menuBtnClicked(QString)), this, SLOT(onMenuBtnClicked(QString))); connect(_navWindow, SIGNAL(menuBtnClicked(QString)), this, SLOT(onMenuBtnClicked(QString)));
connect(_navWindow, &NavWindow::pluginActived, this, &FMPHomePrivate::onPluginActived); connect(_navWindow, &NavWindow::pluginActived, this, &FMPHomePrivate::onPluginActived);
...@@ -69,17 +69,6 @@ int FMPHomePrivate::Init() ...@@ -69,17 +69,6 @@ int FMPHomePrivate::Init()
q->_inited = true; q->_inited = true;
q->notification(QString::fromLocal8Bit("[非码POS插件]启动成功!")); 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; return FMP_SUCCESS;
} }
...@@ -179,6 +168,14 @@ void FMPHomePrivate::onMenuBtnClicked(QString btnName) ...@@ -179,6 +168,14 @@ void FMPHomePrivate::onMenuBtnClicked(QString btnName)
} else if(btnName == "coupons") { } else if(btnName == "coupons") {
// FMPVipInterface *e = q->GetService<FMPVipInterface>(q->_ctx); // FMPVipInterface *e = q->GetService<FMPVipInterface>(q->_ctx);
// e->StartService(); // e->StartService();
FMPRedeemInterface* svcRedeem = FMP::GetService<FMPRedeemInterface>();
if(svcRedeem)
{
svcRedeem->StartService();
QJsonObject result = svcRedeem->Redeem(QJsonArray());
FMP_DEBUG() << QString::fromLocal8Bit("核销结果: ") << result;
}
return;
} else if(btnName == "tool") { } else if(btnName == "tool") {
svc = FMP::GetService<FMPSettingsInterface>(); svc = FMP::GetService<FMPSettingsInterface>();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment