Browse Source

feature: customer service system

tokumeikoi 4 years ago
parent
commit
b740998760

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

@@ -110,7 +110,9 @@ class ConfigController extends Controller
                     'frontend_theme_header' => config('v2board.frontend_theme_header', 'dark'),
                     'frontend_theme_color' => config('v2board.frontend_theme_color', 'default'),
                     'frontend_background_url' => config('v2board.frontend_background_url'),
-                    'frontend_admin_path' => config('v2board.frontend_admin_path', 'admin')
+                    'frontend_admin_path' => config('v2board.frontend_admin_path', 'admin'),
+                    'frontend_customer_service_method' => config('v2board.frontend_customer_service_method', 0),
+                    'frontend_customer_service_id' => config('v2board.frontend_customer_service_id'),
                 ],
                 'server' => [
                     'server_token' => config('v2board.server_token'),

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

@@ -87,6 +87,8 @@ class ConfigSave extends FormRequest
             'frontend_theme_color' => 'in:default,darkblue,black',
             'frontend_background_url' => 'nullable|url',
             'frontend_admin_path' => '',
+            'frontend_customer_service_method' => '',
+            'frontend_customer_service_id' => '',
             // tutorial
             'apple_id' => 'nullable|email',
             'apple_id_password' => '',

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/assets/user/components.async.js


+ 3 - 1
public/assets/user/env.example.js

@@ -12,5 +12,7 @@ window.settings = {
     color: 'default'
   },
   // 背景
-  background_url: ''
+  background_url: '',
+  // crisp
+  crisp_id: ''
 }

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


File diff suppressed because it is too large
+ 0 - 0
public/assets/user/vendors.async.js


+ 2 - 1
resources/views/app.blade.php

@@ -20,7 +20,8 @@
             },
             verison: '{{$verison}}',
             background_url: '{{$backgroun_url}}',
-            description: '{{$description}}'
+            description: '{{$description}}',
+            crisp_id: '{{$crisp_id}}'
         }
     </script>
 </head>

+ 2 - 1
routes/web.php

@@ -26,7 +26,8 @@ Route::get('/', function (Request $request) {
         'theme_color' => config('v2board.frontend_theme_color', 'default'),
         'backgroun_url' => config('v2board.frontend_background_url'),
         'verison' => config('app.version'),
-        'description' => config('v2board.app_description', 'V2Board is best')
+        'description' => config('v2board.app_description', 'V2Board is best'),
+        'crisp_id' => config('v2board.frontend_customer_service_method') === 'crisp' ? config('v2board.frontend_customer_service_id') : ''
     ]);
 });
 

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