mirror of
https://github.com/v2board/v2board.git
synced 2024-11-13 02:59:10 +08:00
update: order service
This commit is contained in:
parent
4c9a38f722
commit
9ff76dedd7
@ -120,6 +120,7 @@ class OrderService
|
|||||||
if ($user->invite_user_id && ($order->total_amount <= 0)) return;
|
if ($user->invite_user_id && ($order->total_amount <= 0)) return;
|
||||||
$order->invite_user_id = $user->invite_user_id;
|
$order->invite_user_id = $user->invite_user_id;
|
||||||
$inviter = User::find($user->invite_user_id);
|
$inviter = User::find($user->invite_user_id);
|
||||||
|
if (!$inviter) return;
|
||||||
$isCommission = false;
|
$isCommission = false;
|
||||||
switch ((int)$inviter->commission_type) {
|
switch ((int)$inviter->commission_type) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -134,7 +135,7 @@ class OrderService
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($isCommission) return;
|
if (!$isCommission) return;
|
||||||
if ($inviter && $inviter->commission_rate) {
|
if ($inviter && $inviter->commission_rate) {
|
||||||
$order->commission_balance = $order->total_amount * ($inviter->commission_rate / 100);
|
$order->commission_balance = $order->total_amount * ($inviter->commission_rate / 100);
|
||||||
} else {
|
} else {
|
||||||
|
10
public/theme/v2board/assets/env.example.js
vendored
10
public/theme/v2board/assets/env.example.js
vendored
@ -14,5 +14,13 @@ window.settings = {
|
|||||||
// 背景
|
// 背景
|
||||||
background_url: '',
|
background_url: '',
|
||||||
// crisp
|
// crisp
|
||||||
crisp_id: ''
|
crisp_id: '',
|
||||||
|
i18n: [
|
||||||
|
'zh-CN',
|
||||||
|
'en-US',
|
||||||
|
'ja-JP',
|
||||||
|
'vi-VN',
|
||||||
|
'ko-KR',
|
||||||
|
'zh-TW'
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user