From 40369fb51585dcf86f21337510b86ce17ec8fa68 Mon Sep 17 00:00:00 2001 From: Kavalar Date: Sun, 5 Jan 2025 17:23:49 +0300 Subject: [PATCH] card page --- .gitignore | 3 +- app/modules/tgbot/views/tgbot/layout/main.php | 24 ++---- app/modules/tgbot/views/tgbot/main/index.php | 4 +- .../app_modules/card/services/CardService.php | 4 +- .../tgbot/controllers/TgBotRestController.php | 34 ++++++-- kernel/app_modules/tgbot/routs/tgbot.php | 1 + .../app_modules/tgbot/views/tgbot/index.php | 2 +- kernel/modules/user/service/UserService.php | 6 +- resources/main/css/tgApp.css | 7 ++ resources/main/images/l.gif | Bin 0 -> 38629 bytes resources/main/js/tg.js | 12 ++- resources/main/js/tg_app/TgApp.js | 78 ++++++++++++++++++ resources/main/js/tg_app/config.js | 6 ++ 13 files changed, 145 insertions(+), 36 deletions(-) create mode 100644 resources/main/css/tgApp.css create mode 100644 resources/main/images/l.gif create mode 100644 resources/main/js/tg_app/TgApp.js create mode 100644 resources/main/js/tg_app/config.js diff --git a/.gitignore b/.gitignore index 6595dc0..59972f8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ views_cache resources/upload resources/tmp resources/cards -composer.lock \ No newline at end of file +composer.lock +resources/main/js/tg_app/config_local.js \ No newline at end of file diff --git a/app/modules/tgbot/views/tgbot/layout/main.php b/app/modules/tgbot/views/tgbot/layout/main.php index de0d12f..c3c76ed 100644 --- a/app/modules/tgbot/views/tgbot/layout/main.php +++ b/app/modules/tgbot/views/tgbot/layout/main.php @@ -20,6 +20,7 @@ + @@ -40,16 +41,10 @@ @@ -67,20 +62,19 @@ -
-
+ + + + + + - - - - - \ No newline at end of file diff --git a/app/modules/tgbot/views/tgbot/main/index.php b/app/modules/tgbot/views/tgbot/main/index.php index 085dd30..dd3f4eb 100644 --- a/app/modules/tgbot/views/tgbot/main/index.php +++ b/app/modules/tgbot/views/tgbot/main/index.php @@ -1,3 +1 @@ - diff --git a/kernel/app_modules/card/services/CardService.php b/kernel/app_modules/card/services/CardService.php index efb4116..0a613ec 100644 --- a/kernel/app_modules/card/services/CardService.php +++ b/kernel/app_modules/card/services/CardService.php @@ -30,8 +30,8 @@ class CardService $model->info = $form_model->getItem('info') ?? 42; $model->program = $form_model->getItem('program') ?? 74; $model->balance = $form_model->getItem('balance') ?? 0; - $model->cvc = $form_model->getItem('cvc'); - $model->pin = $form_model->getItem('pin'); + $model->cvc = $form_model->getItem('cvc') ?? 101; + $model->pin = $form_model->getItem('pin') ?? 1111; $model->username = $form_model->getItem('username'); $model->card_template_id = $form_model->getItem('card_template_id'); $model->status = $form_model->getItem('status'); diff --git a/kernel/app_modules/tgbot/controllers/TgBotRestController.php b/kernel/app_modules/tgbot/controllers/TgBotRestController.php index 139e376..e3ed85b 100644 --- a/kernel/app_modules/tgbot/controllers/TgBotRestController.php +++ b/kernel/app_modules/tgbot/controllers/TgBotRestController.php @@ -4,6 +4,7 @@ namespace kernel\app_modules\tgbot\controllers; use app\modules\tgbot\models\Tgbot; use JetBrains\PhpStorm\NoReturn; +use kernel\app_modules\card\models\Card; use kernel\app_modules\card\models\forms\CreateCardForm; use kernel\app_modules\card\services\CardService; use kernel\helpers\Debug; @@ -28,8 +29,8 @@ class TgBotRestController extends RestController $tgBot = $this->model->where("bot_id", $data['bot_id'])->where("dialog_id", $data['dialog_id'])->first(); - if (!$tgBot){ - foreach ($this->model->getFillable() as $item){ + if (!$tgBot) { + foreach ($this->model->getFillable() as $item) { $this->model->{$item} = $data[$item] ?? null; } @@ -49,12 +50,21 @@ class TgBotRestController extends RestController $this->model->save(); - $resArr = $tgBot->toArray(); - $resArr['has_card'] = CardService::userHasCard($resArr['user_id']); + $resArr = $this->model->toArray(); + + $cardService = new CardService(); + $cardForm = new CreateCardForm(); + $cardForm->load([ + 'user_id' => $user->id, + 'username' => $username, + 'card_template_id' => 105545, + 'status' => 1, + ]); + $cardService->create($cardForm); + $this->renderApi($resArr); } $resArr = $tgBot->toArray(); - $resArr['has_card'] = CardService::userHasCard($resArr['user_id']); $this->renderApi($resArr); } @@ -74,7 +84,7 @@ class TgBotRestController extends RestController $form->setItem('pin', 1111); $form->setItem('status', 1); - if ($form->validate()){ + if ($form->validate()) { $model = $cardService->create($form); $this->renderApi($model->load(['cardFile'])->toArray()); @@ -92,4 +102,16 @@ class TgBotRestController extends RestController $this->renderApi([]); } + #[NoReturn] public function actionGetCardByDialog(int $dialog_id, int $bot_id): void + { + $model = \kernel\app_modules\tgbot\models\Tgbot::where(['dialog_id' => $dialog_id, 'bot_id' => $bot_id])->first(); + if ($model) { + $card = Card::where("user_id", $model->user_id)->first(); + if ($card) { + $this->renderApi($card->load('cardFile')->toArray()); + } + } + $this->renderApi([]); + } + } \ No newline at end of file diff --git a/kernel/app_modules/tgbot/routs/tgbot.php b/kernel/app_modules/tgbot/routs/tgbot.php index 020f712..30f8959 100644 --- a/kernel/app_modules/tgbot/routs/tgbot.php +++ b/kernel/app_modules/tgbot/routs/tgbot.php @@ -30,4 +30,5 @@ App::$collector->group(["prefix" => "api"], function (CgRouteCollector $router){ $router->post('/tg-bot/create-card', [\app\modules\tgbot\controllers\TgBotRestController::class, 'actionCreateCard']); $router->get('/tg-bot/get-by-dialog/{dialog_id}/{bot_id}', [\app\modules\tgbot\controllers\TgBotRestController::class, 'actionGetByDialog']); }); + $router->get('/tg-bot/get-card-by-dialog/{dialog_id}/{bot_id}', [\app\modules\tgbot\controllers\TgBotRestController::class, 'actionGetCardByDialog']); }); \ No newline at end of file diff --git a/kernel/app_modules/tgbot/views/tgbot/index.php b/kernel/app_modules/tgbot/views/tgbot/index.php index 35249ca..446765b 100644 --- a/kernel/app_modules/tgbot/views/tgbot/index.php +++ b/kernel/app_modules/tgbot/views/tgbot/index.php @@ -31,7 +31,7 @@ $table->beforePrint(function () { $table->columns([ "status" => [ "value" => function ($cell) { - return \app\modules\tgbot\models\Tgbot::getStatus()[$cell]; + return \app\modules\tgbot\models\Tgbot::getStatus()[$cell] ?? 0; } ], "username" => [ diff --git a/kernel/modules/user/service/UserService.php b/kernel/modules/user/service/UserService.php index 9915c2a..ebb26bc 100644 --- a/kernel/modules/user/service/UserService.php +++ b/kernel/modules/user/service/UserService.php @@ -11,7 +11,11 @@ class UserService public function create(FormModel $form_model): false|User { - $model = new User(); + $model = User::where("username", $form_model->getItem('username'))->first(); + if ($model){ + return $model; + } + $model = new User(); $model->username = $form_model->getItem('username'); $model->email = $form_model->getItem('email'); $model->password_hash = password_hash($form_model->getItem('password'), PASSWORD_DEFAULT); diff --git a/resources/main/css/tgApp.css b/resources/main/css/tgApp.css new file mode 100644 index 0000000..bf0e104 --- /dev/null +++ b/resources/main/css/tgApp.css @@ -0,0 +1,7 @@ +#cardBox { + text-align: center; +} + +.card { + margin-bottom: 10px; +} \ No newline at end of file diff --git a/resources/main/images/l.gif b/resources/main/images/l.gif new file mode 100644 index 0000000000000000000000000000000000000000..f236150146ef7a106a4ac41856472d811f4bd9c2 GIT binary patch literal 38629 zcmdSAd0bNI`~QD9?BIfk=I#Lj!4>x^xuBU@ zV`gRR;F6+Qqh@7gMP_B&j5XC*Q~9HLZ=c`e@%?<~@9+5sINZy*;pWNfx?a~=7U1XZ z5z7YHz;g}|5f%|27ay}GCMYn7$K~1B*-+_J6EhPpPp|mIc#=Np>zA(@S{euxVsrXt zXGdpeSLe;Cn?Jn&fB+F6K7H_7>O~@wG;kVOnOSdMy?OKNo0;b`Gt)D*M`|x$yj)UL zQc_w{QC=YtNpg4P%3I`F+p|oJO!|BK`v>~FI=e=OMGKi+_T%;~cwGXZk3bG6;*;N%XudDuC)c(^+{+dz&i z2UmNRhrNTdEz7}^<>AS4fc|w*)U##ACwhkQ{QfnU`qdIja#mJ`r@j4-9XsrHIN5E< zOtN?I@bIu_Iodlq+NxXFZrhoj6`Nz5zRlv_Bk&ToZOlx`$V%Cg4*eK0Hf~FH))I>P zO8>cpw2c1@o4(ENujSZn+>&OW6Psc0V8{Bgq<=RI4*tJ4O-uVv>up(K3IDy`|Kq^h zB6emZ*o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}{P`L}2WO54(b-AgbutNipRwjwpZHEkr$VQUS|D1Bu&nvzB zNiCba?>w&mfNn&D^U>@eJ_yr~OG-pstdi|!S24r#lz4WiH!*H0g%>}l zB1MG{oTa;hT|NQV?{9nWa(1@dDLwtH{AEnmHcDZ~cfhk@ZR_cm5v1GUe}L(AA&Yqc zFeRWflloR(VT)V0Ban{HgEj*Mt;dEHc>+0&-k76qt6;Q$t=Wga8BQkjkj;6v!EW{0GrL5nyns5#5=Je*p*U&c z>0^{8L0`Jx`YnHv7Cb6-#ROw-ZFjjmF^ZR7c}(0ZQw=B_<4gwox#G1t1tH!r&GA3c z1|Q{Xg>@BFunv6zCkCaa>By$qd2sbi#R)wVWc8(tLS3cON`M;hR)q<|MADOzAOL_E zxM2|L`IE0*g)Xw9a!I|r6PDzD360Pw6d?S_glYxN#9}jYbZlWTGzhu0ozish+j`=^ z-HwkURJqlIz`S5TaO@4GqoxHrC4*nsSPSK~q&xf=>>j96%`ivvvM*HIXp>Z|K#}3 zx=cS3vr=*K+VHzRoF-Ds6Z(Dpei05d;v*1=&_C146&JnnztQl{KHqgfl-;y=Ws>aTT z`_i-NA{B+UNhM~b40`gKL?(>@5t$H1G;YG$y*04ivc3&k@Ul`_-RMlq78EA zCLTzZ0@Q1w076Pk@JT&H$ua=q6Xhg;tF6N=FbrI{7#4!Ak!^s?oY0uF1WhAzRC-+2EWK`}wdvL?izT{2cqS literal 0 HcmV?d00001 diff --git a/resources/main/js/tg.js b/resources/main/js/tg.js index 35b2de0..9db6bd0 100644 --- a/resources/main/js/tg.js +++ b/resources/main/js/tg.js @@ -1,9 +1,7 @@ -document.addEventListener("DOMContentLoaded", () => { - let tg = window.Telegram.WebAppUser; - let username_tag = document.getElementById("username_tag") - let user_id_tag = document.getElementById("user_id_tag") - username_tag.innerHTML = tg.initDataUnsafe.user.username; - user_id_tag.innerHTML = "tg.initDataUnsafe.user.id"; - console.log(123) +import {TgApp} from "./tg_app/TgApp.js"; +document.addEventListener("DOMContentLoaded", () => { + let tg = window.Telegram.WebApp; + let tgApp = new TgApp("tg_app", tg.initDataUnsafe.user.id); + }); \ No newline at end of file diff --git a/resources/main/js/tg_app/TgApp.js b/resources/main/js/tg_app/TgApp.js new file mode 100644 index 0000000..22daa15 --- /dev/null +++ b/resources/main/js/tg_app/TgApp.js @@ -0,0 +1,78 @@ +import config from "./config_local.js"; + +class TgApp { + constructor(containerId, userId) { + this.container = document.getElementById(containerId); + this.createCardBox(); + this.createDefaultBox(); + this.userId = userId; + this.getCard(); + } + + setUserId(userId){ + this.userId = userId; + } + + createCardBox() { + this.cardBox = document.createElement("div"); + this.cardBox.setAttribute("id", "cardBox"); + + this.cardBox.innerHTML = templates.preloader(); + + this.container.appendChild(this.cardBox); + } + + createDefaultBox() { + this.defaultBox = document.createElement("div"); + this.defaultBox.setAttribute("id", "defaultBox"); + + this.defaultBox.innerHTML = templates.defaultBox(); + + this.container.appendChild(this.defaultBox); + } + + getCard(){ + let botId = config.config.botId; + fetch(config.config.apiUrl + `api/tg-bot/get-card-by-dialog/${this.userId}/${botId}`, { + method: 'GET', // Здесь так же могут быть GET, PUT, DELETE + headers: { + // Добавляем необходимые заголовки + 'Content-type': 'application/json; charset=UTF-8', + }, + }) + .then((response) => response.json()) + .then((data) => { + this.cardBox.innerHTML = templates.cardBox(data.card_file.file, data.balance) + // {title: "foo", body: "bar", userId: 1, id: 101} + }) + } + +} + +const templates = + { + preloader: () => { + return ''; + }, + defaultBox: () => { + return ``; + }, + cardBox: (cardUrl, balance) => { + return `
+ +
+
Баланс: ${balance}
+
+
`; + } + } + +export {TgApp} + diff --git a/resources/main/js/tg_app/config.js b/resources/main/js/tg_app/config.js new file mode 100644 index 0000000..29d8851 --- /dev/null +++ b/resources/main/js/tg_app/config.js @@ -0,0 +1,6 @@ +const config = { + botId: 6911686987, + apiUrl: 'https://6b7b-185-5-38-195.ngrok-free.app/', +} + +export default {config} \ No newline at end of file