fix
This commit is contained in:
@ -3,6 +3,8 @@
|
||||
namespace app\modules\tgbot\controllers;
|
||||
|
||||
use app\modules\tgbot\models\Tgbot;
|
||||
use kernel\app_modules\tag\service\TagService;
|
||||
use kernel\modules\post\models\Post;
|
||||
|
||||
class TgBotRestController extends \kernel\app_modules\tgbot\controllers\TgBotRestController
|
||||
{
|
||||
@ -12,9 +14,15 @@ class TgBotRestController extends \kernel\app_modules\tgbot\controllers\TgBotRes
|
||||
$dialog = Tgbot::where("dialog_id", $id)->first();
|
||||
if ($dialog){
|
||||
$this->renderApi([
|
||||
'html' => '<a class="btn btn-primary" href="/miniapp/scan">Сканировать</a>',
|
||||
'html' => '<a class="btn btn-primary" href="/miniapp/scanner">Сканировать</a>',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function actionGetNews(): void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -3,7 +3,9 @@
|
||||
namespace app\modules\tgbot\controllers;
|
||||
|
||||
use app\modules\tgbot\models\Tgbot;
|
||||
use app\modules\tgbot\services\TgBotService;
|
||||
use Cassandra\Decimal;
|
||||
use kernel\app_modules\card\models\Card;
|
||||
use kernel\app_modules\tag\service\TagService;
|
||||
use kernel\Controller;
|
||||
use kernel\helpers\Debug;
|
||||
@ -40,4 +42,16 @@ class TgMainController extends Controller
|
||||
$this->cgView->render("news.php", ['news' => $news]);
|
||||
}
|
||||
|
||||
public function actionScanner(): void
|
||||
{
|
||||
$this->cgView->render("scanner.php");
|
||||
}
|
||||
|
||||
public function actionCardAction(int $cardId): void
|
||||
{
|
||||
$card = Card::where("id", $cardId)->first();
|
||||
|
||||
$this->cgView->render("card_action.php", ['card' => $card]);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user