批零微信支付开关
parent
7b7f998645
commit
a466084488
|
|
@ -38,6 +38,8 @@ class Dealer extends Form
|
|||
*/
|
||||
public function form()
|
||||
{
|
||||
$this->switch('wxpay_switch', '微信支付');
|
||||
$this->currency('fee_rate', '手续费比例(百分比)')->symbol('%');
|
||||
$this->currency('fee_rate', '手续费比例(百分比)')->symbol('%');
|
||||
$this->number('withdraw_threshold_amount', '起提金额(元)');
|
||||
$this->currency('withdraw_fee_rate', '提现费率')->symbol('%');
|
||||
|
|
@ -137,6 +139,7 @@ class Dealer extends Form
|
|||
{
|
||||
$dealerSettings = (array) Setting::where('key', 'dealer')->value('value');
|
||||
return [
|
||||
'wxpay_switch'=> $dealerSettings['wxpay_switch'] ?? 1,
|
||||
'fee_rate'=> $dealerSettings['fee_rate'] ?? '',
|
||||
'withdraw_threshold_amount'=> $dealerSettings['withdraw_threshold_amount'] ?? 0,
|
||||
'withdraw_fee_rate'=> $dealerSettings['withdraw_fee_rate'] ?? 0,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace App\Endpoint\Api\Http\Controllers\Dealer;
|
||||
|
||||
use App\Endpoint\Api\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ConfigurationController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
{
|
||||
return response()->json([
|
||||
'wxpay_switch' => app_settings('dealer.wxpay_switch', 0),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -211,6 +211,8 @@ Route::group([
|
|||
});
|
||||
|
||||
|
||||
// 批零配置
|
||||
Route::get('dealer/configurations', [Dealer\ConfigurationController::class, 'index']);
|
||||
//商品列表
|
||||
Route::get('/dealer/products', [Dealer\ProductController::class, 'index']);
|
||||
//商品详情
|
||||
|
|
|
|||
Loading…
Reference in New Issue