mirror of
https://github.com/v2board/v2board.git
synced 2025-01-11 00:29:09 +08:00
update: subscribe url random
This commit is contained in:
parent
4722379e79
commit
04615688f7
@ -28,7 +28,11 @@ class KnowledgeController extends Controller
|
|||||||
$appleIdPassword = __('No active subscription. Unable to use our provided Apple ID');
|
$appleIdPassword = __('No active subscription. Unable to use our provided Apple ID');
|
||||||
$this->formatAccessData($knowledge['body']);
|
$this->formatAccessData($knowledge['body']);
|
||||||
}
|
}
|
||||||
$subscribeUrl = config('v2board.subscribe_url', config('v2board.app_url', env('APP_URL'))) . '/api/v1/client/subscribe?token=' . $user['token'];
|
$subscribeUrl = config('v2board.app_url', env('APP_URL'));
|
||||||
|
$subscribeUrls = explode(',', config('v2board.subscribe_url'));
|
||||||
|
if ($subscribeUrls) {
|
||||||
|
$subscribeUrl = $subscribeUrls[rand(0, count($subscribeUrls) - 1)];
|
||||||
|
}
|
||||||
$knowledge['body'] = str_replace('{{siteName}}', config('v2board.app_name', 'V2Board'), $knowledge['body']);
|
$knowledge['body'] = str_replace('{{siteName}}', config('v2board.app_name', 'V2Board'), $knowledge['body']);
|
||||||
$knowledge['body'] = str_replace('{{appleId}}', $appleId, $knowledge['body']);
|
$knowledge['body'] = str_replace('{{appleId}}', $appleId, $knowledge['body']);
|
||||||
$knowledge['body'] = str_replace('{{appleIdPassword}}', $appleIdPassword, $knowledge['body']);
|
$knowledge['body'] = str_replace('{{appleIdPassword}}', $appleIdPassword, $knowledge['body']);
|
||||||
|
@ -118,7 +118,12 @@ class UserController extends Controller
|
|||||||
abort(500, __('Subscription plan does not exist'));
|
abort(500, __('Subscription plan does not exist'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$user['subscribe_url'] = config('v2board.subscribe_url', config('v2board.app_url', env('APP_URL'))) . '/api/v1/client/subscribe?token=' . $user['token'];
|
$subscribeUrl = config('v2board.app_url', env('APP_URL'));
|
||||||
|
$subscribeUrls = explode(',', config('v2board.subscribe_url'));
|
||||||
|
if ($subscribeUrls) {
|
||||||
|
$subscribeUrl = $subscribeUrls[rand(0, count($subscribeUrls) - 1)];
|
||||||
|
}
|
||||||
|
$user['subscribe_url'] = "{$subscribeUrl}/api/v1/client/subscribe?token={$user['token']}";
|
||||||
$user['reset_day'] = $this->getResetDay($user);
|
$user['reset_day'] = $this->getResetDay($user);
|
||||||
return response([
|
return response([
|
||||||
'data' => $user
|
'data' => $user
|
||||||
|
@ -31,7 +31,7 @@ class ConfigSave extends FormRequest
|
|||||||
'app_name' => '',
|
'app_name' => '',
|
||||||
'app_description' => '',
|
'app_description' => '',
|
||||||
'app_url' => 'nullable|url',
|
'app_url' => 'nullable|url',
|
||||||
'subscribe_url' => 'nullable|url',
|
'subscribe_url' => 'nullable',
|
||||||
'try_out_enable' => 'in:0,1',
|
'try_out_enable' => 'in:0,1',
|
||||||
'try_out_plan_id' => 'integer',
|
'try_out_plan_id' => 'integer',
|
||||||
'try_out_hour' => 'numeric',
|
'try_out_hour' => 'numeric',
|
||||||
|
2
public/assets/admin/umi.js
vendored
2
public/assets/admin/umi.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user