Commit d259cf07 by 刘帅

适配卡券、核销详情服务

parent fa06cfa6
...@@ -30,10 +30,11 @@ NavWindow::NavWindow(QWidget *parent) : ...@@ -30,10 +30,11 @@ NavWindow::NavWindow(QWidget *parent) :
connect(this, SIGNAL(startBlink()), ui->navMainBtn, SLOT(start())); connect(this, SIGNAL(startBlink()), ui->navMainBtn, SLOT(start()));
connect(this, SIGNAL(stopBlink()), ui->navMainBtn, SLOT(stop())); connect(this, SIGNAL(stopBlink()), ui->navMainBtn, SLOT(stop()));
btns.push_back(std::make_pair("payment", QString::fromLocal8Bit("非码支付"))); //btns.push_back(std::make_pair("payment", QString::fromLocal8Bit("非码支付")));
btns.push_back(std::make_pair("vip", QString::fromLocal8Bit("非码会员"))); //btns.push_back(std::make_pair("vip", QString::fromLocal8Bit("非码会员")));
btns.push_back(std::make_pair("takeout", QString::fromLocal8Bit("非码外卖"))); //btns.push_back(std::make_pair("takeout", QString::fromLocal8Bit("非码外卖")));
btns.push_back(std::make_pair("coupons", QString::fromLocal8Bit("码多多"))); btns.push_back(std::make_pair("coupons", QString::fromLocal8Bit("码多多")));
btns.push_back(std::make_pair("check", QString::fromLocal8Bit("核销详情")));
btns.push_back(std::make_pair("tool", QString::fromLocal8Bit("设置"))); btns.push_back(std::make_pair("tool", QString::fromLocal8Bit("设置")));
MenuUiProp.distance = 100; MenuUiProp.distance = 100;
......
...@@ -56,6 +56,12 @@ QPushButton:hover { ...@@ -56,6 +56,12 @@ QPushButton:hover {
} }
#coupons:pressed { #coupons:pressed {
border-image: url(:coupons_onclick); border-image: url(:coupons_onclick);
}
#check{
border-image: url(:check_detail);
}
#check:pressed{
border-image: url(:check_detail_onclick);
}</string> }</string>
</property> </property>
<widget class="MenuButton" name="navMainBtn" native="true"> <widget class="MenuButton" name="navMainBtn" native="true">
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#include "fmp_he_handlers.h" #include "fmp_he_handlers.h"
#include "fmp_home_settings.h" #include "fmp_home_settings.h"
#include "fmp_redeem_i.h" #include "fmp_redeem_i.h"
#include <QJsonObject>
#include <QJsonArray>
FMPHomePrivate::FMPHomePrivate(FMPHome *q) FMPHomePrivate::FMPHomePrivate(FMPHome *q)
: q_ptr(q), : q_ptr(q),
...@@ -160,9 +162,36 @@ void FMPHomePrivate::onMenuBtnClicked(QString btnName) ...@@ -160,9 +162,36 @@ 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();
svc = q->GetService<FMPRedeemInterface>(q->_ctx); //svc = q->GetService<FMPRedeemInterface>(q->_ctx);
FMPRedeemInterface* svcRedeem = q->GetService<FMPRedeemInterface>(q->_ctx);
if(svcRedeem)
{
svcRedeem->StartService();
QJsonObject result = svcRedeem->Redeem(QJsonArray());
FMP_DEBUG() << result;
}
else
{
FMP_DEBUG() << "coupon service not available";
}
return ;
} else if(btnName == "tool") { } else if(btnName == "tool") {
svc = q->GetService<FMPSettingsInterface>(q->_ctx); svc = q->GetService<FMPSettingsInterface>(q->_ctx);
}else if(btnName == "check"){
FMPRedeemInterface* svcRedeem = q->GetService<FMPRedeemInterface>(q->_ctx);
if(svcRedeem)
{
svcRedeem->StartService();
svcRedeem->ShowRedeemDetail();
}
else
{
FMP_DEBUG() << "redeem details service not available";
}
return;
} }
if (svc) { if (svc) {
......
...@@ -15,5 +15,7 @@ ...@@ -15,5 +15,7 @@
<file alias="coupons">img/fm-icon_coupons.png</file> <file alias="coupons">img/fm-icon_coupons.png</file>
<file alias="coupons_onclick">img/fm-icon_coupons_02.png</file> <file alias="coupons_onclick">img/fm-icon_coupons_02.png</file>
<file>img/fm-icon_close_02.png</file> <file>img/fm-icon_close_02.png</file>
<file alias="check_detail">img/fm-check_detail.png</file>
<file alias="check_detail_onclick">img/fm-check_detail_onclick.png</file>
</qresource> </qresource>
</RCC> </RCC>
res/img/fm-check_detail.png

2.67 KB | W: | H:

res/img/fm-check_detail.png

6.31 KB | W: | H:

res/img/fm-check_detail.png
res/img/fm-check_detail.png
res/img/fm-check_detail.png
res/img/fm-check_detail.png
  • 2-up
  • Swipe
  • Onion skin
res/img/fm-check_detail_onclick.png

4.17 KB | W: | H:

res/img/fm-check_detail_onclick.png

9.89 KB | W: | H:

res/img/fm-check_detail_onclick.png
res/img/fm-check_detail_onclick.png
res/img/fm-check_detail_onclick.png
res/img/fm-check_detail_onclick.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#define VER_MINOR 1 #define VER_MINOR 1
#define VER_REVISION 0 #define VER_REVISION 0
#define VER_BUILD 21 #define VER_BUILD 22
//! Convert version numbers to string //! Convert version numbers to string
#define _STR(S) #S #define _STR(S) #S
......
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