Browse Source

update: add custom currency

tokumeikoi 3 years ago
parent
commit
7b1a8ee5ff

+ 3 - 1
app/Http/Controllers/Admin/ConfigController.php

@@ -102,7 +102,9 @@ class ConfigController extends Controller
                     'recaptcha_enable' => (int)config('v2board.recaptcha_enable', 0),
                     'recaptcha_key' => config('v2board.recaptcha_key'),
                     'recaptcha_site_key' => config('v2board.recaptcha_site_key'),
-                    'tos_url' => config('v2board.tos_url')
+                    'tos_url' => config('v2board.tos_url'),
+                    'currency' => config('v2board.currency', 'CNY'),
+                    'currency_symbol' => config('v2board.currency_symbol', '¥')
                 ],
                 'subscribe' => [
                     'plan_change_enable' => (int)config('v2board.plan_change_enable', 1),

+ 3 - 1
app/Http/Controllers/User/CommController.php

@@ -16,7 +16,9 @@ class CommController extends Controller
                 'is_telegram' => (int)config('v2board.telegram_bot_enable', 0),
                 'stripe_pk' => config('v2board.stripe_pk_live'),
                 'withdraw_methods' => config('v2board.commission_withdraw_method', Dict::WITHDRAW_METHOD_WHITELIST_DEFAULT),
-                'withdraw_close' => (int)config('v2board.withdraw_close_enable', 0)
+                'withdraw_close' => (int)config('v2board.withdraw_close_enable', 0),
+                'currency' => config('v2board.currency', 'CNY'),
+                'currency_symbol' => config('v2board.currency_symbol', '¥')
             ]
         ]);
     }

+ 2 - 0
app/Http/Requests/Admin/ConfigSave.php

@@ -46,6 +46,8 @@ class ConfigSave extends FormRequest
             'recaptcha_key' => '',
             'recaptcha_site_key' => '',
             'tos_url' => 'nullable|url',
+            'currency' => '',
+            'currency_symbol' => '',
             // subscribe
             'plan_change_enable' => 'in:0,1',
             'reset_traffic_method' => 'in:0,1,2',

File diff suppressed because it is too large
+ 0 - 0
public/assets/admin/umi.js


File diff suppressed because it is too large
+ 0 - 0
public/theme/v2board/assets/umi.js


Some files were not shown because too many files changed in this diff