Skip to content

Commit

Permalink
修改tg bot绑定方式为发送绑定码
Browse files Browse the repository at this point in the history
  • Loading branch information
Malio committed Apr 3, 2020
1 parent 69fedbc commit 493d023
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ public function registerHandle($request, $response)
$user->ref_by = 0;
if (($c != null) && $c->user_id != 0) {
$gift_user = User::where('id', '=', $c->user_id)->first();
if ($gift_user->invite_num > 0) {
if ($gift_user->invite_num != 0) {
$user->ref_by = $c->user_id;
$user->money = Config::get('invite_get_money');
$gift_user->transfer_enable += Config::get('invite_gift') * 1024 * 1024 * 1024;
Expand Down
4 changes: 2 additions & 2 deletions config/.i18n.example.php
Original file line number Diff line number Diff line change
Expand Up @@ -1217,8 +1217,8 @@
'zh-cn' => '立即绑定'
);
$I18N['telegram-modal-desc'] = array(
'en' => 'Copy or take a screenshot of this QR Code and send to the Telegram Bot <a href="https://t.me/$1" target="blank">@$1</a>',
'zh-cn' => '将下面的二维码复制或截图发送给 Telegram 机器人 <a href="https://t.me/$1" target="blank">@$1</a>'
'en' => 'Copy this bind code and send to the Telegram Bot <a href="https://t.me/$1" target="blank">@$1</a>',
'zh-cn' => '将下面的绑定码复制发送给 Telegram 机器人 <a href="https://t.me/$1" target="blank">@$1</a>'
);
$I18N['connect-to-another-account'] = array(
'en' => 'Connect to a new account',
Expand Down
7 changes: 1 addition & 6 deletions resources/views/malio/user/profile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -231,19 +231,14 @@
</div>
<div class="modal-body">
<p>{$i18n->get('telegram-modal-desc',[$telegram_bot])}</p>
<div id="telegram-qr" style="text-align: center"></div>
<h2 style="text-align: center"><code>{$bind_token}</code></h2>
</div>
<div class="modal-footer bg-whitesmoke br">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{$i18n->get('cancel')}</button>
</div>
</div>
</div>
</div>
<script>
jQuery('#telegram-qr').qrcode({
"text": 'mod://bind/{$bind_token}'
});
</script>
{/if}

{if $malio_config['enable_2fa'] == true}
Expand Down

0 comments on commit 493d023

Please sign in to comment.