diff --git a/app/Admin/Forms/Settings/Kuaidi100.php b/app/Admin/Forms/Settings/Kuaidi100.php index 56cac6c7..ed801b99 100644 --- a/app/Admin/Forms/Settings/Kuaidi100.php +++ b/app/Admin/Forms/Settings/Kuaidi100.php @@ -4,7 +4,6 @@ namespace App\Admin\Forms\Settings; use App\Models\Setting; use Dcat\Admin\Widgets\Form; -use Illuminate\Support\Arr; class Kuaidi100 extends Form { @@ -32,14 +31,14 @@ class Kuaidi100 extends Form */ public function form() { - $appSettings = Setting::where('key', 'kuaidi100')->first(); + $appSettings = Setting::where('key', 'kuaidi100')->value('value'); - $this->switch('is_use', '是否启用')->value(Arr::get($appSettings?->value, 'is_use', 0)); + $this->switch('is_use', '是否启用')->value($appSettings['is_use'] ?? 0); $this->divider(); - $this->text('app_key', 'APP_KEY')->value(Arr::get($appSettings?->value, 'app_key', '')); - $this->text('customer', 'CUSTOMER')->value(Arr::get($appSettings?->value, 'customer', '')); - $this->text('secret', 'SECRET')->value(Arr::get($appSettings?->value, 'secret', '')); - $this->text('userid', 'USER_ID')->value(Arr::get($appSettings?->value, 'userid', '')); - $this->text('callback_uri', '回调地址(链接)')->value(Arr::get($appSettings?->value, 'callback_uri', '')); + $this->text('app_key', 'APP_KEY')->value($appSettings['app_key'] ?? ''); + $this->text('customer', 'CUSTOMER')->value($appSettings['customer'] ?? ''); + $this->text('secret', 'SECRET')->value($appSettings['secret'] ?? ''); + $this->text('userid', 'USER_ID')->value($appSettings['userid'] ?? ''); + $this->text('callback_uri', '回调地址(链接)')->value($appSettings['callback_uri'] ?? ''); } } diff --git a/app/Admin/Forms/Settings/Unipush.php b/app/Admin/Forms/Settings/Unipush.php index 6f8ea0f8..0657a5b3 100644 --- a/app/Admin/Forms/Settings/Unipush.php +++ b/app/Admin/Forms/Settings/Unipush.php @@ -4,7 +4,6 @@ namespace App\Admin\Forms\Settings; use App\Models\Setting; use Dcat\Admin\Widgets\Form; -use Illuminate\Support\Arr; class Unipush extends Form { @@ -32,19 +31,19 @@ class Unipush extends Form */ public function form() { - $appSettings = Setting::where('key', 'unipush')->first(); + $appSettings = Setting::where('key', 'unipush')->value('value'); - $this->switch('is_use', '是否启用')->value(Arr::get($appSettings?->value, 'is_use', 0)); - $this->text('mall_app_id', '商城APP_ID')->value(Arr::get($appSettings?->value, 'mall_app_id', '')); - $this->text('mall_app_key', '商城APP_KEY')->value(Arr::get($appSettings?->value, 'mall_app_key', '')); - $this->text('mall_app_secret', '商城APP_SECRET')->value(Arr::get($appSettings?->value, 'mall_app_secret', '')); - $this->text('mall_master_secret', '商城APP_MASTER_SECRET')->value(Arr::get($appSettings?->value, 'mall_master_secret', '')); + $this->switch('is_use', '是否启用')->value($appSettings['is_use'] ?? 0); + $this->text('mall_app_id', '商城APP_ID')->value($appSettings['mall_app_id'] ?? ''); + $this->text('mall_app_key', '商城APP_KEY')->value($appSettings['mall_app_id'] ?? ''); + $this->text('mall_app_secret', '商城APP_SECRET')->value($appSettings['mall_app_id'] ?? ''); + $this->text('mall_master_secret', '商城APP_MASTER_SECRET')->value($appSettings['mall_app_id'] ?? ''); $this->divider(); - $this->switch('merchant_is_use', '是否启用')->value(Arr::get($appSettings?->value, 'merchant_is_use', 0)); - $this->text('merchant_app_id', '商户APP_ID')->value(Arr::get($appSettings?->value, 'merchant_app_id', '')); - $this->text('merchant_app_key', '商户APP_KEY')->value(Arr::get($appSettings?->value, 'merchant_app_key', '')); - $this->text('merchant_app_secret', '商户APP_SECRET')->value(Arr::get($appSettings?->value, 'merchant_app_secret', '')); - $this->text('merchant_master_secret', '商户APP_MASTER_SECRET')->value(Arr::get($appSettings?->value, 'merchant_master_secret', '')); + $this->switch('merchant_is_use', '是否启用')->value($appSettings['merchant_is_use'] ?? 0); + $this->text('merchant_app_id', '商户APP_ID')->value($appSettings['merchant_app_id'] ?? ''); + $this->text('merchant_app_key', '商户APP_KEY')->value($appSettings['merchant_app_key'] ?? ''); + $this->text('merchant_app_secret', '商户APP_SECRET')->value($appSettings['merchant_app_secret'] ?? ''); + $this->text('merchant_master_secret', '商户APP_MASTER_SECRET')->value($appSettings['merchant_master_secret'] ?? ''); } } diff --git a/app/Models/ProductSku.php b/app/Models/ProductSku.php index 07c50f12..24ca9482 100644 --- a/app/Models/ProductSku.php +++ b/app/Models/ProductSku.php @@ -48,7 +48,8 @@ class ProductSku extends Model 'name', 'subtitle', 'category_id', - 'codcovere', + 'cover', + 'description', 'images', 'sell_price', 'market_price', @@ -63,6 +64,8 @@ class ProductSku extends Model 'sales', 'release_at', 'sales_value', + 'buynote_id', + 'verify_state', ]; /**